Просмотр исходного кода

reactor:水位,流量切换问题修复

liu_w601 3 месяцев назад
Родитель
Сommit
bd65f44168
1 измененных файлов с 3 добавлено и 10 удалено
  1. 3 10
      src/views/hydrologic-info/right.vue

+ 3 - 10
src/views/hydrologic-info/right.vue

@@ -84,8 +84,7 @@
               </div>
               <div class="right">更多</div>
             </div>
-            <LineChart ref="vLineChart" style="height: 1.8rem" :option="swOption" v-if="chartShow && swActive" />
-            <LineChart ref="vLineChart2" style="height: 1.8rem" :option="lOption" v-if="chartShow && !swActive" />
+            <LineChart ref="vLineChart" style="height: 1.8rem" :option="swOption" v-if="chartShow" />
           </div>
         </template>
       </BaseMain>
@@ -126,7 +125,6 @@ export default {
           val: '0'
         }
       ],
-      lOption: {},
       chartShow: false,
       selectedVal: '0',
       selectedVal1: '0',
@@ -472,7 +470,7 @@ export default {
               }
             ]
           }
-          this.lOption = option
+          this.swOption = option
         }
       })
     },
@@ -484,15 +482,10 @@ export default {
     },
     toChangeSwTab(a) {
       this.swActive = a
+      this.chartShow = false
       if (this.swActive) {
-         this.$nextTick(() => {
-          this.$refs.vLineChart.initChart()
-        })
         this.getMonitoringStatistics(this.selectedVal2)
       } else {
-         this.$nextTick(() => {
-          this.$refs.vLineChart2.initChart()
-        })
         this.getMonitoringStatisticsByFlow(this.selectedVal2)
       }
     }