| | |
| | | @row-click="handleRowClick" |
| | | @show-rank="handleRankClick" |
| | | @show-data="handleDataClick" |
| | | @change-color="handleColorClick" |
| | | ></SatelliteManage> |
| | | </el-row> |
| | | </el-col> |
| | |
| | | ></CardButton> |
| | | </el-row> |
| | | </el-col> |
| | | <!-- <el-row class="historical" justify="center"> |
| | | </el-row> |
| | | <el-row class="historical" justify="center"> |
| | | <SatelliteAnimation |
| | | :loading="animaLoading" |
| | | :grid-data="gridDataDetailList" |
| | | :mapViews="mapViews" |
| | | ></SatelliteAnimation> |
| | | </el-row> --> |
| | | </el-row> |
| | | </template> |
| | | <script setup> |
| | |
| | | import SatelliteProxy from './SatelliteProxy'; |
| | | import { useFetchData } from '@/composables/fetchData'; |
| | | import { useSatelliteGridStore } from '@/stores/satellite-grid'; |
| | | |
| | | |
| | | const satelliteGridStore = useSatelliteGridStore(); |
| | | const { loading, fetchData } = useFetchData(10000); |
| | |
| | | // SatelliteProxy.clearText(mapViews); |
| | | // 文本标记 |
| | | const { textViews: dataTxt, labelsLayer: dataLayer } = |
| | | SatelliteProxy.drawDataText(mapViews.points, gridData, mapViews.dataTxt, mapViews.dataLayer); |
| | | SatelliteProxy.drawDataText( |
| | | mapViews.points, |
| | | gridData, |
| | | mapViews.dataTxt, |
| | | mapViews.dataLayer |
| | | ); |
| | | mapViews.dataTxt = dataTxt; |
| | | mapViews.dataLayer = dataLayer; |
| | | const { textViews: rankTxt, labelsLayer: rankLayer } = |
| | | SatelliteProxy.drawRankText(mapViews.points, gridData, mapViews.rankTxt, mapViews.rankLayer); |
| | | SatelliteProxy.drawRankText( |
| | | mapViews.points, |
| | | gridData, |
| | | mapViews.rankTxt, |
| | | mapViews.rankLayer |
| | | ); |
| | | mapViews.rankTxt = rankTxt; |
| | | mapViews.rankLayer = rankLayer; |
| | | SatelliteProxy.drawColor(mapViews.gridViews, gridData); |
| | | } |
| | | |
| | | let selectedGridData |
| | | function handleRowClick(row) { |
| | | if (gridDataDetailMap.has(row.id)) { |
| | | const gridData = gridDataDetailMap.get(row.id); |
| | | selectedGridData = gridData |
| | | drawTextAndColor(gridData); |
| | | } else { |
| | | gridApi.fetchGridDataDetail(row.id, row.groupId).then((res) => { |
| | | gridDataDetailMap.set(row.id, res.data); |
| | | const gridData = res.data; |
| | | selectedGridData = gridData |
| | | drawTextAndColor(gridData); |
| | | }); |
| | | } |
| | |
| | | function handleDataClick(dataVisible) { |
| | | dataVisible ? map.add(mapViews.dataLayer) : map.remove(mapViews.dataLayer); |
| | | } |
| | | |
| | | function handleColorClick(isStandardColor) { |
| | | SatelliteProxy.drawColor(mapViews.gridViews, selectedGridData, !isStandardColor); |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .satellite-manage { |