|
@@ -11,7 +11,7 @@
|
|
import { DivideFloorScene, FloorView } from "@saga-web/cad-engine/lib"
|
|
import { DivideFloorScene, FloorView } from "@saga-web/cad-engine/lib"
|
|
import { SColor, SPoint } from "@sybotan-web/draw/lib";
|
|
import { SColor, SPoint } from "@sybotan-web/draw/lib";
|
|
import canvasFun from "@/components/business_space/newGraphy/canvasFun"
|
|
import canvasFun from "@/components/business_space/newGraphy/canvasFun"
|
|
-import { floorQuery } from "@/api/scan/request";
|
|
|
|
|
|
+import { floorQuery, queryEquip } from "@/api/scan/request";
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
canvasFun
|
|
canvasFun
|
|
@@ -27,6 +27,7 @@ export default {
|
|
modelId: '',
|
|
modelId: '',
|
|
FloorID: '',
|
|
FloorID: '',
|
|
Outline: [],
|
|
Outline: [],
|
|
|
|
+ deviceList: [],
|
|
buttonContent: "",
|
|
buttonContent: "",
|
|
showTools: false,
|
|
showTools: false,
|
|
config: {
|
|
config: {
|
|
@@ -44,6 +45,10 @@ export default {
|
|
dialog: {
|
|
dialog: {
|
|
default: false
|
|
default: false
|
|
},
|
|
},
|
|
|
|
+ isLight:{
|
|
|
|
+ type: Boolean,
|
|
|
|
+ default: false
|
|
|
|
+ },
|
|
CurrentModelId: String
|
|
CurrentModelId: String
|
|
},
|
|
},
|
|
created() { },
|
|
created() { },
|
|
@@ -106,15 +111,53 @@ export default {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
this.view.scene = this.drawMainScene;
|
|
this.view.scene = this.drawMainScene;
|
|
|
|
+ if(this.isLight){//高亮显示未验证的区块
|
|
|
|
+ this.deviceList = []
|
|
|
|
+ this.highLightPoint()
|
|
|
|
+ }
|
|
this.view.fitSceneToView();
|
|
this.view.fitSceneToView();
|
|
this.drawMainScene.click(this, this.canvasClick);
|
|
this.drawMainScene.click(this, this.canvasClick);
|
|
-
|
|
|
|
if (this.$refs.canvasFun) {
|
|
if (this.$refs.canvasFun) {
|
|
this.view.maxScale = this.view.scale * 10;
|
|
this.view.maxScale = this.view.scale * 10;
|
|
this.view.minScale = this.view.scale;
|
|
this.view.minScale = this.view.scale;
|
|
this.$refs.canvasFun.everyScale = this.view.scale;
|
|
this.$refs.canvasFun.everyScale = this.view.scale;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ //高亮未完成验证的区块
|
|
|
|
+ async highLightPoint() {
|
|
|
|
+ await this.getUnverificationDevice()
|
|
|
|
+ this.view.scene.spaceList.forEach(item => {
|
|
|
|
+ for(let deviceItem of this.deviceList) {
|
|
|
|
+ if(deviceItem.LocationJson && item.contains(deviceItem.LocationJson.X, -deviceItem.LocationJson.Y)){//注:坐标体系不同,Y坐标取反
|
|
|
|
+ item.selected = true
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ //获取模型下未验证的设备
|
|
|
|
+ getUnverificationDevice(pageNum) {
|
|
|
|
+ return new Promise((resolve) => {
|
|
|
|
+ pageNum = pageNum ? pageNum : 1
|
|
|
|
+ let params = {
|
|
|
|
+ Filters: `TaskState isNull;ModelId='${this.CurrentModelId}'`,
|
|
|
|
+ Orders: "CreateTime desc, EquipID asc",
|
|
|
|
+ Projection: ["EquipID", "BIMID", "BIMLocation", "LocationJson"],
|
|
|
|
+ PageNumber: pageNum,
|
|
|
|
+ PageSize: 1000
|
|
|
|
+ }
|
|
|
|
+ queryEquip(params, res => {
|
|
|
|
+ this.deviceList = res.Content
|
|
|
|
+ resolve();
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ // queryEquip(params, res => {
|
|
|
|
+ // this.deviceList = this.deviceList.concat(res.Content)
|
|
|
|
+ // if (res.Total / (res.PageSize * res.PageNumber) > 1) {
|
|
|
|
+ // this.getUnverificationDevice(res.PageNumber + 1)
|
|
|
|
+ // } else { }
|
|
|
|
+ // });
|
|
|
|
+ },
|
|
// canvas 获取焦点
|
|
// canvas 获取焦点
|
|
focus() {
|
|
focus() {
|
|
document.getElementById(`floorCanvas${this.id}`).focus()
|
|
document.getElementById(`floorCanvas${this.id}`).focus()
|
|
@@ -142,6 +185,18 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
|
|
+ isLight: {
|
|
|
|
+ handler(newValue, oldValue) {
|
|
|
|
+ if(newValue){//高亮显示未验证的区块
|
|
|
|
+ this.deviceList = []
|
|
|
|
+ this.highLightPoint()
|
|
|
|
+ } else {
|
|
|
|
+ this.view.scene.spaceList.forEach(item => {
|
|
|
|
+ item.selected = false
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
CurrentModelId: {
|
|
CurrentModelId: {
|
|
handler(newName, oldName) {
|
|
handler(newName, oldName) {
|
|
if (newName) {
|
|
if (newName) {
|