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");
|
document.body.classList.remove("is-sapi");
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
||||||
this.userStore = useUserStore();
|
this.userStore = useUserStore();
|
||||||
this.currentPrjId = this.userStore.currentPrjId;
|
this.currentPrjId = this.userStore.currentPrjId;
|
||||||
this.currentComId = this.userStore.currentComId;
|
this.currentComId = this.userStore.currentComId;
|
||||||
|
@ -184,14 +185,22 @@ export default {
|
||||||
},
|
},
|
||||||
clearLabels() {
|
clearLabels() {
|
||||||
this.addLabels.forEach((id) => {
|
this.addLabels.forEach((id) => {
|
||||||
window.sandSettingApi.Label.removeBalloon(id);
|
if (this.isClient) {
|
||||||
|
window.sandSettingApi.Label.removeCustomHtml(id);
|
||||||
|
} else {
|
||||||
|
window.sandSettingApi.Label.removeBalloon(id);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.addLabels = [];
|
this.addLabels = [];
|
||||||
},
|
},
|
||||||
addDeviceLabel() {
|
addDeviceLabel() {
|
||||||
this.devices.forEach((d) => {
|
this.devices.forEach((d) => {
|
||||||
if (d.position && d.position.length > 0) {
|
if (d.position && d.position.length > 0) {
|
||||||
this.AddLable(d);
|
if (this.isClient) {
|
||||||
|
this.AddClientLable(d)
|
||||||
|
} else {
|
||||||
|
this.AddLable(d);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -218,13 +227,10 @@ export default {
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>`;
|
</div>`;
|
||||||
console.log(html)
|
|
||||||
window.sandSettingApi.Label.addCustomHtml({
|
window.sandSettingApi.Label.addCustomHtml({
|
||||||
axisType: 0,
|
axisType: 1,
|
||||||
attachmentPoint: 2,
|
attachmentPoint: 2,
|
||||||
|
|
||||||
displayRange: [0, 1000],
|
displayRange: [0, 1000],
|
||||||
|
|
||||||
maxDistance: 1000,
|
maxDistance: 1000,
|
||||||
html: html,
|
html: html,
|
||||||
id: item.elId,
|
id: item.elId,
|
||||||
|
@ -270,7 +276,11 @@ export default {
|
||||||
this.selItem = item;
|
this.selItem = item;
|
||||||
let api = window.sandSettingApi;
|
let api = window.sandSettingApi;
|
||||||
api.Public.clearHandler();
|
api.Public.clearHandler();
|
||||||
ElMessage.info("请在场景中拾取坐标位置");
|
ElMessage.info("请在场景中左键拾取坐标位置,右键取消");
|
||||||
|
api.Public.event("RIGHT_CLICK", (e) => {
|
||||||
|
api.Public.clearHandler();
|
||||||
|
ElMessage.info("已取消拾取");
|
||||||
|
});
|
||||||
if (this.isClient) {
|
if (this.isClient) {
|
||||||
this.getCLientPosition(item, index);
|
this.getCLientPosition(item, index);
|
||||||
return;
|
return;
|
||||||
|
@ -304,15 +314,17 @@ export default {
|
||||||
if (json != undefined) {
|
if (json != undefined) {
|
||||||
if (json && json["id"]) {
|
if (json && json["id"]) {
|
||||||
this.positionByModalId = json.id.split("^")[0];
|
this.positionByModalId = json.id.split("^")[0];
|
||||||
this.selItem.position = [e.position.x, e.position.y];
|
api.Public.pickupCoordinate(e.position, pos => {
|
||||||
api.Label.removeBalloon(item.elId);
|
this.selItem.position = pos;
|
||||||
this.AddClientLable(this.selItem);
|
api.Label.removeBalloon(item.elId);
|
||||||
api.Public.clearHandler();
|
this.AddClientLable(this.selItem);
|
||||||
|
api.Public.clearHandler();
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
ElMessage.warning("请在模型上选点!");
|
ElMessage.warning("请在模型上选点!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
},false);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -325,7 +337,9 @@ export default {
|
||||||
this.clearLabels();
|
this.clearLabels();
|
||||||
sandSettingApi.Camera.stopImmersiveRoam();
|
sandSettingApi.Camera.stopImmersiveRoam();
|
||||||
sandSettingApi.Model.location(sandSettingApi.m_model.keys().toArray()[0]);
|
sandSettingApi.Model.location(sandSettingApi.m_model.keys().toArray()[0]);
|
||||||
sandSettingApi.Plugin.deleteMiniMap();
|
if(!this.isClient){
|
||||||
|
sandSettingApi.Plugin.deleteMiniMap();
|
||||||
|
}
|
||||||
if (this.viewPoint) {
|
if (this.viewPoint) {
|
||||||
sandSettingApi.Camera.setViewPort(this.viewPoint);
|
sandSettingApi.Camera.setViewPort(this.viewPoint);
|
||||||
}
|
}
|
||||||
|
@ -357,7 +371,7 @@ export default {
|
||||||
.map((item) => {
|
.map((item) => {
|
||||||
item.show = item.enabled != 0;
|
item.show = item.enabled != 0;
|
||||||
item.position = this.$tryToJson(item.position, []);
|
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;
|
return item;
|
||||||
});
|
});
|
||||||
this.clearLabels();
|
this.clearLabels();
|
||||||
|
|
Loading…
Reference in New Issue