|
@@ -1,14 +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">
|
|
|
+ <!-- <div style="margin-right:10px;width: 100%;margin-bottom: 10px" v-if="showOtherFlag"> -->
|
|
|
<!-- 平面图其他分区 -->
|
|
|
- <el-button type="primary" @click="addZoneBtn">添加分区</el-button>
|
|
|
+ <!-- <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> -->
|
|
|
<div class="center" style="height: 400px;padding-top:182px;box-sizing:border-box;">
|
|
|
<i class="icon-wushuju iconfont"></i>
|
|
|
暂无数据
|
|
@@ -18,14 +18,14 @@
|
|
|
<canvas id="floorCanvas" :width="canvasWidth" :height="canvasHeight" ref="canvas" tabindex="0"></canvas>
|
|
|
<!-- 初始两个按钮 -->
|
|
|
<el-row class="buttons-box">
|
|
|
- <div style="margin-right:10px;width: 100%;margin-bottom: 10px" v-if="showOtherFlag">
|
|
|
+ <!-- <div style="margin-right:10px;width: 100%;margin-bottom: 10px" v-if="showOtherFlag"> -->
|
|
|
<!-- 平面图其他分区 -->
|
|
|
- <el-button type="primary" @click="addZoneBtn">添加分区</el-button>
|
|
|
+ <!-- <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> -->
|
|
|
<div>
|
|
|
<el-autocomplete popper-class="my-autocomplete" v-model="search" :fetch-suggestions="querySearch" placeholder="输入平面图中已有的业务空间名称进行查找"
|
|
|
width="180px" @select="handleSelect">
|
|
@@ -181,7 +181,7 @@
|
|
|
areaValue: 40,
|
|
|
areaMarks: { 0: '0m²', 100: '1m²' },
|
|
|
options: [], //其他分区类型
|
|
|
- OtherValue: '',
|
|
|
+ // OtherValue: '',
|
|
|
showOtherFlag: false, //是否显示其他分区类型添加
|
|
|
buildFloorName: "", //建筑楼层名称
|
|
|
spaceHeight: 0,
|
|
@@ -264,9 +264,9 @@
|
|
|
})
|
|
|
},
|
|
|
//添加其他分区
|
|
|
- addZoneBtn() {
|
|
|
- this.$refs.zone.dialogFormVisible = true
|
|
|
- },
|
|
|
+ // addZoneBtn() {
|
|
|
+ // this.$refs.zone.dialogFormVisible = true
|
|
|
+ // },
|
|
|
// 搜索
|
|
|
querySearch(queryString, cb) {
|
|
|
let restaurants = this.zoneList;
|
|
@@ -334,10 +334,10 @@
|
|
|
})
|
|
|
},
|
|
|
// 其他类型下拉change
|
|
|
- changeOtherZone(val) {
|
|
|
- this.init(2);
|
|
|
- // localStorage.setItem('otherZone', val)
|
|
|
- },
|
|
|
+ // changeOtherZone(val) {
|
|
|
+ // this.init(2);
|
|
|
+ // // localStorage.setItem('otherZone', val)
|
|
|
+ // },
|
|
|
// 获取未绑定业务空间的元空间
|
|
|
getISPSPUnrelaBSP() {
|
|
|
let pa = {
|
|
@@ -346,11 +346,13 @@
|
|
|
PageSize: 1000,
|
|
|
FloorId: this.buildFloor[1]
|
|
|
},
|
|
|
- objectType: this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code
|
|
|
+ objectType: this.tab.code
|
|
|
+ // objectType: this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code
|
|
|
}
|
|
|
getIspNotInSpace(pa, res => {
|
|
|
// 类型需要重新获取,直接取pa.objecttype有问题
|
|
|
- let tempType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code
|
|
|
+ // let tempType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code
|
|
|
+ let tempType = this.tab.code
|
|
|
if (res.FloorId == this.buildFloor[1] && res.ZoneType == tempType) {
|
|
|
this.allUnRelatISP = res.Content;
|
|
|
}
|
|
@@ -379,7 +381,7 @@
|
|
|
that.canvasLoading = false;
|
|
|
if (res == 'error') {
|
|
|
this.FloorMap = '';
|
|
|
- this.$message.warning('数据解析异常');
|
|
|
+ console.log('数据解析异常');
|
|
|
return;
|
|
|
}
|
|
|
that.view.scene = that.scene;
|
|
@@ -402,7 +404,8 @@
|
|
|
// 获取当前分区下的业务空间
|
|
|
getBusinessSpace() {
|
|
|
this.canvasLoading = true
|
|
|
- let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
|
|
|
+ // let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
|
|
|
+ let ObjectType = this.tab.code;
|
|
|
let pa = {
|
|
|
ZoneType: ObjectType,
|
|
|
Filters: `not RoomID isNull`,
|
|
@@ -415,7 +418,8 @@
|
|
|
}
|
|
|
zoneQueryOutline(pa, res => {
|
|
|
// 类型需要重新获取,直接取pa.ZoneType
|
|
|
- let tempType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
|
|
|
+ let tempType = this.tab.code;
|
|
|
+ // let tempType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
|
|
|
if (res.FloorId == this.buildFloor[1] && res.ZoneType == tempType) {
|
|
|
// 所有业务空间
|
|
|
this.businessSpaceList = res.Content;
|
|
@@ -777,7 +781,8 @@
|
|
|
},
|
|
|
// 确认业务空间
|
|
|
confirmZoneSpace() {
|
|
|
- let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
|
|
|
+ let ObjectType = this.tab.code;
|
|
|
+ // let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
|
|
|
let space = {
|
|
|
RoomID: this.curZoneItem.data.RoomID,
|
|
|
State: 0,
|
|
@@ -800,6 +805,12 @@
|
|
|
},
|
|
|
// 重新划分--保存
|
|
|
saveRefactorBSP() {
|
|
|
+ if (this.scene && this.scene.cutItem) {
|
|
|
+ if (!this.scene.cutItem.closeFlag) {
|
|
|
+ this.$message.warning('未产生闭合区域')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
let selectSpace = this.scene.getSelectedSpaces();
|
|
|
let selectLikeSpace = this.scene.getSelectedLikeSpace();
|
|
|
//更新业务空间
|
|
@@ -994,7 +1005,8 @@
|
|
|
},
|
|
|
// 更新业务空间和元空间的关系
|
|
|
relationInBSPandISP(SpaceId, IspaceIdList) {
|
|
|
- let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
|
|
|
+ let ObjectType = this.tab.code;
|
|
|
+ // let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
|
|
|
let pa = {
|
|
|
data: { SpaceId: SpaceId, IspaceIdList: IspaceIdList },
|
|
|
type: ObjectType
|
|
@@ -1013,7 +1025,8 @@
|
|
|
// 批量更新业务空间和元空间的关系
|
|
|
groupCreRelaZoneAndISp(Spaces) {
|
|
|
Spaces = Spaces.filter(item => item.IspaceId);
|
|
|
- let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
|
|
|
+ let ObjectType = this.tab.code;
|
|
|
+ // let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
|
|
|
if (Spaces.length) {
|
|
|
let param = {
|
|
|
data: {
|
|
@@ -1034,7 +1047,8 @@
|
|
|
},
|
|
|
// 批量创建
|
|
|
groupCreateBSP(spaces) {
|
|
|
- let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
|
|
|
+ let ObjectType = this.tab.code;
|
|
|
+ // let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
|
|
|
spaces = spaces.map(t => {
|
|
|
t.ObjectType = ObjectType;
|
|
|
t.BIMLocation = this.getAverageVal(t.Outline);
|
|
@@ -1058,7 +1072,8 @@
|
|
|
},
|
|
|
// 单个创建
|
|
|
createSingleBSP(space, IspaceIdList) {
|
|
|
- let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
|
|
|
+ let ObjectType = this.tab.code;
|
|
|
+ // let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;/
|
|
|
space.BIMLocation = space.Outline ? this.getAverageVal(space.Outline) : null;
|
|
|
space.ObjectType = ObjectType;
|
|
|
let pa = {
|
|
@@ -1070,7 +1085,8 @@
|
|
|
},
|
|
|
// 更新业务空间区域
|
|
|
updateBSPOutline(zoneObj, IspaceIdList) {
|
|
|
- let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
|
|
|
+ let ObjectType = this.tab.code;
|
|
|
+ // let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
|
|
|
zoneObj.BIMLocation = zoneObj.Outline ? this.getAverageVal(zoneObj.Outline) : null;
|
|
|
zoneObj.ObjectType = ObjectType;
|
|
|
zoneObj.BuildingId = this.buildFloor[0];
|
|
@@ -1097,7 +1113,8 @@
|
|
|
},
|
|
|
// 查询未关联平面图的业务空间(项目下+当前分区)
|
|
|
getBSPunrelaISP() {
|
|
|
- let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
|
|
|
+ let ObjectType = this.tab.code;
|
|
|
+ // let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
|
|
|
let pa = {
|
|
|
Filters: `Outline isNull;ObjectType="${ObjectType}"`
|
|
|
}
|