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 @@