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

首页气象预测弹出框根据类型显示标题

xusl 4 месяцев назад
Родитель
Сommit
8f6e47b209
1 измененных файлов с 11 добавлено и 1 удалено
  1. 11 1
      cpp-ui/src/views/largeScreen/components/right-middle.vue

+ 11 - 1
cpp-ui/src/views/largeScreen/components/right-middle.vue

@@ -15,7 +15,7 @@
     <!-- 全屏弹框 -->
     <div class="echartsFullDialog">
       <el-dialog
-        title="气象预测"
+        :title="dialogTitle"
         :visible.sync="dialogVisible"
         :fullscreen="true"
         :destroy-on-close="true"
@@ -34,6 +34,7 @@ import * as echarts from "echarts";
 export default {
   data() {
     return {
+      dialogTitle: '气象预测',
       dialogVisible: false,
       screenHeight: window.innerHeight,
       weatherChart: null,
@@ -291,6 +292,15 @@ export default {
       this.setOptions()
     },
     openFull(){
+      if(sessionStorage.getItem('screen-weather-type')){
+        if (sessionStorage.getItem('screen-weather-type').includes('wind')){
+          this.dialogTitle = '轮毂风速'
+        }
+        else{
+          this.dialogTitle = '总辐射'
+        }
+      }
+
       const _this = this
       _this.dialogVisible = true// 打开弹窗
       _this.$nextTick(() => {