From 1873d9fe7d3f16721449a19e6bafd26a8a23b9fa Mon Sep 17 00:00:00 2001 From: haha Date: Fri, 25 Jul 2025 23:01:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9BIM=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yanzhu-bigscreen/src/views/bimManage.vue | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/yanzhu-bigscreen/src/views/bimManage.vue b/yanzhu-bigscreen/src/views/bimManage.vue index ac3d5338..3cea6c42 100644 --- a/yanzhu-bigscreen/src/views/bimManage.vue +++ b/yanzhu-bigscreen/src/views/bimManage.vue @@ -912,7 +912,7 @@ export default { if (api.m_model.size > 0) { setTimeout(() => { this.initModelPosition() - }, 10000) + }, 1000) } else { setTimeout(fnInit, 1000); } @@ -960,13 +960,14 @@ export default { let api = bimMgrApi; this.models.forEach(modelInfo => { if (modelInfo) { - let modelId=modelInfo.lightweightName + let modelId = modelInfo.lightweightName let cfg = this.$tryToJson(modelInfo.bimConfig, {}); let x = cfg?.x || 0; let y = cfg?.y || 0; let z = cfg?.z || 0; let rotateZ = cfg?.rotateZ || 0; if (x * 1 + y * 1 + z * 1 != 0) { + console.log("移动模型", modelId, x, y, z) api.Model.moveToPosition([x, y, z], 0, modelId) } if (rotateZ * 1 != 0) { @@ -977,7 +978,15 @@ export default { this.hideParts.push(it); }) } - api.Model.location(modelId); + setTimeout(() => { + api.Model.location(modelId); + this.resetScene(); + if (x * 1 + y * 1 + z * 1 != 0) { + setTimeout(() => { + api.Camera.lookAt({ position: [x, y, z], distance: 20000, heading: 90, pitch: -45 }) + }, 1000); + } + }, 1000); } this.initHideParts() }); @@ -987,7 +996,7 @@ export default { let hideCnt = 0; let hideFn = () => { hideCnt++; - if (hideCnt > 30) { + if (hideCnt > 20) { return; } setTimeout(() => {