From a2bc51063549fd351114d1b845c8806fc2bf3875 Mon Sep 17 00:00:00 2001 From: "lj7788@126.com" Date: Mon, 18 Aug 2025 14:31:54 +0800 Subject: [PATCH] =?UTF-8?q?BIM=E8=AE=BE=E7=BD=AE=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=AB=AF=E6=B8=B2=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/mac-modules-flower | 1 + .../src/views/bim/sandTableSetting/index.vue | 42 ++++++++++++------- 2 files changed, 29 insertions(+), 14 deletions(-) create mode 100755 bin/mac-modules-flower diff --git a/bin/mac-modules-flower b/bin/mac-modules-flower new file mode 100755 index 00000000..b1513975 --- /dev/null +++ b/bin/mac-modules-flower @@ -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 diff --git a/yanzhu-ui-vue3/src/views/bim/sandTableSetting/index.vue b/yanzhu-ui-vue3/src/views/bim/sandTableSetting/index.vue index db00a381..ac024de1 100644 --- a/yanzhu-ui-vue3/src/views/bim/sandTableSetting/index.vue +++ b/yanzhu-ui-vue3/src/views/bim/sandTableSetting/index.vue @@ -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,14 +185,22 @@ export default { }, clearLabels() { 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 = []; }, addDeviceLabel() { this.devices.forEach((d) => { 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 { `; - 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.Label.removeBalloon(item.elId); - this.AddClientLable(this.selItem); - api.Public.clearHandler(); + 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]); - sandSettingApi.Plugin.deleteMiniMap(); + 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();