6
0

2 Коммиты de014f4c82 ... c7a345ba82

Автор SHA1 Сообщение Дата
  LXXXY c7a345ba82 Merge branch 'msg-sever' of http://39.106.8.246:3003/web/ibms into msg-sever 5 лет назад
  LXXXY af76859f90 位置标签整理,竖井业务空间调修 5 лет назад

+ 2 - 2
src/components/data_admin/zoneInput.vue

@@ -8,11 +8,11 @@
             <template slot="append" v-if="item.Unit">{{item.Unit}}</template>
           </el-input>
           <el-input v-model="item.inputValue" v-else-if="item.InputMode == 'B1' || item.InputMode == 'L' || item.InputMode == 'M'"></el-input>
-          <el-select v-model="item.inputValue" v-else-if="item.InputMode == 'D1L'" placeholder="请选择">
+          <el-select v-model="item.inputValue" v-else-if="item.InputMode == 'D1'" placeholder="请选择">
             <el-option v-for="(soption,skey) in item.options" :key="skey" :label="soption.Name" :value="soption.Code">
             </el-option>
           </el-select>
-          <el-cascader v-model="item.inputValue" v-else-if="item.InputMode == 'D1'" placeholder="请选择"
+          <el-cascader v-model="item.inputValue" v-else-if="item.InputMode == 'D1L'" placeholder="请选择"
             :props="item.props" :options="item.options" filterable :show-all-levels="false"></el-cascader>
           <el-input v-model="item.inputValue" v-else></el-input>
         </el-form-item>

+ 5 - 2
src/components/ledger/lib/cenoteGraphy.vue

@@ -9,7 +9,7 @@
     <div class="canvas-box" v-show="floorMap" v-loading="canvasLoading">
       <canvas id="floorCanvas" :width="canvasWidth" :height="canvasHeight" ref="canvas" tabindex="0"></canvas>
       <el-row class="canvas-actions-box">
-        <canvasFun @scale="scale" @savePng="savePng" @saveSvg="saveSvg" @saveJson="saveJson" :config="config" ref="canvasFun"></canvasFun>
+        <canvasFun @scale="scale" @fit="fit" @savePng="savePng" @saveSvg="saveSvg" @saveJson="saveJson" :config="config" ref="canvasFun"></canvasFun>
       </el-row>
     </div>
   </div>
