Переглянути джерело

中心功率预测及站端准确率测试调整

fanxiaoyu 6 місяців тому
батько
коміт
3b852d6902

+ 10 - 2
cpp-ui/src/views/cloudDataQuery/index.vue

@@ -45,7 +45,7 @@
     <div style="padding-top: 10px">
       <el-tabs type="card" v-model="activeName" @tab-click="tabClick">
         <el-tab-pane label="图表" name="first">
-          <div v-loading="loading" style="float:left;width: 100%;height:740px" id="zhxCharts"></div>
+          <div  style="float:left;width: 100%;height:740px" id="zhxCharts"></div>
         </el-tab-pane>
         <el-tab-pane label="列表" name="second">
           <vxe-table
@@ -831,7 +831,13 @@ export default {
     },
     zhDraw(timeList, zhMap, stationType) {
       this.zhxChart = echarts.init(document.getElementById('zhxCharts'), 'dark', {renderer: 'svg'})
-      let option = {
+      // 显示加载动画
+      this.zhxChart.showLoading('default', {
+        textColor: '#000',
+        maskColor: 'rgba(0, 0, 0, 0)'
+      });
+      setTimeout(() => {
+          let option = {
         backgroundColor: 'transparent',
         title: {
           top: 20,
@@ -988,6 +994,8 @@ export default {
       }
 
       this.zhxChart.setOption(option, true)
+      this.zhxChart.hideLoading()
+      }, 1000);
       var _this = this
       window.addEventListener("resize", function () {
         _this.zhxChart.resize();

+ 45 - 12
cpp-ui/src/views/statistics/stationAccuracy/index.vue

@@ -251,14 +251,13 @@ export default {
         let times = []
         let pcDatas = []
         let zqlDatas = []
-        console.log(this.tableData)
         this.tableData.forEach(t => {
           times.push(t.time)
           zqlDatas.push(t.accuracy.replace("%", ""))
           pcDatas.push(t.deviationSum == null ? "" : t.deviationSum.replace("%", ""))
         })
         this.pcDraw(times, pcDatas)
-        this.zqlDraw(times, zqlDatas)
+        this.zqlDraw(times, zqlDatas,this.forecastType)
         this.loading = false
       }).catch(() => {
         this.loading = false
@@ -273,7 +272,7 @@ export default {
         }
       })
     },
-    zqlDraw(times, datas) {
+    zqlDraw(times, datas,forecastType) {
       this.zqlChart = echarts.init(document.getElementById('zqlCharts'), "dark", {renderer: 'svg'})
       let option = {
         backgroundColor: 'transparent',
@@ -325,9 +324,9 @@ export default {
           type: 'inside'
         }],
         grid: {
-          top: 100,
+          top: '12%',
           left: '3%',
-          right: '3%',
+          right: '4%',
           bottom: '10%',
           containLabel: true
         },
@@ -343,7 +342,7 @@ export default {
         }],
         yAxis: [{
           type: 'value',
-          name: '%',
+          // name: '%',
           max: 100,
           min: 0,
           axisTick: {
@@ -369,7 +368,10 @@ export default {
             }
           }
         }],
-        series: [
+
+      }
+      if (forecastType === 'cdq'){
+        option.series=[
           {
             name: '准确率(%)',
             type: 'line',
@@ -393,7 +395,7 @@ export default {
               data: [{
                 label: {
                   position: 'start',
-                  formatter: "标准线"
+                  formatter: "合格(75%)"
                 },
                 yAxis: 75
               }]
@@ -408,8 +410,40 @@ export default {
             data: datas
           }
         ]
+      }else {
+        option.series= [
+          {
+            name: '准确率(%)',
+            type: 'line',
+            smooth: false,
+            symbol: 'circle',
+            symbolSize: 5,
+            showSymbol: true,
+            lineStyle: {
+              normal: {
+                width: 2
+              }
+            },
+            markLine: {
+              silent: true,
+              itemStyle: {
+                normal: {
+                  show: true,
+                  color: 'red'
+                }
+              },
+            },
+            itemStyle: {
+              normal: {
+                color: 'rgb(213,219,50)',
+                borderColor: 'rgba(16,217,16,0.96)',
+                borderWidth: 12
+              }
+            },
+            data: datas
+          }
+        ]
       }
-
       this.zqlChart.setOption(option, true)
       var _this = this
       window.addEventListener("resize", function () {
@@ -470,8 +504,8 @@ export default {
         }],
         grid: {
           top: 100,
-          left: '3%',
-          right: '3%',
+          left: '4%',
+          right: '4%',
           bottom: '10%',
           containLabel: true
         },
@@ -536,7 +570,6 @@ export default {
         ]
       }
 
-
       this.pcChart.setOption(option, true)
       var _this = this
       window.addEventListener("resize", function () {