zhangyu il y a 5 ans
Parent
commit
397aa27df8
1 fichiers modifiés avec 24 ajouts et 3 suppressions
  1. 24 3
      src/components/ledger/cenote/elevationMap.vue

+ 24 - 3
src/components/ledger/cenote/elevationMap.vue

@@ -104,14 +104,35 @@
   },
   methods: {
     init () {
+      console.log(JSON.stringify(this.elevationData))
       // console.log(this.params)
       //// 查询竖井关联的空间垂直交通关系
       // shaftVerticalSpace(this.params, (res) => {
       //   this.elevationData = res.Content
       // })
-      let data = this.elevationData.map(floor => {
-        console.log(floor)
+      let max = 0, idMap = {};
+      this.elevationData.reverse().forEach(floor => {
+        if (floor.ZoneSpaceList && floor.ZoneSpaceList.length) {
+          floor.ZoneSpaceList.forEach(space => {
+            if (idMap[space.RoomID]) {
+              space.SpaceIdList.forEach(RoomID =>{
+                if (!idMap[RoomID]) {
+                  idMap[RoomID] = idMap[space.RoomID];
+                }
+              })
+            } else {
+              max++;
+              idMap[space.RoomID] = max;
+              space.SpaceIdList.forEach(RoomID =>{
+                if (!idMap[RoomID]) {
+                  idMap[RoomID] = max;
+                }
+              })
+            }
+          })
+        }
       })
+      console.log(idMap)
     }
   },
   watch: {
@@ -151,7 +172,7 @@
       box-sizing: border-box;
       flex-direction: column;
       justify-content: flex-end;
-      padding-bottom: 60px;
+      padding: 0 10px 60px 0;
       .saga-rf {
         display: flex;
         flex-direction: row;