|
@@ -1,6 +1,14 @@
|
|
|
<template>
|
|
|
<div id="graphy" ref="graphy" v-loading="canvasLoading">
|
|
|
<div v-show="!FloorMap">
|
|
|
+ <div style="margin-right:10px;width: 100%;margin-bottom: 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>
|
|
|
+ </div>
|
|
|
<div class="center" style="height: 400px;padding-top:182px;box-sizing:border-box;">
|
|
|
<i class="icon-wushuju iconfont"></i>
|
|
|
暂无数据
|
|
@@ -107,38 +115,37 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import canvasFun from "./canvasFun"
|
|
|
-import { mapGetters, mapActions } from "vuex";
|
|
|
-import { SColor, SPoint } from "@saga-web/draw/lib";
|
|
|
-import { DivideFloorScene, SpaceItem, ZoneItem, FloorView } from "@saga-web/cad-engine/lib";
|
|
|
-import { colorArr } from "@/utils/spaceColor"
|
|
|
-import unRelateBSP from "./unRelateBSP";
|
|
|
-import createBSP from "./createBSP";
|
|
|
-import dialogZone from "../../ledger/addDialog/dialogZone";
|
|
|
-import {
|
|
|
- buildingQuery,
|
|
|
- queryZone,
|
|
|
- getIspNotInSpace,
|
|
|
- createRelateInZoneAndISp,
|
|
|
- groupCreRelaZoneAndISp,
|
|
|
- queryAllZoneType, // 定制分区类型
|
|
|
- zoneCreate,
|
|
|
- zoneQuery,
|
|
|
- zoneUpdate,
|
|
|
- zoneCount
|
|
|
-} from "@/api/scan/request"
|
|
|
+ import canvasFun from "./canvasFun"
|
|
|
+ import {mapGetters} from "vuex";
|
|
|
+ import {SPoint} from "@saga-web/draw/lib";
|
|
|
+ import {DivideFloorScene, FloorView, SpaceItem, ZoneItem} from "@saga-web/cad-engine/lib";
|
|
|
+ import {colorArr} from "@/utils/spaceColor"
|
|
|
+ import unRelateBSP from "./unRelateBSP";
|
|
|
+ import createBSP from "./createBSP";
|
|
|
+ import dialogZone from "../../ledger/addDialog/dialogZone";
|
|
|
+ import {
|
|
|
+ createRelateInZoneAndISp,
|
|
|
+ getIspNotInSpace,
|
|
|
+ groupCreRelaZoneAndISp,
|
|
|
+ queryAllZoneType,
|
|
|
+ queryZone,
|
|
|
+ zoneCount,
|
|
|
+ zoneCreate,
|
|
|
+ zoneQuery,
|
|
|
+ zoneUpdate
|
|
|
+ } from "@/api/scan/request"
|
|
|
|
|
|
-export default {
|
|
|
- components: {
|
|
|
- canvasFun,
|
|
|
- unRelateBSP,
|
|
|
- createBSP,
|
|
|
- dialogZone
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- zoneValue: '',
|
|
|
- addZone: [],
|
|
|
+ export default {
|
|
|
+ components: {
|
|
|
+ canvasFun,
|
|
|
+ unRelateBSP,
|
|
|
+ createBSP,
|
|
|
+ dialogZone
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ zoneValue: '',
|
|
|
+ addZone: [],
|
|
|
canvasWidth: 800,
|
|
|
canvasHeight: 600,
|
|
|
type: 1, // 默认操作模式
|
|
@@ -285,7 +292,18 @@ export default {
|
|
|
console.log(arguments);
|
|
|
if (tab.code == "OtherZone") {
|
|
|
// 其他分区
|
|
|
+
|
|
|
this.showOtherFlag = true
|
|
|
+ // 其他分区类型查询表数据接口
|
|
|
+ if (localStorage.getItem('otherZone')) {
|
|
|
+ this.OtherValue = (localStorage.getItem('otherZone'))
|
|
|
+ }
|
|
|
+ if (this.OtherValue) {
|
|
|
+ let val = (localStorage.getItem('otherZone'))
|
|
|
+ this.getBusinessSpace(val)
|
|
|
+ } else {
|
|
|
+ this.FloorMap = ''
|
|
|
+ }
|
|
|
this.getOhterType();
|
|
|
} else {
|
|
|
this.showOtherFlag = false;
|
|
@@ -313,6 +331,12 @@ export default {
|
|
|
// 其他类型下拉change
|
|
|
changeOtherZone(val) {
|
|
|
console.log(val)
|
|
|
+ this.getBusinessSpace(val)
|
|
|
+ if (localStorage.getItem('otherZone')) {
|
|
|
+ localStorage.setItem('otherZone', val)
|
|
|
+ } else {
|
|
|
+ localStorage.setItem('otherZone', val)
|
|
|
+ }
|
|
|
},
|
|
|
// 获取未绑定业务空间的元空间
|
|
|
getISPSPUnrelaBSP() {
|
|
@@ -360,10 +384,10 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 获取当前分区下的业务空间
|
|
|
- getBusinessSpace() {
|
|
|
+ getBusinessSpace(other) {
|
|
|
this.canvasLoading = true
|
|
|
let pa = {
|
|
|
- ZoneType: this.tab.code,
|
|
|
+ ZoneType: other ? other : this.tab.code,
|
|
|
Filters: `not RoomID isNull`,
|
|
|
Orders: "createTime desc, RoomID asc",
|
|
|
PageSize: 1000
|