Jelajahi Sumber

优化批量创建业务空间

zhangyu 4 tahun lalu
induk
melakukan
9e1ba304c9

+ 16 - 6
src/components/business_space/business/handsontable.vue

@@ -99,7 +99,8 @@ import dialogZone from "../../ledger/addDialog/dialogZone";
 export default {
   props: {
     id: {},
-    zoneCode: {}
+    zoneCode: {},
+    otherType: String
   },
   components: {
     qrcode, //二维码页面
@@ -855,11 +856,19 @@ export default {
       }
     },
     //选择业务空间类型-添加业务空间
-    changeAddType(val, item) {
-      this.addData.spaceType = val;
-      this.addData.spaceName = item.Name;
-      this.addData.showType = this.showType;
-      this.addData.buildFloorSelectd = this.buildFloorSelectd;
+    changeAddType(val, item, value) {
+      if (value.length == 2 && value[1] == "OtherZone") {
+        this.addData.spaceType = val;
+        this.addData.otherType = value[1]
+        this.addData.spaceName = `其他分区-${item.Name}`;
+        this.addData.showType = this.showType;
+        this.addData.buildFloorSelectd = this.buildFloorSelectd;
+      } else {
+        this.addData.spaceType = val;
+        this.addData.spaceName = item.Name;
+        this.addData.showType = this.showType;
+        this.addData.buildFloorSelectd = this.buildFloorSelectd;
+      }
     },
     //刷新
     reset() {
@@ -919,6 +928,7 @@ export default {
         } else {
           this.OtherList = []
         }
+        this.OtherValue = this.otherType
       })
     },
     // 其他类型下拉change

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

@@ -66,7 +66,7 @@ export default {
           }
         }
       })
-      this.$emit('change', val, space)
+      this.$emit('change', val, space, value)
     }
   },
   created() {

+ 4 - 3
src/views/ledger/spacelist/index.vue

@@ -45,7 +45,7 @@
           @updateState="updateStateSuc"></graphy>
       </div>
       <div v-show="isMyTab == 2">
-        <handsontable-main @lookEqu="lookEqu" ref="handsontable" :zoneCode="activeName" :id="`handsontable${activeName}`"></handsontable-main>
+        <handsontable-main @lookEqu="lookEqu" ref="handsontable" :zoneCode="activeName" :otherType="otherType" :id="`handsontable${activeName}`"></handsontable-main>
       </div>
       <div class="infectedTips" v-show="isMyTab==1&&infectedTotal>0">
         <p>因底图变化而受影响的业务空间{{infectedTotal.toString()}}个<span v-show="buildFloorSelectd.length>1">,本层受影响的业务空间{{infectedCurfloor.toString()}}个</span></p>
@@ -131,7 +131,8 @@ export default {
       needCalculate: false, // 关系是否需要计算
       mutiCount: 0,
       infectedTotal: 0,
-      infectedCurfloor: 0
+      infectedCurfloor: 0,
+      otherType: ''
     };
   },
   created() {
@@ -214,9 +215,9 @@ export default {
         }).filter(item => item);
         if (this.childBackParam.zone) {
           this.activeName = this.childBackParam.zone;
-
           this.buildFloorSelectd = this.childBackParam.buildFloorSelectd;
           this.isMyTab = this.childBackParam.isMyTab;
+          this.otherType = this.childBackParam.otherType;
         } else if (this.activeName == '0') {
           this.activeName = 'GeneralZone';
         }

+ 3 - 2
src/views/ledger/spacelist/spaceadd/index.vue

@@ -201,9 +201,10 @@ export default {
         this.$router.push({
           name: "spacelist",
           params: {
-            zone: this.space.spaceType,
+            zone: this.space.otherType?this.space.otherType:this.space.spaceType,
             buildFloorSelectd: ['all'],
-            isMyTab: '2'
+            isMyTab: '2',
+            otherType: this.space.otherType?this.space.spaceType:''
           }
         });
       })