BIM设置客户端渲染
parent
08ecf64111
commit
a2bc510635
|
@ -0,0 +1 @@
|
|||
java -Dfile.encoding=utf-8 -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -jar yanzhu-modules/yanzhu-flowable/target/yanzhu-modules-flowable.jar
|
|
@ -115,6 +115,7 @@ export default {
|
|||
document.body.classList.remove("is-sapi");
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.userStore = useUserStore();
|
||||
this.currentPrjId = this.userStore.currentPrjId;
|
||||
this.currentComId = this.userStore.currentComId;
|
||||
|
@ -184,15 +185,23 @@ export default {
|
|||
},
|
||||
clearLabels() {
|
||||
this.addLabels.forEach((id) => {
|
||||
if (this.isClient) {
|
||||
window.sandSettingApi.Label.removeCustomHtml(id);
|
||||
} else {
|
||||
window.sandSettingApi.Label.removeBalloon(id);
|
||||
}
|
||||
});
|
||||
this.addLabels = [];
|
||||
},
|
||||
addDeviceLabel() {
|
||||
this.devices.forEach((d) => {
|
||||
if (d.position && d.position.length > 0) {
|
||||
if (this.isClient) {
|
||||
this.AddClientLable(d)
|
||||
} else {
|
||||
this.AddLable(d);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
AddClientLable(item) {
|
||||
|
@ -218,13 +227,10 @@ export default {
|
|||
</span>
|
||||
</div>
|
||||
</div>`;
|
||||
console.log(html)
|
||||
window.sandSettingApi.Label.addCustomHtml({
|
||||
axisType: 0,
|
||||
axisType: 1,
|
||||
attachmentPoint: 2,
|
||||
|
||||
displayRange: [0, 1000],
|
||||
|
||||
maxDistance: 1000,
|
||||
html: html,
|
||||
id: item.elId,
|
||||
|
@ -270,7 +276,11 @@ export default {
|
|||
this.selItem = item;
|
||||
let api = window.sandSettingApi;
|
||||
api.Public.clearHandler();
|
||||
ElMessage.info("请在场景中拾取坐标位置");
|
||||
ElMessage.info("请在场景中左键拾取坐标位置,右键取消");
|
||||
api.Public.event("RIGHT_CLICK", (e) => {
|
||||
api.Public.clearHandler();
|
||||
ElMessage.info("已取消拾取");
|
||||
});
|
||||
if (this.isClient) {
|
||||
this.getCLientPosition(item, index);
|
||||
return;
|
||||
|
@ -304,15 +314,17 @@ export default {
|
|||
if (json != undefined) {
|
||||
if (json && json["id"]) {
|
||||
this.positionByModalId = json.id.split("^")[0];
|
||||
this.selItem.position = [e.position.x, e.position.y];
|
||||
api.Public.pickupCoordinate(e.position, pos => {
|
||||
this.selItem.position = pos;
|
||||
api.Label.removeBalloon(item.elId);
|
||||
this.AddClientLable(this.selItem);
|
||||
api.Public.clearHandler();
|
||||
});
|
||||
} else {
|
||||
ElMessage.warning("请在模型上选点!");
|
||||
}
|
||||
}
|
||||
});
|
||||
},false);
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -325,7 +337,9 @@ export default {
|
|||
this.clearLabels();
|
||||
sandSettingApi.Camera.stopImmersiveRoam();
|
||||
sandSettingApi.Model.location(sandSettingApi.m_model.keys().toArray()[0]);
|
||||
if(!this.isClient){
|
||||
sandSettingApi.Plugin.deleteMiniMap();
|
||||
}
|
||||
if (this.viewPoint) {
|
||||
sandSettingApi.Camera.setViewPort(this.viewPoint);
|
||||
}
|
||||
|
@ -357,7 +371,7 @@ export default {
|
|||
.map((item) => {
|
||||
item.show = item.enabled != 0;
|
||||
item.position = this.$tryToJson(item.position, []);
|
||||
item.elId = (item.id ? item.id : cnt++) + "-" + item.deviceType;
|
||||
item.elId = "label_" + (item.id ? item.id : cnt++) + "_" + item.deviceType;
|
||||
return item;
|
||||
});
|
||||
this.clearLabels();
|
||||
|
|
Loading…
Reference in New Issue