Browse Source

feat(hydrologic-info): 更新水文信息展示逻辑

- 移除数值后的"次"单位显示
- 简化图表显示条件,移除无数据时强制显示逻辑
- 更新警戒值文案,去除"값"后缀
- 清理水位图表配置选项
- 优化错误处理逻辑,移除异常时强制显示图表功能
- 调整砂石监测预警类型标签文案
王杰 3 tuần trước cách đây
mục cha
commit
d3687a6890

+ 7 - 111
src/views/hydrologic-info/right.vue

@@ -17,9 +17,7 @@
                   <img src="@/assets/image/hydrologic/icon8.png" alt="" />
                   <img src="@/assets/image/hydrologic/icon8.png" alt="" />
                   <div class="txt-val">
                   <div class="txt-val">
                     <div class="txt">{{ item.txt }}</div>
                     <div class="txt">{{ item.txt }}</div>
-                    <div class="val">
-                      <span>{{ item.val }}</span
-                      >次
+                    <div class="val">{{ item.val }}
                     </div>
                     </div>
                   </div>
                   </div>
                 </div>
                 </div>
@@ -85,7 +83,7 @@
               </div>
               </div>
               <div class="right">更多</div>
               <div class="right">更多</div>
             </div>
             </div>
-            <LineChart ref="vLineChart" style="height: 1.8rem" :option="swOption" v-if="chartShow || swList.length > 0" />
+            <LineChart ref="vLineChart" style="height: 1.8rem" :option="swOption" v-if="chartShow" />
           </div>
           </div>
         </template>
         </template>
       </BaseMain>
       </BaseMain>
@@ -121,19 +119,19 @@ export default {
       jcActive: true,
       jcActive: true,
       ycList: [
       ycList: [
         {
         {
-          txt: '水位超警戒',
+          txt: '水位超警戒',
           val: '0'
           val: '0'
         },
         },
         {
         {
-          txt: '雨량超警戒값',
+          txt: '雨量超警戒',
           val: '0'
           val: '0'
         },
         },
         {
         {
-          txt: '流量超警戒',
+          txt: '流量超警戒',
           val: '0'
           val: '0'
         },
         },
         {
         {
-          txt: '流速超警戒',
+          txt: '流速超警戒',
           val: '0'
           val: '0'
         }
         }
       ],
       ],
@@ -230,95 +228,7 @@ export default {
           }
           }
         ]
         ]
       },
       },
-      swOption: {
-        backgroundColor: 'transparent',
-        color: ['#66DC95'],
-        grid: {
-          left: 16,
-          right: 16,
-          top: 20,
-          bottom: 8,
-          containLabel: true
-        },
-        tooltip: {
-          trigger: 'axis',
-          backgroundColor: 'transparent',
-          borderColor: 'transparent',
-          borderWidth: 0,
-          extraCssText: 'box-shadow: none;',
-          formatter: function (params) {
-            let value = params[params.length - 1].value
-            let date = params[params.length - 1].name
-            return `<div style="background-color: #2F5481; color: white; padding: 5px; border-radius: 5px;">
-                        ${date}  高程${value}m
-                   </div>`
-          }
-        },
-        xAxis: [
-          {
-            type: 'category',
-            boundaryGap: false,
-            data: getLast7Days(),
-            axisLine: {
-              lineStyle: {
-                color: '#374672',
-                width: 1
-              }
-            },
-            axisTick: {
-              show: false
-            },
-            lineStyle: {
-              color: '#374672',
-              width: 1
-            }
-          }
-        ],
-        yAxis: [
-          {
-            type: 'value',
-            splitLine: { show: false },
-            min: 380,
-            interval: 10,
-            max: 420,
-            axisLine: {
-              lineStyle: {
-                color: '#374672',
-                width: 1
-              }
-            }
-          }
-        ],
-        series: [
-          {
-            type: 'line',
-            smooth: true,
-            lineStyle: { width: 1, color: '#66DC95' },
-            symbol: 'circle',
-            symbolSize: 7,
-            itemStyle: {
-              normal: {
-                color: '#ffff',
-                borderColor: '#66DC95',
-                borderWidth: 2
-              },
-              emphasis: {
-                borderWidth: 4,
-                shadowBlur: 10,
-                shadowColor: 'rgba(0, 0, 0, 0.3)'
-              }
-            },
-            areaStyle: {
-              opacity: 0.8,
-              color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
-                { offset: 1, color: 'rgba(102,220,149,0)' },
-                { offset: 0, color: 'rgba(102,220,149,0.25)' }
-              ])
-            },
-            data: []
-          }
-        ]
-      },
+      swOption: {},
       swList: []
       swList: []
     }
     }
   },
   },
@@ -455,14 +365,7 @@ export default {
             ]
             ]
           }
           }
           this.swOption = option
           this.swOption = option
-        } else {
-          // 即使没有数据也显示图表
-          this.chartShow = true
         }
         }
-      }).catch((error) => {
-        // 出现错误时也显示图表
-        console.error('获取水位监测统计数据失败:', error)
-        this.chartShow = true
       })
       })
     },
     },
     getMonitoringStatisticsByFlow(id) {
     getMonitoringStatisticsByFlow(id) {
@@ -561,14 +464,7 @@ export default {
             ]
             ]
           }
           }
           this.swOption = option
           this.swOption = option
-        } else {
-          // 即使没有数据也显示图表
-          this.chartShow = true
         }
         }
-      }).catch((error) => {
-        // 出现错误时也显示图表
-        console.error('获取流量监测统计数据失败:', error)
-        this.chartShow = true
       })
       })
     },
     },
     changeDate(val) {
     changeDate(val) {

+ 3 - 3
src/views/sand-monitor/right.vue

@@ -61,9 +61,9 @@
         <div class="warning-container">
         <div class="warning-container">
           <div class="warning-list-tools">
           <div class="warning-list-tools">
             <el-radio-group v-model="typeRadio" size="mini">
             <el-radio-group v-model="typeRadio" size="mini">
-              <el-radio-button label="禁采取采砂"></el-radio-button>
-              <el-radio-button label="超限预警"></el-radio-button>
-              <el-radio-button label="超量预警"></el-radio-button>
+              <el-radio-button label="非采区采砂"></el-radio-button>
+              <el-radio-button label="非采期采砂"></el-radio-button>
+              <el-radio-button label="采砂超量"></el-radio-button>
             </el-radio-group>
             </el-radio-group>
             <el-radio-group v-model="dateRadio" size="mini">
             <el-radio-group v-model="dateRadio" size="mini">
               <el-radio-button label="日"></el-radio-button>
               <el-radio-button label="日"></el-radio-button>