From e92fd99252873021d8e412f304f794d7311c1073 Mon Sep 17 00:00:00 2001 From: fangjiakai <450850793@qq.com> Date: Wed, 28 Feb 2024 08:41:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=86=E5=8F=B2=E8=BD=A8=E8=BF=B9=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=AE=A1=E7=AE=97=E7=A7=BB=E5=8A=A8=E9=80=9F=E5=BA=A6?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/lib/Cesium/CustomCesium.js | 8 +++-- .../historical_trajectory_options.vue | 6 ++-- src/views/BI/components/rightico.vue | 3 +- src/views/BI/js/history_trajectory.js | 6 ++-- src/views/BI/js/map.js | 11 ++++--- src/views/BI/js/trajectory.js | 31 ++++++++++++++----- .../information/edit.vue | 14 ++++----- 7 files changed, 52 insertions(+), 27 deletions(-) diff --git a/public/lib/Cesium/CustomCesium.js b/public/lib/Cesium/CustomCesium.js index 87bfe83..d45d1fb 100644 --- a/public/lib/Cesium/CustomCesium.js +++ b/public/lib/Cesium/CustomCesium.js @@ -697,7 +697,9 @@ var CustomCesium; l = new S.Tween({x: a._value.x, y: a._value.y, z: a._value.z}); l.to({x: o.x, y: o.y, z: o.z}, n), l.onUpdate((({x: e, y: t, z: i}) => { let n = new Cesium.Cartesian3(e, t, i); - this.entity.position = n; + if(this.entity){ + this.entity.position = n; + } let a = r.Cartesian3ToWGS84(this.icy.viewer, n); s(a) })), l.start() @@ -1387,7 +1389,9 @@ var CustomCesium; a = new S.Tween({x: n._value.x, y: n._value.y, z: n._value.z}); a.to({x: s.x, y: s.y, z: s.z}, r), a.onUpdate((({x: e, y: t, z: i}) => { let r = new Cesium.Cartesian3(e, t, i); - this.entity.position = r + if(this.entity){ + this.entity.position = r; + } })), a.start() } diff --git a/src/views/BI/components/historical_trajectory_options.vue b/src/views/BI/components/historical_trajectory_options.vue index cdde126..2dfbd92 100644 --- a/src/views/BI/components/historical_trajectory_options.vue +++ b/src/views/BI/components/historical_trajectory_options.vue @@ -129,7 +129,8 @@ const { currentData[0], currentData[1] ) - : undefined + : undefined, + 1000 / data.speed ); }, }); @@ -156,10 +157,10 @@ const fnGetData = async () => { ElMessage.warning("请选择时间"); return; } - hadleDestroy(); data.positions = []; pause(); reset(); + hadleDestroy(); await getTrajectoriesData( data.searchForm.personnel, data.searchForm.dates[0], @@ -210,6 +211,7 @@ const fnPause = () => { onBeforeUnmount(() => { console.log("onBeforeUnmount"); + pause(); hadleDestroy(); }); diff --git a/src/views/BI/components/rightico.vue b/src/views/BI/components/rightico.vue index 1b12376..5e15b17 100644 --- a/src/views/BI/components/rightico.vue +++ b/src/views/BI/components/rightico.vue @@ -16,7 +16,7 @@