shaun-sheep 5 lat temu
rodzic
commit
60291a7fcc

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

@@ -1,11 +1,11 @@
 <template>
   <div id="handsontable" v-loading="isLoading">
     <el-row class="left">
-      <div style="display: inline-block">
+      <div style="display: inline-block" v-show="!onlyRead && zoneCode === 'OtherZone'">
         <!--      <div v-show="!onlyRead && zoneCode === 'other'">-->
-        <el-button @click="addZoneBtn">添加分区</el-button>
-        <el-select v-model="zoneValue" placeholder="请选择">
-          <el-option v-for="item in addZone" :key="item.value" :label="item.label" :value="item.value">
+        <el-button @click="addZoneBtn" type="primary">添加分区</el-button>
+        <el-select v-model="OtherValue" placeholder="请选择分区类型">
+          <el-option v-for="item in OtherList" :key="item.value" :label="item.label" :value="item.value">
           </el-option>
         </el-select>
         &nbsp;&nbsp; | &nbsp;&nbsp;
@@ -40,7 +40,7 @@
     <qrcode :dialog="dialog" :qrcodeUrl="qrcodeUrl" :addBody="true" ref="qrcode"></qrcode>
     <!--      上传图片-->
     <upload-img-dialog :read="onlyRead" @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog" />
-    <dialogZone ref="zone" />
+    <dialogZone ref="zone" @createSuccess="grtOtherType" />
   </div>
 </template>
 <script>
@@ -66,6 +66,7 @@ import {
   createZone,
   BeatchQueryParam,
   updateRelateInSpAndBuild,
+  queryAllZoneType
 
 } from "@/api/scan/request";
 import { mapGetters, mapActions } from "vuex";
@@ -132,23 +133,8 @@ export default {
         uploadImgs: false, //上传图片弹窗
       },
       imgsArr: [], //空间图片
-      addZone: [{
-        value: '选项1',
-        label: '黄金糕'
-      }, {
-        value: '选项2',
-        label: '双皮奶'
-      }, {
-        value: '选项3',
-        label: '蚵仔煎'
-      }, {
-        value: '选项4',
-        label: '龙须面'
-      }, {
-        value: '选项5',
-        label: '北京烤鸭'
-      }],
-      zoneValue: '',
+     OtherList:[],//其他分区筛选框
+      OtherValue: '',
     };
   },
   created() {
@@ -716,6 +702,24 @@ export default {
     },
     addZoneBtn() {
       this.$refs.zone.dialogFormVisible = true
+    },
+  //  其他分区类型查询
+    grtOtherType() {
+      let param = {
+        Cascade: [{ Name: 'zoneType' }],
+        Filters: `Code="OtherZone"`
+      }
+      queryAllZoneType(param,res=> {
+        if(res.Content[0].ZoneType && res.Content[0].ZoneType.length) {
+          this.OtherList = res.Content[0].ZoneType.map(res=> {
+            t.value = t.Code
+            t.label = t.Name
+            return t
+          })
+        } else {
+          this.OtherList = []
+        }
+      })
     }
   },
   watch: {

+ 2 - 2
src/components/business_space/newGraphy/graphy.vue

@@ -10,13 +10,13 @@
       <canvas id="floorCanvas" :width="canvasWidth" :height="canvasHeight" ref="canvas" tabindex="0"></canvas>
       <!-- 初始两个按钮 -->
       <el-row class="buttons-box">
-        <div style="height:50px;width:100%;background:#fff;" v-if="showOtherFlag">
+        <div style="margin-right: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>
-          <el-button type="promary" @click="addZoneBtn">添加分区</el-button>
         </div>
         <div>
           <el-autocomplete popper-class="my-autocomplete" v-model="search" :fetch-suggestions="querySearch" placeholder="输入平面图中已有的业务空间名称进行查找"