guoshilong
2023-11-07 2975f434373e340f9f099805c6f311434e4c3725
出租房管理数据统计
4 files modified
239 ■■■■■ changed files
api/houseRental/houseRental.js 22 ●●●●● patch | view | raw | blame | history
common/setting.js 7 ●●●●● patch | view | raw | blame | history
pages.json 29 ●●●●● patch | view | raw | blame | history
subPackage/workbench/views/rental.vue 181 ●●●●● patch | view | raw | blame | history
api/houseRental/houseRental.js
@@ -44,4 +44,26 @@
        },
        data
    })
}
//获取统计数据
export const getStatistics = (params) => {
    return http.request({
        url: 'blade-houseRental/houseRental/getStatistics',
        method: 'GET',
        params: {
            ...params
        }
    })
}
//获取统计数据
export const getPage = (params) => {
    return http.request({
        url: 'blade-houseRental/houseRental/page',
        method: 'GET',
        params: {
            ...params
        }
    })
}
common/setting.js
@@ -11,8 +11,9 @@
    // 开发环境接口Url
    // devUrl: 'https://sk.hubeishuiyi.cn',
    // devUrl: 'http://192.168.1.156:9528',
    devUrl:'http://192.168.1.50:9528',
    minioBaseUrl:"http://60.220.177.113:9000/jczz/",
    // devUrl:'http://192.168.1.50:9528',
    devUrl: 'http://192.168.1.133:9528',
    minioBaseUrl: "http://60.220.177.113:9000/jczz/",
    // 数据中台接口url
    // dataCenterUrl: 'http://10.10.2.192/services',
    dataCenterUrl: 'https://sk.hubeishuiyi.cn/services',
@@ -35,4 +36,4 @@
    // token过期时间(秒)
    // 30天 30*24*60*60
    tokenTime: 2592000,
}
}
pages.json
@@ -70,8 +70,7 @@
        //公告
        {
            "root": "subPackage/notice",
            "pages": [
                {
            "pages": [{
                    "path": "list",
                    "style": {
                        "navigationBarTitleText": "公告",
@@ -89,25 +88,23 @@
                        "navigationBarTextStyle": "black"
                    }
                }
            ]
        },
        //便民热线
        {
            "root": "subPackage/hotLine",
            "pages": [
                {
                    "path": "index",
                    "style": {
                        "navigationBarTitleText": "便民热线",
                        "enablePullDownRefresh": false,
                        "navigationBarBackgroundColor": "#fff",
                        "navigationBarTextStyle": "black"
                    }
            "pages": [{
                "path": "index",
                "style": {
                    "navigationBarTitleText": "便民热线",
                    "enablePullDownRefresh": false,
                    "navigationBarBackgroundColor": "#fff",
                    "navigationBarTextStyle": "black"
                }
            ]
            }]
        },
        //工作台
        {
            "root": "subPackage/workbench",
@@ -139,7 +136,7 @@
                    }
                },
                {
                    "path":"views/audit",
                    "path": "views/audit",
                    "style": {
                        "navigationBarTitleText": "网格任务审核",
                        "enablePullDownRefresh": false,
@@ -322,4 +319,4 @@
            }
        ]
    }
}
}
subPackage/workbench/views/rental.vue
@@ -6,13 +6,14 @@
                    @ed='handleSelect'></chenchuang-CCDropDownFilter>
            </view>
            <view class="search-box">
                <u-search placeholder="请输入租户名" v-model="keyword"  :clearabled="true" :showAction="true"  :animation="true"></u-search>
                <u-search placeholder="请输入租户名" v-model="query.tenantName" :clearabled="true" :showAction="true"
                    :animation="true"></u-search>
            </view>
        </view>
        <view class="content">
            <view class="row flex j-c-s-b a-i-c">
                <view class="row-item bgc-ff flex a-i-c">
            <view class="row flex  a-i-c" style="flex-wrap: wrap;">
                <!--                 <view class="row-item bgc-ff flex a-i-c">
                    <view class="dot bgc-green"></view>
                    <text class="f-24">长期3户 (3)人</text>
                </view>
@@ -23,9 +24,18 @@
                <view class="row-item bgc-ff flex a-i-c">
                    <view class="dot bgc-orange"></view>
                    <text class="f-24">长期3户 (3)人</text>
                </view> -->
                <view v-for="(item,index) in statistics" :key="index" class="row-item bgc-ff flex a-i-c">
                    <view v-if="item.term =='shortTerm' " class="dot bgc-orange"></view>
                    <view v-if="item.term =='middleTerm' " class="dot bgc-main"></view>
                    <view v-if="item.term =='longTerm' " class="dot bgc-green"></view>
                    <text class="f-24">{{formatTerm(item.term)}}{{item.total}}户 ({{item.personNum}})人</text>
                </view>
            </view>
            <view class="list bgc-ff" v-for="i in 3">
                <view class="flex j-c-s-b a-i-c">
                    <view class="flex a-i-c">
