Преглед на файлове

修改业务空间内的设备未展示问题

haojianlong преди 4 години
родител
ревизия
19746c50cf

+ 7 - 4
src/components/business_space/newGraphy/graphy.vue

@@ -183,6 +183,7 @@ export default {
       options: [], //其他分区类型
       OtherValue: '',
       showOtherFlag: false, //是否显示其他分区类型添加
+      fileName: '', // 下载文件名称
     }
   },
   computed: {
@@ -282,7 +283,7 @@ export default {
       this.view.fitSelectedToView();
     },
     // 父组件调用
-    getData(buildFloor, FloorObj, tab) {
+    getData(buildFloor, FloorObj, tab, name) {
       let initType = 1;
       if (FloorObj.FloorID == this.FloorObj.FloorID) {
         initType = 2;
@@ -290,6 +291,7 @@ export default {
       this.buildFloor = buildFloor;
       this.FloorObj = FloorObj;
       this.FloorMap = FloorObj.StructureInfo ? FloorObj.StructureInfo.FloorMap : ''
+      this.fileName = name
       this.tab = tab;
       console.log(arguments);
       if (tab.code == "OtherZone") {
@@ -410,6 +412,7 @@ export default {
             return undefined;
           }
         }).filter(item => item)
+        console.log(this.scene)
         this.scene.removeAllZone();
         this.scene.addZoneList(tempArr);
         this.scene.click(this, this.canvasClick);
@@ -1121,15 +1124,15 @@ export default {
     },
     // 保存为png
     savePng() {
-      this.view.saveImage(`${this.buildFloor[1]}.png`, 'png');
+      this.view.saveImage(`${this.fileName}.png`, 'png');
     },
     // 保存为svg
     saveSvg() {
-      this.view.saveSceneSvg(`${this.buildFloor[1]}.svg`, 6400, 4800);
+      this.view.saveSceneSvg(`${this.fileName}.svg`, 6400, 4800);
     },
     // 保存json
     saveJson() {
-      this.view.saveFloorJson(`${this.buildFloor[1]}.json`)
+      this.view.saveFloorJson(`${this.fileName}.json`)
     },
     // 切割划分
     divide() {

+ 1 - 1
src/components/business_space/newTables/eqToSpaceTable.vue

@@ -19,7 +19,7 @@
         <el-table-column :label="`${inSpaceType}类`" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
             <div>
-              {{scope.row.EquipCategory.EquipName}}
+              {{scope.row.EquipCategory?scope.row.EquipCategory.EquipName:''}}
             </div>
           </template>
         </el-table-column>

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

@@ -10,8 +10,7 @@
       <div class="saga-build-mess">
         <div style="margin-left: 10px;float: left;">
           <span style="color: #999999;font-size: 14px;margin-right: 12px;">建筑楼层</span>
-          <el-cascader :options="options" @change="changeCascader" placeholder="请选择建筑楼层" ref="cascaderAddr"
-                       v-model="buildFloorSelectd">
+          <el-cascader :options="options" @change="changeCascader" placeholder="请选择建筑楼层" ref="cascaderAddr" v-model="buildFloorSelectd">
             <template slot-scope="{ node, data }">
               <span>{{ data.label }}</span>
               <i class="el-icon-warning-outline" v-if="data.Count" style="color:red;margin-right:10px;"></i>
@@ -46,7 +45,8 @@
           @updateState="updateStateSuc"></graphy>
       </div>
       <div v-show="isMyTab == 2">
-        <handsontable-main @lookEqu="lookEqu" ref="handsontable" :zoneCode="activeName" :otherType="otherType" :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>
@@ -63,37 +63,37 @@
   </div>
 </template>
 <script>
-  // import noModelDialog from "@/components/business_space/dialogs/noModelDialog";
-  // import influenceDialog from "@/components/business_space/dialogs/influenceDialog";
-  // import detailsDialog from "@/components/business_space/dialogs/detailsDialog";
-  // import notRelated from "@/components/business_space/dialogs/notRelated";
-  // import facilityDialog from "@/components/business_space/dialogs/facilityDialog";
-  // import graphy from "@/components/business_space/graphy/business";
-  import graphy from "@/components/business_space/newGraphy/graphy";
-  import roomInFloorDialog from "@/components/business_space/newAddDialogs/roomInFloorDialog";
-  import handsontableMain from "@/components/business_space/business/handsontable";
-  import {
-    getDataDictionary,
-    getrelationTypeProject,
-    getSpaceBdFlCount,
-    queryAllZoneType,
-    queryBFloorWithState,
-    zoneCount
-  } from "@/api/scan/request";
-  import floorCascader from "@/components/ledger/lib/floorCascader";
-  import {mapGetters} from "vuex";
+// import noModelDialog from "@/components/business_space/dialogs/noModelDialog";
+// import influenceDialog from "@/components/business_space/dialogs/influenceDialog";
+// import detailsDialog from "@/components/business_space/dialogs/detailsDialog";
+// import notRelated from "@/components/business_space/dialogs/notRelated";
+// import facilityDialog from "@/components/business_space/dialogs/facilityDialog";
+// import graphy from "@/components/business_space/graphy/business";
+import graphy from "@/components/business_space/newGraphy/graphy";
+import roomInFloorDialog from "@/components/business_space/newAddDialogs/roomInFloorDialog";
+import handsontableMain from "@/components/business_space/business/handsontable";
+import {
+  getDataDictionary,
+  getrelationTypeProject,
+  getSpaceBdFlCount,
+  queryAllZoneType,
+  queryBFloorWithState,
+  zoneCount
+} from "@/api/scan/request";
+import floorCascader from "@/components/ledger/lib/floorCascader";
+import { mapGetters } from "vuex";
 
-  export default {
-    components: {
-      graphy,
-      handsontableMain,
-      roomInFloorDialog,
-      floorCascader,
-    },
-    computed: {
-      ...mapGetters('layout', ['projectId', 'userId', 'secret'])
-    },
-    data() {
+export default {
+  components: {
+    graphy,
+    handsontableMain,
+    roomInFloorDialog,
+    floorCascader,
+  },
+  computed: {
+    ...mapGetters('layout', ['projectId', 'userId', 'secret'])
+  },
+  data() {
     return {
       floor: {
         influence: false, //受影响的业务空间弹窗
@@ -296,7 +296,7 @@
         this.initMessage();
       } else {
         this.getInfected(this.buildFloorSelectd[1]);
-        this.$refs.graphy.getData(this.buildFloorSelectd, this.FloorMap, this.activeTabType);
+        this.$refs.graphy.getData(this.buildFloorSelectd, this.FloorMap, this.activeTabType, this.$refs.cascaderAddr.inputValue);
         this.childBackParam = {}
       }
     },