通信模块配置软件
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<div id="step20">
|
||||
<select class="cesium-button" v-model="selected">
|
||||
<option v-for="(value, key) in option_dic" :key="key" :value="key">
|
||||
{{ value }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, watch, onMounted } from "vue";
|
||||
import { useStore } from "vuex";
|
||||
|
||||
const store = useStore();
|
||||
const selected = ref("");
|
||||
const firstLoad = ref(true);
|
||||
|
||||
const emit = defineEmits(["handleSatelliteSystemSelect", "handleElementsFly"]);
|
||||
|
||||
defineExpose({ selected });
|
||||
|
||||
watch(selected, (value) => {
|
||||
if (value !== "custom") {
|
||||
store.dispatch("satelliteSystem/setName", { name: value });
|
||||
}
|
||||
window.allowUpdate = true;
|
||||
emit("handleSatelliteSystemSelect", value);
|
||||
if (!firstLoad.value) {
|
||||
let viewName = window.document.getElementsByClassName("cesium-toolbar-button")[1]
|
||||
.classList[2];
|
||||
if (viewName == "cesium-sceneModePicker-button2D") {
|
||||
window.document.getElementsByClassName("cesium-toolbar-button")[4].click();
|
||||
setTimeout(() => {
|
||||
window.document.getElementsByClassName("cesium-toolbar-button")[3].click();
|
||||
emit("handleElementsFly");
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
onMounted(
|
||||
() => (
|
||||
(selected.value = Object.keys(option_dic)[0]),
|
||||
setTimeout(() => {
|
||||
firstLoad.value = false;
|
||||
}, 0)
|
||||
)
|
||||
);
|
||||
|
||||
const option_dic = {
|
||||
beidou: "中国北斗卫星导航系统",
|
||||
"gps-ops": "美国全球定位系统",
|
||||
"glo-ops": "俄罗斯格洛纳斯卫星导航系统",
|
||||
galileo: "欧盟研制伽利略卫星导航系统",
|
||||
custom: "自定义卫星导航系统",
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user