@@ -35,18 +45,18 @@
                            <text class="f-28 ml-10">15180114174</text>
                        </view>
                    </view>
                    <u-tag text="未到期"  type="success" plain plainFill></u-tag>
                    <u-tag text="未到期" type="success" plain plainFill></u-tag>
                </view>
                <view class="list-address f-28 c-99">
                    江西省上饶市信州区西市街道万达社区居民委员会滨江西路66号万达晶座11栋303室
                </view>
                <view class="list-action flex ">
                    <view class="action-item">
                        <u-icon name="/static/icon/list-02.png"  width="40rpx"  height="40rpx"></u-icon>
                        <u-icon name="/static/icon/list-02.png" width="40rpx" height="40rpx"></u-icon>
                        <text class="f-28 c-main ml-10">租客管理</text>
                    </view>
                    <view class="action-item">
                        <u-icon name="/static/icon/list-01.png"  width="40rpx"  height="40rpx"></u-icon>
                        <u-icon name="/static/icon/list-01.png" width="40rpx" height="40rpx"></u-icon>
                        <text class="f-28 c-main ml-10">租客管理</text>
                    </view>
                </view>
@@ -57,34 +67,36 @@
</template>
<script>
    import {
        getPage,
        getStatistics
    } from '@/api/houseRental/houseRental';
    export default {
        data() {
            return {
                filterData: [
                    [
                        {
                          name: '全部',
                          value: ''
                    [{
                            name: '全部',
                            value: ''
                        },
                        {
                            name: '待审核',
                            value: '1'
                            value: '0'
                        },
                        {
                            name: '未到期',
                            value: '2'
                            value: '10'
                        },
                        {
                            name: '即将到期',
                            value: '3'
                            value: '20'
                        },
                        {
                            name: '已到期',
                            value: '3'
                            value: '30'
                        }
                    ],
                    [
                        {
                    [{
                            name: '楼层',
                            value: ''
                        },
@@ -103,14 +115,46 @@
                    ]
                ],
                defaultIndex: [0, 0],
                keyword:""
                keyword: "",
                statistics: [],
                query: {
                    teanatName: "",
                },
            }
        },
        computed: {
            formatTerm() {
                return (term => {
                    if (term == 'longTerm') {
                        return "长期"
                    } else if (term == 'middleTerm') {
                        return "中期"
                    } else if (term == 'shortTerm') {
                        return "短期"
                    }
                })
            }
        },
        onLoad() {
            this.getStatistics()
            this.getList()
        },
        methods: {
            handleSelect(res) {
                console.log('选择res = ' + JSON.stringify(res));
            },
            getStatistics() {
                getStatistics().then(res => {
                    console.log(res, "+------------")
                    this.statistics = res.data
                })
            },
            getList() {
                getPage(this.query).then(res => {
                    console.log(res)
                })
            }
        }
    }
</script>
@@ -118,70 +162,85 @@
    page {
        background-color: #F5F5F5;
    }
    .header{
        width:100%;
    .header {
        width: 100%;
        position: fixed;
        top:0;
        left:0;
        top: 0;
        left: 0;
        z-index: 10;
    }
    .filter-box{
        width:100%;
        height:100rpx;
    .filter-box {
        width: 100%;
        height: 100rpx;
    }
    .search-box{
        padding:20rpx 24rpx 30rpx;
    .search-box {
        padding: 20rpx 24rpx 30rpx;
    }
    .content{
        width:100%;
        margin-top:220rpx;
    .content {
        width: 100%;
        margin-top: 220rpx;
        padding: 0 30rpx;
        box-sizing: border-box;
        .row{
            width:100%;
            padding:20rpx 0;
        .row {
            width: 100%;
            padding: 20rpx 0;
        }
        .row-item{
            width:220rpx;
            height:46rpx;
        .row-item {
            width: calc(100% / 3);
            height: 46rpx;
            border-radius: 30rpx;
            padding: 0 20rpx;
            box-sizing: border-box;
        }
        .dot{
            width:10rpx;
            height:10rpx;
        .dot {
            width: 10rpx;
            height: 10rpx;
            border-radius: 50%;
            margin-right:18rpx;
            margin-right: 18rpx;
        }
        .bgc-green{
            background-color:#30D17C;
        .bgc-green {
            background-color: #30D17C;
        }
        .bgc-orange{
            background-color:#FFAC3D;
        .bgc-orange {
            background-color: #FFAC3D;
        }
        .list{
            width:100%;
            padding:30rpx 30rpx 0;
        .list {
            width: 100%;
            padding: 30rpx 30rpx 0;
            box-sizing: border-box;
            margin-bottom:20rpx;
            .list-address{
                padding:30rpx 0;
            margin-bottom: 20rpx;
            .list-address {
                padding: 30rpx 0;
            }
            .list-action{
                padding:22rpx 0 30rpx;
                border-top:1px solid #F5F5F5;
            .list-action {
                padding: 22rpx 0 30rpx;
                border-top: 1px solid #F5F5F5;
            }
            .action-item{
            .action-item {
                display: flex;
                flex:1;
                flex: 1;
                justify-content: center;
            }
            .action-item:first-child{
                border-right:1px solid #DBDBDB;
            .action-item:first-child {
                border-right: 1px solid #DBDBDB;
            }
            .mr-50{
                margin-right:50rpx;
            .mr-50 {
                margin-right: 50rpx;
            }
        }
    }