Browse Source

问题消缺(sunzehao提交)

wangb 3 months ago
parent
commit
25d98e3638

+ 2 - 2
src/components/powerPredictionComponent/batteryDivinerDialog/dayBatterDialog.vue

@@ -35,7 +35,7 @@
                     <div id="centerCharts" class="chartsStyle"></div>
                 </div>
                 <div class="main_table warn-table" style="margin-top: 20px">
-                    <el-table :data="tableData" ref="report-table_day" border max-height="45vh" style="width: 100%"
+                    <el-table :data="tableData" ref="report-table_day" border show-summary max-height="45vh" style="width: 100%"
                         :header-cell-style="{
                         padding: '4px',
                         fontSize: '16px',
@@ -310,7 +310,7 @@
                     },
                     yAxis: [{
                             type: "value",
-                            name: "万千瓦时(Wkw/h)",
+                            name: "万千瓦时(万kwh)",
                             splitLine: {
                                 lineStyle: {
                                     color: this.$store.state.theme ? "#000" : "#ccc",

+ 2 - 2
src/components/powerPredictionComponent/batteryDivinerDialog/monthAndYearBatterDialog.vue

@@ -29,7 +29,7 @@
                 <div id="centersCharts" class="chartsStyle"></div>
             </div>
             <div class="main_table warn-table" style="margin-top: 20px">
-                <el-table :data="tableData" ref="report-table" border max-height="45vh" style="width: 100%"
+                <el-table :data="tableData" ref="report-table" border show-summary max-height="45vh" style="width: 100%"
                     :header-cell-style="{
                         padding: '4px',
                         fontSize: '16px',
@@ -306,7 +306,7 @@
                     },
                     yAxis: [{
                             type: "value",
-                            name: "万千瓦时(Wkw/h)",
+                            name: "万千瓦时(万kwh)",
                             splitLine: {
                                 lineStyle: {
                                     color: this.$store.state.theme ? "#000" : "#ccc",

+ 1 - 1
src/components/powerPredictionComponent/configPage/Overview.vue

@@ -271,7 +271,7 @@ export default {
                 yAxis: [
                     {
                     type: 'value',
-                    name: 'Wkw/h'
+                    name: '万kwh'
                     }
                 ],
                 series: series

+ 1 - 1
src/components/powerPredictionComponent/configPage/generationPlan.vue

@@ -75,7 +75,7 @@
                             <span>{{scope.row.month}}月</span>
                         </template>
                     </el-table-column>
-                    <el-table-column label="计划发电量(Wkw/h)">
+                    <el-table-column label="计划发电量(万kwh)">
                         <template #default="scope">
                             <span>{{scope.row.generatingcapacity}}万千瓦时</span>
                         </template>

+ 28 - 2
src/components/powerPredictionComponent/homePageAssembly/globalDialogPage.vue

@@ -39,7 +39,7 @@
                     <div id="centerCharts" class="chartsStyle"></div>
                 </div>
                 <div class="warn-table" style="margin-top: 20px" v-if="title === '功率预测'">
-                    <el-table :data="tableData" ref="report-table_power" max-height="45vh" style="width: 100%"
+                    <el-table :data="tableData" ref="report-table_power" show-summary max-height="45vh" style="width: 100%"
                         :header-cell-style="{
                         padding: '4px',
                         fontSize: '16px',
@@ -80,7 +80,7 @@
                     </el-table>
                 </div>
                 <div class="warn-table" v-if="title === '风速预测' || title === '辐照度预测'">
-                    <el-table :data="tableData" ref="report-table_wind" max-height="400px" style="width: 100%"
+                    <el-table :data="tableData" ref="report-table_wind" show-summary :summary-method="getSummaries" max-height="400px" style="width: 100%"
                         :header-cell-style="{
                         padding: '4px',
                         fontSize: '16px',
@@ -209,6 +209,32 @@
                 this.windTurbines = this.stationData[0].no;
                 this.windTurbinesVal = this.stationData[0].itemVal;
             },
+            getSummaries(datas) {
+                const {columns, data} = datas
+                const sums = [];
+                columns.forEach((column, index) => {
+                if (index === 0) {
+                    sums[index] = '合计(平均值)';
+                    return;
+                }
+                const values = data.map(item => Number(item[column.property]));
+                if (!values.every(value => isNaN(value))) {
+                    sums[index] = values.reduce((prev, curr) => {
+                        const value = Number(curr);
+                        if (!isNaN(value)) {
+                            return prev + curr;
+                        } else {
+                            return prev;
+                        }
+                    }, 0) / values.length;
+                    sums[index] = sums[index].toFixed(2) + ' m/s';
+                } else {
+                    sums[index] = '-';
+                }
+                });
+
+                return sums;
+            },
             closeDialog() {
                 this.$emit("notReload", true);
                 this.dialogVisible = false;

+ 175 - 15
src/components/powerPredictionComponent/panoramicPowerDialog/panoramaPowerDialogPage.vue

@@ -3,7 +3,7 @@
         :close-on-click-modal="false">
         <div class="globalDiaMain" :class="!theme ? 'themeDa' : 'themeLi'">
             <div class="main_top">
-                <div class="main_top_left">
+                <div class="main_top_left" >
                     <div class="exceed">
                         <span style="margin-top: 3px">时间:</span>
                         <el-date-picker v-model="pickerTime" @change="changeTime" type="datetimerange"
@@ -32,7 +32,7 @@
                     </el-col>
                 </el-row>
                 <div class="main_table warn-table" style="margin-top: 20px">
-                    <el-table :data="tableData" ref="report-table" border max-height="45vh" style="width: 100%"
+                    <el-table :data="tableData" ref="report-table" border show-summary :summary-method="getSummaries" max-height="45vh" style="width: 100%"
                         :header-cell-style="{
                         padding: '4px',
                         fontSize: '16px',
@@ -144,6 +144,44 @@
                 this.getChartsData();
                 this.getTableData();
             },
+            getSummaries(datas) {
+                const {columns, data} = datas
+                const sums = [];
+                columns.forEach((column, index) => {
+                if (index === 0) {
+                    sums[index] = '合计';
+                    return;
+                }
+                const values = data.map(item => Number(item[column.property]));
+                if (!values.every(value => isNaN(value))) {
+                    if (index === 1 || index === 2) {
+                        sums[index] = values.reduce((prev, curr) => {
+                            const value = Number(curr);
+                            if (!isNaN(value)) {
+                                return prev + curr;
+                            } else {
+                                return prev;
+                            }
+                        }, 0) / values.length;
+                        sums[index] = sums[index].toFixed(2) + ' (平均值)';
+                    } else {
+                        sums[index] = values.reduce((prev, curr) => {
+                            const value = Number(curr);
+                            if (!isNaN(value)) {
+                                return prev + curr;
+                            } else {
+                                return prev;
+                            }
+                        }, 0);
+                        sums[index] = sums[index].toFixed(2)
+                    }
+                } else {
+                    sums[index] = '-';
+                }
+                });
+
+                return sums;
+            },
             changeTime(val) {
                 if (val) {
                     let timeC = new Date(val[1]).getTime() - new Date(val[0]).getTime();
@@ -486,23 +524,145 @@
 </script>
 
 <style lang="less">
-    .themeDa {
-        .main_top {
-            .main_top_left {
-                .exceed {
-                    color: #fff;
+.el-overlay {
+        .el-overlay-dialog {
+            .windLifeDialog {
+                .el-dialog__header {
+                    .el-dialog__title {
+                        color: #fff !important;
+                    }
                 }
-            }
-        }
-    }
 
-    .themeLi {
-        .main_top {
-            .main_top_left {
-                .exceed {
-                    color: #000;
+                .el-dialog__body {
+                    padding: 10px 20px;
+
+                    .globalDiaMain {
+                        .main_top {
+                            display: flex;
+                            justify-content: space-between;
+
+                            .main_top_left {
+                                display: flex;
+
+                                .exceed {
+                                    span {
+                                        font-size: 14px;
+                                        margin-left: 10px;
+                                    }
+
+                                    display: flex;
+                                    margin-right: 20px;
+
+                                    .el-select,
+                                    .el-select__wrapper {
+                                        height: 32px;
+                                    }
+
+                                    .el-date-editor {
+                                        height: 32px;
+
+                                        .el-input__icon,
+                                        .el-range-separator {
+                                            line-height: 30px;
+                                        }
+                                    }
+
+                                    .select-trigger {
+                                        .el-input {
+                                            .el-input__wrapper {
+                                                height: 30px;
+                                            }
+                                        }
+
+                                        .el-input__suffix {
+                                            .el-input__icon {
+                                                line-height: 30px;
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+
+                            .el-button {
+                                height: 30px;
+                                padding: 0 20px;
+                                line-height: 5px;
+                            }
+                        }
+
+                        .main_charts {
+                            margin-top: 20px;
+
+                            .chartsStyle {
+                                height: 300px;
+                                width: 100%;
+                            }
+                        }
+
+                        .main_table {
+                            margin: 20px 0;
+
+                            .el-table {
+                                .el-table__body-wrapper {
+                                    height: 335px !important;
+                                    overflow-y: auto;
+                                }
+                            }
+                        }
+                    }
+
+                    .themeDa {
+                        .main_top {
+                            .main_top_left {
+
+                                .exceed {
+                                    .exceedName {
+                                        color: #fff;
+                                        margin: 3px 0 0 5px;
+                                    }
+                                }
+                            }
+                        }
+                    }
+
+                    .themeLi {
+                        .main_top {
+                            .main_top_left {
+
+                                .exceed {
+                                    .exceedName {
+                                        color: #000;
+                                        margin: 3px 0 0 5px;
+                                    }
+                                }
+                            }
+                        }
+                    }
                 }
             }
         }
     }
+    // .themeDa {
+    //     .main_top {
+    //         .main_top_left {
+    //             display: flex;
+    //             margin-bottom: 10px;
+    //             .exceed {
+    //                 color: #fff;
+    //             }
+    //         }
+    //     }
+    // }
+
+    // .themeLi {
+    //     .main_top {
+    //         .main_top_left {
+    //             display: flex;
+    //             margin-bottom: 10px;
+    //             .exceed {
+    //                 color: #000;
+    //             }
+    //         }
+    //     }
+    // }
 </style>

+ 28 - 2
src/components/powerPredictionComponent/powerPredictionDialog/predictionDialogPage.vue

@@ -30,7 +30,7 @@
                     <div id="centerCharts" class="chartsStyle"></div>
                 </div>
                 <div class="main_table warn-table" style="margin-top: 20px" v-show="isPower">
-                    <el-table :data="tableData" ref="report-table_power" border max-height="45vh" style="width: 100%"
+                    <el-table :data="tableData" ref="report-table_power" border show-summary max-height="45vh" style="width: 100%"
                         :header-cell-style="{
                         padding: '4px',
                         fontSize: '16px',
@@ -71,7 +71,7 @@
                     </el-table>
                 </div>
                 <div class="main_table warn-table" v-show="!isPower">
-                    <el-table :data="tableData" ref="report-table_wind" border max-height="400px" style="width: 100%"
+                    <el-table :data="tableData" ref="report-table_wind" border show-summary :summary-method="getSummaries" max-height="400px" style="width: 100%"
                         :header-cell-style="{
                         padding: '4px',
                         fontSize: '16px',
@@ -175,6 +175,32 @@
                 this.$emit("notReload", true);
                 this.dialogVisible = false;
             },
+            getSummaries(datas) {
+                const {columns, data} = datas
+                const sums = [];
+                columns.forEach((column, index) => {
+                if (index === 0) {
+                    sums[index] = '合计(平均值)';
+                    return;
+                }
+                const values = data.map(item => Number(item[column.property]));
+                if (!values.every(value => isNaN(value))) {
+                    sums[index] = values.reduce((prev, curr) => {
+                        const value = Number(curr);
+                        if (!isNaN(value)) {
+                            return prev + curr;
+                        } else {
+                            return prev;
+                        }
+                    }, 0) / values.length;
+                    sums[index] = sums[index].toFixed(2) + ' m/s';
+                } else {
+                    sums[index] = '-';
+                }
+                });
+
+                return sums;
+            },
             seachData() {
                 this.global = false;
                 this.loading = true;

+ 2 - 2
src/views/powerPrediction/batteryDivinerPage.vue

@@ -872,7 +872,7 @@ export default {
         yAxis: [
           {
             type: "value",
-            name: "万千瓦时(Wkw/h)",
+            name: "万千瓦时(万kwh)",
             splitLine: {
               lineStyle: {
                 color: this.$store.state.theme ? "#000" : "#ccc",
@@ -1028,7 +1028,7 @@ export default {
         yAxis: [
           {
             type: "value",
-            name: "万千瓦时(Wkw/h)",
+            name: "万千瓦时(万kwh)",
             splitLine: {
               lineStyle: {
                 color: this.$store.state.theme ? "#000" : "#ccc",

+ 1 - 1
src/views/powerPrediction/datasExportPage.vue

@@ -250,7 +250,7 @@ export default {
                 yAxis: [
                     {
                     type: 'value',
-                    name: '万千瓦时(Wkw/h)'
+                    name: '万千瓦时(万kwh)'
                     }
                 ],
                 series: series

+ 1 - 1
src/views/powerPrediction/homePageNoMap.vue

@@ -2008,7 +2008,7 @@
                     }, ],
                     yAxis: [{
                         type: "value",
-                        name: title === "预测考核分数" ? "分" : "兆瓦(M/w)",
+                        name: title === "预测考核分数" ? "分" : "兆瓦(Mw)",
                         splitLine: {
                             lineStyle: {
                                 color: this.theme ? "#000" : "#ccc",

+ 1 - 1
src/views/powerPrediction/powerPredictionPage.vue

@@ -1360,7 +1360,7 @@ export default {
         yAxis: [
           {
             type: "value",
-            name: title === "预测准确率" ? "分" : "兆瓦(M/w)",
+            name: title === "预测准确率" ? "分" : "兆瓦(Mw)",
             splitLine: {
               lineStyle: {
                 color: this.theme ? "#000" : "#ccc",

+ 1 - 1
src/views/powerPrediction/statisticalSummaryPage.vue

@@ -781,7 +781,7 @@
                     }, ],
                     yAxis: [{
                         type: "value",
-                        name: "万千瓦时(Wkw/h)",
+                        name: "万千瓦时(万kwh)",
                         splitLine: {
                             lineStyle: {
                                 color: this.theme ? "#000" : "#ccc",