| | |
| | | import { useFetchData } from '@/composables/fetchData'; |
| | | import { useSatelliteGridStore } from '@/stores/satellite-grid'; |
| | | import { useSceneStore } from '@/stores/scene'; |
| | | import { useGridStore } from '@/stores/grid-info'; |
| | | |
| | | const satelliteProxy = new SatelliteProxy(); |
| | | |
| | | const satelliteGridStore = useSatelliteGridStore(); |
| | | const { loading, fetchData } = useFetchData(10000); |
| | | const gridStore = useGridStore(); |
| | | gridStore.selectedSatelliteProxy = satelliteProxy; |
| | | const sceneStore = useSceneStore(); |
| | | const satelliteGridStore = useSatelliteGridStore(); |
| | | |
| | | const { loading, fetchData } = useFetchData(10000); |
| | | const animaLoading = ref(true); |
| | | const show = ref(true); |
| | | |
| | |
| | | }); |
| | | }); |
| | | //鼠标点击事件 |
| | | polygon.on('click', () => { |
| | | const [lng, lat] = polygon.getExtData(); |
| | | sceneStore.radius = 0.5; |
| | | sceneStore.searchScene(lng, lat); |
| | | // polygon.on('click', () => { |
| | | // const [lng, lat] = polygon.getExtData(); |
| | | // sceneStore.radius = 0.5; |
| | | // sceneStore.searchScene(lng, lat); |
| | | // }); |
| | | }); |
| | | satelliteProxy.setGridEvent('click', (e) => { |
| | | const polygon = e.target |
| | | const { gridCell } = polygon.getExtData(); |
| | | const cellIndex = gridCell.cellIndex; |
| | | const gridDataDetail = |
| | | satelliteGridStore.selectedGridDataDetail[cellIndex - 1]; |
| | | gridStore.selectedGridCellAndDataDetail = { |
| | | gridCell, |
| | | gridDataDetail |
| | | }; |
| | | }); |
| | | } |
| | | |
| | | function drawGrid(gridData) { |
| | | satelliteProxy.drawGrid({ gridData }); |
| | | function drawGrid(gridDataDetail) { |
| | | satelliteProxy.drawGrid({ gridDataDetail: gridDataDetail }); |
| | | } |
| | | |
| | | function handleRowClick(row) { |
| | |
| | | |
| | | function handleColorClick(isStandardColor) { |
| | | satelliteProxy.drawGrid({ |
| | | gridData: satelliteGridStore.selectedGridData, |
| | | gridDataDetail: satelliteGridStore.selectedGridDataDetail, |
| | | useCustomColor: !isStandardColor |
| | | }); |
| | | } |