Explorar o código

Merge branch 'msg-sever' into dev

haojianlong %!s(int64=5) %!d(string=hai) anos
pai
achega
58dd1ef899

+ 111 - 0
src/components/business_space/newAddDialogs/roomInFloorDialog.vue

@@ -0,0 +1,111 @@
+<template>
+  <el-dialog :title="title" :visible.sync="dialogVisible" width="800px" id="addSyDialog">
+    <div class="table-box">
+      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="headerStyle" ref="multipleTable">
+        <el-table-column label="业务空间名称" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.SysLocalName||scope.row.SysName||''}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="SysLocalID" label="所属建筑" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="SysLocalID" label="所属楼层" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="action" label="操作" min-width="100">
+          <template slot-scope="scope">
+            <el-button size="mini" @click="toDetail(scope.$index, scope.row)" type="primary" plain>查看详情</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="dialogVisible = false">取 消</el-button>
+      <el-button size="small" type="primary" @click="savaRelation">确 定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+
+<script>
+import {
+  notSyInSpaceQuery, //没有和当前空间绑定的系统
+  syInSpaceCreate, //系统所在业务空间--创建关系
+} from "@/api/scan/request";
+export default {
+  data() {
+    return {
+      title: '请选择业务空间所属建筑',
+      inSpaceType: '系统',
+      dialogVisible: false,
+      tableData: [],
+      loading: false,
+      headerStyle: {
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      }, // 列表样式
+      selections: [], // 选中项
+    }
+  },
+  props: {
+    type: {}, //equipment--equipmentFor
+    spaceId: {},
+    zone: {}, //分区类型 
+  },
+  methods: {
+    // 显示
+    showDialog() {
+      this.dialogVisible = true;
+      this.tableData = [];
+      this.getTableData();
+    },
+    // 选中项修改
+    handleSelectionChange(val) {
+      this.selections = val;
+    },
+    // 确认
+    savaRelation() {
+      let pa = {
+        data: {
+          SpaceId: this.spaceId,
+          SysIdList: []
+        },
+        type: this.zone
+      }
+      this.selections.map(t => {
+        pa.data.SysIdList.push(t.SysID)
+      })
+      syInSpaceCreate(pa, res => {
+        this.$message.success('关联成功');
+        this.$emit('refresh');
+        this.dialogVisible = false;
+      })
+    },
+    // 获取表格数据
+    getTableData() {
+      let pa = {
+        data: {
+          PageSize: 200,
+          Orders: 'SysID asc'
+        },
+        type: this.zone,
+        spaceId: this.spaceId
+      }
+      notSyInSpaceQuery(pa, res => {
+        this.tableData = res.Content;
+      })
+    },
+    // 查看详情
+    toDetail() {
+      this.$message('开发中')
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+#addSyDialog {
+  .table-box {
+    height: 350px;
+  }
+}
+</style>

+ 2 - 1
src/components/business_space/newGraphy/canvasFun.vue

@@ -42,7 +42,7 @@
       <i class="iconfont icon-narrow" @click="reduce"></i>
     </div>
     <div class="line">
-      <el-slider tooltip-class="tooltip-class" :min="min" v-model="sliderVal" :show-tooltip="false" @input="scale"></el-slider>
+      <el-slider tooltip-class="tooltip-class" :min="min" v-model="sliderVal" :show-tooltip="false" @input="scale" :max="max"></el-slider>
     </div>
     <div>
       <i class="iconfont icon-zoom" @click="plus"></i>
@@ -56,6 +56,7 @@ export default {
       sliderVal: 1, // 滑块值
       active: '',
       min: 1,
+      max: 1000,
       everyScale: 1, // 每份的放大倍数
       isSwitch: false, // 是否开启吸附
     }

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

@@ -286,7 +286,6 @@ export default {
         // 绘制业务空间
         that.getBusinessSpace();
         that.view.fitSceneToView();
-        that.view.maxScale = that.view.scale * 10;
         that.view.minScale = that.view.scale;
         if (that.$refs.canvasFun) {
           that.$refs.canvasFun.everyScale = that.view.scale;
@@ -812,7 +811,8 @@ export default {
     "view.scale": {
       handler(n) {
         if (this.$refs.canvasFun) {
-          this.$refs.canvasFun.sliderVal = n * 10 / this.view.minScale;
+          let s = n * 10 / this.view.minScale
+          this.$refs.canvasFun.sliderVal = s > 1000 ? 1000 : s;
         }
       }
     },

+ 2 - 2
src/components/data_admin/buildTask/draw/drawModel.vue

@@ -118,7 +118,6 @@ export default {
       this.view.fitSceneToView();
       this.drawMainScene.click(this, this.canvasClick);
       if (this.$refs.canvasFun) {
-        this.view.maxScale = this.view.scale * 10;
         this.view.minScale = this.view.scale;
         this.$refs.canvasFun.everyScale = this.view.scale;
       }
@@ -211,7 +210,8 @@ export default {
     "view.scale": {
       handler(n) {
         if (this.$refs.canvasFun) {
-          this.$refs.canvasFun.sliderVal = n * 10 / this.view.minScale;
+          let s = n * 10 / this.view.minScale
+          this.$refs.canvasFun.sliderVal = s > 1000 ? 1000 : s;
         }
       }
     },

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

@@ -99,7 +99,6 @@ export default {
         // 绘制业务空间
         that.getBusinessSpace();
         that.view.fitSceneToView();
-        that.view.maxScale = that.view.scale * 10;
         that.view.minScale = that.view.scale;
         if (that.$refs.canvasFun) {
           that.$refs.canvasFun.everyScale = that.view.scale;
@@ -276,7 +275,8 @@ export default {
     "view.scale": {
       handler(n) {
         if (this.$refs.canvasFun) {
-          this.$refs.canvasFun.sliderVal = n * 10 / this.view.minScale;
+          let s = n * 10 / this.view.minScale
+          this.$refs.canvasFun.sliderVal = s > 1000 ? 1000 : s;
         }
       }
     }

+ 2 - 2
src/views/data_admin/buildGraphy/graphyCanvas.vue

@@ -100,7 +100,6 @@ export default {
         that.scene.markerClick(that, that.markClick);
         that.scene.spaceClick(that, that.spaceClick);
         that.view.fitSceneToView();
-        that.view.maxScale = that.view.scale * 10;
         that.view.minScale = that.view.scale;
         // that.view.minScale = 0.000001;
         if (that.$refs.canvasFun) {
@@ -307,7 +306,8 @@ export default {
     "view.scale": {
       handler(n, o) {
         if (this.$refs.canvasFun) {
-          this.$refs.canvasFun.sliderVal = n * 10 / this.view.minScale;
+          let s = n * 10 / this.view.minScale
+          this.$refs.canvasFun.sliderVal = s > 1000 ? 1000 : s;
         }
       }
     }

+ 31 - 22
src/views/ledger/spacelist/index.vue

@@ -3,18 +3,12 @@
  -->
 <template>
   <div id="businessSpace">
-    <!------------------------    头部弹窗,选择楼层信息     -------------->
-    <!-- <influence-dialog ref="influence" :param="param" :tabsList="tabsList" title="受元空间变化影响的业务空间" :isShow="floor"></influence-dialog> -->
-    <details-dialog ref="details" @del="delSuccess" :param="param" :tabsList="tabsList" title="业务空间详情" :isShow="floor" :activeTabType="activeTabType">
-    </details-dialog>
-    <not-related ref="notRelated" @createSuccess="createSuccess" :isShow="floor"></not-related>
-    <facility-dialog ref="facility" :activeTabType="activeTabType" :isShow="floor"></facility-dialog>
+    <!-- 空间属于多个建筑楼层 -->
+    <!-- <roomInFloorDialog ref="roomInFloorDialog"></roomInFloorDialog> -->
     <!--------- 页面头部   -------------->
-    <div class="saga-title">
+    <div class="saga-title" v-show="1">
       <div class="saga-build-mess">
-        <!-- <span style="padding-right:12px;color:#999999;">建筑楼层</span> -->
         <floorCascader @change="changeCascader" ref="floorCascader"></floorCascader>
-        <!-- <el-cascader :options="options" v-model="buildFloorSelectd" :props="props" @change="changeCascader"></el-cascader> -->
       </div>
       <div class="saga-build-tab">
         <el-radio-group v-model="isMyTab" @change="changeRadio" style="width: 136px;">
@@ -22,8 +16,9 @@
           <el-radio-button label="2" class="space-own-radio" style="width: 68px;">列表</el-radio-button>
         </el-radio-group>
       </div>
+      <!-- <div class="saga-build-tips" v-if="1" @click="getTips">有25个空间同时属于多个建筑楼层,点击处理</div> -->
     </div>
-    <div class="saga-business-sapce-main">
+    <div class="saga-business-sapce-main" v-show="1">
       <el-row class="spaceTypes">
         <div class="types">
           <el-tabs v-model="activeName" type='card' @tab-click="tabClick">
@@ -40,16 +35,24 @@
         <handsontable-main @lookEqu="lookEqu" ref="handsontable" :zoneCode="activeName" :id="`handsontable${activeName}`"></handsontable-main>
       </div>
     </div>
+    <div v-show="0" style="display:flex;align-items:center;justify-content:center;height:100%;background-color:#fff;">
+      <div class="center" style="flex:1">
+        <i class="iconfont icon-jianzhu" style="font-size:50px;"></i>
+        <p style="margin:10px 0;">设备空间关系已产生变化,请请前往关系总览重新计算</p>
+        <el-button>立即跳转</el-button>
+      </div>
+    </div>
   </div>
 </template>
 <script>
-import noModelDialog from "@/components/business_space/dialogs/noModelDialog";
-import influenceDialog from "@/components/business_space/dialogs/influenceDialog";
-import detailsDialog from "@/components/business_space/dialogs/detailsDialog";
-import notRelated from "@/components/business_space/dialogs/notRelated";
-import facilityDialog from "@/components/business_space/dialogs/facilityDialog";
+// import noModelDialog from "@/components/business_space/dialogs/noModelDialog";
+// import influenceDialog from "@/components/business_space/dialogs/influenceDialog";
+// import detailsDialog from "@/components/business_space/dialogs/detailsDialog";
+// import notRelated from "@/components/business_space/dialogs/notRelated";
+// import facilityDialog from "@/components/business_space/dialogs/facilityDialog";
 // import graphy from "@/components/business_space/graphy/business";
 import graphy from "@/components/business_space/newGraphy/graphy";
+import roomInFloorDialog from "@/components/business_space/newAddDialogs/roomInFloorDialog";
 import handsontableMain from "@/components/business_space/business/handsontable";
 import {
   getDataDictionary,
@@ -63,13 +66,9 @@ import floorCascader from "@/components/ledger/lib/floorCascader";
 import { mapGetters, mapActions } from "vuex";
 export default {
   components: {
-    noModelDialog,
-    influenceDialog,
-    detailsDialog,
-    notRelated,
     graphy,
     handsontableMain,
-    facilityDialog,
+    roomInFloorDialog,
     floorCascader,
   },
   computed: {
@@ -215,7 +214,7 @@ export default {
     // 判断切换至图还是表
     changeGraphyOrTable(num) {
       this.activeTabType = this.getItemForType()
-      if(!this.buildFloorSelectd[0]) {
+      if (!this.buildFloorSelectd[0]) {
         this.$message.warning('请选择建筑楼层')
         return
       };
@@ -271,6 +270,10 @@ export default {
       this.floor.facility = true
       this.$refs.facility.getData(infos, this.buildMess)
     },
+    // 空间属于多个建筑楼层
+    getTips() {
+      this.$refs.roomInFloorDialog.showDialog();
+    }
   },
   watch: {
     floor: {
@@ -308,7 +311,6 @@ export default {
     font-size: 14px;
     position: relative;
     line-height: 54px;
-    width: 99.5%;
     margin-bottom: 10px;
     border: 1px solid #dfe6ec;
     .saga-build-mess {
@@ -362,6 +364,13 @@ export default {
         color: #fff;
       }
     }
+    .saga-build-tips {
+      float: right;
+      margin-right: 10px;
+      font-size: 12px;
+      color: #409eff;
+      cursor: pointer;
+    }
   }
   .saga-business-sapce-main {
     overflow: hidden;

+ 2 - 2
src/views/ready/buildfloor/drawGraphy/drawFloor.vue

@@ -104,7 +104,6 @@ export default {
       this.drawMainScene.isSpaceSelectable = false;
 
       if (this.$refs.canvasFun) {
-        this.view.maxScale = this.view.scale * 10;
         this.view.minScale = this.view.scale;
         this.$refs.canvasFun.everyScale = this.view.scale;
       }
@@ -206,7 +205,8 @@ export default {
     "view.scale": {
       handler(n) {
         if (this.$refs.canvasFun) {
-          this.$refs.canvasFun.sliderVal = n * 10 / this.view.minScale;
+          let s = n * 10 / this.view.minScale
+          this.$refs.canvasFun.sliderVal = s > 1000 ? 1000 : s;
         }
       }
     },