riku
2025-03-14 8372d022614a1897120802cf1bac90d61651177f
src/views/satellitetelemetry/SatelliteTelemetry.vue
@@ -1,53 +1,40 @@
<template>
  <SatelliteMixTool :group-id="3"></SatelliteMixTool>
  <el-row class="wrap">
    <el-col span="2">
      <!-- <div class="p-events-auto">
        <el-button
          type="primary"
          class="el-button-custom"
          size="small"
          @click="previousGrid"
        >
          上一个
        </el-button>
        <el-button
          type="primary"
          class="el-button-custom"
          size="small"
          @click="nextGrid"
        >
          下一个
        </el-button>
      </div> -->
      <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"
          @change-color="handleColorClick"
          @change-opacity="handleOpacityClick"
        ></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 justify="space-between">
    <el-row class="wrap">
      <el-col span="2">
        <el-row>
          <SatelliteManage
            v-show="show"
            class="satellite-manage"
            :gridDataList="satelliteGridStore.gridDataList"
            :loading="loading"
            @search="onSearch"
            @row-click="handleRowClick"
          ></SatelliteManage>
        </el-row>
      </el-col>
      <el-col span="2">
        <el-row>
          <CardButton
            name="卫星遥测数据"
            direction="right"
            @click="() => (show = !show)"
          ></CardButton>
        </el-row>
        <el-row class="flex-col">
          <GridStyleTool
            @show-rank="handleRankClick"
            @show-data="handleDataClick"
            @change-color="handleColorClick"
            @change-opacity="handleOpacityClick"
          ></GridStyleTool>
        </el-row>
      </el-col>
    </el-row>
    <GridTool></GridTool>
  </el-row>
  <SatelliteDataMix class="data-mix" @mix-data="handleMixDataClick">
  </SatelliteDataMix>
  <!-- <SatelliteDataMix class="data-mix" @mix-data="handleMixDataClick">
  </SatelliteDataMix> -->
  <!-- <el-row class="historical" justify="center">
    <SatelliteAnimation
@@ -58,16 +45,11 @@
  </el-row> -->
</template>
<script setup>
import { map, onMapMounted } from '@/utils/map/index_old';
import calculate from '@/utils/map/calculate';
import marks from '@/utils/map/marks';
import grid from '@/utils/map/grid';
import { ref, onMounted } from 'vue';
import gridApi from '@/api/gridApi';
import SatelliteManage from './component/SatelliteManage.vue';
import SatelliteDataMix from './component/SatelliteDataMix.vue';
import SatelliteMixTool from './component/SatelliteMixTool.vue';
import moment from 'moment';
import GridStyleTool from './component/GridStyleTool.vue';
import { SatelliteProxy } from './SatelliteProxy';
import { useFetchData } from '@/composables/fetchData';
import { useSatelliteGridStore } from '@/stores/satellite-grid';
@@ -78,6 +60,8 @@
const gridStore = useGridStore();
gridStore.selectedSatelliteProxy = satelliteProxy;
gridStore.pushGridClz(satelliteProxy);
const sceneStore = useSceneStore();
const satelliteGridStore = useSatelliteGridStore();
@@ -155,7 +139,7 @@
    // });
  });
  satelliteProxy.setGridEvent('click', (e) => {
    const polygon = e.target
    const polygon = e.target;
    const { gridCell } = polygon.getExtData();
    const cellIndex = gridCell.cellIndex;
    const gridDataDetail =
@@ -167,12 +151,27 @@
  });
}
function drawGrid(gridDataDetail) {
  satelliteProxy.drawGrid({ gridDataDetail: gridDataDetail });
function drawGrid(useCustomColor) {
  satelliteProxy.changeVisibility({
    showGridViews: false,
    showDataTxt: false,
    showRankTxt: false
  });
  satelliteProxy.drawTagGrid({
    tag: satelliteGridStore.selectedGridData.id,
    gridDataDetail: satelliteGridStore.selectedGridDataDetail,
    useCustomColor,
    useDataTxtColor: true,
    extData: {
      name: `卫星遥测数据 - ${moment(satelliteGridStore.selectedGridData).format('YYYY-MM-DD')}`
    }
  });
}
function handleRowClick(row) {
  satelliteGridStore.fetchGridDataDetail(row, drawGrid);
  satelliteGridStore.fetchGridDataDetail(row, () => {
    drawGrid();
  });
}
function handleRankClick(rankVisible) {
@@ -184,14 +183,11 @@
}
function handleColorClick(isStandardColor) {
  satelliteProxy.drawGrid({
    gridDataDetail: satelliteGridStore.selectedGridDataDetail,
    useCustomColor: !isStandardColor
  });
  drawGrid(!isStandardColor);
}
function handleOpacityClick(isOpacity) {
  satelliteProxy.changeGridOpacity({ isOpacity });
function handleOpacityClick(value) {
  satelliteProxy.changeGridOpacity({ opacityValue: value });
}
function handleMixDataClick(gridData) {