Pārlūkot izejas kodu

解析记录及预测发电量调整

fanxiaoyu 7 mēneši atpakaļ
vecāks
revīzija
cb4203f094

+ 19 - 6
cpp-ui/src/views/statistics/analyzeRecords/index.vue

@@ -11,10 +11,11 @@
           end-placeholder="结束日期"
           :default-time="['00:00:00', '23:59:59']"
           popper-class="cpp-popper"
+          :picker-options="pickerOptions"
         />
       </el-form-item>
       <el-form-item label="场站名称">
-        <el-select v-model="stationCode" placeholder="请选择" style="width: 150px" popper-class="cpp-popper" clearable>
+        <el-select v-model="stationCode" placeholder="请选择" style="width: 150px" popper-class="cpp-popper" @change="changeStationCode">
           <el-option
             v-for="item in stationList"
             :key="item.value"
@@ -150,7 +151,12 @@ export default {
       electricFieldTypeEnum: '',
       windFileTypeList: [],
       photovoltaicFileTypeList: [],
-      allFileTypeList: []
+      allFileTypeList: [],
+      pickerOptions: {
+        disabledDate: (time) => {
+          return time.getTime() > new Date(new Date().toLocaleDateString()).getTime()+24 * 60 * 60 * 1000 -1
+        }
+      },
     }
   },
   created() {
@@ -197,7 +203,7 @@ export default {
     getStationCode() {
       this.$axios({url: '/electricfield/all', method: 'get'}).then(response => {
         this.stationList = response.data
-        this.stationList.push({value: '未知', label: '未知'})
+        // this.stationList.push({value: '未知', label: '未知'})
         if (this.stationList.length > 0) {
           this.stationCode = this.stationList[0].value
           this.queryByStationCode()
@@ -209,6 +215,9 @@ export default {
         this.allFileTypeList = response.data
       })
     },
+    changeStationCode(){
+      this.queryByStationCode()
+    },
     queryByStationCode() {
       this.loading = true
       let startTime = Math.round(this.dateTime[0])
@@ -245,9 +254,13 @@ export default {
     },
     codeChangeName(row) {
       var codeList = this.stationList
-      for (let i = 0; i < codeList.length; i++) {
-        if (row.cellValue == codeList[i].value) {
-          return codeList[i].label
+      if (row.cellValue == null){
+        return '未知'
+      }else {
+        for (let i = 0; i < codeList.length; i++) {
+          if (row.cellValue == codeList[i].value) {
+            return codeList[i].label
+          }
         }
       }
     },

+ 13 - 16
cpp-ui/src/views/statistics/predictedPowerGeneration/index.vue

@@ -9,7 +9,9 @@
           type="date"
           value-format="timestamp"
           placeholder="选择开始日期"
-          style="width: 255px">
+          style="width: 255px"
+          :picker-options="pickerOptions"
+        >
         </el-date-picker>
       </el-form-item>
       <el-form-item label="场站名称">
@@ -46,7 +48,7 @@
             :data="tableData">
             <vxe-table-column field="time" title="预测日期"></vxe-table-column>
             <vxe-table-column field="forecastPowerGenerationZd" title="站端上传"></vxe-table-column>
-            <vxe-table-column field="forecastPowerGenerationYd" title="云端下发"></vxe-table-column>
+            <vxe-table-column field="forecastPowerGenerationYd" title="中心预测"></vxe-table-column>
           </vxe-table>
         </el-col>
         <el-col :span="18">
@@ -72,20 +74,15 @@ export default {
       tableData: [],
       loading: false,
       predictionDataSource: '',
-      predictionDataSourceList: [
-        {
-          value: '云端下发',
-          label: '云端下发'
-        },
-        {
-          value: '站端上传',
-          label: '站端上传'
-        }
-      ],
       total: 0,
       pageSize: 10,
       currentPage: 1,
-      contrastChart: null
+      contrastChart: null,
+      pickerOptions: {
+        disabledDate: (time) => {
+          return time.getTime() > new Date()
+        }
+      },
     }
   },
   created() {
@@ -169,7 +166,7 @@ export default {
           itemWidth: 14,
           itemHeight: 5,
           itemGap: 13,
-          data: ['站端上传', '云端下发'],
+          data: ['站端上传', '中心预测'],
           right: '4%',
           textStyle: {
             fontSize: 12,
@@ -194,7 +191,7 @@ export default {
         },
         yAxis: [{
           type: 'value',
-          name: '(万千瓦时)',
+          name: '万(kWh)',
           axisLabel: {
             margin: 10,
             textStyle: {
@@ -226,7 +223,7 @@ export default {
             }
           },
           {
-            name: '云端下发',
+            name: '中心预测',
             type: 'line',
             data: yd,
             lineStyle: {