ソースを参照

修复住户信息

Shannon_mu 3 年 前
コミット
a782f66cc9

+ 31 - 20
operationSupport/src/views/assetManagement/housingManagement/details.vue

@@ -91,7 +91,7 @@ export default {
                 left: [
                     {
                         lable: '所属社区',
-                        prop: 'communityId'
+                        prop: 'communityName'
                     },
                     {
                         lable: '单元',
@@ -127,7 +127,7 @@ export default {
                 ],
                 right: [
                     {
-                        lable: '楼名称',
+                        lable: '楼名称',
                         prop: 'buildingName'
                     },
                     {
@@ -170,8 +170,8 @@ export default {
                         ]
                     },
                     {
-                        lable: '',
-                        prop: ''
+                        lable: '备注',
+                        prop: 'remarks'
                     }
                 ]
             },
@@ -205,7 +205,11 @@ export default {
                 right: [
                     {
                         lable: '类型',
-                        prop: 'householdType'
+                        prop: 'householdType',
+                        const: true,
+                        format(val) {
+                            return '业主';
+                        }
                     },
                     {
                         lable: '人员编号',
@@ -303,27 +307,34 @@ export default {
             this.tabsIndex = index;
         },
         close() {
-            let activeRout = this.$route;
             let tagsList = this.$store.getters['getTagsList'];
-            tagsList.forEach((item, index) => {
-                if (item.title == activeRout.meta.title || item.path == activeRout.path) {
-                    tagsList.splice(index, 1);
-                    history.go(-1);
-                    return true;
-                }
-            });
+            let activeRout = this.$route;
+            if (tagsList.length > 1) {
+                tagsList.forEach((item, index) => {
+                    if (item.title == activeRout.meta.title || item.path == activeRout.path) {
+                        tagsList.splice(index, 1);
+                        this.$router.push({
+                            path: tagsList[index - 1].path
+                        });
+                    }
+                });
+            } else {
+                this.$router.push({
+                    path: '/'
+                });
+            }
         },
         getDetails() {
             this.$http
-                .get('/sc-community/assets/house/find/' + this.id)
-                .then(({ data, status, msg }) => {
-                    if (0 === status) {
-                        this.detailsData = data;
-                        if (!!data.residentId) {
-                            this.getHouse(data.residentId);
+                .get('/sc-community/assets/house/find/house?houseId=' + this.id)
+                .then((res) => {
+                    if (!!res) {
+                        this.detailsData = res;
+                        if (!!res.residentId) {
+                            this.getHouse(res.residentId);
                         }
                     } else {
-                        this.$message.error(msg);
+                        this.$message.error('系统繁忙,请稍后重试');
                     }
                 })
                 .catch(() => {});

+ 37 - 14
operationSupport/src/views/assetManagement/shopManagement/details.vue

@@ -189,7 +189,11 @@ export default {
                 right: [
                     {
                         lable: '类型',
-                        prop: 'householdType'
+                        prop: 'householdType',
+                        const: true,
+                        format(val) {
+                            return '业主';
+                        }
                     },
                     {
                         lable: '人员编号',
@@ -345,24 +349,43 @@ export default {
             this.tabsIndex = index;
         },
         close() {
-            let activeRout = this.$route;
+            // let activeRout = this.$route;
+            // let tagsList = this.$store.getters['getTagsList'];
+            // tagsList.forEach((item, index) => {
+            //     if (item.title == activeRout.meta.title || item.path == activeRout.path) {
+            //         tagsList.splice(index, 1);
+            //         history.go(-1);
+            //         return true;
+            //     }
+            // });
             let tagsList = this.$store.getters['getTagsList'];
-            tagsList.forEach((item, index) => {
-                if (item.title == activeRout.meta.title || item.path == activeRout.path) {
-                    tagsList.splice(index, 1);
-                    history.go(-1);
-                    return true;
-                }
-            });
+            let activeRout = this.$route;
+            if (tagsList.length > 1) {
+                tagsList.forEach((item, index) => {
+                    if (item.title == activeRout.meta.title || item.path == activeRout.path) {
+                        tagsList.splice(index, 1);
+                        this.$router.push({
+                            path: tagsList[index - 1].path
+                        });
+                    }
+                });
+            } else {
+                this.$router.push({
+                    path: '/'
+                });
+            }
         },
         getDetails() {
             this.$http
-                .get('/sc-community/assets/house/find/' + this.id)
-                .then(({ data, status, msg }) => {
-                    if (0 === status) {
-                        this.detailsData = data;
+                .get('/sc-community/assets/house/find/house?houseId=' + this.id)
+                .then((res) => {
+                     if (!!res) {
+                        this.detailsData = res;
+                        if (!!res.residentId) {
+                            this.getHouse(res.residentId);
+                        }
                     } else {
-                        this.$message.error(msg);
+                        this.$message.error('系统繁忙,请稍后重试');
                     }
                 })
                 .catch(() => {});

+ 11 - 3
operationSupport/src/views/assetManagement/stepPage/houseDataPop.vue

@@ -20,6 +20,8 @@
 <script>
 import list from '@utils/list.js';
 import householdTable from './householdTable.vue';
+let type = '';
+let typeArr = ['业主', '亲属', '租客'];
 export default {
     components: { householdTable },
     mixins: [list],
@@ -57,7 +59,11 @@ export default {
                 right: [
                     {
                         lable: '类型',
-                        prop: 'householdType'
+                        prop: 'householdType',
+                        const: true,
+                        format(val) {
+                            return type;
+                        }
                     },
                     {
                         lable: '人员编号',
@@ -89,8 +95,10 @@ export default {
         };
     },
     created() {
-        console.log(this.params);
-        this.getHouse(this.params.data.residentId);
+        if (!!this.params.data) {
+            type = typeArr[Number(this.params.data.householdType) - 1];
+            this.getHouse(this.params.data.residentId);
+        }
     },
     methods: {
         getHouse(id) {

+ 26 - 2
operationSupport/src/views/assetManagement/stepPage/householdTable.vue

@@ -2,9 +2,10 @@
     <div class="item-table">
         <div class="table-list" v-for="item in tableNames" :key="item">
             <div class="lable">{{ item.lable }}</div>
-            <div class="text" v-if="item.prop === 'nation'">{{ tabDatas['nation'] | matchingVal(nationArray) }}</div>
+            <span class="text" v-if="!!item.format && item.const">{{ item.format()}}</span>
+            <span class="text" v-else-if="!!item.format && !!item.const">{{  item.format(params.data[item['prop']]) || '--' }}</span>
+            <div class="text" v-else-if="item.prop === 'nation'">{{ tabDatas['nation'] | matchingVal(nationArray) }}</div>
             <div class="text" v-else-if="item.prop === 'communityId'">{{ tabDatas['communityId'] | matchingVal(communityArray) }}</div>
-
             <div class="text" v-else-if="!!item.typeArray">{{ tabDatas[item.prop] | matchingVal(item.typeArray) }}</div>
             <div class="text" v-else>{{ tabDatas[item.prop] || ' --' }}</div>
         </div>
@@ -28,8 +29,31 @@ export default {
     },
     filters: {
         matchingVal(val, arr) {
+            // let v = '--';
+            // if (!!val) {
+            //     arr.forEach((item) => {
+            //         if (!!item.code && item.code === val) {
+            //             v = item.name;
+            //         } else if (item.type === val) {
+            //             v = item.lable;
+            //         } else if (!!item.communityName && item.id === val) {
+            //             v = item.communityName;
+            //         }
+            //     });
+            // }
+            // return v;
+
             let v = '--';
+            let newDa;
             if (!!val) {
+                try {
+                    v = '';
+                    newDa = val.split(':');
+                    newDa.forEach((item, index) => {
+                        v += item + arr[index].lable;
+                    });
+                } catch (e) {}
+
                 arr.forEach((item) => {
                     if (!!item.code && item.code === val) {
                         v = item.name;

+ 26 - 10
operationSupport/src/views/ownerManagement/details.vue

@@ -59,9 +59,9 @@
 <script>
 import householdTable from './stepPage/householdTable.vue';
 import vehicle from './vehicle.vue';
-import vehicleOutToIn from './vehicleOutToIn.vue'
+import vehicleOutToIn from './vehicleOutToIn.vue';
 export default {
-    components: { householdTable, vehicle,vehicleOutToIn },
+    components: { householdTable, vehicle, vehicleOutToIn },
     name: 'ownerManagementDetails',
     data() {
         let _this = this;
@@ -286,15 +286,31 @@ export default {
             this.tabsIndex = index;
         },
         close() {
-            let activeRout = this.$route;
+            // let activeRout = this.$route;
+            // let tagsList = this.$store.getters['getTagsList'];
+            // tagsList.forEach((item, index) => {
+            //     if (item.title == activeRout.meta.title || item.path == activeRout.path) {
+            //         tagsList.splice(index, 1);
+            //         history.go(-1);
+            //         return true;
+            //     }
+            // });
             let tagsList = this.$store.getters['getTagsList'];
-            tagsList.forEach((item, index) => {
-                if (item.title == activeRout.meta.title || item.path == activeRout.path) {
-                    tagsList.splice(index, 1);
-                    history.go(-1);
-                    return true;
-                }
-            });
+            let activeRout = this.$route;
+            if (tagsList.length > 1) {
+                tagsList.forEach((item, index) => {
+                    if (item.title == activeRout.meta.title || item.path == activeRout.path) {
+                        tagsList.splice(index, 1);
+                        this.$router.push({
+                            path: tagsList[index - 1].path
+                        });
+                    }
+                });
+            } else {
+                this.$router.push({
+                    path: '/'
+                });
+            }
         },
         getDetails() {
             this.$http

+ 5 - 5
operationSupport/src/views/ownerManagement/vehicleOutToIn.vue

@@ -147,8 +147,8 @@ export default {
     },
     methods: {
         timeToggle(val) {
-            this.mixins_query.startTime = val[0];
-            this.mixins_query.endTime = val[1];
+            this.mixins_query.startTime = !!val ? val[0] : '';
+            this.mixins_query.endTime = !!val ? val[1] : '';
         },
         lookPage(row) {
             new Promise((resolve) => {
@@ -157,13 +157,13 @@ export default {
                     width: '839px',
                     height: '500px',
                     props: {
-                        data:row,
+                        data: row,
                         callback: resolve
                     },
                     title: '车辆通行记录详情',
                     notip: true,
-                    showCancelButton:true,
-                    showConfirmButton:true
+                    showCancelButton: true,
+                    showConfirmButton: true
                 });
             }).then((res) => {});
         }