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: "确定",