Browse Source

隐藏其他分区中的添加分区;修改业务空间更新接口报错问题

haojianlong 4 years ago
parent
commit
eaaf55d50e

+ 10 - 11
src/components/business_space/business/handsontable.vue

@@ -1,15 +1,14 @@
 <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="!onlyRead && zoneCode === 'OtherZone'">-->
+      <!-- <div style="display: inline-block" v-show="zoneCode === 'OtherZone'">
         <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>
@@ -283,9 +282,9 @@ export default {
           } else if (item.hasOwnProperty("buildingId") && !item.hasOwnProperty("floorId")) {
             item.flowBuild = item.buildingId
           }
-          if (item.outline) {
-            item.outline = JSON.stringify(item.outline)
-          }
+          // if (item.outline) {
+          //   item.outline = JSON.stringify(item.outline)
+          // }
           return item
         });
 
@@ -576,9 +575,9 @@ export default {
       if (param.data.Projection.indexOf('BuildingId') > -1) {
         let pa = param.data.Content.map(t => {
           return {
-            Type: this.zoneCode,
-            SpaceId: t.id,
-            Id: t.FloorId || t.BuildingId || null,
+            type: this.zoneCode,
+            spaceId: t.id,
+            id: t.FloorId || t.BuildingId || null,
           }
         })
         handleZoneUpdateBd(pa, res => {
@@ -599,8 +598,8 @@ export default {
           }
         })
         let updateParam = {
-          Content: obj,
-          Projection: param.data.Projection
+          content: obj,
+          // projection: param.data.Projection
         };
         zoneUpdate(updateParam, res => {
           this.$message.success('更新成功')

+ 5 - 5
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-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-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">