|
@@ -349,18 +349,24 @@ export default {
|
|
|
},
|
|
|
// canvas点击事件
|
|
|
canvasClick(item, event) {
|
|
|
+ console.log(item)
|
|
|
+ console.log(event)
|
|
|
if (this.type == 4) {
|
|
|
|
|
|
} else {
|
|
|
if (item instanceof SpaceItem && item.selectable) {
|
|
|
+ if (this.type == 2) {
|
|
|
+ this.scene.clearZoneSelection();
|
|
|
+ }
|
|
|
this.type = 3;
|
|
|
this.curZoneItem = {};
|
|
|
- this.scene.isZoneSelectable = false;
|
|
|
}
|
|
|
if (item instanceof ZoneItem && item.selectable) {
|
|
|
+ if (this.type == 3) {
|
|
|
+ this.scene.clearSpaceSelection();
|
|
|
+ }
|
|
|
this.type = 2;
|
|
|
this.curZoneItem = item;
|
|
|
- this.scene.isSpaceSelectable = false;
|
|
|
this.scene.clearZoneSelection();
|
|
|
item.selected = true;
|
|
|
}
|
|
@@ -547,23 +553,23 @@ export default {
|
|
|
},
|
|
|
// 批量创建
|
|
|
groupCreateBSP(spaces) {
|
|
|
- let pa = {
|
|
|
- zone: this.tab.code,
|
|
|
- data: {
|
|
|
- Content: space
|
|
|
- }
|
|
|
+ let pa = {
|
|
|
+ zone: this.tab.code,
|
|
|
+ data: {
|
|
|
+ Content: space
|
|
|
}
|
|
|
- createZone(pa, res => {
|
|
|
- res.EntityList.map(t => {
|
|
|
- Spaces = Spaces.map(item => {
|
|
|
- if (t.RoomLocalName == item.RoomLocalName) {
|
|
|
- item.SpaceId = t.RoomID
|
|
|
- }
|
|
|
- return item;
|
|
|
- })
|
|
|
+ }
|
|
|
+ createZone(pa, res => {
|
|
|
+ res.EntityList.map(t => {
|
|
|
+ Spaces = Spaces.map(item => {
|
|
|
+ if (t.RoomLocalName == item.RoomLocalName) {
|
|
|
+ item.SpaceId = t.RoomID
|
|
|
+ }
|
|
|
+ return item;
|
|
|
})
|
|
|
- this.groupCreRelaZoneAndISp(space)
|
|
|
})
|
|
|
+ this.groupCreRelaZoneAndISp(space)
|
|
|
+ })
|
|
|
},
|
|
|
// 单个创建
|
|
|
createSingleBSP(space, IspaceIdList) {
|