|
@@ -78,7 +78,8 @@ import {
|
|
|
updateZone,
|
|
|
createZone,
|
|
|
getIspNotInSpace,
|
|
|
- createRelateInZoneAndISp
|
|
|
+ createRelateInZoneAndISp,
|
|
|
+ groupCreRelaZoneAndISp
|
|
|
} from "@/api/scan/request"
|
|
|
const colorArr = [
|
|
|
"#F9C3C3",
|
|
@@ -122,6 +123,7 @@ export default {
|
|
|
curOutline: [],
|
|
|
BIMIDToSID: {}, //bimid映射元空间id
|
|
|
curZoneItem: {}, //当前选中的业务空间item
|
|
|
+ allUnRelatISP: [], //
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -210,8 +212,9 @@ export default {
|
|
|
},
|
|
|
objectType: this.tab.code
|
|
|
}
|
|
|
+ this.allUnRelatISP = []
|
|
|
getIspNotInSpace(pa, res => {
|
|
|
- console.log(res)
|
|
|
+ this.allUnRelatISP = res.Content;
|
|
|
})
|
|
|
},
|
|
|
// 获取底图
|
|
@@ -314,16 +317,16 @@ export default {
|
|
|
// 批量创建业务空间
|
|
|
groupCreateBSpace() {
|
|
|
let text = []
|
|
|
- let Spaces = this.scene.spaceList.map(t => {
|
|
|
- text.push(t.data.Name)
|
|
|
+ let Spaces = this.allUnRelatISP.map(t => {
|
|
|
+ text.push(t.RoomLocalName || t.RoomName)
|
|
|
return {
|
|
|
- RoomLocalName: t.data.Name,
|
|
|
- Outline: [t.data.OutLine]
|
|
|
+ IspaceId: t.RoomID,
|
|
|
+ RoomLocalName: t.RoomLocalName || t.RoomName,
|
|
|
+ Outline: [t.Outline],
|
|
|
+ BuildingId: this.buildFloor[0],
|
|
|
+ FloorId: this.buildFloor[1]
|
|
|
}
|
|
|
});
|
|
|
- console.log(Spaces)
|
|
|
- console.log(this.scene.spaceList)
|
|
|
- // return
|
|
|
this.$confirm(
|
|
|
"<p>确定根据未关联业务空间的空间批量创建业务空间</p>" +
|
|
|
"<p>涉及的空间:</p>" +
|
|
@@ -337,15 +340,33 @@ export default {
|
|
|
type: "warning"
|
|
|
}
|
|
|
).then(() => {
|
|
|
- console.log()
|
|
|
let pa = {
|
|
|
- zone: this.zoneCode,
|
|
|
+ zone: this.tab.code,
|
|
|
data: {
|
|
|
Content: Spaces
|
|
|
}
|
|
|
}
|
|
|
+ this.canvasLoading = true;
|
|
|
createZone(pa, res => {
|
|
|
-
|
|
|
+ res.EntityList.map(t => {
|
|
|
+ Spaces = Spaces.map(item => {
|
|
|
+ if (t.RoomLocalName == item.RoomLocalName) {
|
|
|
+ item.SpaceId = t.RoomID
|
|
|
+ }
|
|
|
+ return item;
|
|
|
+ })
|
|
|
+ })
|
|
|
+ let param = {
|
|
|
+ data: {
|
|
|
+ Content: Spaces
|
|
|
+ },
|
|
|
+ type: this.tab.code
|
|
|
+ }
|
|
|
+ groupCreRelaZoneAndISp(param, res => {
|
|
|
+ this.$message.success('创建成功')
|
|
|
+ this.canvasLoading = false;
|
|
|
+ this.init()
|
|
|
+ })
|
|
|
})
|
|
|
}).catch(() => {
|
|
|
this.$message({
|