Parcourir la source

fix: 修复图表切换的BUG

zhanghonggang il y a 5 mois
Parent
commit
43b5e38893

+ 7 - 5
src/views/flight/flightQueryByLogTime/index.vue

@@ -144,6 +144,7 @@
       width="95%"
       append-to-body
       center
+      @close="initData()"
     >
       <div
         class="chart-container"
@@ -241,10 +242,6 @@ export default {
         ],
         MINUTE: [
           {
-            type: "5",
-            value: "5分钟",
-          },
-          {
             type: "10",
             value: "10分钟",
           },
@@ -480,7 +477,7 @@ export default {
         } else if (val === "HOUR") {
           this.statisticalInterval = "1";
         } else if (val === "MINUTE") {
-          this.statisticalInterval = "5";
+          this.statisticalInterval = "10";
         }
       } else if (type === "DAY") {
         this.statisticalInterval = "1";
@@ -500,6 +497,11 @@ export default {
         // type === "DAY" || (type === "lx" && val === "MINUTE")
       });
     },
+    initData() {
+      this.statisticalInterval = "1";
+      this.logDate = null;
+      this.timeTypeValue = "HOUR";
+    },
     selectFlightNumber(row) {
       this.selectRow = row;
       if (row.flightNumber) {

+ 7 - 1
src/views/flight/global-ticket/index.vue

@@ -401,6 +401,7 @@
       :visible.sync="chartOpen"
       width="95%"
       append-to-body
+      @close="initData()"
     >
       <el-row>
         <el-col
@@ -420,7 +421,7 @@
       <el-row>
         <h1 v-show="this.getTaskChartDataParam.flightNumber">
           {{ this.getTaskChartDataParam.flightNumber }}航班价格曲线图
-          <span>{{ logDate }}</span>
+          <span>{{ logDate ? '统计日期' + logDate :logDate}}</span>
         </h1>
       </el-row>
       <div
@@ -1009,6 +1010,11 @@ export default {
       };
       this.chartOpen = true;
     },
+    initData() {
+      this.statisticalInterval = "1";
+      this.logDate = null;
+      this.timeTypeValue = "HOUR";
+    },
     showChart(flightNumber) {
       this.selectRow.flightNumber = flightNumber;
       this.getTaskChartDataParam.flightNumber = flightNumber;