Ver código fonte

优化批量创建业务空间

zhangyu 4 anos atrás
pai
commit
9e81fe8f0b

+ 11 - 1
src/components/business_space/business/handsontable.vue

@@ -819,7 +819,16 @@ export default {
     },
     /**  页面中的按钮事件--------------------------- */
     addSp() {
-      this.myDialog.addSpace = true
+      this.myDialog.addSpace = true;
+      if (this.zoneCode && this.zoneCode != 'OtherZone') {
+        this.$nextTick(() => {
+          this.$refs.cascader.setValue([this.zoneCode])
+        })
+      } else if (this.zoneCode == 'OtherZone' && this.OtherValue) {
+        this.$nextTick(() => {
+          this.$refs.cascader.setValue([this.zoneCode,this.OtherValue])
+        })
+      }
       // if (this.main && this.main.length && this.main[0].RoomID) {
       //   this.hot.destroy()
       //   this.hot = null
@@ -850,6 +859,7 @@ export default {
       this.addData.spaceType = val;
       this.addData.spaceName = item.Name;
       this.addData.showType = this.showType;
+      this.addData.buildFloorSelectd = this.buildFloorSelectd;
     },
     //刷新
     reset() {

+ 1 - 1
src/components/dialogs/config/infoPoint.vue

@@ -4,7 +4,7 @@
       <el-form-item label="方案:">
         <el-radio-group v-model="form.SchemeId">
           <el-radio label="schemeZero">全新设定</el-radio>
-          <el-radio label="schemeOne">预置方案1</el-radio>
+          <el-radio label="schemeOne">预置方案</el-radio>
           <el-radio label="schemeTwo">万达专用方案</el-radio>
         </el-radio-group>
       </el-form-item>

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

@@ -14,7 +14,7 @@
 </template>
 
 <script>
-import { queryDictionaryHead, queryAllZoneType } from '@/api/scan/request';
+import { queryAllZoneType } from '@/api/scan/request';
 import { mapGetters } from 'vuex'
 export default {
   computed: {
@@ -37,11 +37,16 @@ export default {
     }
   },
   methods: {
+    setValue(val) {
+      this.value = val;
+      this.changeVal(val);
+    },
     //获取下拉框数据
     getOptionData() {
       let params1 = {Cascade: [{ Name: 'zoneType', Filters: `ProjectId='${this.projectId}'` }]}
       queryAllZoneType(params1, res => {
         this.options = res.Content;
+        this.changeVal(this.value);
       })
     },
     //改变空间

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

@@ -104,7 +104,27 @@ export default {
     };
   },
   computed: {
-    ...mapGetters("layout", ["projectId", "secret", "userId"])
+    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+    flowBuild() {
+      let buildFloorSelectd = this.space.buildFloorSelectd
+      if (buildFloorSelectd && buildFloorSelectd.length == 0) {
+        return ""
+      } else if (buildFloorSelectd && buildFloorSelectd.length == 1){
+        let build = buildFloorSelectd[0]
+        if (build == 'all' && build == 'noKnow') {
+          return ""
+        } else {
+          return build
+        }
+      } else if (buildFloorSelectd && buildFloorSelectd.length == 2) {
+        let build = buildFloorSelectd[0], floor = buildFloorSelectd[1];
+        if (build && (floor == 'all' || floor == 'noKnow')) {
+          return build
+        } else {
+          return `${build}-${floor}`
+        }
+      }
+    }
   },
   created() {
     this.space = this.$route.query;
@@ -129,6 +149,7 @@ export default {
             this.inputMap[item.Path] = item
           }
         })
+        this.tableData[0].flowBuild = this.flowBuild
         this.initTable();
       });
     },
@@ -196,7 +217,7 @@ export default {
     handleAddTableRow() {
       let addRowLength = this.addNum;
       for (let i = 0; i < addRowLength; i++) {
-        this.tableData.push({ Checked: 1 });
+        this.tableData.push({flowBuild:this.flowBuild});
       }
       this.initTable();
       this.formaTableData();