Browse Source

基于风机发电量全寿命周期管控的研究与应用项目中,发电能力分析系统,浆距角分析页面,图表展示增加风速曲线,纵坐标固定0到100,增加浆距角风速曲线页签曲线功能,表格数据展示时,桨距角不一致时颜色标为红色。基于风机发电量全寿命周期管控的研究与应用项目中,报表模块,在首页点击智能报表菜单时,默认打开关口表-新庄风电场报表;发电能力分析系统,所有带有表格的页面增加导出功能;首页,计划电量完成情况区域,只保留风,隐藏掉,光,总 按钮。

SunZehao 1 year ago
parent
commit
35273a5264

+ 21 - 2
src/components/generatingCapacityComponent/table.vue

@@ -14,7 +14,7 @@
             <!-- <el-button size="small" type="primary" @click="funExport" :disabled="!tableId">数据导出</el-button> -->
         </div>
         <el-table :data="data" size="small" ref="windLifeTable" v-loading="loading" :max-height="tableHeight"
-            :style="{ width: '100%'}">
+            :style="{ width: '100%'}" :row-class-name="rowstyle ? tableRowClassName : ''">
             <el-table-column align="center" show-overflow-tooltip v-for="(item,index) in column" :key="index"
                 :prop="item.prop" :label="item.label" sortable resizable :min-width="item.width? item.width : 70" />
             <template #empty>
@@ -60,6 +60,12 @@
                     return false;
                 },
             },
+            rowstyle: {
+                type: Boolean,
+                default: () => {
+                    return false;
+                },
+            },
             tableId: {
                 type: String,
                 default: () => {
@@ -87,6 +93,16 @@
             }
         },
         methods: {
+            tableRowClassName({
+                row,
+                rowIndex
+            }) {
+                if (!row.eqTag) {
+                    return 'warning-row';
+                } else {
+                    return ''
+                }
+            },
             handleExport() {
                 let $e = this.$refs.windLifeTable.$el
                 try {
@@ -116,7 +132,7 @@
         }
     }
 </script>
-<style lang="less" scoped>
+<style lang="less">
     .warn-table {
 
 
@@ -146,6 +162,9 @@
             }
         }
 
+        .warning-row {
+            background: oldlace;
+        }
 
         .el-table__empty-block {
             .el-table__empty-text {

+ 22 - 0
src/views/generatingCapacity/dataAnalysis/angleAnalysis/components/current-scatter-chart.vue

@@ -302,15 +302,30 @@
                     }, ],
                     //y轴没有显式设置,根据值自动生成y轴
                     yAxis: [{
+                        type: 'value',
                         splitLine: {
                             show: false
                         },
                         position: 'left',
                         min: 0,
+                        max: 100,
                         name: '度',
                         nameTextStyle: {
                             color: '#838383'
                         },
+                    }, {
+                        type: 'value',
+                        splitLine: {
+                            show: false
+                        },
+                        min: 0,
+                        max: 25,
+                        // splitLine: {
+                        //     lineStyle: {
+                        //         color: ['#393F4D']
+                        //     }
+                        // },
+                        name: '单位:m/s'
                     }],
                     animation: true,
                     dataset: that.dataSet.length ? JSON.parse(that.dataSet) : [],
@@ -318,6 +333,13 @@
                     series: that.seriesData,
                 };
 
+                option.legend.selected = {
+                    '叶片1': true,
+                    '叶片2': true,
+                    '叶片3': true,
+                    '风速': false
+                };
+
                 that.resize = function () {
                     myChart.resize();
                 };

+ 76 - 4
src/views/generatingCapacity/dataAnalysis/angleAnalysis/index.vue

@@ -18,11 +18,13 @@
                     <el-tabs v-model="activeTab">
                         <el-tab-pane label="图表展示" name="1">
                         </el-tab-pane>
-                        <el-tab-pane label="表格数据" name="2">
+                        <el-tab-pane label="桨距角风速曲线" name="2">
                         </el-tab-pane>
-                        <div v-if="activeTab === '2'" :style="{ height: tableHeight }">
+                        <el-tab-pane label="表格数据" name="3">
+                        </el-tab-pane>
+                        <div v-if="activeTab === '3'" :style="{ height: tableHeight }">
                             <table-cop class="" :data="tableData" :column="tableColumn" :theme="theme"
-                                :height="tableHeight" tableId="1" tableName="浆距角分析"></table-cop>
+                                :height="tableHeight" tableId="1" :tableName="tableName" :rowstyle="true"></table-cop>
                         </div>
                         <div v-if="activeTab === '1'" :style="{ height: tableHeight }">
                             <!-- :height="`calc( ${tableHeight})`" -->
@@ -33,6 +35,11 @@
                                 :dataSet="dataSet" :theme="theme" :echartsTheme="echartsTheme"
                                 @getSelected="funChartSelect" />
                         </div>
+                        <div v-if="activeTab === '2'" :style="{ height: tableHeight }">
+                            <!-- <div id="speedLine" style="width:100%;height:100%"></div> -->
+                            <bar-chart-cop width="100%" height="100%" :theme="theme" :echartsTheme="echartsTheme"
+                                :xAxis="linexAxis" :yAxis="lineyAxis" :series="lineSeries"></bar-chart-cop>
+                        </div>
                     </el-tabs>
                 </div>
             </div>
