|
@@ -3,12 +3,14 @@
|
|
|
<!-- 数据字典设备类型 -->
|
|
|
<el-row>
|
|
|
<el-button size="small" type="default" icon="el-icon-back" @click="goback"></el-button>
|
|
|
- <div style="display:inline-block;margin-left:10px;">
|
|
|
+ <div style="display:inline-block;margin:10px 0 0 10px;">
|
|
|
<label style="margin-right:10px;">业务空间类型</label>
|
|
|
- <el-select v-model="value" placeholder="请选择" @change="getTnRelatFloor">
|
|
|
- <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <el-badge :is-dot="options.length>1">
|
|
|
+ <el-select v-model="value" placeholder="请选择" @change="getTnRelatFloor">
|
|
|
+ <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-badge>
|
|
|
</div>
|
|
|
</el-row>
|
|
|
<el-row class="main-container">
|
|
@@ -45,14 +47,16 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="canvas-container" ref="graphy" v-loading="canvasLoading">
|
|
|
- <div class="floor-container" v-show="hasMap">
|
|
|
+ <div class="floor-container" v-show="floorList.length">
|
|
|
<div class="before" @click="toBefore">
|
|
|
<div><i class="el-icon-caret-top"></i></div>
|
|
|
</div>
|
|
|
<div class="floor">
|
|
|
<div v-for="(fl,i) in floorList" :key="fl.id" :class="{'active':fl.active,'textParent':true}" @click="floorChange(i)">
|
|
|
<div class="text">
|
|
|
- {{fl.FloorLocalID || fl.FloorLocalName}}
|
|
|
+ <el-tooltip effect="dark" :content="fl.FloorLocalID||fl.FloorLocalName" placement="top">
|
|
|
+ <b>{{fl.FloorLocalID || fl.FloorLocalName}}</b>
|
|
|
+ </el-tooltip>
|
|
|
<span v-if="fl.Count">{{fl.Count>9?'9+':fl.Count}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -84,7 +88,6 @@ 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 { buildingQuery, queryTnRelateFloor, queryRentTableData, tnRelateZone, queryZone } from '@/api/scan/request'
|
|
|
-import { resolve } from 'q';
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -135,7 +138,7 @@ export default {
|
|
|
},
|
|
|
// 返回
|
|
|
goback() {
|
|
|
- this.$router.push({ name: 'rentlist' })
|
|
|
+ this.$router.push({ name: 'rentlist', query: { onlyRead: this.onlyRead } })
|
|
|
},
|
|
|
// 适配底图到窗口
|
|
|
fit() {
|
|
@@ -250,6 +253,7 @@ export default {
|
|
|
this.config.isEdit = true;
|
|
|
this.scene.zoneList.map(t => {
|
|
|
t.selected = t.highLightFlag;
|
|
|
+ t.transparency = 20;
|
|
|
t.highLightFlag = false;
|
|
|
})
|
|
|
},
|
|
@@ -258,6 +262,7 @@ export default {
|
|
|
this.isEdit = false;
|
|
|
this.config.isEdit = false;
|
|
|
this.scene.clearZoneSelection();
|
|
|
+ this.getBusinessSpace();
|
|
|
},
|
|
|
// 清除canvas
|
|
|
clearGraphy() {
|
|
@@ -306,36 +311,6 @@ export default {
|
|
|
PageSize: 1000
|
|
|
}
|
|
|
}
|
|
|
- // queryZone(pa, res => {
|
|
|
- // // 所有业务空间
|
|
|
- // this.businessSpaceList = res.Content;
|
|
|
- // // 已关联元空间的业务空间
|
|
|
- // this.BSPRelaISPList = [];
|
|
|
- // res.Content.map(t => {
|
|
|
- // if (t.Outline && t.Outline.length) {
|
|
|
- // this.BSPRelaISPList.push(t)
|
|
|
- // }
|
|
|
- // })
|
|
|
- // let key = 'Z' + this.Cascade[this.value].substring(1)
|
|
|
- // let relationList = this.tenantList[this.activeTentanIndex][key] || []
|
|
|
- // // 绘制业务空间
|
|
|
- // let tempArr = this.BSPRelaISPList.map((t, i) => {
|
|
|
- // if (t.FloorId == this.floorList[this.activeFloor].FloorID && t.ObjectType == this.value) {
|
|
|
- // return {
|
|
|
- // RoomLocalName: t.RoomLocalName,
|
|
|
- // OutLine: t.Outline,
|
|
|
- // RoomID: t.RoomID,
|
|
|
- // Color: colorArr[i % colorArr.length],
|
|
|
- // HighLightFlag: relationList.findIndex((item) => (item.RoomID == t.RoomID)) > -1
|
|
|
- // }
|
|
|
- // } else {
|
|
|
- // return undefined;
|
|
|
- // }
|
|
|
- // }).filter(item => item)
|
|
|
- // this.scene.removeAllZone();
|
|
|
- // this.scene.addZoneList(tempArr);
|
|
|
- // this.scene.click(this, this.canvasClick);
|
|
|
- // })
|
|
|
this.canvasLoading = false;
|
|
|
let promise1 = new Promise((resolve) => {
|
|
|
queryZone(pa, res => {
|
|
@@ -374,7 +349,8 @@ export default {
|
|
|
OutLine: t.Outline,
|
|
|
RoomID: t.RoomID,
|
|
|
Color: colorArr[i % colorArr.length],
|
|
|
- HighLightFlag: relationList.findIndex((item) => (item.RoomID == t.RoomID)) > -1
|
|
|
+ HighLightFlag: relationList.findIndex((item) => (item.RoomID == t.RoomID)) > -1,
|
|
|
+ Transparency: relationList.findIndex((item) => (item.RoomID == t.RoomID)) > -1 ? 20 : 1
|
|
|
}
|
|
|
} else {
|
|
|
return undefined;
|
|
@@ -448,6 +424,7 @@ export default {
|
|
|
this.hasMap = false;
|
|
|
this.canvasLoading = false;
|
|
|
this.allBuilding = [];
|
|
|
+ this.floorList = [];
|
|
|
}
|
|
|
},
|
|
|
// 保存关系
|
|
@@ -503,7 +480,7 @@ export default {
|
|
|
margin-top: 10px;
|
|
|
background: #fff;
|
|
|
border: 1px solid @normal-border-color;
|
|
|
- height: calc(100% - 43px);
|
|
|
+ height: calc(100% - 53px);
|
|
|
overflow: hidden;
|
|
|
.main-left {
|
|
|
height: 100%;
|
|
@@ -527,6 +504,7 @@ export default {
|
|
|
color: #2b2b2b;
|
|
|
border-radius: 28px;
|
|
|
padding: 4px 16px;
|
|
|
+ cursor: pointer;
|
|
|
&.active {
|
|
|
border: 1px solid #409eff;
|
|
|
color: #409eff;
|
|
@@ -592,6 +570,9 @@ export default {
|
|
|
&:hover {
|
|
|
background-color: #409eff1a;
|
|
|
}
|
|
|
+ b {
|
|
|
+ font-weight: normal;
|
|
|
+ }
|
|
|
span {
|
|
|
position: absolute;
|
|
|
display: block;
|