Parcourir la source

bug修改2200221100330055

zhangyu il y a 4 ans
Parent
commit
4cfd1008bd

+ 1 - 1
src/components/ledger/lib/bimDialog.vue

@@ -10,7 +10,7 @@
     <div id='bim-code' v-if='Object.keys(bimcodeobj).length>0'>
       <div class='eq'>
         <span class='eq-name'>设备名称 &nbsp;&nbsp;</span>
-        {{ bimcodeobj.EquipLocalName || bimcodeobj.EquipName || '--' }}
+        {{ bimcodeobj.localName || bimcodeobj.name || '--' }}
       </div>
       <div>
         <noAllDataFloor @change='changeFloor' ref='floors' @getFloorMap='getFloorMap'></noAllDataFloor>

+ 11 - 1
src/components/ledger/lib/spaceSelect.vue

@@ -24,12 +24,15 @@ export default {
     isWidth: {
       type: Boolean,
       default: true
+    },
+    isAll: {
+			type: Boolean,
+			default: false
     }
   },
   data() {
     return {
       value:[null],
-      spaceVal: null,//值
       options: [],
       props: {
         isWidth:false
@@ -47,6 +50,13 @@ export default {
       //Cascade: [{ Name: 'zoneType', Filters: `ProjectId='${this.projectId}'` }]
       queryAllZoneType(params1, res => {
         this.options = res.content;
+        if (this.isAll) {
+					this.options.unshift({
+						code: "",
+						name: "全部"
+					});
+					this.value = [''];
+        }
         this.changeVal(this.value);
       })
     },

+ 20 - 4
src/components/ledger/system/dialog/addSpaceDialog.vue

@@ -10,7 +10,7 @@
         <floor-cascader ref="floorcas" @change="changeFloor"></floor-cascader>
       </el-col>
       <el-col :span="7.5" style="padding:0 0;">
-        <space-select ref="spacesel" @change="changeSpace"></space-select>
+        <space-select ref="spacesel" :isAll="true" @change="changeSpace"></space-select>
       </el-col>
     </el-row>
     <el-row class="filters" :gutter="20"></el-row>
@@ -87,6 +87,7 @@ export default {
       inSpaceType: "业务空间",
       Buildfloor: ["all"], // 选中的建筑楼层
       Spacecategory: null, // 选中的业务空间类型
+			spaceValue: [""], //记录切换成功的业务空间值
       tableData: [],
       floorData: {}, //楼层
       spaceData: {}, //业务空间分区
@@ -125,9 +126,24 @@ export default {
       this.getTableData();
     },
     //修改空间类型
-    changeSpace(value) {
-      this.Spacecategory = value;
-      this.getTableData();
+    changeSpace(val, space, value) {
+			if (this.selections.length) {
+				this.$confirm('关联的业务空间未保存, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.Spacecategory = val;
+					this.spaceValue = value;
+      		this.getTableData();
+        }).catch(() => {
+          this.$refs.spacesel.value = this.spaceValue;  
+        });
+			} else {
+				this.Spacecategory = val;
+				this.spaceValue = value;
+      	this.getTableData();
+			}
     },
     getTableData() {
       let params = {