|
@@ -118,14 +118,14 @@ import dialogZone from "../../ledger/addDialog/dialogZone";
|
|
import {
|
|
import {
|
|
buildingQuery,
|
|
buildingQuery,
|
|
queryZone,
|
|
queryZone,
|
|
- updateZone,
|
|
|
|
- createZone,
|
|
|
|
- countZone,
|
|
|
|
getIspNotInSpace,
|
|
getIspNotInSpace,
|
|
createRelateInZoneAndISp,
|
|
createRelateInZoneAndISp,
|
|
groupCreRelaZoneAndISp,
|
|
groupCreRelaZoneAndISp,
|
|
- getZoneQuery,
|
|
|
|
queryAllZoneType, // 定制分区类型
|
|
queryAllZoneType, // 定制分区类型
|
|
|
|
+ zoneCreate,
|
|
|
|
+ searchZoneQuery,
|
|
|
|
+ handleZoneObjectUpdate,
|
|
|
|
+ countObjZone
|
|
} from "@/api/scan/request"
|
|
} from "@/api/scan/request"
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -137,8 +137,8 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- zoneValue:'',
|
|
|
|
- addZone:[],
|
|
|
|
|
|
+ zoneValue: '',
|
|
|
|
+ addZone: [],
|
|
canvasWidth: 800,
|
|
canvasWidth: 800,
|
|
canvasHeight: 600,
|
|
canvasHeight: 600,
|
|
type: 1, // 默认操作模式
|
|
type: 1, // 默认操作模式
|
|
@@ -221,7 +221,7 @@ export default {
|
|
// 查询未关联平面图的业务空间
|
|
// 查询未关联平面图的业务空间
|
|
this.getBSPunrelaISP();
|
|
this.getBSPunrelaISP();
|
|
},
|
|
},
|
|
- // 获取当前楼层的元空间
|
|
|
|
|
|
+ // 获取当前楼层的元空间-元空间接口不变
|
|
getFloorISpace() {
|
|
getFloorISpace() {
|
|
let pa = {
|
|
let pa = {
|
|
zone: 'Ispace',
|
|
zone: 'Ispace',
|
|
@@ -301,7 +301,6 @@ export default {
|
|
queryAllZoneType(pa, res => {
|
|
queryAllZoneType(pa, res => {
|
|
if (res.Content[0].ZoneType && res.Content[0].ZoneType.length) {
|
|
if (res.Content[0].ZoneType && res.Content[0].ZoneType.length) {
|
|
this.options = res.Content[0].ZoneType.map(t => {
|
|
this.options = res.Content[0].ZoneType.map(t => {
|
|
-
|
|
|
|
t.value = t.Code;
|
|
t.value = t.Code;
|
|
t.label = t.Name;
|
|
t.label = t.Name;
|
|
return t;
|
|
return t;
|
|
@@ -364,17 +363,16 @@ export default {
|
|
getBusinessSpace() {
|
|
getBusinessSpace() {
|
|
this.canvasLoading = true
|
|
this.canvasLoading = true
|
|
let pa = {
|
|
let pa = {
|
|
- zone: this.tab.code,
|
|
|
|
- data: {
|
|
|
|
- Filters: ``,
|
|
|
|
- Orders: "createTime desc, RoomID asc",
|
|
|
|
- PageSize: 1000
|
|
|
|
- }
|
|
|
|
|
|
+ ZoneType: this.tab.code,
|
|
|
|
+ Filters: `not RoomID isNull`,
|
|
|
|
+ Orders: "createTime desc, RoomID asc",
|
|
|
|
+ PageSize: 1000
|
|
}
|
|
}
|
|
if (this.buildFloor.length && this.buildFloor.length > 1) {
|
|
if (this.buildFloor.length && this.buildFloor.length > 1) {
|
|
- pa.data.Filters = `BuildingId='${this.buildFloor[0]}';FloorId='${this.buildFloor[1]}'`
|
|
|
|
|
|
+ pa.BuildingId = this.buildFloor[0];
|
|
|
|
+ pa.FloorId = this.buildFloor[1];
|
|
}
|
|
}
|
|
- queryZone(pa, res => {
|
|
|
|
|
|
+ searchZoneQuery(pa, res => {
|
|
// 所有业务空间
|
|
// 所有业务空间
|
|
this.businessSpaceList = res.Content;
|
|
this.businessSpaceList = res.Content;
|
|
// 已关联元空间的业务空间
|
|
// 已关联元空间的业务空间
|
|
@@ -720,15 +718,16 @@ export default {
|
|
},
|
|
},
|
|
// 确认业务空间
|
|
// 确认业务空间
|
|
confirmZoneSpace() {
|
|
confirmZoneSpace() {
|
|
- this.curZoneItem.data.State = 0;
|
|
|
|
|
|
+ let space = {
|
|
|
|
+ RoomID: this.curZoneItem.data.RoomID,
|
|
|
|
+ State: 0,
|
|
|
|
+ ObjectType: this.tab.code
|
|
|
|
+ }
|
|
let pa = {
|
|
let pa = {
|
|
- zone: this.tab.code,
|
|
|
|
- data: {
|
|
|
|
- Content: [this.curZoneItem.data],
|
|
|
|
- Projection: ['State']
|
|
|
|
- },
|
|
|
|
|
|
+ Content: [space],
|
|
|
|
+ Projection: ['State']
|
|
}
|
|
}
|
|
- updateZone(pa, res => {
|
|
|
|
|
|
+ handleZoneObjectUpdate(pa, res => {
|
|
this.curZoneItem.isInfected = false;
|
|
this.curZoneItem.isInfected = false;
|
|
this.$emit('updateState');
|
|
this.$emit('updateState');
|
|
this.$message.success('更新成功');
|
|
this.$message.success('更新成功');
|
|
@@ -952,16 +951,14 @@ export default {
|
|
// 批量创建
|
|
// 批量创建
|
|
groupCreateBSP(spaces) {
|
|
groupCreateBSP(spaces) {
|
|
spaces = spaces.map(t => {
|
|
spaces = spaces.map(t => {
|
|
|
|
+ t.ObjectType = this.tab.code;
|
|
t.BIMLocation = this.getAverageVal(t.Outline);
|
|
t.BIMLocation = this.getAverageVal(t.Outline);
|
|
return t;
|
|
return t;
|
|
})
|
|
})
|
|
let pa = {
|
|
let pa = {
|
|
- zone: this.tab.code,
|
|
|
|
- data: {
|
|
|
|
- Content: spaces
|
|
|
|
- }
|
|
|
|
|
|
+ Content: spaces,
|
|
}
|
|
}
|
|
- createZone(pa, res => {
|
|
|
|
|
|
+ zoneCreate(pa, res => {
|
|
res.EntityList.map(t => {
|
|
res.EntityList.map(t => {
|
|
spaces = spaces.map(item => {
|
|
spaces = spaces.map(item => {
|
|
if (t.RoomLocalName == item.RoomLocalName) {
|
|
if (t.RoomLocalName == item.RoomLocalName) {
|
|
@@ -976,39 +973,31 @@ export default {
|
|
// 单个创建
|
|
// 单个创建
|
|
createSingleBSP(space, IspaceIdList) {
|
|
createSingleBSP(space, IspaceIdList) {
|
|
space.BIMLocation = space.Outline ? this.getAverageVal(space.Outline) : null;
|
|
space.BIMLocation = space.Outline ? this.getAverageVal(space.Outline) : null;
|
|
|
|
+ space.ObjectType = this.tab.code;
|
|
let pa = {
|
|
let pa = {
|
|
- zone: this.tab.code,
|
|
|
|
- data: {
|
|
|
|
- Content: [space]
|
|
|
|
- }
|
|
|
|
|
|
+ Content: [space]
|
|
}
|
|
}
|
|
- createZone(pa, res => {
|
|
|
|
|
|
+ zoneCreate(pa, res => {
|
|
this.relationInBSPandISP(res.EntityList[0].RoomID, IspaceIdList)
|
|
this.relationInBSPandISP(res.EntityList[0].RoomID, IspaceIdList)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 更新业务空间区域
|
|
// 更新业务空间区域
|
|
updateBSPOutline(zoneObj, IspaceIdList) {
|
|
updateBSPOutline(zoneObj, IspaceIdList) {
|
|
zoneObj.BIMLocation = zoneObj.Outline ? this.getAverageVal(zoneObj.Outline) : null;
|
|
zoneObj.BIMLocation = zoneObj.Outline ? this.getAverageVal(zoneObj.Outline) : null;
|
|
|
|
+ zoneObj.ObjectType = this.tab.code;
|
|
let pa = {
|
|
let pa = {
|
|
- zone: this.tab.code,
|
|
|
|
- data: {
|
|
|
|
- Content: [zoneObj],
|
|
|
|
- Projection: ['Outline', 'BIMLocation', 'State']
|
|
|
|
- },
|
|
|
|
|
|
+ Content: [zoneObj]
|
|
}
|
|
}
|
|
- updateZone(pa, res => {
|
|
|
|
|
|
+ handleZoneObjectUpdate(pa, res => {
|
|
this.relationInBSPandISP(zoneObj.RoomID, IspaceIdList)
|
|
this.relationInBSPandISP(zoneObj.RoomID, IspaceIdList)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 查询未关联平面图的业务空间(项目下+当前分区)
|
|
// 查询未关联平面图的业务空间(项目下+当前分区)
|
|
getBSPunrelaISP() {
|
|
getBSPunrelaISP() {
|
|
let pa = {
|
|
let pa = {
|
|
- zone: this.tab.code,
|
|
|
|
- data: {
|
|
|
|
- Filters: `Outline isNull`
|
|
|
|
- }
|
|
|
|
|
|
+ Filters: `Outline isNull;ObjectType="${this.tab.code}"`
|
|
}
|
|
}
|
|
- countZone(pa, res => {
|
|
|
|
|
|
+ countObjZone(pa, res => {
|
|
this.num = res.Count;
|
|
this.num = res.Count;
|
|
})
|
|
})
|
|
},
|
|
},
|