Sfoglia il codice sorgente

业务空间修改建筑楼层功能添加;删除工具栏移动按钮

haojianlong 5 anni fa
parent
commit
4a8ebd3265

+ 5 - 0
src/api/scan/request.js

@@ -1427,6 +1427,11 @@ export function groupCreRelaZoneAndISp(param, success) {
     let url = `${baseUrl}/datacenter/si-in-sp-base/link-list?type=${param.type}`;
     http.postJson(url, param.data, success)
 }
+//关系-----业务空间所属建筑楼层修改
+export function updateRelateInSpAndBuild(param, success) {
+    let url = `${baseUrl}/datacenter/update-relationship/update-sp`;
+    http.postJson(url, param, success)
+}
 
 /**系统集成成果管理 */
 //系统集成统计条形图

+ 19 - 3
src/components/business_space/business/handsontable.vue

@@ -42,7 +42,7 @@ import buildFloor from '@/utils/handsontable/buildFloorData'
 import 'handsontable-pro/dist/handsontable.full.css'
 import zhCN from 'handsontable-pro/languages/zh-CN';
 import qrcode from "@/components/ledger/lib/qrcode";
-import { queryZone, updateZone, deleteZone, createZone, BeatchQueryParam } from "@/api/scan/request";
+import { queryZone, updateZone, deleteZone, createZone, BeatchQueryParam, updateRelateInSpAndBuild } from "@/api/scan/request";
 import { mapGetters, mapActions } from "vuex";
 export default {
   props: {
@@ -193,6 +193,7 @@ export default {
         sortIndicator: true, //添加排序
         renderAllRows: true,
         autoColumnSize: true,
+        observeChanges: false,
         language: "zh-CN",
         manualColumnResize: true,
         manualColumnMove: true,
@@ -401,8 +402,23 @@ export default {
         })
         param.data.Content.push(item);
       })
-      param.Projection = []
-      updateZone(param, (res) => { })
+      if (param.data.Projection.indexOf('BuildingId') > -1) {
+        let pa = param.data.Content.map(t => {
+          return {
+            type: this.zoneCode,
+            spaceId: t.RoomID,
+            id: t.FloorId || t.BuildingId || null,
+          }
+        })
+        updateRelateInSpAndBuild(pa, res => {
+          this.$message.success('修改成功')
+        })
+      } else {
+        param.data.Projection = []
+        updateZone(param, (res) => {
+          this.$message.success('修改成功')
+        })
+      }
     },
     //获取被筛选掉的行号
     trimmedRows() {

+ 6 - 6
src/components/business_space/newGraphy/canvasFun.vue

@@ -1,8 +1,8 @@
 <template>
   <el-row id="canvas-actions-box" :class="{'isEdit':isEdit}">
-    <div :class="{'active':active=='move'}">
+    <!-- <div :class="{'active':active=='move'}">
       <i class="iconfont icon-move" @click="moveCanvas"></i>
-    </div>
+    </div> -->
     <div>
       <i class="iconfont icon-maximize" @click="fitToWindow"></i>
     </div>
@@ -58,10 +58,10 @@ export default {
   },
   methods: {
     // 移动画布
-    moveCanvas() {
-      this.active = this.active != "move" ? "move" : '';
-      this.$emit('move', this.active == 'move');
-    },
+    // moveCanvas() {
+    //   this.active = this.active != "move" ? "move" : '';
+    //   this.$emit('move', this.active == 'move');
+    // },
     // 适配大小
     fitToWindow() {
       this.$emit('fit');

+ 3 - 0
src/components/business_space/newGraphy/graphy.vue

@@ -145,6 +145,9 @@ export default {
         this.scene.clearSpaceSelection();
         this.scene.clearZoneSelection();
       }
+      if (this.buildFloor.indexOf('all') > -1 || this.buildFloor.indexOf('noKnow') > -1) {
+        return;
+      }
       if (initType == 1) {
         // 底图
         this.getGraphy();

+ 1 - 1
src/views/ledger/spacelist/index.vue

@@ -174,7 +174,7 @@ export default {
         }).filter(item => item);
         if (this.childBackParam.zone) {
           this.activeName = this.childBackParam.zone;
-          this.buildFloorSelectd = [this.childBackParam.BuildingId, this.childBackParam.FloorId];
+          // this.buildFloorSelectd = [this.childBackParam.BuildingId, this.childBackParam.FloorId];
           this.isMyTab = this.childBackParam.isMyTab;
         } else {
           this.activeName = 'GeneralZone';

+ 2 - 2
src/views/ledger/spacelist/spaceDetail/index.vue

@@ -83,8 +83,8 @@ export default {
       }
       queryZone(pa, res => {
         this.spaceDetails = res.Content[0];
-        this.params.BuildingId = this.spaceDetails.BuildingId;
-        this.params.FloorId = this.spaceDetails.FloorId;
+        // this.params.BuildingId = this.spaceDetails.BuildingId;
+        // this.params.FloorId = this.spaceDetails.FloorId;
       })
     },
     // 设置iframe