ソースを参照

注释其他分区添加分区功能;字段多c问题

haojianlong 3 年 前
コミット
c95d844c38

+ 26 - 25
src/components/business_space/business/handsontable.vue

@@ -1,15 +1,15 @@
 <template>
   <div id="handsontable" v-loading="isLoading">
     <el-row class="left">
-      <div style="display: inline-block" v-show="zoneCode === 'OtherZone'">
+      <!-- <div style="display: inline-block" v-show="zoneCode === 'OtherZone'"> -->
         <!--              <div style="display: inline-block" v-show="!onlyRead && zoneCode === 'OtherZone'">-->
-        <el-button @click="addZoneBtn" type="primary">添加分区</el-button>
+        <!-- <el-button @click="addZoneBtn" type="primary">添加分区</el-button>
         <el-select v-model="OtherValue" placeholder="请选择分区类型" @change="changeOtherZone">
           <el-option v-for="item in OtherList" :key="item.value" :label="item.label" :value="item.value">
           </el-option>
         </el-select>
         &nbsp;&nbsp; | &nbsp;&nbsp;
-      </div>
+      </div> -->
       <el-select v-model="onlyRead" @change="getData(false)" style="width:100px;margin-right:20px;vertical-align:bottom;">
         <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
       </el-select>
@@ -173,7 +173,7 @@
       },
       imgsArr: [], //空间图片
       OtherList: [],//其他分区筛选框
-      OtherValue: '',
+      // OtherValue: '',
       addData: {},
     };
   },
@@ -237,24 +237,24 @@
       if (this.zoneItemID) {
         this.zoneParam.Filters = `RoomID="${this.zoneItemID}"`
       }
-      if (this.zoneCode != 'OtherZone') {
+      // if (this.zoneCode != 'OtherZone') {
         this.isLoading = true
         this.getZoneMessage(this.zoneParam)
-      } else {
-        // 其他分区类型查询表数据接口
-        // if (localStorage.getItem('otherZone')) {
-        //   // this.OtherValue = (localStorage.getItem('otherZone'))
-        //   localStorage.removeItem('otherZone')
-        // }
-        if (this.OtherValue) {
-          this.zoneParam.ZoneType = this.OtherValue;
-          this.getZoneMessage(this.zoneParam)
-        } else {
-          this.main = []
-        }
-        this.isLoading = false
-        this.getOtherType();
-      }
+      // } else {
+      //   // 其他分区类型查询表数据接口
+      //   // if (localStorage.getItem('otherZone')) {
+      //   //   // this.OtherValue = (localStorage.getItem('otherZone'))
+      //   //   localStorage.removeItem('otherZone')
+      //   // }
+      //   // if (this.OtherValue) {
+      //   //   this.zoneParam.ZoneType = this.OtherValue;
+      //   //   this.getZoneMessage(this.zoneParam)
+      //   // } else {
+      //     this.main = []
+      //   // }
+      //   this.isLoading = false
+      //   this.getOtherType();
+      // }
     },
     //查询空间信息
     getZoneMessage(param) {
@@ -834,11 +834,12 @@
         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

+ 36 - 25
src/components/business_space/newGraphy/graphy.vue

@@ -1,14 +1,14 @@
 <template>
   <div id="graphy" ref="graphy" v-loading="canvasLoading">
     <div v-show="!FloorMap">
-      <div style="margin-right:10px;width: 100%;margin-bottom: 10px" v-if="showOtherFlag">
+      <!-- <div style="margin-right:10px;width: 100%;margin-bottom: 10px" v-if="showOtherFlag"> -->
         <!-- 平面图其他分区 -->
-        <el-button type="primary" @click="addZoneBtn">添加分区</el-button>
+        <!-- <el-button type="primary" @click="addZoneBtn">添加分区</el-button>
         <el-select v-model="OtherValue" placeholder="请选择分区类型" @change="changeOtherZone">
           <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
           </el-option>
         </el-select>
-      </div>
+      </div> -->
       <div class="center" style="height: 400px;padding-top:182px;box-sizing:border-box;">
         <i class="icon-wushuju iconfont"></i>
         暂无数据
@@ -18,14 +18,14 @@
       <canvas id="floorCanvas" :width="canvasWidth" :height="canvasHeight" ref="canvas" tabindex="0"></canvas>
       <!-- 初始两个按钮 -->
       <el-row class="buttons-box">
-        <div style="margin-right:10px;width: 100%;margin-bottom: 10px" v-if="showOtherFlag">
+        <!-- <div style="margin-right:10px;width: 100%;margin-bottom: 10px" v-if="showOtherFlag"> -->
           <!-- 平面图其他分区 -->
-          <el-button type="primary" @click="addZoneBtn">添加分区</el-button>
+          <!-- <el-button type="primary" @click="addZoneBtn">添加分区</el-button>
           <el-select v-model="OtherValue" placeholder="请选择分区类型" @change="changeOtherZone">
             <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
             </el-option>
           </el-select>
-        </div>
+        </div> -->
         <div>
           <el-autocomplete popper-class="my-autocomplete" v-model="search" :fetch-suggestions="querySearch" placeholder="输入平面图中已有的业务空间名称进行查找"
             width="180px" @select="handleSelect">
@@ -181,7 +181,7 @@
       areaValue: 40,
       areaMarks: { 0: '0m²', 100: '1m²' },
       options: [], //其他分区类型
-      OtherValue: '',
+      // OtherValue: '',
       showOtherFlag: false, //是否显示其他分区类型添加
       buildFloorName: "", //建筑楼层名称
       spaceHeight: 0,
@@ -264,9 +264,9 @@
       })
     },
     //添加其他分区
