优化代码

master
叶志超 2021-12-23 15:59:46 +08:00
parent 9806553242
commit 6ed9ebc1f6
3 changed files with 5 additions and 9 deletions

View File

@ -1 +0,0 @@
1. 深入研究TLE转CZML的规范要求解决持续运行中卫星轨道消失的问题

View File

@ -1,9 +1,7 @@
<template>
<vc-viewer class="vc-viewer" :animation="true" :showCredit="false" :shouldAnimate="true" :sceneModePicker="true" @ready="onViewerReady">
<vc-layer-imagery>
<vc-provider-imagery-singletile
:url="earth"
></vc-provider-imagery-singletile>
<vc-provider-imagery-singletile :url="earth" />
</vc-layer-imagery>
<vc-navigation :offset="[10, 40]" :position="'top-left'" :printOpts="false" :locationOpts="false" :otherOpts="false" />
@ -15,8 +13,8 @@
<script lang="ts" setup>
import { computed } from 'vue'
import { useStore } from 'vuex'
import earth from '../assets/earth.jpg'
import entity from '../api/entity'
import earth from '../assets/earth.jpg'
//
const store = useStore()
@ -30,7 +28,7 @@ const onDataSourceReady = ({ viewer, cesiumObject }) => {
}
// /
let vcViewerInstance = null
let vcViewerInstance: any = null
store.subscribeAction(({ type, payload }) => {
// /
if (type === 'satelliteSystem/toggleShow') {
@ -73,6 +71,7 @@ const onViewerReady = ({ viewer }) => {
</script>
<style>
/* 隐藏动画仪表盘中的日期和时间 */
.vc-viewer .cesium-viewer .cesium-viewer-animationContainer svg > g > g text:not(:last-of-type) {
display: none;
}

View File

@ -17,9 +17,7 @@ import { ref, watch, onMounted } from 'vue'
const store = useStore()
const selected = ref('')
watch(selected, (value) => store.dispatch('satelliteSystem/setName', {
name: value
}))
watch(selected, (value) => store.dispatch('satelliteSystem/setName', { name: value }))
onMounted(() => selected.value = Object.keys(option_dic)[0])
const option_dic = {