Compare commits

..

3 Commits

Author SHA1 Message Date
0da7f2576d 修复若干bug 2026-04-23 14:44:07 +08:00
8a6a9f0c0c 修复若干bug 2026-04-23 11:40:13 +08:00
822061780e 新增天通卫星系统 2026-04-08 17:43:09 +08:00
12 changed files with 42 additions and 16 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -171,6 +171,7 @@ const modelCache = {
MEO: MEOModel
},
other: {
GEO: GEOModel,
"II-F": GPSIIFModel,
"II-R": GPSIIRModel,
"III-A": GPSIIIAModel,

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);
@@ -117,6 +118,7 @@ const adder = (num) => {
const makeTopic = () => {
const satelliteSystem = {
beidou: "中国北斗卫星导航",
tiantong: "天通卫星系统",
"gps-ops": "美国全球定位",
"glo-ops": "俄罗斯格洛纳斯卫星导航",
galileo: "欧盟研制伽利略卫星导航",
@@ -300,6 +302,13 @@ const close = () => {
};
defineExpose({ show });
watch(satellites, () => {
if (allowMakeTopic.value) {
nextTopic();
}
allowMakeTopic.value = true;
});
</script>
<style scoped>

View File

@@ -50,6 +50,7 @@ onMounted(
const option_dic = {
beidou: "中国北斗卫星导航系统",
tiantong: "天通卫星系统",
"gps-ops": "美国全球定位系统",
"glo-ops": "俄罗斯格洛纳斯卫星导航系统",
galileo: "欧盟研制伽利略卫星导航系统",

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;
@@ -2513,6 +2515,10 @@ const onDataSourceReady = ({ viewer, cesiumObject }) => {
} else if (element.description._value.indexOf("IGSO") !== -1) {
element.model.uri._value = IGSOModel.model._resource;
}
} else if (element.properties.satelliteType._value == "Tiantong") {
if (element.description._value.indexOf("GEO") !== -1) {
element.model.uri._value = GEOModel.model._resource;
}
} else if (element.properties.satelliteType._value == "GPS") {
// 指定基于漫反射和镜面反射图像的照明的贡献,调整模型亮度
element.model.imageBasedLightingFactor = new Cesium.Cartesian2(20, 1);
@@ -2608,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
@@ -78,7 +78,6 @@ import { CloseBold, Plus, RefreshRight, Minus } from "@element-plus/icons-vue";
import * as THREE from "three";
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls";
// import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader.js";
import sky from "../../assets/sky.jpg";