SunZehao hace 5 meses
padre
commit
97dfebb9a0

+ 1 - 1
components.d.ts

@@ -166,7 +166,7 @@ declare module 'vue' {
     StrightLineChart: typeof import('./src/components/chart/line/stright-line-chart.vue')['default']
     SubmitBtn: typeof import('./src/components/generatingCapacityComponent/SubmitBtn.vue')['default']
     SvgDraw: typeof import('./src/components/coms/icon/svg-draw.vue')['default']
-    SvgIcon: typeof import('./src/components/coms/icon/svg-icon.vue')['default']
+    SvgIcon: typeof import('./src/components/powerPredictionComponent/svgIcon/index.vue')['default']
     SvgPageShow: typeof import('./src/components/powerPredictionComponent/powerControlSvg/svgPageShow.vue')['default']
     Tab: typeof import('./src/components/coms/tabs/tab.vue')['default']
     Table: typeof import('./src/components/generatingCapacityComponent/table.vue')['default']

+ 39 - 32
src/views/powerPrediction/component/power.json

@@ -1222,38 +1222,45 @@
     },
     "installedCapacityData": {
         "dataFormatList": [
-            {
-                "name": "装机",
-                "xAxisData": null,
-                "data": [
-                    149.6
-                ]
-            },
-            {
-                "name": "并网",
-                "xAxisData": null,
-                "data": [
-                    111.0
-                ]
-            },
-            {
-                "name": "实时",
-                "xAxisData": null,
-                "data": [
-                    15.754103
-                ]
-            },
-            {
-                "name": "可用",
-                "xAxisData": null,
-                "data": [
-                    11.026925
-                ]
-            }
-        ],
-        "name": [
-            "草山梁风电场"
-        ]
+                {
+                    "name": "装机",
+                    "xAxisData": null,
+                    "data": [
+                        50.0
+                    ]
+                },
+                {
+                    "name": "理论",
+                    "xAxisData": null,
+                    "data": [
+                        2.301329
+                    ]
+                },
+                {
+                    "name": "实时",
+                    "xAxisData": null,
+                    "data": [
+                        2.1858449999999996
+                    ]
+                },
+                {
+                    "name": "可用",
+                    "xAxisData": null,
+                    "data": [
+                        2.268537
+                    ]
+                },
+                {
+                    "name": "预测",
+                    "xAxisData": null,
+                    "data": [
+                        8.329816000000001
+                    ]
+                }
+            ],
+            "name": [
+                "草山梁风电场"
+            ]
     },
     "predictedAssessmentScoresData": {
         "dataFormatList": [

+ 65 - 46
src/views/powerPrediction/powerPredictionPage.vue

@@ -20,7 +20,8 @@
                 <!-- <el-scrollbar> -->
                 <div class="scrollbar-flex-content " style="transform: scale(.9)">
                     <p v-for="item in stationData" :key="item.no" class="scrollbar-demo-item"
-                        :class="item.showBac === true ? 'changeBacksty' : 'defaultBacksty'" @click="changeStation(item.no)">
+                        :class="item.showBac === true ? 'changeBacksty' : 'defaultBacksty'"
+                        @click="changeStation(item.no)">
                         {{ item.stationName }}
                     </p>
                 </div>
@@ -506,16 +507,16 @@
                     jsonData.globalPowerPredictionChartData2.dataFormatList.forEach(
                         (iten) => {
                             // if (iten.name !== "短期") {
-                                legend.push(iten.name);
-                                let seriesObj = {
-                                    name: iten.name,
-                                    type: "line",
-                                    data: iten.data.map((it) => {
-                                        return that.$utils.isHasNum(it);
-                                    }),
-                                    symbol: "none",
-                                };
-                                series.push(seriesObj);
+                            legend.push(iten.name);
+                            let seriesObj = {
+                                name: iten.name,
+                                type: "line",
+                                data: iten.data.map((it) => {
+                                    return that.$utils.isHasNum(it);
+                                }),
+                                symbol: "none",
+                            };
+                            series.push(seriesObj);
                             // }
                         }
                     );
@@ -553,22 +554,31 @@
                     jsonData.installedCapacityData.name.forEach((item) => {
                         xAxis.push(item);
                     });
-                    jsonData.installedCapacityData.dataFormatList.forEach((iten, index) => {
-                        legend.push(iten.name);
-                        let seriesObj = {
-                            name: iten.name,
-                            type: "bar",
-                            barGap: 0,
-                            emphasis: {
-                                focus: "series",
-                            },
-                            data: iten.data.map((it) => {
-                                return that.$utils.isHasNum(it);
-                            }),
-                        };
-                        series.push(seriesObj);
-                    });
-                    that.getPowerBar("installChart", "功率统计", xAxis, legend, series);
+
+                    let powerArr = ["装机", "理论", "可用", "预测", "实时"]
+                    powerArr.forEach(it => {
+                        jsonData.installedCapacityData.dataFormatList.forEach((iten, index) => {
+                            if (it === iten.name) {
+                                legend.push(iten.name);
+                                let seriesObj = {
+                                    name: iten.name,
+                                    type: "bar",
+                                    barGap: 0,
+                                    emphasis: {
+                                        focus: "series",
+                                    },
+                                    data: iten.data.map((it) => {
+                                        return that.$utils.isHasNum(it);
+                                    }),
+                                };
+                                series.push(seriesObj);
+                            }
+                        });
+                    })
+                    let color = ['#ea7ccc', '#5470c6', '#91cc75', '#ee6666', '#73c0de', '#fc8452',
+                        '#9a60b4',
+                    ]
+                    that.getPowerBar("installChart", "功率统计", xAxis, legend, series, color);
                 }
 
                 {
@@ -922,7 +932,7 @@
                         }
                         if (datas.data.dataFormatList.length > 0) {
                             let powerArr = ["理论", "可用", "AGC", "超短期", "短期", "实际"]
-                            powerArr.forEach(it =>{
+                            powerArr.forEach(it => {
                                 datas.data.dataFormatList.forEach((iten) => {
                                     if (it === iten.name) {
                                         legend.push(iten.name);
@@ -937,7 +947,7 @@
                                         series.push(seriesObj);
                                     }
                                 });
-                                
+
                             })
                         }
                         this.getPowerLine("powerChart", "功率预测", xAxis, legend, series);
@@ -1179,23 +1189,31 @@
                             });
                         }
                         if (datas.data.dataFormatList.length > 0) {
-                            datas.data.dataFormatList.forEach((iten, index) => {
-                                legend.push(iten.name);
-                                let seriesObj = {
-                                    name: iten.name,
-                                    type: "bar",
-                                    barGap: 0,
-                                    emphasis: {
-                                        focus: "series",
-                                    },
-                                    data: iten.data.map((it) => {
-                                        return this.$utils.isHasNum(it);
-                                    }),
-                                };
-                                series.push(seriesObj);
-                            });
+                            let powerArr = ["装机", "理论", "可用", "预测", "实时"]
+                            powerArr.forEach(it => {
+                                datas.data.dataFormatList.forEach((iten, index) => {
+                                    if (it === iten.name) {
+                                        legend.push(iten.name);
+                                        let seriesObj = {
+                                            name: iten.name,
+                                            type: "bar",
+                                            barGap: 0,
+                                            emphasis: {
+                                                focus: "series",
+                                            },
+                                            data: iten.data.map((it) => {
+                                                return this.$utils.isHasNum(it);
+                                            }),
+                                        };
+                                        series.push(seriesObj);
+                                    }
+                                });
+                            })
                         }
-                        this.getPowerBar("installChart", "功率统计", xAxis, legend, series);
+                        let color = ['#ea7ccc', '#5470c6', '#91cc75', '#ee6666', '#73c0de', '#fc8452',
+                            '#9a60b4',
+                        ]
+                        this.getPowerBar("installChart", "功率统计", xAxis, legend, series, color);
                     }
                 });
             },
@@ -1241,7 +1259,7 @@
                     }
                 });
             },
-            getPowerBar(name, title, xAxis, legend, series) {
+            getPowerBar(name, title, xAxis, legend, series, color) {
                 let option = {
                     backgroundColor: "",
                     title: {
@@ -1251,6 +1269,7 @@
                             fontWeight: "bold",
                         },
                     },
+                    color: color,
                     tooltip: {
                         trigger: "axis",
                         axisPointer: {