修复若干bug

This commit is contained in:
2026-04-23 11:40:13 +08:00
parent 822061780e
commit 8a6a9f0c0c
4 changed files with 30 additions and 11 deletions

View File

@@ -19,7 +19,7 @@
:locationOpts="false"
:otherOpts="false"
/>
<SatelliteSystemView />
<SatelliteSystemView @showModel="showModel" />
</vc-viewer>
</vc-config-provider>
</template>
@@ -2803,6 +2803,10 @@ watch(animationShow, (value) => {
}, 0);
}
});
const showModel = (x, y, z) => {
emit("showModel", x, y, z);
};
</script>
<style>

View File

@@ -69,12 +69,13 @@
</template>
<script setup>
import { ref, reactive, watch, onMounted } from "vue";
import { ref, reactive, watch } from "vue";
import { useStore } from "vuex";
import { CloseBold } from "@element-plus/icons-vue";
const store = useStore();
const satellites = store.state;
const allowMakeTopic = ref(false);
const show = ref(false);
const showFrist = ref(true);
@@ -301,6 +302,13 @@ const close = () => {
};
defineExpose({ show });
watch(satellites, () => {
if (allowMakeTopic.value) {
nextTopic();
}
allowMakeTopic.value = true;
});
</script>
<style scoped>

View File

@@ -13,6 +13,8 @@ let vcViewerInstance: any = null;
const store = useStore();
const czml = computed(() => "./CZML/" + store.getters["satelliteSystem/name"] + ".czml");
const emit = defineEmits(["showModel"]);
const onDataSourceReady = ({ viewer, cesiumObject }) => {
if (!vcViewerInstance) vcViewerInstance = viewer;
@@ -2473,19 +2475,19 @@ const onDataSourceReady = ({ viewer, cesiumObject }) => {
mypolylines = element;
}
// 打包后进行系统切换以及先进行视图切换后进行系统切换时对象名称可能会发生改变,具体名称需要在重装或更新打包依赖库后重新获取
// 2025/12/30 打包后直接进行系统切换时对象名称发生改变 CustomPolyline --> jn
// 2025/12/30 打包后先进行视图切换(3D -> 2D)后进行系统切换时对象名称发生改变 CustomPolyline --> jn
// 2025/12/30 打包后先进行视图切换(3D -> 哥伦布图)后进行系统切换时对象名称发生改变 CustomPolyline --> le
// 2026/04/23 打包后直接进行系统切换时对象名称发生改变 CustomPolyline --> $n
// 2026/04/23 打包后先进行视图切换(3D -> 2D)后进行系统切换时对象名称发生改变 CustomPolyline --> je
// 2026/04/23 打包后先进行视图切换(3D -> 哥伦布图)后进行系统切换时对象名称发生改变 CustomPolyline --> je
// console.log(element.constructor.name);
if (element.constructor.name == "jn" || element.constructor.name == "le") {
if (element.constructor.name == "$n" || element.constructor.name == "je") {
viewer.scene.primitives._primitives.splice(index, 2);
mypolylines = element;
}
// 打包后进行系统切换以及先进行视图切换后进行系统切换时对象名称可能会发生改变,具体名称需要在重装或更新打包依赖库后重新获取
// 2025/12/30 打包后直接进行系统切换时对象名称未发生改变 PolylineCollection --> fn
// 2025/12/30 打包后先进行视图切换(3D -> 2D)后进行系统切换时对象名称未发生改变 PolylineCollection --> S
// 2025/12/30 打包后先进行视图切换(3D -> 哥伦布图)后进行系统切换时对象名称未发生改变 PolylineCollection --> S
if (element.constructor.name == "fn" || element.constructor.name == "S") {
// 2026/04/23 打包后直接进行系统切换时对象名称未发生改变 PolylineCollection --> vn
// 2026/04/23 打包后先进行视图切换(3D -> 2D)后进行系统切换时对象名称未发生改变 PolylineCollection --> E
// 2026/04/23 打包后先进行视图切换(3D -> 哥伦布图)后进行系统切换时对象名称未发生改变 PolylineCollection --> E
if (element.constructor.name == "vn" || element.constructor.name == "E") {
// 4K适配版本后将造成列表第一颗卫星模型不显示的bug,故注释掉
// viewer.scene.primitives._primitives.splice(index, 1);
mypolylines = element;
@@ -2612,6 +2614,11 @@ store.subscribeAction(({ type, payload }) => {
vcViewerInstance.selectedEntity = satellite;
vcViewerInstance.trackedEntity = satellite;
setTimeout(() => {
const SatelliteMsgArr = vcViewerInstance.infoBox._frame.contentDocument.getElementsByTagName("p");
emit("showModel", true, SatelliteMsgArr[2].textContent.slice(3), SatelliteMsgArr[SatelliteMsgArr.length - 1].textContent.indexOf("北斗"));
}, 0);
}
});
</script>

View File

@@ -1,7 +1,7 @@
<template>
<div id="step15" class="bg-white" style="width: 30vw; height: 44vh; z-index: 99;">
<div
class="text-3xl absolute bottom-2 right-2 cursor-pointer flex justify-center items-center"
class="text-3xl absolute bottom-2 right-2 cursor-pointer"
style="width: 2rem; height: 6rem"
>
<div