Explorar o código

Merge branch 'master' of git.sagacloud.cn:web/wanda-adm

zhangyu %!s(int64=4) %!d(string=hai) anos
pai
achega
614bc26f5b

+ 2 - 2
package.json

@@ -15,8 +15,8 @@
   "dependencies": {
     "@persagy-web/base": "2.2.1",
     "@persagy-web/draw": "2.2.12",
-    "@persagy-web/graph": "2.2.43",
-    "@persagy-web/big": "2.2.46",
+    "@persagy-web/graph": "2.2.44",
+    "@persagy-web/big": "2.2.47",
     "@babel/runtime": "^7.12.5",
     "axios": "^0.21.1",
     "core-js": "^3.6.5",

+ 15 - 0
src/api/datacenter.ts

@@ -51,6 +51,21 @@ export function queryZone(postParams: any): any {
     return httputils.postJson(`${ baseApi }/object/zone/query`, postParams)
 }
 
+// 查询元空间信息
+export function queryIspace(postParams: any): any {
+    return httputils.postJson(`${ baseApi }/object/ispace/query`, postParams)
+}
+
+// 创建空间
+export function createZone(postParams: any): any {
+    return httputils.postJson(`${ baseApi }/object/zone/create`, postParams)
+}
+
+// 更新空间
+export function updateZone(postParams: any): any {
+    return httputils.postJson(`${ baseApi }/object/zone/update`, postParams)
+}
+
 // 查询设备统计
 export function queryCount(postParams: any): any {
     return httputils.postJson(`${ baseApi }/object/equip/count`, postParams)

+ 12 - 12
src/permission.ts

@@ -10,25 +10,25 @@ NProgress.configure({ showSpinner: false });
 const whiteList = ["/login"];
 
 router.beforeEach(async (to: Route, _: Route, next: any) => {
-  // Start progress bar
+  // 加载进度条
   NProgress.start();
 
-  // Determine whether the user has logged in
+  // 确定用户是否已登录
 //   if (UserModule.token) {
 //     if (to.path === "/login") {
-//       // If is logged in, redirect to the home page
+//       // 如果已登录,请重定向到主页
 //       next({ path: "/" });
 //       NProgress.done();
 //     } else {
-//       // Check whether the user has obtained his permission roles
+//       // 检查用户是否已获得其角色权限
 //       if (UserModule.roles.length === 0) {
 //         try {
-//           // Get user info, including roles
+//           // 获取用户信息,包括角色
 //           await UserModule.GetUserInfo();
-//           // Set the replace: true, so the navigation will not leave a history record
+//           // 设置replace:true,这样导航就不会留下历史记录
 //           next({ ...to, replace: true });
 //         } catch (err) {
-//           // Remove token and redirect to login page
+//           // 删除令牌并重定向到登录页
 //           UserModule.ResetToken();
 //           Message.error(err || "Has Error");
 //           next(`/login?redirect=${to.path}`);
@@ -39,12 +39,12 @@ router.beforeEach(async (to: Route, _: Route, next: any) => {
 //       }
 //     }
 //   } else {
-//     // Has no token
+//     // 没有令牌
 //     if (whiteList.indexOf(to.path) !== -1) {
-//       // In the free login whitelist, go directly
+//       // 在免费登录白名单中,直接进入
 //       next();
 //     } else {
-//       // Other pages that do not have permission to access are redirected to the login page.
+//       // 其他没有访问权限的页面将重定向到登录页面。
 //       next(`/login?redirect=${to.path}`);
 //       NProgress.done();
 //     }
@@ -53,9 +53,9 @@ router.beforeEach(async (to: Route, _: Route, next: any) => {
 });
 
 router.afterEach((to: Route) => {
-  // Finish progress bar
+  // 完成进度条
   NProgress.done();
 
-  // set page title
+  // 设置页面标题
   document.title = to.meta.title;
 });

+ 1 - 1
src/router/index.ts

@@ -62,7 +62,7 @@ export default new Router({
                     path: "index",
                     component: () =>
                         import(
-                            /* webpackChunkName: "project" */ "@/layout/components/Navbar/MessageSever/MsgAllDetails.vue"
+                            /* webpackChunkName: "allDetails" */ "@/layout/components/Navbar/MessageSever/MsgAllDetails.vue"
                         ),
                     meta: {
                         title: "消息中心"

+ 10 - 0
src/utils/graph/FloorScene.ts

@@ -146,6 +146,7 @@ export class FloorScene extends SGraphScene {
      */
     addSpace(space: Space): void {
         let item = new SSpaceItem(null, space);
+        item.likeCtrl = true;
         item.selectable = this.isSpaceSelectable;
         item.fillColor = ItemColor.spaceColor;
         item.strokeColor = ItemColor.spaceBorderColor;
@@ -264,4 +265,13 @@ export class FloorScene extends SGraphScene {
         );
     }
 
+    /**
+     * 清空业务空间
+     */
+    removeAllZone(){
+        this.zoneList.forEach(t => {
+            this.removeItem(t);
+        })
+        this.zoneList = [];
+    }
 }

+ 8 - 8
src/utils/graph/config/zoneColor.ts

@@ -1,11 +1,11 @@
 const colorArr = [
-  "#fed44c",
-  "#3485d6",
-  "#a384fc",
-  "#4caf50",
-  "#ff6316",
-  "#fd8bbe",
-  "#03a9f3",
-  "#ea615b"
+  "#faf7db",
+  "#f9e8f2",
+  "#d1e7f7",
+  "#d6efdc",
+  "#e8e6fe",
+  "#fae0d0",
+  "#c7eefc",
+  "#e7f098"
 ];
 export default colorArr;

+ 10 - 18
src/views/maintain/device/index.vue

@@ -51,20 +51,9 @@
             <template v-if="next">
                 <div class="align" style="height: 400px">
                     <span class="text ">设备类别</span>
-                    <el-select
-                        v-model="deviceVal"
-                        placeholder="请选择"
-                        clearable
-                        filterable
-                    >
-                        <el-option
-                            v-for="item in list"
-                            :key="item.value"
-                            :label="item.label"
-                            :value="item.value"
-
-                        />
-                    </el-select>
+                    <el-cascader :options="options" clearable v-model="deviceVal" @change="changeLinshi"
+                                 class="adm-select"></el-cascader>
+
                 </div>
                 <el-button type="primary" class="fr" @click="handleNext">下一步</el-button>
             </template>
@@ -74,7 +63,7 @@
                 <el-button type="default" class="fr ml-10">重置</el-button>
             </template>
             <template v-else>
-                <dataForm/>
+                <dataForm :dataFormList="dataFormList"/>
                 <el-button type="primary" class="fr ml-10">确定</el-button>
                 <el-button type="default" class="fr" @click="handlePosition">维护位置</el-button>
             </template>
@@ -84,7 +73,7 @@
 <script lang="ts">
 import { Component, Vue } from "vue-property-decorator";
 import { AdmMultiTable, AdmSearch, dataForm, Pagination, Statistics } from '../components/index'
-import { BeatchQueryParam, dictInfo, dictType } from "@/api/equipComponent";
+import { BeatchQueryParam, dictInfo } from "@/api/equipComponent";
 import { queryCount, queryEquip } from "@/api/datacenter";
 import { UserModule } from "@/store/modules/user";
 import tools from "@/utils/maintain"
@@ -309,8 +298,11 @@ export default class extends Vue {
         if (Object.keys(this.headerInformation).length > 0) {
             this.headerInformation.dictStages.forEach(item => {
                 if (this.currentHeader == item.name) {
-                    item.infos && item.infos.forEach(val => header.push(val))
-
+                    // item.infos && item.infos.forEach(val => header.push(val))
+                    item.infos && item.infos.forEach(val => {
+                        val.name = val.unit ? `${ val.name }(${ val.unit })` : val.name
+                        header.push(val)
+                    })
                 }
             })
         }

+ 38 - 0
src/views/maintain/space/components/createBSP.vue

@@ -0,0 +1,38 @@
+<template>
+  <el-dialog :title="title" :visible.sync="dialogVisible" width="400px" id="createBSP">
+    <div>请输入创建的业务空间名:</div>
+    <el-input :placeholder="`请输入业务空间名称`" v-model="roomName"></el-input>
+    <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="dialogVisible=false">取 消</el-button>
+      <el-button size="small" type="primary" @click="confirm">确 定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      title: '提示',
+      dialogVisible: false,
+      roomName: '',
+    };
+  },
+  methods: {
+    // 显示弹窗
+    showDialog(val) {
+      this.roomName = val;
+      this.dialogVisible = true;
+    },
+    // 确认
+    confirm() {
+      if (this.roomName == '') {
+        this.$message.warning("请填写空间名称");
+        return
+      }
+      this.$emit('createRoom', this.roomName);
+      this.dialogVisible = false;
+    }
+  },
+};
+</script>

+ 191 - 51
src/views/maintain/space/components/spaceGraph.vue

@@ -27,8 +27,8 @@
                             </el-dropdown-menu>
                         </el-dropdown>
                         <!-- 点击已经关联的业务空间 -->
-                        <el-button plain @click="refactorBSP" :disabled="zoneDisable" style="margin-left:10px;">重新划分业务空间</el-button>
-                        <el-button plain :disabled="zoneDisable" style="margin-left:10px;">维护空间信息</el-button>
+                        <el-button plain @click="refactorBSP" :disabled="zoneDisable" style="margin-left:10px;">编辑业务空间</el-button>
+                        <!-- <el-button plain :disabled="zoneDisable" style="margin-left:10px;">维护空间信息</el-button> -->
                         <el-button plain @click="cancelGraphy" v-show="!zoneDisable">取 消</el-button>
                     </div>
                     <!-- 点击未关联的业务空间 -->
@@ -61,6 +61,8 @@
                 暂无数据
             </p>
         </div>
+        <!-- 创建新的业务空间 -->
+        <createBSP ref="createBSP" @createRoom="createRoom"></createBSP>
     </div>
 </template>
 <script lang="ts">
@@ -68,9 +70,21 @@ import { Vue, Component, Watch } from "vue-property-decorator";
 import { FloorView } from "@/utils/graph/FloorView";
 import { FloorScene } from "@/utils/graph/FloorScene";
 import canvasFun from "./canvasFun.vue";
+import {
+    queryZone,
+    queryIspace,
+    createZone,
+    updateZone,
+} from "@/api/datacenter";
+import createBSP from "./createBSP";
+import colorArr from "@/utils/graph/config/zoneColor";
+import { SObject } from "@persagy-web/base/lib";
+import { ItemColor } from "@persagy-web/big/lib";
+import { SSpaceItem } from "@persagy-web/big/lib/items/floor/SSpaceItem";
+import { SZoneItem } from "@persagy-web/big/lib/items/floor/ZoneItem";
 
 @Component({
-    components: { canvasFun },
+    components: { canvasFun, createBSP },
 })
 export default class spaceGraph extends Vue {
     canvasWidth = 800;
@@ -92,6 +106,13 @@ export default class spaceGraph extends Vue {
     buildFloor: string[] = [];
     floor = {}; // 当前楼层对象
     floorKey = ""; // 当前楼层底图请求完整url
+    curZoneType = "";
+    allzone = [];
+    BSPRelaISPList = [];
+    businessSpaceList = [];
+    BIMIDToSID = {};
+    BIMIDToSIName = {};
+    sourceIdToISP = {};
     // 挂载
     mounted(): void {
         this.canvasWidth = this.$refs.graphContainer.offsetWidth;
@@ -99,12 +120,13 @@ export default class spaceGraph extends Vue {
         this.getGraph();
     }
     // 父组件调用查询楼层底图
-    getData(floor) {
+    getData(floor, zoneType) {
+        this.curZoneType = zoneType[zoneType.length - 1];
         this.canvasLoading = true;
         if (floor.infos && floor.infos.floorMap) {
             this.floor = floor;
             this.floorKey = this.mapBaseUrl + floor.infos.floorMap;
-            this.getGraph();
+            this.init(1);
         } else {
             this.noMap();
         }
@@ -118,12 +140,11 @@ export default class spaceGraph extends Vue {
     init(initType: number): void {
         this.type = 1;
         if (this.scene) {
-            // this.scene.clearSpaceSelection();
-            // this.scene.clearZoneSelection();
-            // this.scene.clearLikeSpaces();
-            // this.zoneDisable = true;
-            // this.scene.isZoneSelectable = true;
-            // this.scene.isSpaceSelectable = false;
+            this.scene.selectContainer.clear();
+            this.scene.initSpaceColor();
+            this.zoneDisable = true;
+            this.scene.isZoneSelectable = true;
+            this.scene.isSpaceSelectable = false;
         }
         if (
             this.buildFloor.indexOf("all") > -1 ||
@@ -134,10 +155,10 @@ export default class spaceGraph extends Vue {
 
         if (initType == 1) {
             // 底图
-            // this.getGraphy();
+            this.getGraph();
         } else {
             // 业务空间
-            // this.getBusinessSpace();
+            this.getBussiness();
         }
         this.config = {
             isEdit: false,
@@ -145,11 +166,7 @@ export default class spaceGraph extends Vue {
             groupSelect: true,
         };
         // 获取当前楼层的元空间
-        // this.getFloorISpace();
-        // 查询未关联业务空间的元空间
-        // this.getISPSPUnrelaBSP();
-        // 查询未关联平面图的业务空间
-        // this.getBSPunrelaISP();
+        this.getFloorISpace();
     }
     // 获取底图
     getGraph(): void {
@@ -183,7 +200,9 @@ export default class spaceGraph extends Vue {
         }
         if (this.scene) {
             this.scene.changeSelect = this.changeSelect;
+            this.scene.isSpaceSelectable = false;
         }
+        this.getBussiness();
         this.canvasLoading = false;
     }
     // 清除canvas
@@ -194,7 +213,6 @@ export default class spaceGraph extends Vue {
         }
         this.view = new FloorView("spaceCanvas");
     }
-
     // 搜索
     querySearch(queryString: string, cb: Function) {
         let restaurants = this.zoneList;
@@ -204,26 +222,21 @@ export default class spaceGraph extends Vue {
         // 调用 callback 返回建议列表的数据
         cb(results);
     }
-
     // 过滤器
     createFilter(queryString: any) {
         return (restaurant: any) => {
             return restaurant.data.RoomLocalName.indexOf(queryString) > -1;
         };
     }
-
     // 查询选中,定位
     handleSelect(zone) {
-        //   // 清空选中
-        //   this.scene.clearSpaceSelection();
-        //   this.scene.clearZoneSelection();
-        //   // 选中当前
-        //   zone.selected = true;
-        //   this.curZoneItem = zone;
-        //   this.zoneDisable = false;
-        //   this.view.fitSelectedToView();
+        // 清空选中
+        this.scene?.selectContainer.clear();
+        this.curZoneItem = zone;
+        this.scene?.selectContainer.setItem(zone);
+        this.zoneDisable = false;
+        this.view.fitSelectedToView();
     }
-
     // 点击创建业务空间
     editGraphy() {
         this.type = 3;
@@ -233,39 +246,166 @@ export default class spaceGraph extends Vue {
         this.scene!.isSpaceSelectable = true;
         this.scene!.isZoneSelectable = false;
         this.view?.update();
+        console.log(12312312);
     }
     // 创建新的业务空间
     createNewZone() {
-        //   let arr = this.scene.getSelectedSpaces();
-        //   if (arr.length) {
-        //     let tempArr = [];
-        //     arr.map(t => {
-        //       tempArr.push(this.BIMIDToSIName[t.data.SourceId]);
-        //     })
-        //     this.$refs.createBSP.showDialog(tempArr.toString());
-        //   } else {
-        //     this.$message.warning('请至少选择一个空间');
-        //   }
+        let arr = this.scene?.selectContainer.itemList;
+        if (arr.length) {
+            let tempArr = [];
+            arr.map((t) => {
+                tempArr.push(this.BIMIDToSIName[t.data.SourceId]);
+            });
+            this.$refs.createBSP.showDialog(tempArr.toString());
+        } else {
+            this.$message.warning("请至少选择一个空间");
+        }
     }
-
     handleCommand() {}
-
-    refactorBSP() {}
-
+    // 编辑业务空间
+    refactorBSP() {
+        this.scene!.isZoneSelectable = false;
+        this.scene!.isSpaceSelectable = true;
+        this.type = 4;
+        this.curZoneItem.visible = false;
+    }
     editeSpaceDetail() {}
-
+    // 获取元空间
+    getFloorISpace() {
+        const pa = {
+            floorId: this.floor.id,
+            buildingId: this.floor.buildingId,
+            pageSize: 2000,
+        };
+        queryIspace(pa).then((res) => {
+            if (res.message == this.floor.id) {
+                this.BIMIDToSID = {};
+                this.BIMIDToSIName = {};
+                this.sourceIdToISP = {};
+                res.content.map((t) => {
+                    let key = t.bimId.split(":")[1];
+                    this.BIMIDToSID[key] = t.id;
+                    this.BIMIDToSIName[key] = t.localName || t.name;
+                    this.sourceIdToISP[key] = t;
+                });
+            }
+        });
+    }
+    // 获取业务空间
+    getBussiness() {
+        const pa = {
+            filters: `classCode='${this.curZoneType}';floorId='${this.floor.id}';buildingId='${this.floor.buildingId}'`,
+            pageSize: 2000,
+        };
+        this.canvasLoading = true;
+        queryZone(pa).then((res) => {
+            // if (res.FloorId == this.buildFloor[1] && res.ZoneType == tempType) {
+            // 所有业务空间
+            this.businessSpaceList = res.content;
+            // 已关联元空间的业务空间
+            this.BSPRelaISPList = [];
+            res.content.map((t) => {
+                if (t.outline && t.outline.length) {
+                    this.BSPRelaISPList.push(t);
+                }
+            });
+            // 绘制业务空间
+            let tempArr = this.BSPRelaISPList.map((t, i) => {
+                return {
+                    RoomLocalName: t.localName || t.name,
+                    OutLine: t.outline,
+                    RoomID: t.id,
+                    Color: colorArr[i % colorArr.length],
+                };
+            }).filter((item) => item);
+            console.log(this.scene);
+            this.scene.removeAllZone();
+            this.scene.addZoneList(tempArr);
+            this.zoneList = this.scene.zoneList;
+            this.view.update();
+            this.canvasLoading = false;
+            // }
+        });
+    }
     // 取消(所有取消公用)
     cancelGraphy() {
         this.init(2);
     }
-
-    saveRefactorBSP() {}
+    // 重新划分业务空间保存
+    saveRefactorBSP() {
+        const arr = this.scene?.selectContainer.itemList;
+        const zoneObj = {
+            id: this.curZoneItem.data.RoomID,
+            classCode: this.curZoneType,
+            outline: [],
+        };
+        if (arr.length) {
+            arr?.forEach((t) => {
+                if (t instanceof SSpaceItem) {
+                    zoneObj.outline.push(t.data.OutLine);
+                }
+            });
+        }
+        const pa = {
+            content: [zoneObj],
+        };
+        this.canvasLoading = true;
+        updateZone(pa).then((res) => {
+            this.$message.success("更新成功");
+            this.init(2);
+        });
+    }
 
     groupCreateZone() {}
 
-    //
-    changeSelect() {
-        console.log(arguments);
+    // 点击平面图事件
+    changeSelect(selectContainer: SObject, data: any[]) {
+        if (data.length) {
+            console.log(data[0]);
+            if (data[0].length) {
+                if (data[0][0] instanceof SSpaceItem) {
+                    this.scene?.initSpaceColor();
+                } else if (data[0][0] instanceof SZoneItem) {
+                    this.scene?.initZoneColor();
+                    this.zoneDisable = false;
+                    this.curZoneItem = data[0][0];
+                }
+            } else {
+                this.scene?.initSpaceColor();
+                this.scene?.initZoneColor();
+                this.zoneDisable = true;
+            }
+            data[0].forEach((t) => {
+                t.fillColor = ItemColor.selectColor;
+            });
+        } else {
+            this.scene?.initSpaceColor();
+            this.scene?.initZoneColor();
+            this.zoneDisable = true;
+        }
+    }
+
+    // 根据图创建新的业务空间-弹窗返回确认创建
+    createRoom(val) {
+        const zoneObj = {
+            outline: [],
+            localName: val,
+            buildingId: this.floor.buildingId,
+            floorId: this.floor.id,
+            classCode: this.curZoneType,
+        };
+        let arr = this.scene?.selectContainer.itemList;
+        arr?.forEach((t) => {
+            zoneObj.outline.push(t.data.OutLine);
+        });
+        const pa = {
+            content: [zoneObj],
+        };
+        this.canvasLoading = true;
+        createZone(pa).then((res) => {
+            this.$message.success("创建成功");
+            this.init(2);
+        });
     }
 
     // 适配底图到窗口
@@ -332,7 +472,7 @@ export default class spaceGraph extends Vue {
     height: 100%;
     .canvas-actions-box {
         position: absolute;
-        bottom: 60px;
+        bottom: 14px;
         left: 50%;
         transform: translateX(-50%);
         z-index: 99;

+ 27 - 27
src/views/maintain/space/index.vue

@@ -11,7 +11,7 @@
                 <div class="search" :class="{ 'borderBottom': activeName==='picture' }">
                     <el-cascader clearable ref="floorCascader" placeholder="请选择建筑楼层" :options="options" v-model="building" filterable size="small"
                         @change="changeCascader" style="margin-right: 12px"></el-cascader>
-                    <el-cascader v-model="zoneTypeVal" :options="zoneTypeOption" @change="handleChange" placeholder="请选择分区" class="item"
+                    <el-cascader v-model="zoneTypeVal" :options="zoneTypeOption" @change="changeZoneType" placeholder="请选择分区" class="item"
                         v-if="activeName==='picture'"></el-cascader>
                     <admSearch @SearchValue="searchValue" class="item" v-if="activeName==='table'" />
                 </div>
@@ -37,20 +37,9 @@
 
 <script lang="ts">
 import { Component, Vue } from "vue-property-decorator";
-import {
-    AdmMultiTable,
-    AdmSearch,
-    Pagination,
-    Statistics,
-} from "../components/index";
+import { AdmMultiTable, AdmSearch, Pagination, Statistics, } from "../components/index";
 import spaceGraph from "./components/spaceGraph.vue";
-import {
-    buildingQuery,
-    dictQuery,
-    floorQuery,
-    queryCountSpace,
-    queryZone,
-} from "@/api/datacenter";
+import { buildingQuery, dictQuery, floorQuery, queryCountSpace, queryZone, } from "@/api/datacenter";
 import tools from "@/utils/maintain";
 import { BeatchQueryParam } from "@/api/equipComponent";
 import { UserModule } from "@/store/modules/user";
@@ -76,7 +65,7 @@ export default class spaceIndex extends Vue {
     activeName = "table";
     building = ["all"];
 
-    zoneTypeVal = ['FunctionZone'];
+    zoneTypeVal = ['GeneralZone'];
     // 分页
     private paginationList = {
         page: 1,
@@ -87,7 +76,7 @@ export default class spaceIndex extends Vue {
     options = [];
     zoneTypeOption = [
         {
-            value: "FunctionZone",
+            value: "GeneralZone",
             label: "功能分区",
         },
         {
@@ -249,7 +238,7 @@ export default class spaceIndex extends Vue {
                     pageSize: this.paginationList.size,
                     orders: "createTime desc, localName desc, localId desc, id asc",
                 };
-    
+
                 if (this.building.length === 1) {
                     param2.filters = "";
                     switch (this.building[0]) {
@@ -258,14 +247,14 @@ export default class spaceIndex extends Vue {
                             break;
                         case "all":
                             delete param2.filters;
-    
+
                             break;
                     }
                 } else if (this.building.length === 2) {
                     switch (this.building[1]) {
                         case "noKnow":
                             param2.filters = `buildingId='${this.building[0]}';floorId='isnull'`;
-    
+
                             break;
                         case "all":
                             param2.filters = `buildingId='${this.building[0]}'`;
@@ -274,7 +263,7 @@ export default class spaceIndex extends Vue {
                             param2.filters = `buildingId='${this.building[0]}';floorId='${this.building[1]}'`;
                     }
                 }
-    
+
                 let promise = new Promise((resolve) => {
                     dictQuery(param).then((res) => {
                         resolve(res);
@@ -300,6 +289,13 @@ export default class spaceIndex extends Vue {
                             dictStages.push(item);
                         }
                     });
+                    dictStages.map((val,index) => {
+                        val.name = val.unit ? `${ val.name }(${ val.unit })` : val.name
+                        if (val.path == 'outline') {
+                            dictStages.splice(index,1)
+                        }
+                        return val
+                    })
                     basicInfos.map((item) => {
                         if (item.path == "building") {
                             item.path = "buildingSign";
@@ -309,7 +305,7 @@ export default class spaceIndex extends Vue {
                         }
                         return item;
                     });
-    
+
                     this.headersStage = {
                         basicInfos: {
                             name: "模型解析",
@@ -331,10 +327,14 @@ export default class spaceIndex extends Vue {
                         if (item.floor) {
                             item.floorSign = item.floor.localName;
                         }
-                        item = {
-                            ...item,
-                            outline: JSON.stringify(item.outline),
-                        };
+                        // 删除轮廓线
+                        if (item.outline) {
+                            delete item.outline
+                        }
+                        // item = {
+                        //     ...item,
+                        //     outline: JSON.stringify(item.outline),
+                        // };
                         return item;
                     });
                     //  列表信息展示,获取动态数据
@@ -427,7 +427,7 @@ export default class spaceIndex extends Vue {
         }
     }
 
-    handleChange(val) {
+    changeZoneType(val) {
         console.log(val);
     }
 
@@ -464,7 +464,7 @@ export default class spaceIndex extends Vue {
                 this.building.indexOf("noKnow") < 0 &&
                 this.building.indexOf("all") < 0
             ) {
-                this.$refs.spaceGraph.getData(this.floorToMap[this.building[1]]);
+                this.$refs.spaceGraph.getData(this.floorToMap[this.building[1]], this.zoneTypeVal);
             } else {
                 this.$refs.spaceGraph.noMap();
             }

+ 1 - 0
src/views/maintain/system/index.vue

@@ -309,6 +309,7 @@ export default class extends Vue {
                     if (i.includes(item.path)) {
                         basicInfos.push(item);
                     } else {
+                        item.name = item.unit ? `${ item.name }(${ item.unit })` : item.name
                         dictStages.push(item);
                     }
                 });