Shannon_mu 3 лет назад
Родитель
Сommit
f3d40b85d6

+ 3 - 0
energyManagement/src/assets/css/main.scss

@@ -467,6 +467,9 @@ a {
         height: 0;
     }
 }
+.left_search .el-date-editor .el-range-separator {
+    padding: 0;
+}   
 //左边菜单栏边框显示
 .el-menu {
     border: none !important;

+ 66 - 32
energyManagement/src/views/instrumentManagement/popups/addDeviceManagement.vue

@@ -146,39 +146,73 @@ export default {
                     title: '楼栋信息'
                 });
             }).then((e) => {
-                if (e.ids.length) {
-                    let lengthSum = e.ids.length;
-                    switch (lengthSum) {
-                        case 1:
-                            this.formData.addressType = 1;
-                            break;
-                        case 2:
-                            this.formData.addressType = 2;
-                            this.formData.buildingId = e.ids[1];
-                            break;
-                        case 3:
-                            this.formData.addressType = 3;
-                            this.formData.buildingId = e.ids[1];
-                            this.formData.unitName = e.ids[2];
-                            break;
-                        case 4:
-                            this.formData.addressType = 4;
-                            this.formData.buildingId = e.ids[1];
-                            this.formData.unitName = e.ids[2];
-                            this.formData.floorName = e.ids[3];
-                            break;
-                        case 5:
-                            this.formData.addressType = 5;
-                            this.formData.buildingId = e.ids[1];
-                            this.formData.unitName = e.ids[2];
-                            this.formData.floorName = e.ids[3];
-                            this.formData.houseId = e.ids[4];
-                            break;
-                        default:
-                            break;
-                    }
+                debugger;
+                let address = '';
+                if (!!e.roomId) {
+                    this.formData.addressType = 5;
+                    this.formData.buildingId = e.buildingId;
+                    this.formData.unitName = e.unitId;
+                    this.formData.floorName = e.floorId;
+                    this.formData.houseId = e.roomId;
+                    address = e.buildingName + '-' + e.unitName + '-' + e.floor + '-' + e.roomName;
+                } else if (!!e.floorId) {
+                    this.formData.addressType = 4;
+                    this.formData.buildingId = e.buildingId;
+                    this.formData.unitName = e.unitId;
+                    this.formData.floorName = e.floorId;
+                    this.formData.houseId = '';
+                    address = e.buildingName + '-' + e.unitName + '-' + e.floor;
+                } else if (!!e.unitId) {
+                    this.formData.addressType = 3;
+                    this.formData.buildingId = e.buildingId;
+                    this.formData.unitName = e.unitId;
+                    this.formData.floorName = '';
+                    this.formData.houseId = '';
+                    address = e.buildingName + '-' + e.unitName;
+                } else if (!!e.buildingId) {
+                    this.formData.addressType = 2;
+                    this.formData.buildingId = e.buildingId;
+
+                    this.formData.unitName = '';
+                    this.formData.floorName = '';
+                    this.formData.houseId = '';
+                    address = e.buildingName;
                 }
-                this.formData.address = ` ${e.buildingName} - ${e.unitName} - ${e.roomName}`;
+                // console.log(e);
+                // debugger;
+                // if (e.ids.length) {
+                //     let lengthSum = e.ids.length;
+                //     switch (lengthSum) {
+                //         case 1:
+                //             this.formData.addressType = 1;
+                //             break;
+                //         case 2:
+                //             this.formData.addressType = 2;
+                //             this.formData.buildingId = e.ids[1];
+                //             break;
+                //         case 3:
+                //             this.formData.addressType = 3;
+                //             this.formData.buildingId = e.ids[1];
+                //             this.formData.unitName = e.ids[2];
+                //             break;
+                //         case 4:
+                //             this.formData.addressType = 4;
+                //             this.formData.buildingId = e.ids[1];
+                //             this.formData.unitName = e.ids[2];
+                //             this.formData.floorName = e.ids[3];
+                //             break;
+                //         case 5:
+                //             this.formData.addressType = 5;
+                //             this.formData.buildingId = e.ids[1];
+                //             this.formData.unitName = e.ids[2];
+                //             this.formData.floorName = e.ids[3];
+                //             this.formData.houseId = e.ids[4];
+                //             break;
+                //         default:
+                //             break;
+                //     }
+                // }
+                this.formData.address = address;
             });
         },
         submit() {

+ 30 - 3
energyManagement/src/views/instrumentManagement/popups/poptreeSelect.vue

@@ -16,9 +16,13 @@ export default {
             },
             unitPa: {
                 buildingName: '',
+                buildingId: '',
                 unitName: '',
+                unitId: '',
                 floor: '',
+                floorId: '',
                 roomName: '',
+                roomId: '',
                 type: '',
                 ids: []
             }
@@ -37,28 +41,51 @@ export default {
             let thisJson = this.$refs.tenantstree.getNode(e);
             if (e.type == 'building') {
                 this.unitPa.buildingName = e.name;
+                this.unitPa.buildingId = e.value;
             } else if (e.type == 'unit') {
                 this.unitPa.buildingName = thisJson.parent.data.name;
+                this.unitPa.buildingId = thisJson.parent.data.value;
                 this.unitPa.unitName = e.name;
+                this.unitPa.unitId = e.value;
             } else if (e.type == 'floor') {
                 this.unitPa.buildingName = thisJson.parent.parent.data.name;
+                this.unitPa.buildingId = thisJson.parent.parent.data.value;
                 this.unitPa.unitName = thisJson.parent.data.name;
+                this.unitPa.unitId = thisJson.parent.data.value;
                 this.unitPa.floor = e.name;
+                this.unitPa.floorId = e.value;
             } else if (e.type == 'room') {
                 this.unitPa.buildingName = thisJson.parent.parent.parent.data.name;
+                this.unitPa.buildingId = thisJson.parent.parent.parent.data.value;
                 this.unitPa.unitName = thisJson.parent.parent.data.name;
+                this.unitPa.unitId = thisJson.parent.parent.data.value;
                 this.unitPa.floor = thisJson.parent.data.name;
+                this.unitPa.floorId = thisJson.parent.data.value;
                 this.unitPa.roomName = e.name;
+                this.unitPa.roomId = e.value;
             }
+        },
+        dimension(arr, type, names) {
+            arr.map((item, index) => {
+                if (!!item.children & (item.type !== type)) {
+                    this.dimension(item.children, type, names);
+                } else {
+                    if (item.name.indexOf(names) === -1) {
+                        item.name = item.name + names;
+                    }
+                }
+            });
         }
     },
     created() {
+        this.dimension(this.params.tenantsTree, 'unit', '单元');
+        this.dimension(this.params.tenantsTree, 'floor', '楼');
         this.tenantsTree = this.params.tenantsTree;
     }
 };
 </script>
 <style lang="scss" scoped>
