From e94ea7f723e616a0566ac5c7f9d77435333d9e92 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期六, 11 五月 2024 17:38:20 +0800
Subject: [PATCH] 实时走航

---
 src/components/chart/ProgressLineChart.vue |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/src/components/monitor/LineChart.vue b/src/components/chart/ProgressLineChart.vue
similarity index 93%
rename from src/components/monitor/LineChart.vue
rename to src/components/chart/ProgressLineChart.vue
index 2a0b846..4aedf0a 100644
--- a/src/components/monitor/LineChart.vue
+++ b/src/components/chart/ProgressLineChart.vue
@@ -19,6 +19,7 @@
 import { factorName } from '@/constant/factor-name';
 import { factorLineOption } from '@/utils/chart/chart-option';
 
+// 甯﹀彲鎷栧姩杩涘害鏉$殑鎶樼嚎鍥�
 export default {
   props: {
     loading: Boolean,
@@ -119,20 +120,17 @@
     // 淇敼鍥捐〃灞曠ず鐨勬姌绾垮浘绫诲瀷
     changeChartSeries() {
       this.option.series = this.getShowSeries();
-      this.option.legend.data = this.getLegends(this.option.series);
       this.lineChart.setOption(this.option, { notMerge: true });
     },
     changeChartRange() {
       const { sIndex, eIndex, startPer, endPer } = this.getRange();
       const showSeries = this.getShowSeries(sIndex, eIndex);
       const xAxis = this.getShowXAxis(sIndex, eIndex);
-      const legends = this.getLegends(showSeries);
       if (!this.option) {
-        this.option = factorLineOption(xAxis, showSeries, legends);
+        this.option = factorLineOption(xAxis, showSeries);
       } else {
         this.option.xAxis.data = xAxis;
         this.option.series = showSeries;
-        this.option.legend.data = legends;
       }
       // this.option.dataZoom[0].start = startPer;
       // this.option.dataZoom[0].end = endPer;
@@ -160,11 +158,6 @@
       const startPer = (sIndex / this.allXAxis.length) * 100;
       const endPer = (eIndex / this.allXAxis.length) * 100;
       return { sIndex, eIndex, startPer, endPer };
-    },
-    getLegends(series) {
-      return series.map((s) => {
-        return s.name;
-      });
     }
   },
   beforeUnmount() {

--
Gitblit v1.9.3