riku
2025-03-14 8372d022614a1897120802cf1bac90d61651177f
src/views/satellitetelemetry/SatelliteProxy.js
@@ -4,14 +4,8 @@
import { useCloned } from '@vueuse/core';
export class SatelliteProxy {
  constructor(name) {
    this.name = name;
  }
  // 地图网格相关对象
  mapViews;
  mapViewsList = [];
  mapViewsMap = new Map();
@@ -272,70 +266,6 @@
    }
  }
  //
  drawGrids({
    gridDataDetailList,
    useCustomColor,
    opacity,
    zIndex,
    showDataTxt,
    showRankTxt
  }) {
    if (this.mapViewsList.length < gridDataDetailList.length) {
      let index = this.mapViewsList.length;
      while (index < gridDataDetailList.length) {
        const newMapViews = {
          gridViews: gridMapUtil.drawPolylines({
            points: this.mapViews.gridPoints,
            event: this.firstEvent
          }),
          gridPoints: JSON.parse(JSON.stringify(this.mapViews.gridPoints)),
          points: JSON.parse(JSON.stringify(this.mapViews.points))
        };
        this.mapViewsList.push(newMapViews);
      }
    }
    this.mapViewsList.forEach((m, i) => {
      this.drawGrid({
        gridDataDetail: gridDataDetailList[i],
        useCustomColor,
        opacity,
        zIndex,
        showDataTxt,
        showRankTxt,
        mapViews: m
      });
    });
  }
  drawNewGrid({
    gridDataDetail,
    useCustomColor,
    opacity,
    zIndex,
    showDataTxt,
    showRankTxt
  }) {
    const newMapViews = {
      gridViews: gridMapUtil.drawPolylines({
        points: this.mapViews.gridPoints,
        event: this.firstEvent
      }),
      gridPoints: JSON.parse(JSON.stringify(this.mapViews.gridPoints)),
      points: JSON.parse(JSON.stringify(this.mapViews.points))
    };
    this.mapViewsList.push(newMapViews);
    this.drawGrid({
      gridDataDetail,
      useCustomColor,
      opacity,
      zIndex,
      showDataTxt,
      showRankTxt,
      mapViews: newMapViews
    });
  }
  drawTagGrid({
    tag,
    gridDataDetail,
@@ -343,7 +273,8 @@
    opacity,
    zIndex,
    showDataTxt,
    showRankTxt
    showRankTxt,
    extData
  }) {
    if (!this.mapViewsMap.has(tag)) {
      const newMapViews = {
@@ -352,7 +283,8 @@
          event: this.firstEvent
        }),
        gridPoints: JSON.parse(JSON.stringify(this.mapViews.gridPoints)),
        points: JSON.parse(JSON.stringify(this.mapViews.points))
        points: JSON.parse(JSON.stringify(this.mapViews.points)),
        extData: extData
      };
      this.mapViewsMap.set(tag, newMapViews);
    }