-.thisColor /deep/ .el-tree .is-current {
-    color: #56c6ff;
-}
+// .thisColor /deep/ .el-tree .is-current {
+//     color: #56c6ff;
+// }
 </style>

+ 2 - 2
energyManagement/src/views/meterReadingManagement/index.vue

@@ -2,8 +2,8 @@
     <div class="main">
         <div class="search">
             <el-radio-group v-model="mixins_query.categoryId" @change="mixins_search" class="zz-tab-button">
-                <el-radio-button :label="1">水</el-radio-button>
-                <el-radio-button :label="2">电</el-radio-button>
+                <el-radio-button :label="1">水</el-radio-button>
+                <el-radio-button :label="2">电</el-radio-button>
             </el-radio-group>
             <el-input class="search-input" v-model="mixins_query.name" placeholder="输入设备编号/名称/地址"></el-input>
             <el-select v-model="mixins_query.communityId" placeholder="选择社区" clearable>

+ 2 - 2
energyManagement/src/views/valveControlRecords/index.vue

@@ -2,8 +2,8 @@
     <div class="main">
         <div class="search">
             <el-radio-group v-model="mixins_query.categoryId" @change="mixins_search" class="zz-tab-button">
-                <el-radio-button :label="1">水</el-radio-button>
-                <el-radio-button :label="2">电</el-radio-button>
+                <el-radio-button :label="1">水</el-radio-button>
+                <el-radio-button :label="2">电</el-radio-button>
             </el-radio-group>
             <el-input class="search-input" v-model="mixins_query.name" placeholder="输入设备编号/名称/地址"></el-input>
             <el-select v-model="mixins_query.communityId" placeholder="选择社区" clearable>

+ 1 - 1
operationSupport/src/views/assetManagement/housingManagement/index.vue

@@ -241,7 +241,7 @@ export default {
         },
         buildingInformation(data) {
             if (!!data.type && data.type == 'community') {
-                this.mixins_query.communityId = data.val;
+                this.mixins_query = {communityId:data.value};
             } else {
                 this.mixins_query.communityId = data.communityId;
                 this.mixins_query.id = data.roomId;

+ 1 - 1
operationSupport/src/views/assetManagement/shopManagement/index.vue

@@ -263,7 +263,7 @@ export default {
         },
         buildingInformation(data) {
             if (!!data.type && data.type == 'community') {
-                this.mixins_query.communityId = data.val;
+               this.mixins_query = {communityId:data.value};
             } else {
                 this.mixins_query.communityId = data.communityId;
                 this.mixins_query.id = data.roomId;

+ 1 - 0
operationSupport/src/views/ownerManagement/stepPage/add.vue

@@ -440,6 +440,7 @@ export default {
         if (!!this.params.id) {
             this.getDetails(this.params.id);
         }
+        console.log(this.$parent)
         this.getTenantsTree();
     },
     beforeDestroy() {