Explorar el Código

fix update si outline fix online groupcreatezone

haojianlong hace 5 años
padre
commit
9b316f6c2e
Se han modificado 1 ficheros con 29 adiciones y 2 borrados
  1. 29 2
      src/views/business_space/dataUtil/index.vue

+ 29 - 2
src/views/business_space/dataUtil/index.vue

@@ -3,7 +3,8 @@
     <div class="saga-build-mess">
       <span style="padding-right:12px;color:#999999;">建筑楼层</span>
       <el-cascader :options="options" v-model="buildFloorSelectd" :props="props" @change="changeCascader"></el-cascader>
-      <!-- <el-button @click="importOutline">导入业务空间轮廓线</el-button> -->
+      <el-button @click="updateSpOutline">导入业务空间Outline</el-button>
+      <el-button @click="updateSiOutline">更新元空间Outline</el-button>
     </div>
   </div>
 </template>
@@ -533,11 +534,37 @@ export default {
             _this.$message("没有元空间数据")
           }
           console.log(_this.sourceIdToOutline)
-          _this.getGraphy();
           _this.querySi();
         };
       });
     },
+    updateSpOutline() {
+      this.getGraphy();
+    },
+    updateSiOutline() {
+      let pa = {
+        data: {
+          Content: [],
+          Projection: ['Outline']
+        },
+        zone: 'Ispace'
+      }
+      for (let key in this.allSiListMap) {
+        let obj = {
+          RoomID: key,
+          Outline: []
+        }
+        if (this.sourceIdToOutline[this.allSiListMap[key]]) {
+          obj.Outline = this.sourceIdToOutline[this.allSiListMap[key]];
+          pa.data.Content.push(obj);
+        }
+      }
+      if (pa.data.Content.length) {
+        updateZone(pa, res => {
+          this.$message.success(`success-----Ispace`)
+        })
+      }
+    }
   },
   created() {
     this.init()