Browse Source

modify childpage back params

haojianlong 5 years ago
parent
commit
743c422f56

+ 1 - 1
package.json

@@ -24,7 +24,7 @@
         "vue-axios": "^2.1.4",
         "vue-router": "^3.0.1",
         "vuex": "^3.1.0",
-        "cad-engine": "2.0.231"
+        "cad-engine": "2.0.233"
     },
     "devDependencies": {
         "ajv": "^6.9.1",

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

@@ -398,7 +398,7 @@ export default {
       let item = this.curZoneItem.data;
       this.$router.push({
         path: "/ledger/spaceDetail",
-        query: { RoomID: item.RoomID, zone: this.zoneCode, isMyTab: 1 }
+        query: { RoomID: item.RoomID, zone: this.tab.code, isMyTab: 1 }
       })
     },
     // 重新划分业务空间
@@ -419,12 +419,15 @@ export default {
         IspaceIdList.push(this.BIMIDToSID[t.data.SourceId])
       })
       zoneObj.RoomID = this.curZoneItem.data.RoomID;
+      if (!zoneObj.Outline.length) {
+        zoneObj.Outline = null;
+      }
       let pa = {
         zone: this.tab.code,
         data: {
-          Content: [zoneObj]
+          Content: [zoneObj],
+          Projection: ['Outline']
         },
-        Projection: ['Outline']
       }
       updateZone(pa, res => {
         this.relationInBSPandISP(zoneObj.RoomID, IspaceIdList)

+ 12 - 10
src/views/ledger/spacelist/index.vue

@@ -114,17 +114,12 @@ export default {
       floorToMap: {}, //楼层及其对应的模型图
       FloorMap: "", //当前选中的楼层平面图
       buildFloorSelectd: [], //当前所选的建筑楼层
+      childBackParam: {}
     };
   },
   created() {
     this.init();
-    let params = this.$route.params;
-    if (params.BuildingId) {
-      this.buildFloorSelectd = [params.BuildingId, params.FloorId];
-      this.activeName = params.zone;
-      this.isMyTab = params.isMyTab;
-      this.changeRadio(this.isMyTab)
-    }
+    this.childBackParam = this.$route.params;
   },
   mounted() { },
   methods: {
@@ -153,6 +148,9 @@ export default {
           }
           return t;
         })
+        if (this.childBackParam.zone) {
+          this.changeCascader(this.buildFloorSelectd)
+        }
       })
     },
     // 切换平面图和列表
@@ -166,9 +164,13 @@ export default {
       }
       queryDictionaryHead(pa, res => {
         this.tabsList = res.Content;
-        console.log(this.activeName == '0')
-        console.log(this.activeName == '0' ? 'GeneralZone' : this.activeName)
-        this.activeName = this.activeName == '0' ? 'GeneralZone' : this.activeName;
+        if (this.childBackParam.zone) {
+          this.activeName = this.childBackParam.zone;
+          this.buildFloorSelectd = [this.childBackParam.BuildingId, this.childBackParam.FloorId];
+          this.isMyTab = this.childBackParam.isMyTab;
+        } else {
+          this.activeName = 'GeneralZone';
+        }
       })
     },
     // 通过选中的tab-Code 获取选中的tab的所有数据