From a531e8cce9f8d30a2ef9789eb04eb00b73f16a2b Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sat, 06 Jan 2024 16:01:19 +0800
Subject: [PATCH] 数据管理下所有模块对应页面调整:搜索、字段展示; 搜索后,分页切换显示异常BUG

---
 src/views/userHouse/hireInfoList.vue                |  517 +++++++++++++++++++-----------------
 src/views/community/index.vue                       |   28 -
 src/views/userHouse/houseList.vue                   |   40 ++
 src/views/userHouse/components/householdManager.vue |   25 +
 src/views/grid/index.vue                            |   47 ++-
 src/views/place/index.vue                           |  117 +++++---
 src/views/userHouse/houseHoldList.vue               |   18 
 src/views/district/index.vue                        |   26 -
 8 files changed, 456 insertions(+), 362 deletions(-)

diff --git a/src/views/community/index.vue b/src/views/community/index.vue
index 4b197f1..ccb575f 100644
--- a/src/views/community/index.vue
+++ b/src/views/community/index.vue
@@ -33,13 +33,15 @@
             selectionList: [],
             option: {
                 labelWidth: 120,
+                searchLabelWidth: 96,
+                searchShow: true,
+                searchMenuSpan: 3,
+                menuWidth: 210,
+
                 height: "auto",
                 calcHeight: 54,
                 dialogWidth: 950,
                 tip: false,
-                searchShow: true,
-                searchMenuSpan: 3,
-                menuWidth: 280,
                 border: true,
                 //stripe:true,
                 index: true,
@@ -52,7 +54,7 @@
                         overHidden: true,
                         label: "社区名称",
                         prop: "name",
-                        searchSpan: 5,
+                        searchSpan: 4,
                         search: true,
                         span: 12,
                         rules: [
@@ -68,7 +70,7 @@
                         overHidden: true,
                         label: "社区编号",
                         prop: "code",
-                        searchSpan: 5,
+                        searchSpan: 4,
                         search: true,
                         span: 12,
                         rules: [
@@ -333,21 +335,9 @@
             this.onLoad(this.page, this.query)
         },
         onLoad (page, params = {}) {
-            const { dateTime } = this.query
-            let values = {
-                ...params,
-            }
-            if (dateTime) {
-                values = {
-                    ...params,
-                    startTime: dateTime[0],
-                    endTime: dateTime[1],
-                    ...this.query,
-                }
-                values.dateTime = null
-            }
             this.loading = true
-            getList(page.currentPage, page.pageSize, values).then((res) => {
+
+            getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then((res) => {
                 const data = res.data.data
                 this.page.total = data.total
                 this.data = data.records
diff --git a/src/views/district/index.vue b/src/views/district/index.vue
index b7ec598..4bce92b 100644
--- a/src/views/district/index.vue
+++ b/src/views/district/index.vue
@@ -33,13 +33,15 @@
             selectionList: [],
             option: {
                 labelWidth: 120,
+                searchLabelWidth: 96,
+                searchShow: true,
+                searchMenuSpan: 3,
+                menuWidth: 210,
+
                 height: "auto",
                 calcHeight: 54,
                 dialogWidth: 950,
                 tip: false,
-                searchShow: true,
-                searchMenuSpan: 3,
-                menuWidth: 280,
                 border: true,
                 //stripe:true,
                 index: true,
@@ -314,20 +316,11 @@
             this.onLoad(this.page, this.query)
         },
         onLoad (page, params = {}) {
-            const { dateTime, communityCode } = this.query
-            let values = {
-                ...params,
-            }
+            this.loading = true
 
-            if (dateTime) {
-                values = {
-                    ...params,
-                    startTime: dateTime[0],
-                    endTime: dateTime[1],
-                    ...this.query,
-                }
-                values.dateTime = null
-            }
+            let values = Object.assign(params, this.query)
+
+            const { communityCode } = this.query
 
             if (communityCode) {
                 values = {
@@ -338,7 +331,6 @@
                 delete values.communityCode
             }
 
-            this.loading = true
             getList(page.currentPage, page.pageSize, values).then((res) => {
                 const data = res.data.data
                 this.page.total = data.total
diff --git a/src/views/grid/index.vue b/src/views/grid/index.vue
index 5f1c1e3..2386b77 100644
--- a/src/views/grid/index.vue
+++ b/src/views/grid/index.vue
@@ -19,6 +19,18 @@
 // import website from '@/config/website'
 export default {
     data () {
+        //手机号格式校验
+        let validatorPhone = function (rule, value, callback) {
+            if (value) {
+                if (!/^1[3456789]\d{9}$/.test(value)) {
+                    callback(new Error('手机号格式有误!'))
+                } else {
+                    callback()
+                }
+            }
+            callback()
+        }
+
         return {
             form: {},
             query: {},
@@ -31,13 +43,16 @@
             datetime: "",
             selectionList: [],
             option: {
+                labelWidth: 96,
+                searchLabelWidth: 96,
+                searchShow: true,
+                searchMenuSpan: 3,
+                menuWidth: 210,
+
                 height: "auto",
                 calcHeight: 54,
                 dialogWidth: 950,
                 tip: false,
-                searchShow: true,
-                searchMenuSpan: 3,
-                menuWidth: 280,
                 border: true,
                 //stripe:true,
                 index: true,
@@ -46,7 +61,6 @@
                 dialogClickModal: false,
                 column: [
                     {
-                        width: 156,
                         overHidden: true,
                         label: "所属社区",
                         addDisplay: false,
@@ -84,7 +98,6 @@
                     },
 
                     {
-                        width: 110,
                         overHidden: true,
                         label: "网格名称",
                         prop: "gridName",
@@ -98,7 +111,9 @@
                             },
                         ],
                     },
+
                     {
+                        width: 110,
                         label: "负责人",
                         prop: "principal",
                         searchSpan: 4,
@@ -112,6 +127,7 @@
                         ],
                     },
                     {
+                        width: 120,
                         label: "联系电话",
                         prop: "principalPhone",
                         searchSpan: 4,
@@ -122,6 +138,11 @@
                                 message: "请输入联系电话",
                                 trigger: "blur",
                             },
+
+                            {
+                                validator: validatorPhone,
+                                trigger: 'blur'
+                            }
                         ],
                     },
                     {
@@ -301,21 +322,9 @@
             this.onLoad(this.page, this.query)
         },
         onLoad (page, params = {}) {
-            const { dateTime } = this.query
-            let values = {
-                ...params,
-            }
-            if (dateTime) {
-                values = {
-                    ...params,
-                    startTime: dateTime[0],
-                    endTime: dateTime[1],
-                    ...this.query,
-                }
-                values.dateTime = null
-            }
             this.loading = true
-            getList(page.currentPage, page.pageSize, values).then((res) => {
+
+            getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then((res) => {
                 const data = res.data.data
                 this.page.total = data.total
                 this.data = data.records
diff --git a/src/views/place/index.vue b/src/views/place/index.vue
index 152f6d9..c81d30e 100644
--- a/src/views/place/index.vue
+++ b/src/views/place/index.vue
@@ -22,6 +22,16 @@
                 }}</el-tag>
             </template>
 
+            <template slot-scope="{row}" slot="confirmFlag">
+                <el-tag size="small" :type="showConfirmFlag(row.confirmFlag).type">{{ showConfirmFlag(row.confirmFlag).text
+                }}</el-tag>
+            </template>
+
+            <template slot-scope="{row}" slot="source">
+                <el-tag size="small" :type="showSource(row.source).type">{{ showSource(row.source).text
+                }}</el-tag>
+            </template>
+
             <template slot="menuLeft">
                 <el-button size="small" icon="el-icon-delete" plain v-if="permission.place_delete" @click="handleDelete">删 除
                 </el-button>
@@ -98,13 +108,16 @@
             datetime: "",
             selectionList: [],
             option: {
+                labelWidth: 120,
+                searchLabelWidth: 96,
+                searchShow: true,
+                searchMenuSpan: 3,
+                menuWidth: 280,
+
                 height: "auto",
                 calcHeight: 54,
                 dialogWidth: 950,
                 tip: false,
-                searchShow: true,
-                searchMenuSpan: 3,
-                menuWidth: 280,
                 border: true,
                 //stripe:true,
                 index: true,
@@ -113,16 +126,15 @@
                 selection: true,
                 dialogClickModal: false,
                 menuFixed: 'right',
-                labelWidth: 120,
                 column: [
                     {
-                        width: 160,
-                        span: 12,
+                        width: 156,
+                        overHidden: true,
                         label: "场所名称",
+                        span: 12,
                         prop: "placeName",
                         searchSpan: 5,
                         search: true,
-                        overHidden: true,
                         rules: [{
                             required: true,
                             message: "请输入场所名称",
@@ -166,11 +178,11 @@
                     },
 
                     {
-                        width: 96,
-                        searchLabelWidth: 120,
+                        width: 110,
                         label: "场所负责人",
                         prop: "principal",
                         searchSpan: 5,
+                        searchLabelWidth: 110,
                         search: true,
                         rules: [{
                             required: false,
@@ -180,13 +192,13 @@
                     },
 
                     {
-                        width: 96,
+                        width: 120,
+                        overHidden: true,
                         label: "手机号码",
                         prop: "principalPhone",
                         search: true,
                         searchSpan: 4,
                         slot: true,
-                        overHidden: true,
                         rules: [
                             {
                                 validator: validatorPhone,
@@ -283,9 +295,9 @@
                         ],
                     },
                     {
+                        width: 110,
                         label: "场所照片",
                         prop: "imageUrls",
-                        width: 80,
                         type: "upload",
                         listType: "picture-card",
                         dataType: "string",
@@ -300,7 +312,7 @@
                     },
 
                     {
-                        width: 160,
+                        width: 156,
                         overHidden: true,
                         slot: true,
                         label: "位置",
@@ -339,6 +351,7 @@
                     },
 
                     {
+                        width: 100,
                         addDisplay: false,
                         editDisplay: false,
                         viewDisplay: false,
@@ -346,16 +359,18 @@
                         prop: 'confirmFlag',
                         type: 'radio',
                         slot: true,
-                        dicData: [{
-                            label: '待审核',
-                            value: 1
-                        }, {
-                            label: '已审核',
-                            value: 2
-                        }, {
-                            label: '未通过',
-                            value: 3
-                        }]
+                        dicData: [
+                            {
+                                label: '待审核',
+                                value: 1
+                            }, {
+                                label: '已审核',
+                                value: 2
+                            }, {
+                                label: '未通过',
+                                value: 3
+                            }
+                        ]
                     },
                     {
                         width: 120,
@@ -366,13 +381,16 @@
                         type: "select",
                         search: true,
                         searchSpan: 5,
-                        dicData: [{
-                            label: '是',
-                            value: 1
-                        }, {
-                            label: '否',
-                            value: 2
-                        }]
+                        slot: true,
+                        dicData: [
+                            {
+                                label: '是',
+                                value: 1
+                            }, {
+                                label: '否',
+                                value: 2
+                            }
+                        ]
                     }
                 ],
             },
@@ -434,6 +452,29 @@
                 } else if (data == 4) {
                     tags = {
                         text: '待完善',
+                        type: 'info'
+                    }
+                }
+
+                return tags
+            }
+        },
+
+        showSource () {
+            return (data) => {
+                let tags = {
+                    text: '',
+                    type: ''
+                }
+
+                if (data == 1) {
+                    tags = {
+                        text: '是',
+                        type: 'success'
+                    }
+                } else if (data == 2) {
+                    tags = {
+                        text: '否',
                         type: 'info'
                     }
                 }
@@ -670,23 +711,9 @@
             this.onLoad(this.page, this.query)
         },
         onLoad (page, params = {}) {
-            const { dateTime } = this.query
-            let values = {
-                ...params,
-            }
-            if (dateTime) {
-                values = {
-                    ...params,
-                    startTime: dateTime[0],
-                    endTime: dateTime[1],
-                    ...this.query,
-                }
-                values.dateTime = null
-            }
-
             this.loading = true
 
-            getList(page.currentPage, page.pageSize, values).then((res) => {
+            getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then((res) => {
                 const data = res.data.data
 
                 this.page.total = data.total
diff --git a/src/views/userHouse/components/householdManager.vue b/src/views/userHouse/components/householdManager.vue
index 9341a25..64a3374 100644
--- a/src/views/userHouse/components/householdManager.vue
+++ b/src/views/userHouse/components/householdManager.vue
@@ -129,12 +129,15 @@
                 total: 0
             },
             option: {
-                labelWidth: 144,
+                labelWidth: 120,
+                searchLabelWidth: 96,
+                searchShow: true,
+                searchMenuSpan: 4,
+                menuWidth: 210,
+
                 height: 420,
                 calcHeight: 80,
                 tip: false,
-                searchShow: true,
-                searchMenuSpan: 6,
                 border: true,
                 index: true,
                 selection: true,
@@ -164,11 +167,12 @@
                     },
 
                     {
-                        width: 96,
+                        width: 110,
                         label: "姓名",
                         prop: "name",
+                        searchSpan: 4,
+                        searchLabelWidth: 66,
                         search: true,
-                        searchSpan: 3,
                         rules: [
                             {
                                 required: true,
@@ -192,12 +196,12 @@
                     },
 
                     {
-                        display: true,
                         width: 160,
+                        display: true,
                         label: "身份证号",
                         prop: "idCard",
                         search: true,
-                        searchSpan: 4,
+                        searchSpan: 5,
                         slot: true,
                         rules: [
                             {
@@ -208,9 +212,9 @@
                     },
 
                     {
+                        width: 160,
                         hide: true,
                         display: false,
-                        width: 160,
                         label: "证件号码",
                         prop: "cardNo",
                     },
@@ -227,6 +231,7 @@
 
 
                     {
+                        width: 60,
                         label: "性别",
                         prop: "gender",
                         type: "select",
@@ -251,7 +256,7 @@
                         label: "手机号码",
                         prop: "phoneNumber",
                         search: true,
-                        searchSpan: 3,
+                        searchSpan: 5,
                         slot: true,
                         rules: [
                             {
@@ -313,6 +318,7 @@
                     },
 
                     {
+                        overHidden: true,
                         label: "地址",
                         prop: "address",
                         display: false
@@ -805,6 +811,7 @@
         onLoad (page, params = {}) {
             params['houseCode'] = this.houseCode
             this.loading = true
+            
             getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
                 const data = res.data.data
                 this.page.total = data.total
diff --git a/src/views/userHouse/hireInfoList.vue b/src/views/userHouse/hireInfoList.vue
index 5a2dc50..4c29fac 100644
--- a/src/views/userHouse/hireInfoList.vue
+++ b/src/views/userHouse/hireInfoList.vue
@@ -7,6 +7,12 @@
                     @row-save="rowSave" :before-open="beforeOpen" :page.sync="page" @search-change="searchChange"
                     @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
                     @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+                    <template slot="auditStatus" slot-scope="{row}">
+                        <el-tag size="small" :type="showConfirmFlag(row.auditStatus).type">
+                            {{ showConfirmFlag(row.auditStatus).text }}
+                        </el-tag>
+                    </template>
+
                     <template slot="menuLeft">
                         <el-button type="danger" size="small" plain icon="el-icon-delete"
                             v-if="permission.houseRental_delete" @click="handleDelete">删 除
@@ -210,11 +216,15 @@
                 ]
             },
             option: {
+                labelWidth: 120,
+                searchLabelWidth: 96,
+                searchShow: true,
+                searchMenuSpan: 3,
+                menuWidth: 280,
+
                 height: 'auto',
                 calcHeight: 80,
                 tip: false,
-                searchShow: true,
-                searchMenuSpan: 6,
                 border: true,
                 index: true,
                 selection: true,
@@ -222,252 +232,257 @@
                 addBtn: true,
                 dialogType: 'drawer',
                 dialogClickModal: false,
-                menuWidth: 280,
-                column: [{
-                    label: "房屋",
-                    prop: "address",
-                    display: false
-                },
-                {
-                    label: "房屋",
-                    prop: "houseCode",
-                    hide: true,
-                    type: "table",
-                    children: {
-                        border: true,
-                        height: 400,
-                        searchShow: true,
-                        searchMenuSpan: 6,
-                        submitText: "确定",
-                        column: [
-                            {
-                                width: 220,
-                                overHidden: true,
-                                label: '小区名称',
-                                prop: "districtName",
-                                search: true,
-                                searchSpan: 4,
-                                rules: [{
-                                    required: true,
-                                    message: "请输入小区名称",
-                                    trigger: "blur",
-                                },],
-                            },
-                            {
-                                label: "地址",
-                                prop: "address",
-                                width: 180,
-                                display: false
-                            },
-                            {
-                                label: "手机",
-                                prop: "phone",
-                                rules: [{
-                                    required: true,
-                                    message: "请输入绑定手机",
-                                    trigger: "blur",
-                                },],
-                            },
+
+                column: [
+                    {
+                        label: "房屋",
+                        prop: "address",
+                        display: false
+                    },
+                    {
+                        label: "房屋",
+                        prop: "houseCode",
+                        hide: true,
+                        type: "table",
+                        children: {
+                            border: true,
+                            height: 400,
+                            searchShow: true,
+                            searchMenuSpan: 6,
+                            submitText: "确定",
+                            column: [
+                                {
+                                    width: 220,
+                                    overHidden: true,
+                                    label: '小区名称',
+                                    prop: "districtName",
+                                    search: true,
+                                    searchSpan: 4,
+                                    rules: [{
+                                        required: true,
+                                        message: "请输入小区名称",
+                                        trigger: "blur",
+                                    },],
+                                },
+                                {
+                                    label: "地址",
+                                    prop: "address",
+                                    width: 180,
+                                    display: false
+                                },
+                                {
+                                    label: "手机",
+                                    prop: "phone",
+                                    rules: [{
+                                        required: true,
+                                        message: "请输入绑定手机",
+                                        trigger: "blur",
+                                    },],
+                                },
+                            ],
+                        },
+                        page: {
+                            pageSize: 10,
+                            currentPage: 1,
+                            total: 0
+                        },
+                        formatter: (row) => {
+                            console.log(row, 888)
+                            if (!row.districtName) return ''
+                            return row.districtName + '-' + row.unit + row.building + row.room
+                        },
+                        onLoad: ({
+                            page,
+                            value,
+                            data
+                        }, callback) => {
+                            //首次加载去查询对应的值
+                            if (value) {
+                                getHouseDetail({
+                                    houseCode: value
+                                }).then(res => {
+                                    var resData = res.data.data
+                                    // 查询对应行数据
+                                    callback(resData)
+                                    return
+                                })
+                            }
+                            if (page) {
+                                this.loading = true
+                                getHouseList(page.currentPage, page.pageSize, Object.assign(data)).then(res => {
+                                    const resData = res.data.data
+                                    var total = resData.total
+                                    var data = resData.records
+                                    this.loading = false
+                                    this.selectionClear()
+                                    //分页查询信息
+                                    callback({
+                                        total: total,
+                                        data: data
+                                    })
+                                })
+                            }
+                        },
+                        props: {
+                            label: 'address',
+                            value: 'houseCode'
+                        }
+                    },
+                    {
+                        label: "关系",
+                        prop: "tenantRelationship",
+                        search: true,
+                        searchSpan: 3,
+                        searchLabelWidth: 66,
+                        width: 100,
+                        type: "select",
+                        dicData: [{
+                            label: "同一户",
+                            value: 1
+                        },
+                        {
+                            label: "不同一户",
+                            value: 2
+                        }
+                        ],
+                        rules: [{
+                            required: true,
+                            message: "请选择关系",
+                            trigger: "blur",
+                        },],
+                    },
+                    {
+                        label: "房屋状态",
+                        prop: "houseStatus",
+                        search: true,
+                        searchSpan: 4,
+                        width: 100,
+                        type: "select",
+                        dicData: [{
+                            label: "部分出租",
+                            value: 1
+                        },
+                        {
+                            label: "全部出租",
+                            value: 2
+                        }
+                        ],
+                        rules: [{
+                            required: true,
+                            message: "请选择房屋状态",
+                            trigger: "blur",
+                        },],
+                    },
+                    {
+                        label: "用途",
+                        prop: "rentalUse",
+                        type: "select",
+                        searchSpan: 3,
+                        searchLabelWidth: 66,
+                        search: true,
+                        dataType: "number",
+                        width: 100,
+                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=rentalUseType",
+                        props: {
+                            label: "dictValue",
+                            value: "dictKey",
+                        },
+                        rules: [{
+                            required: true,
+                            message: "请选择用途",
+                            trigger: "blur",
+                        },],
+                    },
+                    {
+                        width: 100,
+                        label: "租房时间",
+                        prop: "rentalTime",
+                        type: "date",
+                        format: "yyyy-MM-dd",
+                        valueFormat: "yyyy-MM-dd",
+                        rules: [{
+                            required: true,
+                            message: "请选择租房时间",
+                            trigger: "blur",
+                        },],
+                    },
+                    {
+                        label: "到期时间",
+                        prop: "dueTime",
+                        type: "date",
+                        format: "yyyy-MM-dd",
+                        valueFormat: "yyyy-MM-dd",
+                        width: 100,
+                        rules: [{
+                            required: true,
+                            message: "请选择到期时间",
+                            trigger: "blur",
+                        },],
+                    },
+
+                    {
+                        label: "租赁期限",
+                        prop: "dldType",
+                        width: 100,
+                        display: false,
+                        search: true,
+                        searchSpan: 4,
+                        type: "select",
+                        dicData: [{
+                            label: "长期",
+                            value: 1
+                        },
+                        {
+                            label: "中期",
+                            value: 2
+                        },
+                        {
+                            label: "短期",
+                            value: 3
+                        }
                         ],
                     },
-                    page: {
-                        pageSize: 10,
-                        currentPage: 1,
-                        total: 0
-                    },
-                    formatter: (row) => {
-                        console.log(row, 888)
-                        if (!row.districtName) return ''
-                        return row.districtName + '-' + row.unit + row.building + row.room
-                    },
-                    onLoad: ({
-                        page,
-                        value,
-                        data
-                    }, callback) => {
-                        //首次加载去查询对应的值
-                        if (value) {
-                            getHouseDetail({
-                                houseCode: value
-                            }).then(res => {
-                                var resData = res.data.data
-                                // 查询对应行数据
-                                callback(resData)
-                                return
-                            })
-                        }
-                        if (page) {
-                            this.loading = true
-                            getHouseList(page.currentPage, page.pageSize, Object.assign(data)).then(res => {
-                                const resData = res.data.data
-                                var total = resData.total
-                                var data = resData.records
-                                this.loading = false
-                                this.selectionClear()
-                                //分页查询信息
-                                callback({
-                                    total: total,
-                                    data: data
-                                })
-                            })
-                        }
-                    },
-                    props: {
-                        label: 'address',
-                        value: 'houseCode'
-                    }
-                },
-                {
-                    label: "关系",
-                    prop: "tenantRelationship",
-                    search: true,
-                    searchSpan: 4,
-                    width: 100,
-                    type: "select",
-                    dicData: [{
-                        label: "同一户",
-                        value: 1
+                    {
+                        width: 80,
+                        label: "审核状态",
+                        prop: "auditStatus",
+                        type: "select",
+                        search: true,
+                        searchSpan: 4,
+                        display: false,
+                        slot: true,
+                        dicData: [
+                            {
+                                label: "已确认",
+                                value: 1
+                            },
+                            {
+                                label: "待确认",
+                                value: 0
+                            }
+                        ],
                     },
                     {
-                        label: "不同一户",
-                        value: 2
-                    }
-                    ],
-                    rules: [{
-                        required: true,
-                        message: "请选择关系",
-                        trigger: "blur",
-                    },],
-                },
-                {
-                    label: "房屋状态",
-                    prop: "houseStatus",
-                    search: true,
-                    searchSpan: 4,
-                    width: 100,
-                    type: "select",
-                    dicData: [{
-                        label: "部分出租",
-                        value: 1
+                        width: 144,
+                        label: "创建时间",
+                        prop: "createTime",
+                        display: false,
                     },
                     {
-                        label: "全部出租",
-                        value: 2
-                    }
-                    ],
-                    rules: [{
-                        required: true,
-                        message: "请选择房屋状态",
-                        trigger: "blur",
-                    },],
-                },
-                {
-                    label: "用途",
-                    prop: "rentalUse",
-                    type: "select",
-                    search: true,
-                    searchSpan: 3,
-                    dataType: "number",
-                    width: 100,
-                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=rentalUseType",
-                    props: {
-                        label: "dictValue",
-                        value: "dictKey",
+                        label: "合同",
+                        prop: "fileUrls",
+                        // align:'center',
+                        width: 80,
+                        type: "upload",
+                        listType: "picture-img",
+                        action: "/api/blade-resource/oss/endpoint/put-file",
+                        propsHttp: {
+                            res: "data",
+                            url: "link",
+                        },
+                        hide: true,
+                        span: 24,
                     },
-                    rules: [{
-                        required: true,
-                        message: "请选择用途",
-                        trigger: "blur",
-                    },],
-                },
-                {
-                    label: "租房时间",
-                    prop: "rentalTime",
-                    type: "date",
-                    format: "yyyy-MM-dd",
-                    valueFormat: "yyyy-MM-dd",
-                    width: 100,
-                    rules: [{
-                        required: true,
-                        message: "请选择租房时间",
-                        trigger: "blur",
-                    },],
-                },
-                {
-                    label: "到期时间",
-                    prop: "dueTime",
-                    type: "date",
-                    format: "yyyy-MM-dd",
-                    valueFormat: "yyyy-MM-dd",
-                    width: 100,
-                    rules: [{
-                        required: true,
-                        message: "请选择到期时间",
-                        trigger: "blur",
-                    },],
-                },
-
-                {
-                    label: "租赁期限",
-                    prop: "dldType",
-                    width: 100,
-                    display: false,
-                    search: true,
-                    searchSpan: 3,
-                    type: "select",
-                    dicData: [{
-                        label: "长期",
-                        value: 1
-                    },
-                    {
-                        label: "中期",
-                        value: 2
-                    },
-                    {
-                        label: "短期",
-                        value: 3
-                    }
-                    ],
-                },
-                {
-                    label: "审核状态",
-                    prop: "auditStatus",
-                    type: "select",
-                    width: 80,
-                    search: true,
-                    searchSpan: 4,
-                    display: false,
-                    dicData: [{
-                        label: "已确认",
-                        value: 1
-                    },
-                    {
-                        label: "待确认",
-                        value: 0
-                    }
-                    ],
-                },
-                {
-                    label: "创建时间",
-                    prop: "createTime",
-                    display: false,
-                    width: 160,
-                },
-                {
-                    label: "合同",
-                    prop: "fileUrls",
-                    // align:'center',
-                    width: 80,
-                    type: "upload",
-                    listType: "picture-img",
-                    action: "/api/blade-resource/oss/endpoint/put-file",
-                    propsHttp: {
-                        res: "data",
-                        url: "link",
-                    },
-                    hide: true,
-                    span: 24,
-                },
                 ]
             },
             data: [],
@@ -531,6 +546,25 @@
                 viewBtn: this.vaildData(this.permission.houseRental_view, true),
                 delBtn: this.vaildData(this.permission.houseRental_delete, true),
                 editBtn: this.vaildData(this.permission.houseRental_edit, true)
+            }
+        },
+        showConfirmFlag () {
+            return (data) => {
+                let tags = {}
+
+                if (data == 0) {
+                    tags = {
+                        type: 'warning',
+                        text: '待处理'
+                    }
+                } else if (data == 1) {
+                    tags = {
+                        type: 'success',
+                        text: '已处理'
+                    }
+                }
+
+                return tags
             }
         }
     },
@@ -771,6 +805,7 @@
         },
         onLoad (page, params = {}) {
             this.loading = true
+
             getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
                 const data = res.data.data
                 this.page.total = data.total
diff --git a/src/views/userHouse/houseHoldList.vue b/src/views/userHouse/houseHoldList.vue
index 089cb7b..6ff6c2c 100644
--- a/src/views/userHouse/houseHoldList.vue
+++ b/src/views/userHouse/houseHoldList.vue
@@ -224,11 +224,14 @@
             },
             option: {
                 labelWidth: 144,
+                searchLabelWidth: 96,
+                searchShow: true,
+                searchMenuSpan: 3,
+                menuWidth: 280,
+
                 height: 'auto',
                 calcHeight: 80,
                 tip: false,
-                searchShow: true,
-                searchMenuSpan: 3,
                 border: true,
                 index: true,
                 selection: true,
@@ -236,7 +239,6 @@
                 addBtn: true,
                 dialogType: 'drawer',
                 dialogClickModal: false,
-                menuWidth: 280,
                 menuFixed: 'right',
                 column: [
                     {
@@ -263,8 +265,9 @@
                         width: 110,
                         label: "姓名",
                         prop: "name",
-                        search: true,
                         searchSpan: 3,
+                        searchLabelWidth: 66,
+                        search: true,
                         rules: [
                             {
                                 required: true,
@@ -346,7 +349,7 @@
                         label: "手机号码",
                         prop: "phoneNumber",
                         search: true,
-                        searchSpan: 3,
+                        searchSpan: 4,
                         slot: true,
                         rules: [
                             {
@@ -455,7 +458,8 @@
                     },
 
                     {
-                        width: 140,
+                        width: 156,
+                        overHidden: true,
                         label: "地址",
                         prop: "address",
                         display: false
@@ -543,6 +547,7 @@
 
                     {
                         width: 210,
+                        overHidden: true,
                         label: "标签",
                         prop: "householdLabelList",
                         display: false
@@ -1083,6 +1088,7 @@
 
         onLoad (page, params = {}) {
             this.loading = true
+            
             getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
                 const data = {
                     ...res.data.data,
diff --git a/src/views/userHouse/houseList.vue b/src/views/userHouse/houseList.vue
index fe280c0..601875f 100644
--- a/src/views/userHouse/houseList.vue
+++ b/src/views/userHouse/houseList.vue
@@ -145,6 +145,19 @@
         householdManager
     },
     data () {
+
+        //手机号格式校验
+        let validatorPhone = function (rule, value, callback) {
+            if (value) {
+                if (!/^1[3456789]\d{9}$/.test(value)) {
+                    callback(new Error('手机号格式有误!'))
+                } else {
+                    callback()
+                }
+            }
+            callback()
+        }
+
         return {
             labelData: [],
             labelForm: {},
@@ -199,18 +212,21 @@
                 total: 0
             },
             option: {
+                labelWidth: 120,
+                searchLabelWidth: 96,
+                searchShow: true,
+                searchMenuSpan: 3,
+                menuWidth: 350,
+
                 height: 'auto',
                 calcHeight: 80,
                 tip: false,
-                searchShow: true,
-                searchMenuSpan: 3,
                 border: true,
                 index: true,
                 selection: true,
                 viewBtn: true,
                 dialogType: 'drawer',
                 dialogClickModal: false,
-                menuWidth: 340,
                 column: [
                     {
                         label: "房屋编号",
@@ -220,9 +236,10 @@
                         display: false
                     },
                     {
+                        width: 156,
+                        overHidden: true,
                         label: "地址",
                         prop: "address",
-                        width: 180,
                         display: false
                     },
 
@@ -343,7 +360,7 @@
                     {
                         label: "房屋照片",
                         prop: "imageUrls",
-                        width: 80,
+                        width: 110,
                         type: "upload",
                         listType: "picture-card",
                         dataType: "string",
@@ -357,12 +374,21 @@
                         span: 24,
                     },
 
+
                     {
-                        width: 110,
+                        width: 120,
                         label: "电话",
                         prop: "phone",
                         slot: true,
+                        rules: [
+
+                            {
+                                validator: validatorPhone,
+                                trigger: 'blur'
+                            }
+                        ],
                     },
+
                     {
                         label: "幢",
                         prop: "building",
@@ -404,6 +430,7 @@
                     },
                     {
                         width: 210,
+                        overHidden: true,
                         label: "标签",
                         prop: "userHouseLabelVOList",
                         display: false
@@ -746,6 +773,7 @@
         },
         onLoad (page, params = {}) {
             this.loading = true
+
             getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
                 const data = {
                     ...res.data.data,

--
Gitblit v1.9.3