|
@@ -0,0 +1,595 @@
|
|
|
+<template>
|
|
|
+ <div class="powerLinefitting">
|
|
|
+ <div class="powerLinefitting_topAll">
|
|
|
+ <div class="powerLinefitting_top">
|
|
|
+ <div class="form-wrapper">
|
|
|
+ <div class="select-wrapper">
|
|
|
+ <el-select
|
|
|
+ size="mini"
|
|
|
+ v-model="tabEvent"
|
|
|
+ placeholder="请选择"
|
|
|
+ @change="changeBtn"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in tabOptions"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-select
|
|
|
+ size="mini"
|
|
|
+ v-model="companyVal"
|
|
|
+ placeholder="请选择"
|
|
|
+ @change="changeCompan"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in companyOptions"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.aname"
|
|
|
+ :value="item.id"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-select
|
|
|
+ size="mini"
|
|
|
+ v-model="stationVal"
|
|
|
+ placeholder="请选择"
|
|
|
+ clearable
|
|
|
+ @change="changeStation"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in stationOptions"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.aname"
|
|
|
+ :value="item.id"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-select
|
|
|
+ size="mini"
|
|
|
+ v-model="windVal"
|
|
|
+ placeholder="请选择"
|
|
|
+ clearable
|
|
|
+ @change="changeWind"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in windsOptions"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.aname"
|
|
|
+ :value="item.nemCode"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div class="date-wrapper">
|
|
|
+ <div class="date-item-wrapper">
|
|
|
+ 开始时间
|
|
|
+ <div class="date-item-date">
|
|
|
+ <el-date-picker
|
|
|
+ size="mini"
|
|
|
+ v-model="starTime"
|
|
|
+ type="datetime"
|
|
|
+ value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ placeholder="选择时间"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="date-item-wrapper">
|
|
|
+ 结束时间
|
|
|
+ <div class="date-item-date">
|
|
|
+ <el-date-picker
|
|
|
+ size="mini"
|
|
|
+ v-model="endTime"
|
|
|
+ type="datetime"
|
|
|
+ value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ placeholder="选择时间"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="but">
|
|
|
+ <el-button round size="mini" class="buttons" @click="getTableData"
|
|
|
+ >查询</el-button
|
|
|
+ >
|
|
|
+ <el-button round size="mini" class="buttons" @click="downXlsxFn"
|
|
|
+ >导出</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style="background: rgba(0, 0, 0, 0.4)">
|
|
|
+ <div class="powerLinefitting_title clearfix">
|
|
|
+ <div class="leftContent floatLeft"><span>功率曲线分析</span></div>
|
|
|
+ <div class="rightContent floatRight"></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="powerLinefitting_Table">
|
|
|
+ <el-table
|
|
|
+ :data="stationAnalyseData"
|
|
|
+ stripe
|
|
|
+ size="mini"
|
|
|
+ height="48vh"
|
|
|
+ ref="fitting_table"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ v-for="(item, index) in tableHeader"
|
|
|
+ :key="index"
|
|
|
+ sortable
|
|
|
+ :prop="item.code"
|
|
|
+ :label="item.title"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="powerLinefitting_Echarts">
|
|
|
+ <div class="chart-name">
|
|
|
+ <div class="point left bottom"></div>
|
|
|
+ <div class="point right bottom"></div>
|
|
|
+ <span>功率曲线</span>
|
|
|
+ </div>
|
|
|
+ <div class="fittingEchartSty">
|
|
|
+ <doubleLineChart
|
|
|
+ :tabEvent="tabEvent"
|
|
|
+ :unit="'(W/m²)'"
|
|
|
+ :list="lineList"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { getApipowerAnalyse } from "@/api/monthlyPerformanceAnalysis";
|
|
|
+import {
|
|
|
+ GetOrganization,
|
|
|
+ GetStationByCompany,
|
|
|
+ GetwtByWp,
|
|
|
+} from "@/api/headerNav.js";
|
|
|
+import utils from "@/utils/downXlsx";
|
|
|
+import dayjs from "dayjs";
|
|
|
+import doubleLineChart from "@/components/chart/line/double-line-chart.vue";
|
|
|
+export default {
|
|
|
+ name: "powerLineAnalyse", //功率曲线分析
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ companyVal: "",
|
|
|
+ companyOptions: [],
|
|
|
+ stationVal: "",
|
|
|
+ stationOptions: [],
|
|
|
+ windVal: "",
|
|
|
+ windsOptions: [],
|
|
|
+ starTime: "",
|
|
|
+ endTime: "",
|
|
|
+ stationAnalyseData: [],
|
|
|
+ tableHeader: [
|
|
|
+ { title: "逆变器", code: "name" },
|
|
|
+ { title: "时间", code: "time" },
|
|
|
+ { title: "实际功率", code: "sjgl" },
|
|
|
+ { title: "理论功率", code: "ycgl" },
|
|
|
+ ],
|
|
|
+ tabEvent: -2,
|
|
|
+ tabOptions: [
|
|
|
+ { id: -1, name: "风电" },
|
|
|
+ { id: -2, name: "光伏" },
|
|
|
+ ],
|
|
|
+ lineList: [],
|
|
|
+ };
|
|
|
+ },
|
|
|
+ components: { doubleLineChart },
|
|
|
+ created() {
|
|
|
+ this.starTime = dayjs().startOf("day").format("YYYY-MM-DD HH:mm:ss");
|
|
|
+ this.endTime = dayjs().format("YYYY-MM-DD HH:mm:ss");
|
|
|
+ this.getCompanyData();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //切换风电光伏
|
|
|
+ changeBtn() {
|
|
|
+ this.$router.push({
|
|
|
+ path: "/economicsOperation/powerCurve/powerLineAnalyseFd",
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 获取公司列表
|
|
|
+ async getCompanyData() {
|
|
|
+ this.companyOptions = [];
|
|
|
+ const datas = await GetOrganization({ type: this.tabEvent });
|
|
|
+ this.companyOptions = datas.data;
|
|
|
+ this.companyVal = datas.data[0]?.id;
|
|
|
+ this.getStationData(this.companyVal);
|
|
|
+ },
|
|
|
+ // 获取场站列表
|
|
|
+ async getStationData() {
|
|
|
+ this.stationOptions = [];
|
|
|
+ let params = {
|
|
|
+ type: this.tabEvent,
|
|
|
+ companyids: this.companyVal,
|
|
|
+ };
|
|
|
+ const datas = await GetStationByCompany(params);
|
|
|
+ this.stationOptions = datas.data;
|
|
|
+ this.stationVal = datas.data[0].id;
|
|
|
+ this.getWindData(this.stationVal);
|
|
|
+ },
|
|
|
+ // 获取风机
|
|
|
+ async getWindData(stationVal) {
|
|
|
+ this.windsOptions = [];
|
|
|
+ const datas = await GetwtByWp(stationVal);
|
|
|
+ if (datas.data.length) {
|
|
|
+ this.windsOptions = datas.data;
|
|
|
+ this.windVal = datas.data[0].nemCode;
|
|
|
+ } else {
|
|
|
+ this.windsOptions = datas.data;
|
|
|
+ this.windVal = "";
|
|
|
+ }
|
|
|
+ this.getTableData();
|
|
|
+ },
|
|
|
+ //切换公司
|
|
|
+ changeCompan(val) {
|
|
|
+ this.companyVal = val;
|
|
|
+ this.getStationData();
|
|
|
+ },
|
|
|
+ //切换场站
|
|
|
+ changeStation(val) {
|
|
|
+ this.stationVal = val;
|
|
|
+ this.getWindData(val);
|
|
|
+ },
|
|
|
+ //切换设备
|
|
|
+ changeWind(val) {
|
|
|
+ this.windVal = val;
|
|
|
+ this.getTableData();
|
|
|
+ },
|
|
|
+ async getTableData() {
|
|
|
+ let params = {
|
|
|
+ companys: this.companyVal,
|
|
|
+ type: this.tabEvent,
|
|
|
+ wpids: this.stationVal,
|
|
|
+ starttime: this.starTime,
|
|
|
+ endtime: this.endTime,
|
|
|
+ windturbineids: this.windVal,
|
|
|
+ };
|
|
|
+ const { data } = await getApipowerAnalyse(params);
|
|
|
+ if (data.length) {
|
|
|
+ this.stationAnalyseData = data.map((item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ time: dayjs(item.time).format("YYYY-MM-DD HH:mm:ss"),
|
|
|
+ };
|
|
|
+ });
|
|
|
+ this.lineList = [
|
|
|
+ {
|
|
|
+ name: "实际功率",
|
|
|
+ type: "line",
|
|
|
+ stack: "Total",
|
|
|
+ data: data.map((item) => item.sjgl),
|
|
|
+ time: data.map((item) =>
|
|
|
+ dayjs(item.time).format("YYYY-MM-DD HH:mm:ss")
|
|
|
+ ),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "理论功率",
|
|
|
+ type: "line",
|
|
|
+ stack: "Total",
|
|
|
+ data: data.map((item) => item.ycgl),
|
|
|
+ time: data.map((item) =>
|
|
|
+ dayjs(item.time).format("YYYY-MM-DD HH:mm:ss")
|
|
|
+ ),
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ } else {
|
|
|
+ this.stationAnalyseData = [];
|
|
|
+ this.lineList = [
|
|
|
+ {
|
|
|
+ name: "实际功率",
|
|
|
+ type: "line",
|
|
|
+ stack: "Total",
|
|
|
+ data: [],
|
|
|
+ time: [],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "理论功率",
|
|
|
+ type: "line",
|
|
|
+ stack: "Total",
|
|
|
+ data: [],
|
|
|
+ time: [],
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ downXlsxFn() {
|
|
|
+ let header = [];
|
|
|
+ this.tableHeader.forEach((it) => {
|
|
|
+ header.push(it.title);
|
|
|
+ });
|
|
|
+ utils.exportExcel(
|
|
|
+ this.$refs["fitting_table"].$el,
|
|
|
+ header,
|
|
|
+ "功率曲线分析"
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less">
|
|
|
+.powerLinefitting {
|
|
|
+ padding: 0 23px;
|
|
|
+ .powerLinefitting_topAll {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ .powerLinefitting_top {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 10px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ .form-wrapper {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .select-wrapper {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .el-select {
|
|
|
+ width: 155px;
|
|
|
+ .el-input .el-input__inner {
|
|
|
+ width: 150px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .date-wrapper {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 14px;
|
|
|
+ font-family: Microsoft YaHei;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #b3b3b3;
|
|
|
+ margin-left: 10px;
|
|
|
+ .date-item-wrapper {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin-right: 15px;
|
|
|
+ .date-item-date {
|
|
|
+ margin-left: 10px;
|
|
|
+ .el-input .el-input__inner {
|
|
|
+ font-size: 13px;
|
|
|
+ color: #b3b3b3;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .station {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 14px;
|
|
|
+ font-family: Microsoft YaHei;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #b3b3b3;
|
|
|
+ margin-right: 25px;
|
|
|
+ }
|
|
|
+ .search-input {
|
|
|
+ margin-left: 10px;
|
|
|
+ .el-input__inner {
|
|
|
+ width: 175px;
|
|
|
+ }
|
|
|
+ .el-input__suffix {
|
|
|
+ right: -50px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .but {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-content: center;
|
|
|
+ .buttons:nth-child(1) {
|
|
|
+ background: rgba(0, 70, 199, 0.6);
|
|
|
+ border: 1px solid #1f51ae;
|
|
|
+ border-radius: 13px;
|
|
|
+ color: #fff;
|
|
|
+ &:hover {
|
|
|
+ background: rgba(14, 90, 229, 0.9);
|
|
|
+ border-radius: 13px;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .buttons:nth-child(2) {
|
|
|
+ background: rgba(67, 81, 107, 0.3);
|
|
|
+ border: 1px solid #3b4c6c;
|
|
|
+ border-radius: 13px;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #b3b3b3;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .selections {
|
|
|
+ display: flex;
|
|
|
+ margin-top: 10px;
|
|
|
+ position: relative;
|
|
|
+ right: 120px;
|
|
|
+ .selections_btn {
|
|
|
+ flex: 0 0 55px;
|
|
|
+ text-align: center;
|
|
|
+ height: 33px;
|
|
|
+ line-height: 33px;
|
|
|
+ margin-right: 8px;
|
|
|
+ color: #fff;
|
|
|
+ font-size: 1.296vh;
|
|
|
+ background: fade(#606769, 20);
|
|
|
+ border: 1px solid fade(#606769, 20);
|
|
|
+ border-radius: 20px;
|
|
|
+ &:hover,
|
|
|
+ &.active {
|
|
|
+ background: fade(#0046c7, 80);
|
|
|
+ border: 1px solid #0046c7;
|
|
|
+ color: #b9b9b9;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .powerLinefitting_title {
|
|
|
+ padding-left: 10px;
|
|
|
+ .leftContent {
|
|
|
+ width: 242px;
|
|
|
+ height: 41px;
|
|
|
+ line-height: 41px;
|
|
|
+ background: url("../../../../../assets/imgs/title_left_bg.png");
|
|
|
+ span {
|
|
|
+ font-size: 16px;
|
|
|
+ font-family: Microsoft YaHei;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #ffffff;
|
|
|
+ margin-left: 25px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .floatLeft {
|
|
|
+ float: left;
|
|
|
+ }
|
|
|
+ .floatRight {
|
|
|
+ float: right;
|
|
|
+ }
|
|
|
+ .rightContent {
|
|
|
+ width: 212px;
|
|
|
+ height: 28px;
|
|
|
+ margin-top: 13px;
|
|
|
+ background: url("../../../../../assets/imgs/title_right_bg.png");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .clearfix::after {
|
|
|
+ content: "";
|
|
|
+ clear: both;
|
|
|
+ height: 0;
|
|
|
+ line-height: 0;
|
|
|
+ visibility: hidden;
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+ .clearfix {
|
|
|
+ zoom: 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ .powerLinefitting_Table {
|
|
|
+ margin: 0 5px 5px 5px;
|
|
|
+ padding-bottom: 10px;
|
|
|
+ .el-table--mini {
|
|
|
+ margin: 5px;
|
|
|
+ .el-table__header-wrapper {
|
|
|
+ tr {
|
|
|
+ background: rgba(83, 89, 104, 0.3) !important;
|
|
|
+ th {
|
|
|
+ vertical-align: top !important;
|
|
|
+ }
|
|
|
+ .cell {
|
|
|
+ color: #b3b3b3;
|
|
|
+ font-family: MicrosoftYaHei;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .el-table__body-wrapper {
|
|
|
+ tr {
|
|
|
+ &:nth-child(2n) {
|
|
|
+ background: rgba(83, 89, 104, 0.05) !important;
|
|
|
+ }
|
|
|
+ .cell {
|
|
|
+ color: #d8d8d9;
|
|
|
+ font-family: ArialMT;
|
|
|
+ font-size: 13px;
|
|
|
+ height: 25px !important;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .historyBtn {
|
|
|
+ background: #43516b;
|
|
|
+ border-radius: 15px;
|
|
|
+ margin-top: 5px;
|
|
|
+ border: 1px solid #43516b;
|
|
|
+ span {
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .powerLinefitting_Echarts {
|
|
|
+ margin-top: 10px;
|
|
|
+ width: 100%;
|
|
|
+ background: rgba(0, 0, 0, 0.45);
|
|
|
+ position: relative;
|
|
|
+ height: 39px;
|
|
|
+ // border-bottom: 1px solid rgba(153, 153, 153, 0.5);
|
|
|
+ font-size: 16px;
|
|
|
+ font-family: Microsoft YaHei;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #ffffff;
|
|
|
+ .chart-name {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ padding-left: 20px;
|
|
|
+ position: relative;
|
|
|
+ height: 39px;
|
|
|
+ width: 98%;
|
|
|
+ margin-left: 1%;
|
|
|
+ border-bottom: 1px solid rgba(153, 153, 153, 0.5);
|
|
|
+ font-size: 16px;
|
|
|
+ font-family: Microsoft YaHei;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #ffffff;
|
|
|
+ .point {
|
|
|
+ width: 6px;
|
|
|
+ height: 1px;
|
|
|
+ background-color: #ffffff;
|
|
|
+ position: absolute;
|
|
|
+
|
|
|
+ &.left {
|
|
|
+ left: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ &.right {
|
|
|
+ right: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ &.top {
|
|
|
+ top: -1px;
|
|
|
+ }
|
|
|
+
|
|
|
+ &.bottom {
|
|
|
+ bottom: -1px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .fittingEchartSty {
|
|
|
+ width: 100%;
|
|
|
+ height: 280px;
|
|
|
+ background: rgba(0, 0, 0, 0.45);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .el-overlay {
|
|
|
+ .el-overlay-dialog {
|
|
|
+ overflow-y: hidden !important;
|
|
|
+ .powerLinefittinghistoryModel {
|
|
|
+ margin-top: 0 !important;
|
|
|
+ .el-dialog__body {
|
|
|
+ padding-top: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .contrastModal {
|
|
|
+ .el-dialog__body {
|
|
|
+ padding-top: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-picker__popper .el-date-range-picker__header .el-picker-panel__icon-btn {
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ .el-picker__popper .el-date-table .in-range div {
|
|
|
+ background: #43516b;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|