Pārlūkot izejas kodu

增加场站中长期电量预测

SunZehao 11 mēneši atpakaļ
vecāks
revīzija
21a6e69c27

+ 1 - 1
.env.development

@@ -29,7 +29,7 @@ VUE_APP_REPORT_URL = 'http://192.168.0.102:9001'
 
 # 功率预测
 # 徐世利
-VUE_APP_BASE_URL = 'http://192.168.2.159:8086'
+VUE_APP_BASE_URL = 'http://192.168.2.150:8086'
 # 马力军
 # VUE_APP_BASE_URL = 'http://192.168.2.45:8086'
 # 王波

+ 8 - 1
src/App.vue

@@ -230,6 +230,13 @@ export default {
           svg: `<svg t="1711618680641" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="96088" width="25" height="25"><path d="M322.06 98.4m6.19 0l299.01 0q6.19 0 6.19 6.19l0 102.85q0 6.19-6.19 6.19l-299.01 0q-6.19 0-6.19-6.19l0-102.85q0-6.19 6.19-6.19Z" fill="#33CAB7" p-id="96089"></path><path d="M483.19 752.83c0-120.47 98.65-218.13 220.36-218.13a221.06 221.06 0 0 1 109 28.52c-0.38-181.64-0.5-367.3-0.5-367.3a22.24 22.24 0 0 0-22.19-22.17H670.39v54.65a22.25 22.25 0 0 1-22.2 22.18H307.31a22.25 22.25 0 0 1-22.19-22.18v-54.65H165.64a22.24 22.24 0 0 0-22.19 22.17v700.72a22.24 22.24 0 0 0 22.19 22.17h395c-47.42-40.01-77.45-99.52-77.45-165.98z m-215.8-366.06a10.33 10.33 0 0 1 10.3-10.3h400.12a10.33 10.33 0 0 1 10.3 10.3v54.9a10.33 10.33 0 0 1-10.3 10.3H277.69a10.33 10.33 0 0 1-10.3-10.3zM482.9 617.71A10.32 10.32 0 0 1 472.6 628H277.69a10.32 10.32 0 0 1-10.3-10.29V562.8a10.32 10.32 0 0 1 10.3-10.29H472.6a10.32 10.32 0 0 1 10.3 10.29z" fill="#33CAB7" p-id="96090"></path><path d="M703.55 768.1a15.36 15.36 0 0 1-15.44-15.27v-175c-90.81 7.69-162.11 83.1-162.11 175 0 97 79.48 175.71 177.52 175.71 92.83 0 169-70.55 176.83-160.44z" fill="#33CAB7" p-id="96091"></path><path d="M719 737.55h161.4C873 652.7 804.7 585.09 719 577.78z" fill="#33CAB7" p-id="96092"></path></svg>`,
           name: "统计汇总",
         },