-    addZoneBtn() {
-      this.$refs.zone.dialogFormVisible = true
-    },
+    // addZoneBtn() {
+    //   this.$refs.zone.dialogFormVisible = true
+    // },
     // 搜索
     querySearch(queryString, cb) {
       let restaurants = this.zoneList;
@@ -334,10 +334,10 @@
       })
     },
     // 其他类型下拉change
-    changeOtherZone(val) {
-      this.init(2);
-      // localStorage.setItem('otherZone', val)
-    },
+    // changeOtherZone(val) {
+    //   this.init(2);
+    //   // localStorage.setItem('otherZone', val)
+    // },
     // 获取未绑定业务空间的元空间
     getISPSPUnrelaBSP() {
       let pa = {
@@ -346,11 +346,13 @@
           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 == 'OtherZone' ? this.OtherValue : this.tab.code
+        let tempType = this.tab.code
         if (res.FloorId == this.buildFloor[1] && res.ZoneType == tempType) {
           this.allUnRelatISP = res.Content;
         }
@@ -402,7 +404,8 @@
     // 获取当前分区下的业务空间
     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 = {
         ZoneType: ObjectType,
         Filters: `not RoomID isNull`,
@@ -415,7 +418,8 @@
       }
       zoneQueryOutline(pa, res => {
         // 类型需要重新获取,直接取pa.ZoneType
-        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.businessSpaceList = res.Content;
@@ -777,7 +781,8 @@
     },
     // 确认业务空间
     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 = {
         RoomID: this.curZoneItem.data.RoomID,
         State: 0,
@@ -1000,7 +1005,8 @@
     },
     // 更新业务空间和元空间的关系
     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
@@ -1019,7 +1025,8 @@
     // 批量更新业务空间和元空间的关系
     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: {
@@ -1040,7 +1047,8 @@
     },
     // 批量创建
     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.ObjectType = ObjectType;
         t.BIMLocation = this.getAverageVal(t.Outline);
@@ -1064,7 +1072,8 @@
     },
     // 单个创建
     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.ObjectType = ObjectType;
       let pa = {
@@ -1076,7 +1085,8 @@
     },
     // 更新业务空间区域
     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.ObjectType = ObjectType;
       zoneObj.BuildingId = this.buildFloor[0];
@@ -1103,7 +1113,8 @@
     },
     // 查询未关联平面图的业务空间(项目下+当前分区)
     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;ObjectType="${ObjectType}"`
       }

+ 1 - 1
src/utils/handsontable/notShow.js

@@ -1234,7 +1234,7 @@ const showTools = {
         } else { //(未支持的输入方式)暂不支持编辑
             return {
                 data: item.Path,
-                readOnly: onlyReadc
+                readOnly: onlyRead
             }
         }
     },