Browse Source

业务空间受影响的业务空间

haojianlong 5 years ago
parent
commit
11301cd18f

+ 1 - 1
package.json

@@ -32,7 +32,7 @@
     "@saga-web/base": "2.1.9",
     "@saga-web/draw": "2.1.74",
     "@saga-web/graphy": "2.1.39",
-    "@saga-web/cad-engine": "2.0.530"
+    "@saga-web/cad-engine": "2.0.531"
   },
   "devDependencies": {
     "ajv": "^6.9.1",

+ 6 - 0
src/api/scan/request.js

@@ -1486,6 +1486,12 @@ export function queryBFloorWithState(param, success) {
   http.postJson(url, param, success)
 }
 
+// 查询业务空间分区类型包含其他
+export function queryAllZoneType(param, success) {
+  let url = `${baseUrl}/datacenter/object/zone/type`;
+  http.postJson(url, param, success)
+}
+
 // 创建分区信息
 export function createZone(param, success) {
   let data = param.data

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

@@ -159,8 +159,8 @@ export default {
   },
   created() { },
   mounted() {
-    this.canvasWidth = this.$refs.graphy.offsetWidth;
-    this.canvasHeight = this.$refs.graphy.offsetHeight;
+    this.canvasWidth = this.$refs.graphy.offsetWidth - 20;
+    this.canvasHeight = this.$refs.graphy.offsetHeight - 20;
   },
   methods: {
     // 初始化
@@ -1028,7 +1028,7 @@ export default {
   .buttons-box {
     position: absolute;
     top: 0;
-    left:0;
+    left: 0;
     padding: 0 10px;
     width: 100%;
     z-index: 999;

+ 14 - 12
src/views/ledger/spacelist/index.vue

@@ -32,7 +32,10 @@
         <div class="types">
           <el-tabs v-model="activeName" type='card' @tab-click="tabClick">
             <template v-for="(item,index) in tabsList">
-              <el-tab-pane :name="item.Code" :key="index" :label="item.Name"></el-tab-pane>
+              <el-tab-pane :name="item.Code" :key="index">
+                <span slot="label"><i class="el-icon-warning-outline" v-if="item.Count>0"
+                    style="color:red;margin-right:10px;"></i>{{item.Name}}</span>
+              </el-tab-pane>
             </template>
           </el-tabs>
         </div>
@@ -75,6 +78,7 @@ import {
   getSpaceBdFlCount, // 属于多建筑楼层的空间数据统计
   countObjZone, //受影响统计
   queryBFloorWithState, // 定制建筑楼层
+  queryAllZoneType, // 定制分区类型
 } from "@/api/scan/request";
 import tools from '@/utils/scan/tools'
 import floorCascader from "@/components/ledger/lib/floorCascader";
@@ -195,25 +199,20 @@ export default {
       this.changeGraphyOrTable(val)
     },
     // 获取tabs的列表
-    getTypes() {
+    getTypes(floorid) {
       let pa = {
-        Filters: `parentId = 'Space'`
+        Cascade: [{ Name: 'zoneType' }]
       }
-      queryDictionaryHead(pa, res => {
+      if (floorid) {
+        pa.FloorId = floorid
+      }
+      queryAllZoneType(pa, res => {
         this.tabsList = res.Content.map(t => {
           if (t.Name == "元空间") {
             return undefined;
           }
           return t;
         }).filter(item => item);
-        this.tabsList.push({
-          Code: "other",
-          CreateTime: "2019-06-04 14:48:39",
-          LastUpdate: "2019-06-04 14:48:39",
-          Name: "其他",
-          ObjectType: null,
-          ParentId: "Other"
-        })
         if (this.childBackParam.zone) {
           this.activeName = this.childBackParam.zone;
           this.buildFloorSelectd = this.childBackParam.buildFloorSelectd;
@@ -266,6 +265,7 @@ export default {
       this.buildFloorSelectd = val;
       // 如果选择的是全部或者未明确
       if (val.indexOf('noKnow') > -1 || val.indexOf('all') > -1) {
+        this.getTypes()
         this.isMyTab = 2;
         this.FloorMap = {}
       } else {
@@ -273,6 +273,7 @@ export default {
         if (!this.floorToMap[val[1]].StructureInfo || !this.floorToMap[val[1]].StructureInfo.FloorMap) {
           this.isMyTab = 2;
         }
+        this.getTypes(val[1]);
         this.FloorMap = this.floorToMap[val[1]];
       }
       this.changeGraphyOrTable(this.isMyTab)
@@ -469,6 +470,7 @@ export default {
       line-height: 40px;
       background: #ec808d;
       color: #fff;
+      z-index: 9;
     }
   }
   .spaceTypes {