From bb9fcf136d23b8624e44ed6458caaa605f72af91 Mon Sep 17 00:00:00 2001 From: Riku <risaku@163.com> Date: 星期三, 01 一月 2025 20:24:20 +0800 Subject: [PATCH] 开始添加数据融合功能 --- src/views/satellitetelemetry/SatelliteTelemetry.vue | 54 ++++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 40 insertions(+), 14 deletions(-) diff --git a/src/views/satellitetelemetry/SatelliteTelemetry.vue b/src/views/satellitetelemetry/SatelliteTelemetry.vue index 6b37603..d5a43cd 100644 --- a/src/views/satellitetelemetry/SatelliteTelemetry.vue +++ b/src/views/satellitetelemetry/SatelliteTelemetry.vue @@ -1,6 +1,7 @@ <template> - <div> - <!-- <el-button + <el-row class="wrap"> + <el-col span="2"> + <!-- <el-button class="p-events-auto" type="info" icon="Memo" @@ -9,21 +10,36 @@ > 缁樺埗缃戞牸 </el-button> --> - <SatelliteManage - class="satellite-manage" - :gridDataList="satelliteGridStore.gridDataList" - :loading="loading" - @search="onSearch" - @row-click="handleRowClick" - ></SatelliteManage> - <el-row class="historical" justify="center"> + <el-row> + <SatelliteManage + v-show="show" + class="satellite-manage" + :gridDataList="satelliteGridStore.gridDataList" + :loading="loading" + @search="onSearch" + @row-click="handleRowClick" + @show-rank="handleRankClick" + @show-data="handleDataClick" + ></SatelliteManage> + </el-row> + </el-col> + <el-col span="2"> + <el-row> + <CardButton + name="鍗槦閬ユ祴鏁版嵁" + direction="right" + @click="() => (show = !show)" + ></CardButton> + </el-row> + </el-col> + <!-- <el-row class="historical" justify="center"> <SatelliteAnimation :loading="animaLoading" :grid-data="gridDataDetailList" :mapViews="mapViews" ></SatelliteAnimation> - </el-row> - </div> + </el-row> --> + </el-row> </template> <script setup> import { map } from '@/utils/map/index_old'; @@ -38,9 +54,11 @@ import { useFetchData } from '@/composables/fetchData'; import { useSatelliteGridStore } from '@/stores/satellite-grid'; + const satelliteGridStore = useSatelliteGridStore(); const { loading, fetchData } = useFetchData(10000); const animaLoading = ref(true); +const show = ref(true); let count = 0, max = 0; @@ -95,11 +113,11 @@ // SatelliteProxy.clearText(mapViews); // 鏂囨湰鏍囪 const { textViews: dataTxt, labelsLayer: dataLayer } = - SatelliteProxy.drawDataText(mapViews.points, gridData, mapViews.dataTxt); + 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); + SatelliteProxy.drawRankText(mapViews.points, gridData, mapViews.rankTxt, mapViews.rankLayer); mapViews.rankTxt = rankTxt; mapViews.rankLayer = rankLayer; SatelliteProxy.drawColor(mapViews.gridViews, gridData); @@ -117,6 +135,14 @@ }); } } + +function handleRankClick(rankVisible) { + rankVisible ? map.add(mapViews.rankLayer) : map.remove(mapViews.rankLayer); +} + +function handleDataClick(dataVisible) { + dataVisible ? map.add(mapViews.dataLayer) : map.remove(mapViews.dataLayer); +} </script> <style scoped> .satellite-manage { -- Gitblit v1.9.3