卫星科普互动展示系统

This commit is contained in:
2026-03-18 16:38:50 +08:00
parent 267462fc3f
commit 6cca66434b
17 changed files with 86 additions and 19117 deletions

View File

@@ -58,7 +58,20 @@ const showModelTour = () => {
}, 0);
};
defineExpose({ animationShow, firstClick, flyfunc, singleBeamShow, dualBeamShow, showModelTour });
const resetSceneMode = () => {
if(window.document.getElementsByClassName("cesium-toolbar-button")[8]) {
if (window.document.getElementsByClassName("cesium-toolbar-button")[8].children[0].classList[2] == 'cesium-sceneModePicker-button2D') {
firstClick.value = false;
secondClick.value = false;
window.document.getElementsByClassName("cesium-toolbar-button")[8].children[1].click();
setTimeout(() => {
window.document.getElementsByClassName("cesium-toolbar-button")[8].children[2].click();
}, 100);
}
}
};
defineExpose({ animationShow, firstClick, flyfunc, singleBeamShow, dualBeamShow, showModelTour, resetSceneMode });
// 初始化视图参数
const onViewerReady = ({ Cesium, viewer }) => {
@@ -2598,7 +2611,7 @@ const onViewerReady = ({ Cesium, viewer }) => {
setTimeout(() => {
secondClick.value = false;
window.document.getElementsByClassName("cesium-toolbar-button")[8].children[2].click();
}, 0);
}, 100);
return;
}
}

View File

@@ -2465,24 +2465,30 @@ const onDataSourceReady = ({ viewer, cesiumObject }) => {
viewer.scene.primitives._primitives.forEach((element, index) => {
if (element.constructor.name == "CustomPolyline") {
viewer.scene.primitives._primitives.splice(index, 2);
mypolylines = element;
}
if (element.constructor.name == "PolylineCollection") {
// 4K适配版本后将造成列表第一颗卫星模型不显示的bug,故注释掉
// viewer.scene.primitives._primitives.splice(index, 1);
mypolylines = element;
}
// 打包后进行系统切换以及先进行视图切换后进行系统切换时对象名称可能会发生改变,具体名称需要在重装或更新打包依赖库后重新获取
// 2025/12/30 打包后直接进行系统切换时对象名称发生改变 CustomPolyline --> jn
// 2025/12/30 打包后先进行视图切换(3D -> 2D)后进行系统切换时对象名称发生改变 jn --> gt
// 2025/12/30 打包后先进行视图切换(3D -> 哥伦布图)后进行系统切换时对象名称发生改变 jn --> gt
// 2025/12/30 打包后先进行视图切换(3D -> 2D)后进行系统切换时对象名称发生改变 CustomPolyline --> jn
// 2025/12/30 打包后先进行视图切换(3D -> 哥伦布图)后进行系统切换时对象名称发生改变 CustomPolyline --> le
// console.log(element.constructor.name);
if (element.constructor.name == "jn" || element.constructor.name == "gt") {
if (element.constructor.name == "jn" || element.constructor.name == "le") {
viewer.scene.primitives._primitives.splice(index, 2);
mypolylines = element;
}
// 2025/12/30 打包后直接进行系统切换时对象名称未发生改变 PolylineCollection --> PolylineCollection
// 2025/12/30 打包后先进行视图切换(3D -> 2D)后进行系统切换时对象名称未发生改变 PolylineCollection --> PolylineCollection
// 2025/12/30 打包后先进行视图切换(3D -> 哥伦布图)后进行系统切换时对象名称未发生改变 PolylineCollection --> PolylineCollection
if (element.constructor.name == "PolylineCollection") {
// 打包后进行系统切换以及先进行视图切换后进行系统切换时对象名称可能会发生改变,具体名称需要在重装或更新打包依赖库后重新获取
// 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") {
// 4K适配版本后将造成列表第一颗卫星模型不显示的bug,故注释掉
// viewer.scene.primitives._primitives.splice(index, 1);
mypolylines = element;
}
});
viewer.scene.primitives.show = false;

View File

@@ -130,7 +130,7 @@ const changeName = (newName) => {
if (newName !== undefined) {
softwareName.value = newName;
}
}
};
defineExpose({ show, onTrackButtonClicked });