From 68d9c39caffe8078e193dc0c8fbb720e6288508e Mon Sep 17 00:00:00 2001 From: "lj7788@126.com" Date: Wed, 3 Sep 2025 15:51:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A8=A1=E5=9E=8B=E8=A7=86?= =?UTF-8?q?=E7=82=B9=E8=AE=BE=E7=BD=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yanzhu-bigscreen/src/views/bimRoaming.vue | 8 ++++++-- yanzhu-ui-vue3/src/views/bim/bimSetting/Viewpoint.vue | 10 +++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/yanzhu-bigscreen/src/views/bimRoaming.vue b/yanzhu-bigscreen/src/views/bimRoaming.vue index cd8c51e1..9fd4a3e9 100644 --- a/yanzhu-bigscreen/src/views/bimRoaming.vue +++ b/yanzhu-bigscreen/src/views/bimRoaming.vue @@ -558,9 +558,13 @@ export default { let pt = JSON.parse(item.viewPosition) if (item.viewPosition != null) { if (this.isClient) { - bimRoadmApi.Camera.SetCamera(pt.position, pt.heading, pt.pitch) + if (pt["position"] && pt["heading"] && pt["pitch"]) { + bimRoadmApi.Camera.SetCamera(pt.position, pt.heading, pt.pitch) + } } else { - bimRoadmApi.Camera.setViewPort(pt); + if (pt["world"]) { + bimRoadmApi.Camera.setViewPort(pt); + } } } diff --git a/yanzhu-ui-vue3/src/views/bim/bimSetting/Viewpoint.vue b/yanzhu-ui-vue3/src/views/bim/bimSetting/Viewpoint.vue index 463862ff..c627392f 100644 --- a/yanzhu-ui-vue3/src/views/bim/bimSetting/Viewpoint.vue +++ b/yanzhu-ui-vue3/src/views/bim/bimSetting/Viewpoint.vue @@ -211,9 +211,13 @@ export default { if (item.viewPosition != null) { let pt=JSON.parse(item.viewPosition) if(this.isClient){ - api.Camera.SetCamera(pt.position, pt.heading, pt.pitch) + if (pt["position"] && pt["heading"] && pt["pitch"]) { + api.Camera.SetCamera(pt.position, pt.heading, pt.pitch) + } }else{ - api.Camera.setViewPort(pt); + if (pt["world"]) { + api.Camera.setViewPort(pt); + } } } }, @@ -272,7 +276,7 @@ export default { } }); }, - DelViewpoint(item, index) { + DelViewpoint(item, index) {debugger let that = this; ElMessageBox.confirm(`确定要删除漫游 “${item.name}” 吗?`, "提示", { confirmButtonText: "确定",