Jelajahi Sumber

其他分区修改

haojianlong 4 tahun lalu
induk
melakukan
a6c6ae185e

+ 17 - 15
src/components/business_space/business/handsontable.vue

@@ -767,15 +767,17 @@ export default {
     /**  页面中的按钮事件--------------------------- */
     addSp() {
       this.myDialog.addSpace = true;
-      if (this.zoneCode && this.zoneCode != 'OtherZone') {
+      // 其他分区 已删除在其他分区下添加子分区
+      // if (this.zoneCode && this.zoneCode != 'OtherZone') {
         this.$nextTick(() => {
           this.$refs.cascader.setValue([this.zoneCode])
         })
-      } else if (this.zoneCode == 'OtherZone' && this.OtherValue) {
-        this.$nextTick(() => {
-          this.$refs.cascader.setValue([this.zoneCode, this.OtherValue])
-        })
-      }
+      // } else if (this.zoneCode == 'OtherZone' && this.OtherValue) {
+      //   this.$nextTick(() => {
+      //     this.$refs.cascader.setValue([this.zoneCode, this.OtherValue])
+      //   })
+      // }
+      // 以下是直接在列表中添加的方法
       // if (this.main && this.main.length && this.main[0].RoomID) {
       //   this.hot.destroy()
       //   this.hot = null
@@ -803,18 +805,18 @@ export default {
     },
     //选择业务空间类型-添加业务空间
     changeAddType(val, item, value) {
-      if (value.length == 2 && value[0] == "OtherZone") {
-        this.addData.spaceType = val;
-        this.addData.otherType = value[0]
-        this.addData.spaceName = `其他分区-${item.Name}`;
-        this.addData.showType = this.showType;
-        this.addData.buildFloorSelectd = this.buildFloorSelectd;
-      } else {
+      // if (value.length == 2 && value[0] == "OtherZone") {
+      //   this.addData.spaceType = val;
+      //   this.addData.otherType = value[0]
+      //   this.addData.spaceName = `其他分区-${item.name}`;
+      //   this.addData.showType = this.showType;
+      //   this.addData.buildFloorSelectd = this.buildFloorSelectd;
+      // } else {
         this.addData.spaceType = val;
-        this.addData.spaceName = item.Name;
+        this.addData.spaceName = item.name;
         this.addData.showType = this.showType;
         this.addData.buildFloorSelectd = this.buildFloorSelectd;
-      }
+      // }
     },
     //刷新
     reset() {

+ 24 - 11
src/components/business_space/newGraphy/graphy.vue

@@ -345,11 +345,13 @@ export default {
           pageSize: 1000,
           floorId: this.buildFloor[1]
         },
-        objectType: this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code
+        objectType: this.tab.code
+        // objectType: this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code
       }
       getIspNotInSpace(pa, res => {
         // 类型需要重新获取,直接取pa.objecttype有问题
-        let tempType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code
+        let tempType = this.tab.code
+        // let tempType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code
         if (res.floorId == this.buildFloor[1] && res.zoneType == tempType) {
           this.allUnRelatISP = res.content;
         }
@@ -400,7 +402,9 @@ export default {
     // 获取当前分区下的业务空间
     getBusinessSpace() {
       this.canvasLoading = true
-      let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
+      // 其他分区 已删除在其他分区下添加子分区
+      // let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
+      let ObjectType = this.tab.code;
       let pa = {
         // cascader: [{name: 'spaceOutline'}],
         zoneType: ObjectType,
@@ -416,7 +420,9 @@ export default {
       // zoneQueryOutline
       zoneQueryOutline(pa, res => {
         // 类型需要重新获取,直接取pa.ZoneType
-        let tempType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
+        // 其他分区已删除 在其他分区下添加子分区
+        // let tempType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
+        let tempType = this.tab.code;
         if (res.floorId == this.buildFloor[1] && res.zoneType == tempType) {
           // 所有业务空间
           this.businessSpaceList = res.content;
@@ -833,7 +839,8 @@ export default {
     },
     // 确认业务空间
     confirmZoneSpace() {
-      let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
+      let ObjectType = this.tab.code
+      // let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
       let space = {
         id: this.curZoneItem.data.RoomID,
         state: 0,
@@ -1080,7 +1087,8 @@ export default {
     },
     // 更新业务空间和元空间的关系
     relationInBSPandISP(SpaceId, IspaceIdList) {
-      let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
+      let ObjectType = this.tab.code;
+      // let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
       let pa = {
         data: { spaceId: SpaceId, ispaceIdList: IspaceIdList },
         type: ObjectType
@@ -1099,7 +1107,8 @@ export default {
     // 批量更新业务空间和元空间的关系
     groupCreRelaZoneAndISp(Spaces) {
       Spaces = Spaces.filter(item => item.ispaceId);
-      let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
+      let ObjectType = this.tab.code;
+      // let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
       if (Spaces.length) {
         let param = {
           data: {
@@ -1120,7 +1129,8 @@ export default {
     },
     // 批量创建
     groupCreateBSP(spaces) {
-      let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
+      let ObjectType = this.tab.code;
+      // let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
       spaces = spaces.map(t => {
         t.classCode = ObjectType;
         t.bimLocation = this.getAverageVal(t.outline);
@@ -1143,7 +1153,8 @@ export default {
     },
     // 单个创建
     createSingleBSP(space, IspaceIdList) {
-      let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
+      let ObjectType = this.tab.code;
+      // let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
       space.bimLocation = space.outline ? this.getAverageVal(space.outline) : null;
       space.classCode = ObjectType;
       let pa = {
@@ -1155,7 +1166,8 @@ export default {
     },
     // 更新业务空间区域
     updateBSPOutline(zoneObj, IspaceIdList) {
-      let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
+      let ObjectType = this.tab.code;
+      // let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
       zoneObj.bimLocation = zoneObj.outline ? this.getAverageVal(zoneObj.outline) : null;
       zoneObj.classCode = ObjectType;
       zoneObj.buildingId = this.buildFloor[0];
@@ -1182,7 +1194,8 @@ export default {
     },
     // 查询未关联平面图的业务空间(项目下+当前分区)
     getBSPunrelaISP() {
-      let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
+      let ObjectType = this.tab.code;
+      // let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
       let pa = {
         Filters: `outline isNull;classCode="${ObjectType}"`
       }