Riku
2025-01-01 bb9fcf136d23b8624e44ed6458caaa605f72af91
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;
@@ -94,11 +112,14 @@
function drawTextAndColor(gridData) {
  // SatelliteProxy.clearText(mapViews);
  // 文本标记
  mapViews.textViews = SatelliteProxy.drawDataText(
    mapViews.points,
    gridData,
    mapViews.textViews
  );
  const { textViews: dataTxt, labelsLayer: 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);
  mapViews.rankTxt = rankTxt;
  mapViews.rankLayer = rankLayer;
  SatelliteProxy.drawColor(mapViews.gridViews, gridData);
}
@@ -114,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 {