@@ -57,7 +57,7 @@ export default {
   methods: {
     //获取楼层map
     getFloorMap(buildfloor, space) {
-      if (buildfloor.length == 2 && space && buildfloor[1]) {
+      if (buildfloor.length == 2 && space && buildfloor[1] && buildfloor[0]) {
         this.buildingData = buildfloor
         let pa = {
           Filters: `FloorID='${this.buildingData[1]}'`
@@ -68,6 +68,9 @@ export default {
           this.getGraphy();
         })
       }
+      else{
+        this.floorMap = '';
+      }
     },
     //加载
     load() {

+ 4 - 4
src/router/system.js

@@ -100,14 +100,14 @@ export default [{
     { path: '/auth', name: 'auth', component: auth },
     { path: '/noUser', name: 'noUser', component: noUser },
     // 业务空间数据导入工具
-    { 
+    {
         path: '/dataUtil',
         name: 'dataUtil',
         component: LayoutMain,
-        children:[
+        children: [
             { path: 'index', component: dataUtil },
             { path: 'index2', component: dataUtil2 }
-        ] 
+        ]
     },
     // 平台管理
     {
@@ -395,7 +395,7 @@ export default [{
                 path: 'relatedSpace',
                 name: 'relatedSpace',
                 component: relatedSpace,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '竖井台账', path: '/ledger/cenotelist' }, { label: '竖井关联的空间' }] }
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '竖井台账', path: '/ledger/cenotelist' }, { label: '竖井关联的业务空间' }] }
             },
             {
                 path: 'rentlist',

+ 7 - 7
src/views/data_admin/buildGraphy/graphyTabs.vue

@@ -56,9 +56,9 @@ getLocation 定位
             -({{pointDetails.X}},{{pointDetails.Y}})
           </p>
           <div>
-            <form-input :width="100" @change="changeInput" :value="pointDetails.PointName" :keys="'PointName'" :label="'点位标签'" :isRule="false">
+            <form-input :width="100" @change="changeInput" :value="pointDetails.Name" :keys="'Name'" :label="'点位标签'" :isRule="false">
             </form-input>
-            <form-input :width="100" @change="changeInput" :value="pointDetails.PointLocalId" :keys="'PointLocalId'" :label="'点位本地编码'"
+            <form-input :width="100" @change="changeInput" :value="pointDetails.LocalId" :keys="'LocalId'" :label="'点位本地编码'"
               :isRule="false"></form-input>
             <!-- <form-input></form-input> -->
           </div>
@@ -217,35 +217,35 @@ export default {
       switch (name) {
         case "安装位置":
           this.installPic.push({
-            key: val,
+            Key: val,
             name: name,
             type: "image_wz"
           });
           break;
         case "全景照片":
           this.panorama.push({
-            key: val,
+            Key: val,
             name: name,
             type: "panorama"
           });
           break;
         case "周边照片":
           this.rimPic.push({
-            key: val,
+            Key: val,
             name: name,
             type: "image_zb"
           });
           break;
         case "视频":
           this.videoPic.push({
-            key: val,
+            Key: val,
             name: name,
             type: "video"
           });
           break;
         default:
           this.elsePic.push({
-            key: val,
+            Key: val,
             name: name,
             type: "image_else"
           });

+ 3 - 3
src/views/data_admin/buildGraphy/locationPointMsg.vue

@@ -1,9 +1,9 @@
 <template>
   <div id="locationPointMsg" style="width:100%;border:1px solid rgb(204,204,204)">
     <div style="padding:5px 10px;border-bottom:1px solid rgb(204,204,204);">
-      <label class="item">位置标签名称:{{pointObj.Name}}</label>
-      <label class="item">本地编码:{{pointObj.Id}}</label>
-      <label class="item">备注:{{pointObj.Name}}</label>
+      <label class="item">位置标签名称:{{pointObj.Name || '--'}}</label>
+      <label class="item">本地编码:{{pointObj.LocalId || '--'}}</label>
+      <label class="item">备注:{{pointObj.Note || '--'}}</label>
     </div>
     <div style="padding:5px 10px;">
       <p>勾选需要补充到业务空间的图片信息</p>

+ 1 - 1
src/views/ledger/cenotelist/index.vue

@@ -290,7 +290,7 @@ export default {
     formatHeaderData(list) {//格式化表头显示的数据
       let arr = tools.copyArr(list)
       let data = showTools.headerTextFilter(arr, "shaft", this.onlyRead, this.showType)
-      data.unshift("关联的空间", "其他关系");
+      data.unshift("关联的业务空间", "其他关系");
       return data;
     },
     formatHeaderType(list) {//格式化表头头映射的数据

+ 45 - 37
src/views/ledger/cenotelist/relatedSpace.vue

@@ -3,7 +3,6 @@
     <div class="condition">
       <div class="header">
         <el-button style="float:left;" size="small" type="default" icon="el-icon-back" @click="goBack"></el-button>
-        <span style="float:left;">{{ cenoteObj.name || '' }}</span>
         <div class="edit-tool" v-if="!cenoteObj.onlyRead">
           <el-button v-if="isMyTab == 2" size="small" style="float:right" @click="dialogVisible = true">添加</el-button>
           <div v-else>
@@ -14,7 +13,8 @@
           <addSpaceDialog :dialogVisible.sync="dialogVisible" ref="addSpaceDialog" @refresh="refresh" :params="cenoteObj" :spaceType="spaceType"
             :floorType="floorType"></addSpaceDialog>
         </div>
-        <el-badge :is-dot="showSpaceDot">
+        <el-badge :is-dot="showSpaceDot" style="margin-left:15px;">
+          <label style="line-height:32px;">业务空间类型:</label>
           <el-select v-model="space" placeholder="请选择业务空间" @change="changeSpace" style="margin-left:15px;">
             <el-option v-for="item in spaceList" :key="item.Code" :label="item.Name" :value="item.Code">
             </el-option>
@@ -29,9 +29,10 @@
       </div>
       <div v-show="isMyTab == 1" class="data-item">
         <el-badge :is-dot="showBuildDot">
-        <el-select v-model="building" placeholder="请选择建筑" @change="changeBuilding" v-loading="buildingLoading">
-          <el-option v-for="item in buildingList" :key="item.value" :label="item.BuildLocalName" :value="item.BuildID"></el-option>
-        </el-select>
+          <label style="line-height:32px;padding: 0 10px;">所属建筑:</label>
+          <el-select v-model="building" placeholder="请选择建筑" @change="changeBuilding" v-loading="buildingLoading">
+            <el-option v-for="item in buildingList" :key="item.value" :label="item.BuildLocalName" :value="item.BuildID"></el-option>
+          </el-select>
         </el-badge>
         <div style="height:calc(100% - 42px);margin:10px 0 0 0;width:100%;position:relative;">
           <el-scrollbar style="height:100%;width:148px;border:1px solid rgb(201,201,201);margin:0px;float:left;">
@@ -43,7 +44,7 @@
               </div>
             </div>
           </el-scrollbar>
-          <div style="float:right;height:100%;width:calc(100% - 152px);border:1px solid rgb(201,201,201);">
+          <div style="float:right;height:100%;width:calc(100% - 152px);border:1px solid rgb(201,201,201);border-left:none;">
             <cenote-graphy ref="cenotegraphy"></cenote-graphy>
           </div>
         </div>
@@ -79,8 +80,8 @@ export default {
       spaceType: {},//空间种类
       floorType: {},//子组件楼层信息
       buildingLoading: false,//左侧列表加载
-      showSpaceDot:false,//空间提示红点
-      showBuildDot:false,//楼层提示红点
+      showSpaceDot: false,//空间提示红点
+      showBuildDot: false,//楼层提示红点
     }
   },
   computed: {
@@ -134,7 +135,7 @@ export default {
     showDefaultSpace() {
       if (this.spaceList.length) {
         this.space = this.spaceList[0].Code;
-        if(this.spaceList.length > 1 && this.cenoteObj.onlyRead){
+        if (this.spaceList.length > 1 && this.cenoteObj.onlyRead) {
           this.showSpaceDot = true;
         }
       }
@@ -188,15 +189,26 @@ export default {
     },
     //处理建筑楼层数据
     handleBuildingData() {
+      if (this.isMyTab == 2) {
+        this.$refs.relatedSpacelist.setFloorData(this.buildingList);
+      }
       if (this.buildingList.length) {
-        this.building = this.buildingList[0].BuildID;
-        this.buildingObj = this.buildingList[0];
-        if (this.buildingObj.Floor && this.buildingObj.Floor.length) {
-          this.floor = this.buildingObj.Floor[0].FloorID;
-        }
-        if(this.buildingList.length > 1 && this.cenoteObj.onlyRead){
+        if (this.buildingList.length > 1 && this.cenoteObj.onlyRead) {
           this.showBuildDot = true;
         }
+        this.changeBuilding(this.buildingList[0].BuildID);
+        // this.building = this.buildingList[0].BuildID;
+        // this.buildingObj = this.buildingList[0];
+        // if (this.buildingObj.Floor && this.buildingObj.Floor.length) {
+        //   this.floor = this.buildingObj.Floor[0].FloorID;
+        // }
+
+      }
+      else {
+        this.buildingList = [];
+        this.building = '';
+        this.floor = '';
+        this.showBuildDot = false;
       }
       this.buildingList.map(item => {
         if (item.BuildID && item.BuildLocalName) {
@@ -213,17 +225,24 @@ export default {
     },
     //更改业务空间类型
     changeSpace(val) {
+      this.showSpaceDot = false;
       this.space = val;
+      this.floor = '';
+      this.buildingList = [];
+      this.building = '';
+      this.changeFloor('');
       this.loadBuildingData();
-      this.showSpaceDot = false;
     },
     //更换建筑
     changeBuilding(bid) {
+      this.buildingObj = {};
+      this.building = bid;
       this.buildingList.map(item => {
         if (item.BuildID == bid) {
           this.buildingObj = item;
           if (item.Floor && item.Floor.length) {
-            this.floor = item.Floor[0].FloorID
+            // this.floor = item.Floor[0].FloorID
+            this.changeFloor(item.Floor[0].FloorID);
           }
         }
       })
@@ -232,14 +251,17 @@ export default {
     //更换楼层
     changeFloor(fid) {
       this.floor = fid;
+      this.isEdit = false;
+      let buildfloor = [this.building, fid]
+      this.$refs.cenotegraphy.getFloorMap(buildfloor, this.space)
     },
     //取消编辑
-    cancelEdit(){
+    cancelEdit() {
       this.isEdit = false;
       this.$refs.cenotegraphy.cancelEdit();
     },
     //保存编辑
-    saveEdit(){
+    saveEdit() {
       this.isEdit = false;
       this.$refs.cenotegraphy.saveEdit();
     },
@@ -271,27 +293,13 @@ export default {
     }
   },
   watch: {
-    floor: {
-      handler(val) {
-          this.isEdit = false;
-          let buildfloor = [this.building, val]
-          this.$refs.cenotegraphy.getFloorMap(buildfloor, this.space)
-      }
-    },
-    space: {
-      handler(val) {
-          this.isEdit = false;
-          let buildfloor = [this.building, this.floor]
-          this.$refs.cenotegraphy.getFloorMap(buildfloor, val)
-      }
-    },
     isEdit: {
       handler(val) {
         this.$refs.cenotegraphy.setSelectAble(val);
       }
     },
-    projectId:{
-      handler(val){
+    projectId: {
+      handler(val) {
         this.goBack();
       }
     }
@@ -375,8 +383,8 @@ export default {
 .data-item {
   height: calc(100% - 44px);
   padding: 10px 0px;
-  /deep/ .is-horizontal{
-    display:none
+  /deep/ .is-horizontal {
+    display: none;
   }
 }
 .floor-item {

+ 113 - 63
src/views/ledger/cenotelist/relatedSpaceList.vue

@@ -4,32 +4,31 @@
       <el-input v-model="keyword" placeholder="请输入关键词" @keyup.enter.native="getSpaceList" style="width:240px;margin:0 0;">
         <i slot="suffix" class="el-input__icon el-icon-search" @click="getSpaceList"></i>
       </el-input>
+      <label style="line-height:32px;padding: 0 10px;">所属建筑楼层:</label>
       <el-cascader v-model="Buildfloor" :options="buildingData" @change="handleChange"></el-cascader>
     </div>
     <div class="table-area" style="height:calc(100% - 52px)">
-      <el-scrollbar style="height:calc(100% - 48px);">
-        <el-table :data="tableData" style="width: 100%;height:100%;" v-loading="loading" :header-cell-style="headerStyle">
-          <el-table-column label='业务空间建筑楼层' show-overflow-tooltip min-width="200" header-align='center' align="center">
-            <template slot-scope="scope">
-              {{ scope.row.BuildingId && floorType[scope.row.BuildingId]? ((floorType[scope.row.BuildingId] || '') + (scope.row.FloorId && floorType[scope.row.FloorId] ? (' - ' + floorType[scope.row.FloorId] || '') : '')) : ''}}
-            </template>
-          </el-table-column>
-          <el-table-column label='业务空间类型' show-overflow-tooltip min-width="200" header-align='center' align="center">
-            <template slot-scope="scope">
-              {{spaceType[scope.row.ObjectType] || ''}}
-            </template>
-          </el-table-column>
-          <el-table-column prop='RoomLocalName' label='业务空间本地名称' show-overflow-tooltip min-width="200" header-align='center' align="center">
-          </el-table-column>
-          <el-table-column prop='RoomLocalID' label='业务空间本地编码' show-overflow-tooltip min-width="200" header-align='center' align="center">
-          </el-table-column>
-          <el-table-column v-if="!$route.query.onlyRead" prop='' label='操作' show-overflow-tooltip min-width="90" header-align='center' align='center'>
-            <template slot-scope="scope">
-              <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain icon="el-icon-delete"></el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-      </el-scrollbar>
+      <el-table :data="tableData" style="width: 100%;height:calc(100% - 48px);" v-loading="loading" :header-cell-style="headerStyle">
+        <el-table-column label='业务空间建筑楼层' show-overflow-tooltip min-width="200" header-align='center' align="center">
+          <template slot-scope="scope">
+            {{ scope.row.BuildingId && floorType[scope.row.BuildingId]? ((floorType[scope.row.BuildingId] || '') + (scope.row.FloorId && floorType[scope.row.FloorId] ? (' - ' + floorType[scope.row.FloorId] || '') : '')) : ''}}
+          </template>
+        </el-table-column>
+        <el-table-column label='业务空间类型' show-overflow-tooltip min-width="200" header-align='center' align="center">
+          <template slot-scope="scope">
+            {{spaceType[scope.row.ObjectType] || ''}}
+          </template>
+        </el-table-column>
+        <el-table-column prop='RoomLocalName' label='业务空间本地名称' show-overflow-tooltip min-width="200" header-align='center' align="center">
+        </el-table-column>
+        <el-table-column prop='RoomLocalID' label='业务空间本地编码' show-overflow-tooltip min-width="200" header-align='center' align="center">
+        </el-table-column>
+        <el-table-column v-if="!$route.query.onlyRead" prop='' label='操作' show-overflow-tooltip min-width="90" header-align='center' align='center'>
+          <template slot-scope="scope">
+            <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain icon="el-icon-delete"></el-button>
+          </template>
+        </el-table-column>
+      </el-table>
       <!-- 分页 -->
       <el-pagination @size-change="getSpaceList" @current-change="getSpaceList" :current-page="currentPage" :page-sizes="pageSizes"
         :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="tableData.length" style="float:right;padding:20px 20px 0 0;">
@@ -39,7 +38,7 @@
 </template>
 
 <script>
-import { shaftSpaceQuery,spaceInShaftUnlink } from "@/api/scan/request";
+import { shaftSpaceQuery, spaceInShaftUnlink } from "@/api/scan/request";
 export default {
   data() {
     return {
@@ -54,7 +53,6 @@ export default {
       currentPage: 1,
       keyword: '',//关键词
       floor: '',//当前楼层
-      options: [],//楼层
       tableData: [],//表格数据
       loading: false,//加载
       Buildfloor: ["all"],//当前选中的楼层
@@ -64,6 +62,7 @@ export default {
         pageNumber: 1,
         total: 0
       },
+      buildingData: [],//楼层数据
     }
   },
   components: {
@@ -136,53 +135,98 @@ export default {
         this.getSpaceList();
       });
     },
+    //楼层
+    setFloorData(val) {
+      if (val && val.length) {
+        let bL = val.concat();
+        bL.map(item => {
+          item.value = item.BuildID;
+          item.label = item.BuildLocalName;
+          item.children = [];
+          if (item.Floor instanceof Array) {
+            item.children = item.Floor.map(fitem => {
+              fitem.value = fitem.FloorID
+              fitem.label = fitem.FloorLocalName
+              return fitem
+            })
+          }
+          if (!this.$route.query.onlyRead) {
+            item.children.unshift({
+              value: "noKnow",
+              label: "未明确建筑"
+            })
+          }
+          item.children.unshift({
+            value: "all",
+            label: "全部"
+          })
+        });
+        if (!this.$route.query.onlyRead) {
+          bL.unshift({
+            value: "all",
+            label: "全部"
+          }, {
+            value: "noKnow",
+            label: "未明确建筑"
+          });
+        }
+        this.buildingData = bL;
+      }
+      else {
+        this.buildingData = [];
+      }
+    }
   },
   props: {
     space: '',//空间id
     buildingList: {//建筑楼层
       Type: Array,
-      default: () => []
+      default: []
     },
     spaceType: Object,
     floorType: Object
   },
-  computed: {
-    buildingData() {
-      let bL = this.buildingList.concat();
-      bL.map(item => {
-        item.value = item.BuildID;
-        item.label = item.BuildLocalName;
-        item.children = [];
-        if (item.Floor instanceof Array) {
-          item.children = item.Floor.map(fitem => {
-            fitem.value = fitem.FloorID
-            fitem.label = fitem.FloorLocalName
-            return fitem
-          })
-        }
-        if (!this.$route.query.onlyRead) {
-          item.children.unshift({
-            value: "noKnow",
-            label: "未明确建筑"
-          })
-        }
-        item.children.unshift({
-          value: "all",
-          label: "全部"
-        })
-      });
-      if (!this.$route.query.onlyRead) {
-        bL.unshift({
-          value: "all",
-          label: "全部"
-        }, {
-          value: "noKnow",
-          label: "未明确建筑"
-        });
-      }
-      return bL;
-    }
-  },
+  // computed: {
+  //   buildingData() {
+  //     if (!this.buildingList || !this.buildingList.length) {
+  //       return [];
+  //     }
+  //     let bL = this.buildingList.concat();
+  //     bL.map(item => {
+  //       item.value = item.BuildID;
+  //       item.label = item.BuildLocalName;
+  //       item.children = [];
+  //       if (item.Floor instanceof Array) {
+  //         item.children = item.Floor.map(fitem => {
+  //           fitem.value = fitem.FloorID
+  //           fitem.label = fitem.FloorLocalName
+  //           return fitem
+  //         })
+  //       }
+  //       if (!this.$route.query.onlyRead) {
+  //         item.children.unshift({
+  //           value: "noKnow",
+  //           label: "未明确建筑"
+  //         })
+  //       }
+  //       item.children.unshift({
+  //         value: "all",
+  //         label: "全部"
+  //       })
+  //     });
+  //     if (!this.$route.query.onlyRead) {
+  //       bL.unshift({
+  //         value: "all",
+  //         label: "全部"
+  //       }, {
+  //         value: "noKnow",
+  //         label: "未明确建筑"
+  //       });
+  //     }
+  //     console.log("这是", bL)
+  //     return bL;
+  //   }
+  // },
   watch: {
     space: {
       handler() {
@@ -202,5 +246,11 @@ export default {
   /deep/ .el-scrollbar__wrap {
     overflow-x: hidden;
   }
+  /deep/ .el-table__body-wrapper{
+    overflow-x:hidden;
+    overflow-y:auto;
+    height:calc(100% - 47px);
+    width:100%;
+  }
 }
 </style>