@@ -43,12 +50,15 @@
     import excelCop from '@/components/generatingCapacityComponent/excel.vue'
     import treeCop from '@/components/generatingCapacityComponent/tree.vue'
     import tableCop from '@/components/generatingCapacityComponent/table.vue'
+    import barChartCop from '../spaceAnalysis/components/barChart.vue'
+    import * as echarts from 'echarts'
     import {
         ElMessage
     } from 'element-plus';
     import {
         onMounted,
         ref,
+        reactive,
         onActivated,
         watch
     } from 'vue'
@@ -63,10 +73,18 @@
     const excelHeight = ref(window.innerHeight - 120 + 'px') //excel高度
     /**excel 开始 */
     const excelList = ref([])
+    const speedParams = ref({})
     const funExcelChange = async (obj) => { //点击excel项时
         funSubmit({
             ids: obj.id
         })
+        tableName.value = obj.name
+        getSpeedLine({
+            ids: obj.id
+        })
+        speedParams.value = {
+            ids: obj.id
+        }
     }
     /**tree 开始 */
     const treeData = ref([])
@@ -184,12 +202,14 @@
         let exTime = []
         let yp1 = [],
             yp2 = [],
-            yp3 = []
+            yp3 = [],
+            speed = []
         res.data.bw.forEach(it => {
             exTime.push(it.time)
             yp1.push(it.yp1)
             yp2.push(it.yp2)
             yp3.push(it.yp3)
+            speed.push(it.speed)
         })
         tableData.value = res.data.bw
         seriesAllData.value = res.data.bw
@@ -234,9 +254,61 @@
                 smooth: false, //这个是把线变成曲线
                 data: yp3,
                 xAxisIndex: 0,
+            },
+            {
+                name: "风速",
+                type: "line",
+                yAxisIndex: 1,
+                symbol: "line", //设定为实心点
+                symbolSize: 0, //设定实心点的大小
+                smooth: false, //这个是把线变成曲线
+                data: speed,
+                xAxisIndex: 0,
             }
         ]
     }
+    const linexAxis = reactive({
+        type: 'category',
+        name: '风速',
+        data: []
+    })
+    const lineyAxis = reactive({
+        type: 'value',
+        name: '度',
+        splitLine: {
+            show: false
+        },
+        axisTick: {
+            show: true
+        },
+        axisLine: {
+            onZero: false
+        }
+    })
+    const lineSeries = reactive([{
+        name: "桨距角风速曲线",
+        type: "line",
+        data: [],
+        symbol: "line", //设定为实心点
+        symbolSize: 0, //设定实心点的大小
+    }])
+    const getSpeedLine = async (params) => {
+        const speedRes = await httpRequest.get('/blade/curve', {
+            params: params
+        })
+        if (speedRes.code === 200) {
+            if (speedRes.data) {
+                let xAsis = []
+                let series = []
+                for (const item in speedRes.data) {
+                    xAsis.push(item)
+                    series.push(speedRes.data[item])
+                }
+                linexAxis.data = xAsis
+                lineSeries[0].data = series
+            }
+        }
+    }
     /**created */
     // funGetTree()
     const theme = ref(null)

+ 8 - 5
src/views/generatingCapacity/dataAnalysis/combine/components/current-scatter-chart.vue

@@ -1,5 +1,6 @@
 <template>
-    <div class="chart" :id="id"></div>
+    <div class="chart" :id="id">
+    </div>
 </template>
 
 <script>
@@ -117,9 +118,10 @@
                     //标题
                     title: {
                         text: that.chartTitle,
-                        right: 460,
+                        // right: 460,
+                        left: 'center',
                         // left: 110,
-                        top: 4,
+                        // top: 4,
                         textStyle: {
                             fontSize: 16,
                             color: that.echartsTheme === "dark" ? partten.getColor("white") : "#000",
@@ -218,8 +220,8 @@
                     legend: {
                         show: that.showLegend,
                         data: ["拟合功率", "保证功率", "无用点", "有用点", "Cp值"],
-                        right: "120",
-                        top: "5",
+                        right: "center",
+                        top: "25",
                         // icon: "circle",
                         itemWidth: 6,
                         inactiveColor: that.echartsTheme === "dark" ?
@@ -313,6 +315,7 @@
                         },
                     });
                 }
+
                 myChart.off("brushSelected");
                 myChart.on("brushSelected", (params) => {
                     that.$emit("getSelected", params.batch || []);

+ 2 - 2
src/views/home/index.vue

@@ -246,8 +246,8 @@
                         <div class="analysRadio">
                             <el-radio-group v-model="powerPlanRadio">
                                 <el-radio-button label="风" value="风" />
-                                <el-radio-button label="光" value="光" disabled />
-                                <el-radio-button label="总" value="总" disabled />
+                                <!-- <el-radio-button label="光" value="光" disabled />
+                                <el-radio-button label="总" value="总" disabled /> -->
                             </el-radio-group>
                         </div>
                         <div class="planMain">