|
@@ -115,70 +115,70 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
- import canvasFun from "./canvasFun"
|
|
|
|
- import {mapGetters} from "vuex";
|
|
|
|
- import {SColor, SPoint} from "@saga-web/draw/lib";
|
|
|
|
- import {DivideFloorScene, FloorView, Opt, 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,
|
|
|
|
- handleZoneUpdateBd,
|
|
|
|
- queryAllZoneType,
|
|
|
|
- queryZone,
|
|
|
|
- zoneCount,
|
|
|
|
- zoneCreate,
|
|
|
|
- zoneQuery,
|
|
|
|
- zoneQueryOutline,
|
|
|
|
- zoneUpdate,
|
|
|
|
- zoneUpdateOutline
|
|
|
|
- } from "@/api/scan/request"
|
|
|
|
|
|
+import canvasFun from "./canvasFun"
|
|
|
|
+import { mapGetters } from "vuex";
|
|
|
|
+import { SColor, SPoint } from "@saga-web/draw/lib";
|
|
|
|
+import { DivideFloorScene, FloorView, Opt, 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,
|
|
|
|
+ handleZoneUpdateBd,
|
|
|
|
+ queryAllZoneType,
|
|
|
|
+ queryZone,
|
|
|
|
+ zoneCount,
|
|
|
|
+ zoneCreate,
|
|
|
|
+ zoneQuery,
|
|
|
|
+ zoneQueryOutline,
|
|
|
|
+ zoneUpdate,
|
|
|
|
+ zoneUpdateOutline
|
|
|
|
+} from "@/api/scan/request"
|
|
|
|
|
|
- export default {
|
|
|
|
- components: {
|
|
|
|
- canvasFun,
|
|
|
|
- unRelateBSP,
|
|
|
|
- createBSP,
|
|
|
|
- // dialogZone
|
|
|
|
- },
|
|
|
|
- data() {
|
|
|
|
- return {
|
|
|
|
- canvasWidth: 800,
|
|
|
|
- canvasHeight: 600,
|
|
|
|
- type: 1, // 默认操作模式
|
|
|
|
- search: '',//搜索
|
|
|
|
- buildFloor: ['', ''],
|
|
|
|
- FloorObj: {}, //楼层对象
|
|
|
|
- FloorMap: '', //楼层底图
|
|
|
|
- tab: {},
|
|
|
|
- config: {
|
|
|
|
- isEdit: false,
|
|
|
|
- divide: true,
|
|
|
|
- groupSelect: true
|
|
|
|
- },
|
|
|
|
- canvasLoading: false,
|
|
|
|
- view: null,
|
|
|
|
- scene: null,
|
|
|
|
- Outline: [], // 当前选中的多个空间组成的轮廓线->三维数组
|
|
|
|
- businessSpaceList: [], // 所有业务空间
|
|
|
|
- num: 0, // 未关联元空间的业务空间统计
|
|
|
|
- BSPRelaISPList: [], // 已关联元空间的业务空间
|
|
|
|
- // 未关联元空间的业务空间弹窗
|
|
|
|
- isAction: false,
|
|
|
|
- curOutline: [],
|
|
|
|
- BIMIDToSID: {}, //bimid映射元空间id
|
|
|
|
- BIMIDToSIName: {}, //bimid映射元空间名称
|
|
|
|
- curZoneItem: {}, //当前选中的业务空间item
|
|
|
|
- allUnRelatISP: [], //
|
|
|
|
- zoneList: [], // 业务空间-canvas图中
|
|
|
|
- groupCreateDialogVis: false, //批量创建业务空间弹窗
|
|
|
|
- groupCreateType: 1, //批量创建方式
|
|
|
|
- zoneDisable: true, // 重新划分是否禁用
|
|
|
|
- sourceIdToISP: {},
|
|
|
|
|
|
+export default {
|
|
|
|
+ components: {
|
|
|
|
+ canvasFun,
|
|
|
|
+ unRelateBSP,
|
|
|
|
+ createBSP,
|
|
|
|
+ // dialogZone
|
|
|
|
+ },
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ canvasWidth: 800,
|
|
|
|
+ canvasHeight: 600,
|
|
|
|
+ type: 1, // 默认操作模式
|
|
|
|
+ search: '',//搜索
|
|
|
|
+ buildFloor: ['', ''],
|
|
|
|
+ FloorObj: {}, //楼层对象
|
|
|
|
+ FloorMap: '', //楼层底图
|
|
|
|
+ tab: {},
|
|
|
|
+ config: {
|
|
|
|
+ isEdit: false,
|
|
|
|
+ divide: true,
|
|
|
|
+ groupSelect: true
|
|
|
|
+ },
|
|
|
|
+ canvasLoading: false,
|
|
|
|
+ view: null,
|
|
|
|
+ scene: null,
|
|
|
|
+ Outline: [], // 当前选中的多个空间组成的轮廓线->三维数组
|
|
|
|
+ businessSpaceList: [], // 所有业务空间
|
|
|
|
+ num: 0, // 未关联元空间的业务空间统计
|
|
|
|
+ BSPRelaISPList: [], // 已关联元空间的业务空间
|
|
|
|
+ // 未关联元空间的业务空间弹窗
|
|
|
|
+ isAction: false,
|
|
|
|
+ curOutline: [],
|
|
|
|
+ BIMIDToSID: {}, //bimid映射元空间id
|
|
|
|
+ BIMIDToSIName: {}, //bimid映射元空间名称
|
|
|
|
+ curZoneItem: {}, //当前选中的业务空间item
|
|
|
|
+ allUnRelatISP: [], //
|
|
|
|
+ zoneList: [], // 业务空间-canvas图中
|
|
|
|
+ groupCreateDialogVis: false, //批量创建业务空间弹窗
|
|
|
|
+ groupCreateType: 1, //批量创建方式
|
|
|
|
+ zoneDisable: true, // 重新划分是否禁用
|
|
|
|
+ sourceIdToISP: {},
|
|
areaValue: 40,
|
|
areaValue: 40,
|
|
areaMarks: { 0: '0m²', 100: '1m²' },
|
|
areaMarks: { 0: '0m²', 100: '1m²' },
|
|
options: [], //其他分区类型
|
|
options: [], //其他分区类型
|
|
@@ -554,13 +554,22 @@
|
|
outline: [t.outline],
|
|
outline: [t.outline],
|
|
buildingId: this.buildFloor[0],
|
|
buildingId: this.buildFloor[0],
|
|
floorId: this.buildFloor[1],
|
|
floorId: this.buildFloor[1],
|
|
- height: this.spaceHeight,
|
|
|
|
- ///
|
|
|
|
- ///
|
|
|
|
|
|
+ height: this.spaceHeight
|
|
}
|
|
}
|
|
if (t.customParam) {
|
|
if (t.customParam) {
|
|
obj.customParam = t.customParam
|
|
obj.customParam = t.customParam
|
|
}
|
|
}
|
|
|
|
+ // 2020-12-20 演示用 -start
|
|
|
|
+ if (t.infos) {
|
|
|
|
+ obj.infos = {}
|
|
|
|
+ if (t.infos.ctmWDRoomFuncId) {
|
|
|
|
+ obj.infos.ctmWDRoomFuncId = t.infos.ctmWDRoomFuncId
|
|
|
|
+ }
|
|
|
|
+ if (t.infos.ctmWDRoomFuncName) {
|
|
|
|
+ obj.infos.ctmWDRoomFuncName = t.infos.ctmWDRoomFuncName
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 2020-12-20 演示用 -end
|
|
return obj;
|
|
return obj;
|
|
} else {
|
|
} else {
|
|
return undefined
|
|
return undefined
|
|
@@ -640,6 +649,18 @@
|
|
if (curISP) {
|
|
if (curISP) {
|
|
curISP && IspaceIdList.push(curISP.id);
|
|
curISP && IspaceIdList.push(curISP.id);
|
|
zoneObj.height = this.spaceHeight;
|
|
zoneObj.height = this.spaceHeight;
|
|
|
|
+ // 2020-12-20 演示用 -start
|
|
|
|
+ console.log(curISP);
|
|
|
|
+ if (curISP.infos) {
|
|
|
|
+ zoneObj.infos = {}
|
|
|
|
+ if (curISP.infos.ctmWDRoomFuncId) {
|
|
|
|
+ zoneObj.infos.ctmWDRoomFuncId = curISP.infos.ctmWDRoomFuncId
|
|
|
|
+ }
|
|
|
|
+ if (curISP.infos.ctmWDRoomFuncName) {
|
|
|
|
+ zoneObj.infos.ctmWDRoomFuncName = curISP.infos.ctmWDRoomFuncName
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 2020-12-20 演示用 -end
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} catch (err) {
|
|
} catch (err) {
|
|
@@ -652,6 +673,18 @@
|
|
if (curISP) {
|
|
if (curISP) {
|
|
IspaceIdList.push(curISP.id);
|
|
IspaceIdList.push(curISP.id);
|
|
zoneObj.height = this.spaceHeight;
|
|
zoneObj.height = this.spaceHeight;
|
|
|
|
+ // 2020-12-20 演示用 -start
|
|
|
|
+ console.log(curISP);
|
|
|
|
+ if (curISP.infos) {
|
|
|
|
+ zoneObj.infos = {}
|
|
|
|
+ if (curISP.infos.ctmWDRoomFuncId) {
|
|
|
|
+ zoneObj.infos.ctmWDRoomFuncId = curISP.infos.ctmWDRoomFuncId
|
|
|
|
+ }
|
|
|
|
+ if (curISP.infos.ctmWDRoomFuncName) {
|
|
|
|
+ zoneObj.infos.ctmWDRoomFuncName = curISP.infos.ctmWDRoomFuncName
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 2020-12-20 演示用 -end
|
|
}
|
|
}
|
|
})
|
|
})
|
|
// 如果有划分,求交集
|
|
// 如果有划分,求交集
|
|
@@ -677,8 +710,6 @@
|
|
zoneObj.localName = val;
|
|
zoneObj.localName = val;
|
|
zoneObj.buildingId = this.buildFloor[0];
|
|
zoneObj.buildingId = this.buildFloor[0];
|
|
zoneObj.floorId = this.buildFloor[1];
|
|
zoneObj.floorId = this.buildFloor[1];
|
|
- ///
|
|
|
|
- ///
|
|
|
|
this.createSingleBSP(zoneObj, IspaceIdList)
|
|
this.createSingleBSP(zoneObj, IspaceIdList)
|
|
},
|
|
},
|
|
// 根据图从未关联平面图的业务空间中选择--按钮返回关联信号
|
|
// 根据图从未关联平面图的业务空间中选择--按钮返回关联信号
|
|
@@ -714,6 +745,17 @@
|
|
if (curISP) {
|
|
if (curISP) {
|
|
curISP && IspaceIdList.push(curISP.id);
|
|
curISP && IspaceIdList.push(curISP.id);
|
|
zoneObj.height = this.spaceHeight;
|
|
zoneObj.height = this.spaceHeight;
|
|
|
|
+ // 2020-12-20 演示用 -start
|
|
|
|
+ if (curISP.infos) {
|
|
|
|
+ zoneObj.infos = {}
|
|
|
|
+ if (curISP.infos.ctmWDRoomFuncId) {
|
|
|
|
+ zoneObj.infos.ctmWDRoomFuncId = curISP.infos.ctmWDRoomFuncId
|
|
|
|
+ }
|
|
|
|
+ if (curISP.infos.ctmWDRoomFuncName) {
|
|
|
|
+ zoneObj.infos.ctmWDRoomFuncName = curISP.infos.ctmWDRoomFuncName
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 2020-12-20 演示用 -end
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} catch (err) {
|
|
} catch (err) {
|
|
@@ -726,6 +768,17 @@
|
|
if (curISP) {
|
|
if (curISP) {
|
|
curISP && IspaceIdList.push(curISP.id);
|
|
curISP && IspaceIdList.push(curISP.id);
|
|
zoneObj.height = this.spaceHeight;
|
|
zoneObj.height = this.spaceHeight;
|
|
|
|
+ // 2020-12-20 演示用 -start
|
|
|
|
+ if (curISP.infos) {
|
|
|
|
+ zoneObj.infos = {}
|
|
|
|
+ if (curISP.infos.ctmWDRoomFuncId) {
|
|
|
|
+ zoneObj.infos.ctmWDRoomFuncId = curISP.infos.ctmWDRoomFuncId
|
|
|
|
+ }
|
|
|
|
+ if (curISP.infos.ctmWDRoomFuncName) {
|
|
|
|
+ zoneObj.infos.ctmWDRoomFuncName = curISP.infos.ctmWDRoomFuncName
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 2020-12-20 演示用 -end
|
|
}
|
|
}
|
|
})
|
|
})
|
|
// 如果有划分,求交集
|
|
// 如果有划分,求交集
|
|
@@ -813,11 +866,18 @@
|
|
if (this.BIMIDToSID[t.data.SourceId]) {
|
|
if (this.BIMIDToSID[t.data.SourceId]) {
|
|
IspaceIdList.push(this.BIMIDToSID[t.data.SourceId]);
|
|
IspaceIdList.push(this.BIMIDToSID[t.data.SourceId]);
|
|
}
|
|
}
|
|
-
|
|
|
|
- // if (t.Height && (zoneObj.Height == 0 || t.Height < zoneObj.Height)) {
|
|
|
|
- // zoneObj.Height = t.Height > 100 ? (t.Height / 1000).toFixed(2) : t.Height;
|
|
|
|
|
|
+ // 2020-12-20 演示用 -start
|
|
|
|
+ if (this.sourceIdToISP[t.data.sourceId] && this.sourceIdToISP[t.data.sourceId].infos) {
|
|
|
|
+ zoneObj.infos = {};
|
|
|
|
+ if (this.sourceIdToISP[t.data.sourceId].infos.ctmWDRoomFuncId) {
|
|
|
|
+ zoneObj.infos.ctmWDRoomFuncId = this.sourceIdToISP[t.data.sourceId].infos.ctmWDRoomFuncId
|
|
|
|
+ }
|
|
|
|
+ if (this.sourceIdToISP[t.data.sourceId].infos.ctmWDRoomFuncName) {
|
|
|
|
+ zoneObj.infos.ctmWDRoomFuncName = this.sourceIdToISP[t.data.sourceId].infos.ctmWDRoomFuncName
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 2020-12-20 演示用 -end
|
|
zoneObj.height = this.spaceHeight
|
|
zoneObj.height = this.spaceHeight
|
|
- // }
|
|
|
|
})
|
|
})
|
|
// 类空间
|
|
// 类空间
|
|
selectLikeSpace.map(t => {
|
|
selectLikeSpace.map(t => {
|
|
@@ -909,6 +969,17 @@
|
|
// zoneObj.Height = zoneObj.Height == 0 ? curISP.Height : zoneObj.Height > curISP.Height ? curISP.Height : zoneObj.Height;
|
|
// zoneObj.Height = zoneObj.Height == 0 ? curISP.Height : zoneObj.Height > curISP.Height ? curISP.Height : zoneObj.Height;
|
|
zoneObj.ispaceId = curISP.id;
|
|
zoneObj.ispaceId = curISP.id;
|
|
zoneObj.localName = curISP.localName || '';
|
|
zoneObj.localName = curISP.localName || '';
|
|
|
|
+ // 2020-12-20 演示用 -start
|
|
|
|
+ if (curISP.infos) {
|
|
|
|
+ zoneObj.infos = {}
|
|
|
|
+ if (curISP.infos.ctmWDRoomFuncId) {
|
|
|
|
+ zoneObj.infos.ctmWDRoomFuncId = curISP.infos.ctmWDRoomFuncId
|
|
|
|
+ }
|
|
|
|
+ if (curISP.infos.ctmWDRoomFuncName) {
|
|
|
|
+ zoneObj.infos.ctmWDRoomFuncName = curISP.infos.ctmWDRoomFuncName
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 2020-12-20 演示用 -end
|
|
}
|
|
}
|
|
zoneObj.buildingId = this.buildFloor[0];
|
|
zoneObj.buildingId = this.buildFloor[0];
|
|
zoneObj.floorId = this.buildFloor[1];
|
|
zoneObj.floorId = this.buildFloor[1];
|
|
@@ -957,9 +1028,13 @@
|
|
outline: line,
|
|
outline: line,
|
|
buildingId: this.buildFloor[0],
|
|
buildingId: this.buildFloor[0],
|
|
floorId: this.buildFloor[1],
|
|
floorId: this.buildFloor[1],
|
|
- height: this.spaceHeight
|
|
|
|
- ///
|
|
|
|
- ///
|
|
|
|
|
|
+ height: this.spaceHeight,
|
|
|
|
+ // 2020-12-20 演示用 -start
|
|
|
|
+ infos: {
|
|
|
|
+ ctmWDRoomFuncId: this.sourceIdToISP[t.data.sourceId].infos ? this.sourceIdToISP[t.data.sourceId].infos.ctmWDRoomFuncId || '' : '',
|
|
|
|
+ ctmWDRoomFuncName: this.sourceIdToISP[t.data.sourceId].infos ? this.sourceIdToISP[t.data.sourceId].infos.ctmWDRoomFuncName || '' : ''
|
|
|
|
+ }
|
|
|
|
+ // 2020-12-20 演示用 -end
|
|
}
|
|
}
|
|
}).filter(item => item)
|
|
}).filter(item => item)
|
|
} else {
|
|
} else {
|
|
@@ -985,9 +1060,13 @@
|
|
outline: [line],
|
|
outline: [line],
|
|
buildingId: this.buildFloor[0],
|
|
buildingId: this.buildFloor[0],
|
|
floorId: this.buildFloor[1],
|
|
floorId: this.buildFloor[1],
|
|
- height: this.spaceHeight
|
|
|
|
- ///
|
|
|
|
- ///
|
|
|
|
|
|
+ height: this.spaceHeight,
|
|
|
|
+ // 2020-12-20 演示用 -start
|
|
|
|
+ infos: {
|
|
|
|
+ ctmWDRoomFuncId: this.sourceIdToISP[t.data.sourceId].infos ? this.sourceIdToISP[t.data.sourceId].infos.ctmWDRoomFuncId || '' : '',
|
|
|
|
+ ctmWDRoomFuncName: this.sourceIdToISP[t.data.sourceId].infos ? this.sourceIdToISP[t.data.sourceId].infos.ctmWDRoomFuncName || '' : ''
|
|
|
|
+ }
|
|
|
|
+ // 2020-12-20 演示用 -end
|
|
}
|
|
}
|
|
}).filter(item => item);
|
|
}).filter(item => item);
|
|
}
|
|
}
|
|
@@ -1081,8 +1160,6 @@
|
|
zoneObj.classCode = ObjectType;
|
|
zoneObj.classCode = ObjectType;
|
|
zoneObj.buildingId = this.buildFloor[0];
|
|
zoneObj.buildingId = this.buildFloor[0];
|
|
zoneObj.floorId = this.buildFloor[1];
|
|
zoneObj.floorId = this.buildFloor[1];
|
|
- ///
|
|
|
|
- ///
|
|
|
|
let pa = {
|
|
let pa = {
|
|
content: [zoneObj],
|
|
content: [zoneObj],
|
|
projection: ['bimLocation', 'classCode', 'outline', 'height', 'buildingId', 'floorId']
|
|
projection: ['bimLocation', 'classCode', 'outline', 'height', 'buildingId', 'floorId']
|