+        {
+          index: "/powerPrediction/stationPowerContro",
+          icon: "Tickets",
+          img: power_tjhz,
+          svg: `<svg t="1711617136510" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="53900" width="25" height="25"><path d="M768 960H128c-17.67 0-32-14.33-32-32V224c0-17.67 14.33-32 32-32h640c17.67 0 32 14.33 32 32v704c0 17.67-14.33 32-32 32z m-608-64h576V256H160v640z" p-id="53901" fill="#33CAB7"></path><path d="M896 864c-17.67 0-32-14.33-32-32V128H225c-17.67 0-32-14.33-32-32s14.33-32 32-32h671c17.67 0 32 14.33 32 32v736c0 17.67-14.33 32-32 32zM288 832h-64V608c0-17.67 14.33-32 32-32s32 14.33 32 32v224zM480 832h-64V672c0-17.67 14.33-32 32-32s32 14.33 32 32v160z" p-id="53902" fill="#33CAB7"></path><path d="M672 832h-64V544c0-17.67 14.33-32 32-32s32 14.33 32 32v288z" p-id="53903" fill="#33CAB7"></path><path d="M448.02 512c-9.07 0-18.03-3.84-24.31-11.18L352 417.17l-71.7 83.65c-11.5 13.42-31.7 14.97-45.12 3.47-13.42-11.5-14.97-31.7-3.47-45.12l96-112a32 32 0 0 1 24.3-11.17 32 32 0 0 1 24.3 11.17l77.55 90.47 168.41-112.27c14.7-9.8 34.57-5.83 44.38 8.88 9.8 14.71 5.83 34.57-8.88 44.38l-192 128a32.008 32.008 0 0 1-17.75 5.37z" p-id="53904" fill="#33CAB7"></path></svg>`,
+          name: "场站电量预测",
+        },
       ],
       intelligentReportDatas: [
         {
@@ -951,7 +958,7 @@ export default {
         if (path.indexOf("generatingCap") > -1) {
           str = "width: 200px";
         } else if (path.indexOf("powerPrediction") > -1) {
-          str = "width: 150px";
+          str = "width: 160px";
         }
       }
       return str;

+ 11 - 0
src/router/index.js

@@ -106,6 +106,17 @@ const routes = [
                 '../views/powerPrediction/statisticalSummaryPage.vue'
             ),
     },
+    {
+        path: '/powerPrediction/stationPowerContro',
+        name: 'stationPowerContro',
+        meta: {
+            title: '场站电量预测',
+        },
+        component: () =>
+            import(
+                '../views/powerPrediction/stationPowerContro.vue'
+            ),
+    },
     //智能报表
     {
         path: "/intelligentReport/gkjlb",

+ 405 - 0
src/views/powerPrediction/component/stationPowerControl.json

@@ -0,0 +1,405 @@
+{
+    "code": 200,
+    "data": [
+        {
+            "name": "吉山梁地区预计平均风速",
+            "nameEn": "jls",
+            "time": "白天",
+            "jls1": 6.94,
+            "jls2": 6.94,
+            "jls3": 6.94,
+            "jls4": 6.94,
+            "jls5": 6.94,
+            "jls6": 6.94,
+            "jls7": 6.94,
+            "jls8": 6.94,
+            "jls9": 6.94,
+            "jls10": 6.94,
+            "jls11": 6.94,
+            "jls12": 6.94,
+            "jls13": 6.94,
+            "jls14": 6.94,
+            "jls15": 6.94
+        },
+        {
+            "name": "吉山梁地区预计平均风速",
+            "nameEn": "jls",
+            "time": "夜间",
+            "jls1": 6.94,
+            "jls2": 6.94,
+            "jls3": 6.94,
+            "jls4": 6.94,
+            "jls5": 6.94,
+            "jls6": 6.94,
+            "jls7": 6.94,
+            "jls8": 6.94,
+            "jls9": 6.94,
+            "jls10": 6.94,
+            "jls11": 6.94,
+            "jls12": 6.94,
+            "jls13": 6.94,
+            "jls14": 6.94,
+            "jls15": 6.94
+        },
+        {
+            "name": "吉山梁风场一期",
+            "nameEn": "jls",
+            "time": "白天",
+            "jls1": 6.94,
+            "jls2": 6.94,
+            "jls3": 6.94,
+            "jls4": 6.94,
+            "jls5": 6.94,
+            "jls6": 6.94,
+            "jls7": 6.94,
+            "jls8": 6.94,
+            "jls9": 6.94,
+            "jls10": 6.94,
+            "jls11": 6.94,
+            "jls12": 6.94,
+            "jls13": 6.94,
+            "jls14": 6.94,
+            "jls15": 6.94
+        },
+        {
+            "name": "吉山梁风场一期",
+            "nameEn": "jls",
+            "time": "夜间",
+            "jls1": 6.94,
+            "jls2": 6.94,
+            "jls3": 6.94,
+            "jls4": 6.94,
+            "jls5": 6.94,
+            "jls6": 6.94,
+            "jls7": 6.94,
+            "jls8": 6.94,
+            "jls9": 6.94,
+            "jls10": 6.94,
+            "jls11": 6.94,
+            "jls12": 6.94,
+            "jls13": 6.94,
+            "jls14": 6.94,
+            "jls15": 6.94
+        },
+        {
+            "name": "吉山梁风场一期",
+            "nameEn": "jls",
+            "time": "合计",
+            "jls1": 6.94,
+            "jls2": 6.94,
+            "jls3": 6.94,
+            "jls4": 6.94,
+            "jls5": 6.94,
+            "jls6": 6.94,
+            "jls7": 6.94,
+            "jls8": 6.94,
+            "jls9": 6.94,
+            "jls10": 6.94,
+            "jls11": 6.94,
+            "jls12": 6.94,
+            "jls13": 6.94,
+            "jls14": 6.94,
+            "jls15": 6.94
+        },
+        {
+            "name": "吉山梁地区预计平均风速",
+            "nameEn": "jls",
+            "time": "白天",
+            "jls1": 6.94,
+            "jls2": 6.94,
+            "jls3": 6.94,
+            "jls4": 6.94,
+            "jls5": 6.94,
+            "jls6": 6.94,
+            "jls7": 6.94,
+            "jls8": 6.94,
+            "jls9": 6.94,
+            "jls10": 6.94,
+            "jls11": 6.94,
+            "jls12": 6.94,
+            "jls13": 6.94,
+            "jls14": 6.94,
+            "jls15": 6.94
+        },
+        {
+            "name": "吉山梁地区预计平均风速",
+            "nameEn": "jls",
+            "time": "夜间",
+            "jls1": 6.94,
+            "jls2": 6.94,
+            "jls3": 6.94,
+            "jls4": 6.94,
+            "jls5": 6.94,
+            "jls6": 6.94,
+            "jls7": 6.94,
+            "jls8": 6.94,
+            "jls9": 6.94,
+            "jls10": 6.94,
+            "jls11": 6.94,
+            "jls12": 6.94,
+            "jls13": 6.94,
+            "jls14": 6.94,
+            "jls15": 6.94
+        },
+        {
+            "name": "吉山梁风场一期",
+            "nameEn": "jls",
+            "time": "白天",
+            "jls1": 6.94,
+            "jls2": 6.94,
+            "jls3": 6.94,
+            "jls4": 6.94,
+            "jls5": 6.94,
+            "jls6": 6.94,
+            "jls7": 6.94,
+            "jls8": 6.94,
+            "jls9": 6.94,
+            "jls10": 6.94,
+            "jls11": 6.94,
+            "jls12": 6.94,
+            "jls13": 6.94,
+            "jls14": 6.94,
+            "jls15": 6.94
+        },
+        {
+            "name": "吉山梁风场一期",
+            "nameEn": "jls",
+            "time": "夜间",
+            "jls1": 6.94,
+            "jls2": 6.94,
+            "jls3": 6.94,
+            "jls4": 6.94,
+            "jls5": 6.94,
+            "jls6": 6.94,
+            "jls7": 6.94,
+            "jls8": 6.94,
+            "jls9": 6.94,
+            "jls10": 6.94,
+            "jls11": 6.94,
+            "jls12": 6.94,
+            "jls13": 6.94,
+            "jls14": 6.94,
+            "jls15": 6.94
+        },
+        {
+            "name": "吉山梁风场一期",
+            "nameEn": "jls",
+            "time": "合计",
+            "jls1": 6.94,
+            "jls2": 6.94,
+            "jls3": 6.94,
+            "jls4": 6.94,
+            "jls5": 6.94,
+            "jls6": 6.94,
+            "jls7": 6.94,
+            "jls8": 6.94,
+            "jls9": 6.94,
+            "jls10": 6.94,
+            "jls11": 6.94,
+            "jls12": 6.94,
+            "jls13": 6.94,
+            "jls14": 6.94,
+            "jls15": 6.94
+        },
+        {
+            "name": "吉山梁地区预计平均风速",
+            "nameEn": "jls",
+            "time": "白天",
+            "jls1": 6.94,
+            "jls2": 6.94,
+            "jls3": 6.94,
+            "jls4": 6.94,
+            "jls5": 6.94,
+            "jls6": 6.94,
+            "jls7": 6.94,
+            "jls8": 6.94,
+            "jls9": 6.94,
+            "jls10": 6.94,
+            "jls11": 6.94,
+            "jls12": 6.94,
+            "jls13": 6.94,
+            "jls14": 6.94,
+            "jls15": 6.94
+        },
+        {
+            "name": "吉山梁地区预计平均风速",
+            "nameEn": "jls",
+            "time": "夜间",
+            "jls1": 6.94,
+            "jls2": 6.94,
+            "jls3": 6.94,
+            "jls4": 6.94,
+            "jls5": 6.94,
+            "jls6": 6.94,
+            "jls7": 6.94,
+            "jls8": 6.94,
+            "jls9": 6.94,
+            "jls10": 6.94,
+            "jls11": 6.94,
+            "jls12": 6.94,
+            "jls13": 6.94,
+            "jls14": 6.94,
+            "jls15": 6.94
+        },
+        {
+            "name": "吉山梁风场一期",
+            "nameEn": "jls",
+            "time": "白天",
+            "jls1": 6.94,
+            "jls2": 6.94,
+            "jls3": 6.94,
+            "jls4": 6.94,
+            "jls5": 6.94,
+            "jls6": 6.94,
+            "jls7": 6.94,
+            "jls8": 6.94,
+            "jls9": 6.94,
+            "jls10": 6.94,
+            "jls11": 6.94,
+            "jls12": 6.94,
+            "jls13": 6.94,
+            "jls14": 6.94,
+            "jls15": 6.94
+        },
+        {
+            "name": "吉山梁风场一期",
+            "nameEn": "jls",
+            "time": "夜间",
+            "jls1": 6.94,
+            "jls2": 6.94,
+            "jls3": 6.94,
+            "jls4": 6.94,
+            "jls5": 6.94,
+            "jls6": 6.94,
+            "jls7": 6.94,
+            "jls8": 6.94,
+            "jls9": 6.94,
+            "jls10": 6.94,
+            "jls11": 6.94,
+            "jls12": 6.94,
+            "jls13": 6.94,
+            "jls14": 6.94,
+            "jls15": 6.94
+        },
+        {
+            "name": "吉山梁风场一期",
+            "nameEn": "jls",
+            "time": "合计",
+            "jls1": 6.94,
+            "jls2": 6.94,
+            "jls3": 6.94,
+            "jls4": 6.94,
+            "jls5": 6.94,
+            "jls6": 6.94,
+            "jls7": 6.94,
+            "jls8": 6.94,
+            "jls9": 6.94,
+            "jls10": 6.94,
+            "jls11": 6.94,
+            "jls12": 6.94,
+            "jls13": 6.94,
+            "jls14": 6.94,
+            "jls15": 6.94
+        },
+        {
+            "name": "吉山梁地区预计平均风速",
+            "nameEn": "jls",
+            "time": "白天",
+            "jls1": 6.94,
+            "jls2": 6.94,
+            "jls3": 6.94,
+            "jls4": 6.94,
+            "jls5": 6.94,
+            "jls6": 6.94,
+            "jls7": 6.94,
+            "jls8": 6.94,
+            "jls9": 6.94,
+            "jls10": 6.94,
+            "jls11": 6.94,
+            "jls12": 6.94,
+            "jls13": 6.94,
+            "jls14": 6.94,
+            "jls15": 6.94
+        },
+        {
+            "name": "吉山梁地区预计平均风速",
+            "nameEn": "jls",
+            "time": "夜间",
+            "jls1": 6.94,
+            "jls2": 6.94,
+            "jls3": 6.94,
+            "jls4": 6.94,
+            "jls5": 6.94,
+            "jls6": 6.94,
+            "jls7": 6.94,
+            "jls8": 6.94,
+            "jls9": 6.94,
+            "jls10": 6.94,
+            "jls11": 6.94,
+            "jls12": 6.94,
+            "jls13": 6.94,
+            "jls14": 6.94,
+            "jls15": 6.94
+        },
+        {
+            "name": "吉山梁风场一期",
+            "nameEn": "jls",
+            "time": "白天",
+            "jls1": 6.94,
+            "jls2": 6.94,
+            "jls3": 6.94,
+            "jls4": 6.94,
+            "jls5": 6.94,
+            "jls6": 6.94,
+            "jls7": 6.94,
+            "jls8": 6.94,
+            "jls9": 6.94,
+            "jls10": 6.94,
+            "jls11": 6.94,
+            "jls12": 6.94,
+            "jls13": 6.94,
+            "jls14": 6.94,
+            "jls15": 6.94
+        },
+        {
+            "name": "吉山梁风场一期",
+            "nameEn": "jls",
+            "time": "夜间",
+            "jls1": 6.94,
+            "jls2": 6.94,
+            "jls3": 6.94,
+            "jls4": 6.94,
+            "jls5": 6.94,
+            "jls6": 6.94,
+            "jls7": 6.94,
+            "jls8": 6.94,
+            "jls9": 6.94,
+            "jls10": 6.94,
+            "jls11": 6.94,
+            "jls12": 6.94,
+            "jls13": 6.94,
+            "jls14": 6.94,
+            "jls15": 6.94
+        },
+        {
+            "name": "吉山梁风场一期",
+            "nameEn": "jls",
+            "time": "合计",
+            "jls1": 6.94,
+            "jls2": 6.94,
+            "jls3": 6.94,
+            "jls4": 6.94,
+            "jls5": 6.94,
+            "jls6": 6.94,
+            "jls7": 6.94,
+            "jls8": 6.94,
+            "jls9": 6.94,
+            "jls10": 6.94,
+            "jls11": 6.94,
+            "jls12": 6.94,
+            "jls13": 6.94,
+            "jls14": 6.94,
+            "jls15": 6.94
+        }
+    ]
+}

+ 276 - 0
src/views/powerPrediction/stationPowerContro.vue

@@ -0,0 +1,276 @@
+<template>
+    <div class="stationPowerContro" :class="!theme ? 'themeDark' : 'themeLight'">
+        <div class="stationPowerControSeach">
+            <div class="seach_top">
+                <div class="exceed">
+                    <span class="exceedName">月份:</span>
+                    <el-date-picker v-model="pickerTime" @change="changeTime" format="YYYY-MM" type="month"
+                        placeholder="选择月份" />
+                </div>
+                <el-button type="primary" @click="seachData">计 算</el-button>
+                <el-button @click="exportExcel">导 出</el-button>
+            </div>
+        </div>
+        <div class="stationPowerControTable">
+            <p class="tableTitle">{{titelMonth}}发电量预测(拟合)</p>
+            <span class="tableUnit">单位:m/s,万kwh</span>
+            <div :style="tableHeight">
+                <div class="tablestyle warn-table" style="margin-top: 10px">
+                    <!-- :span-method="mergeSameCells" -->
+                    <el-table :data="tableData" border style="width: 100%" :max-height="tableMainHeight"
+                        ref="stationPowerTable" element-loading-background="rgba(0,0,0,.5)"
+                        :header-cell-style="{ 'text-align': 'center' }">
+                        <el-table-column prop="name" label="名称" width="200" align="center" fixed>
+                        </el-table-column>
+                        <el-table-column prop="time" label="周期" width="73" align="center" fixed>
+                        </el-table-column>
+                        <el-table-column label="日期" align="center">
+                            <el-table-column :prop="item.value" :label="index+1" align="center"
+                                v-for="(item, index) in 40" :key="index">
+                                <template #default="scope">
+                                    {{scope.row[scope.row.nameEn+(index+1)]}}
+                                </template>
+                            </el-table-column>
+                        </el-table-column>
+                    </el-table>
+                </div>
+            </div>
+        </div>
+
+    </div>
+</template>
+
+<script>
+    import {} from "../../api/api";
+
+    import jsonData from "./component/stationPowerControl.json";
+    import dayjs from "dayjs";
+    import * as XLSX from 'xlsx'
+    import {
+        saveAs
+    } from 'file-saver'
+    import * as XLSXD from 'xlsx-js-style'
+    export default {
+        data() {
+            return {
+                pickerTime: "",
+                titelMonth: "",
+                tableData: [],
+                tableColumn: [],
+                echartsTheme: "",
+                theme: null,
+            };
+        },
+        watch: {
+            "$store.state.theme": {
+                handler: function (newVal, oldVal) {
+                    this.theme = newVal;
+                    this.echartsTheme = !newVal ? "dark" : "";
+                    // this.getStationData();
+                },
+                immediate: true,
+            },
+        },
+        created() {
+            this.pickerTime = dayjs(new Date()).format("YYYY-MM")
+            this.titelMonth = this.pickerTime.split("-")[0] + "年" + this.pickerTime.split("-")[1] + "月"
+            this.getTableData();
+        },
+        computed: {
+            tableHeight() {
+                let height = (document.documentElement.clientHeight - 190) / 2 + "px";
+                return {
+                    width: "100%",
+                    height: height,
+                };
+            },
+            tableMainHeight() {
+                let height = (document.documentElement.clientHeight - 180) + "px";
+                return height
+            },
+        },
+        methods: {
+            changeTime(val) {
+
+            },
+            seachData() {
+                let str = dayjs(this.pickerTime).format("YYYY-MM")
+                this.titelMonth = str.split("-")[0] + "年" + str.split("-")[1] + "月"
+            },
+            exportExcel() {
+                let $e = this.$refs.stationPowerTable.$el
+                try {
+                    let $table = $e.querySelector('.el-table__fixed')
+                    if (!$table) {
+                        $table = $e
+                    }
+                    const wb = XLSX.utils.table_to_book($table, {
+                        raw: true
+                    })
+
+                    const wbout = XLSXD.write(wb, {
+                        bookType: 'xlsx',
+                        bookSST: true,
+                        type: 'array'
+                    })
+                    saveAs(
+                        new Blob([wbout], {
+                            type: 'application/octet-stream'
+                        }),
+                        `场站中长期电量预测数据导出.xlsx`,
+                    )
+                } catch (e) {
+                    if (typeof console !== 'undefined') console.error(e)
+                }
+            },
+            getTableData() {
+                let that = this;
+                this.tableData = jsonData.data
+            },
+            mergeSameCells({
+                row,
+                column,
+                rowIndex,
+                columnIndex
+            }) {
+                if (columnIndex === 0) {
+                    const prevRow = this.tableData[rowIndex];
+                    if (prevRow && this.tableData[rowIndex + 1] && this.tableData[rowIndex + 1].name === prevRow.name) {
+                        if (row.name.indexOf('风速') !== -1) {
+                            return {
+                                rowspan: 2,
+                                colspan: 1,
+                            }
+                        } else {
+                            return {
+                                rowspan: 3,
+                                colspan: 1,
+                            }
+                        }
+                    }
+                }
+                // if (columnIndex === 0) {
+                //     if (rowIndex % 2 === 0) {
+                //         return {
+                //             rowspan: 2,
+                //             colspan: 1,
+                //         }
+                //     } else {
+                //         return {
+                //             rowspan: 0,
+                //             colspan: 0,
+                //         }
+                //     }
+                // }
+            }
+        },
+    };
+</script>
+
+<style lang="less">
+    .stationPowerContro {
+        padding: 0 20px 0 20px;
+
+        .stationPowerControSeach {
+            margin-top: 20px;
+
+            .seach_top {
+                display: flex;
+
+                .exceed {
+                    .exceedName {
+                        margin-top: 7px;
+                        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;
+                }
+            }
+        }
+
+        .stationPowerControTable {
+            .tableTitle {
+                display: flex;
+                justify-content: center;
+                font-size: 18px;
+                font-weight: 600;
+            }
+
+            .tableUnit {
+                font-size: 14px;
+            }
+        }
+    }
+
+    .themeDark {
+        background-image: none;
+
+        .stationPowerControSeach {
+            .exceedName {
+                color: #fff;
+            }
+        }
+
+        .stationPowerControTable {
+
+            .tableTitle,
+            .tableUnit {
+                color: #fff;
+            }
+        }
+
+    }
+
+    .themeLight {
+        .stationPowerControSeach {
+            .exceedName {
+                color: #000;
+            }
+        }
+
+        .stationPowerControTable {
+
+            .tableTitle,
+            .tableUnit {
+                color: #000;
+            }
+        }
+
+    }
+</style>