|
@@ -0,0 +1,556 @@
|
|
|
+<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="dateTime"
|
|
|
+ type="date"
|
|
|
+ value-format="YYYY-MM-DD"
|
|
|
+ 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="75vh"
|
|
|
+ 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"
|
|
|
+ >
|
|
|
+ <template #default="scope" v-if="item.title === '操作'">
|
|
|
+ <span class="historyBtn" @click="handleRowClick(scope.row)"
|
|
|
+ >详情</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div class="pagination-wrapper">
|
|
|
+ <el-pagination
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="page.currentPage"
|
|
|
+ :page-size="page.pagesize"
|
|
|
+ layout="total, prev, pager, next, jumper"
|
|
|
+ :total="page.total"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-dialog
|
|
|
+ class="dialogs"
|
|
|
+ width="85%"
|
|
|
+ top="8vh"
|
|
|
+ v-model="dialogCurveVisible"
|
|
|
+ :show-close="true"
|
|
|
+ >
|
|
|
+ <template #title>
|
|
|
+ <div class="dialog-title">
|
|
|
+ <img
|
|
|
+ class="dialog-title-img"
|
|
|
+ src="@/assets/img/images/dialog-title.png"
|
|
|
+ />
|
|
|
+ <div class="title">{{ dialogTitle }}</div>
|
|
|
+ <!-- <i class="el-icon-full-screen" @click="c"></i>-->
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <div class="dialog-body" style="height: 65vh; width: 100%">
|
|
|
+ <HistoryDetail ref="cleanDetail" />
|
|
|
+ <img
|
|
|
+ class="dialog-img"
|
|
|
+ style="bottom: 65px"
|
|
|
+ src="@/assets/img/images/dialog.png"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { getApiCleanAnalyse } from "@/api/monthlyPerformanceAnalysis";
|
|
|
+
|
|
|
+import {
|
|
|
+ GetOrganization,
|
|
|
+ GetStationByCompany,
|
|
|
+ GetwtByWp,
|
|
|
+} from "@/api/headerNav.js";
|
|
|
+import utils from "@/utils/downXlsx";
|
|
|
+import dayjs from "dayjs";
|
|
|
+import HistoryDetail from "./components/powerDetails.vue";
|
|
|
+export default {
|
|
|
+ name: "cleanAnalyse", //清洗分析
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ companyVal: "",
|
|
|
+ companyOptions: [],
|
|
|
+ stationVal: "",
|
|
|
+ stationOptions: [],
|
|
|
+ windVal: "",
|
|
|
+ windsOptions: [],
|
|
|
+ dateTime: "",
|
|
|
+ stationAnalyseData: [],
|
|
|
+ stationLineData: [],
|
|
|
+ tableHeader: [
|
|
|
+ { title: "支路名称", code: "aname" },
|
|
|
+ { title: "实际功率", code: "actualPower" },
|
|
|
+ { title: "理论功率", code: "theoreticalPower" },
|
|
|
+ { title: "曲线偏差率", code: "curveDeviationRate" },
|
|
|
+ { title: "操作" },
|
|
|
+ ],
|
|
|
+ tabEvent: -2,
|
|
|
+ tabOptions: [{ id: -2, name: "光伏" }],
|
|
|
+ page: {
|
|
|
+ pagesize: 20,
|
|
|
+ currentPage: 1,
|
|
|
+ total: 0,
|
|
|
+ },
|
|
|
+ dialogCurveVisible: false,
|
|
|
+ dialogTitle: "",
|
|
|
+ dialogFull: false,
|
|
|
+ inverter: {},
|
|
|
+ };
|
|
|
+ },
|
|
|
+ components: { HistoryDetail },
|
|
|
+ created() {
|
|
|
+ this.dateTime = dayjs().add(-1, "day").format("YYYY-MM-DD");
|
|
|
+ this.getCompanyData();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //切换风电光伏
|
|
|
+ changeBtn() {},
|
|
|
+ // 获取公司列表
|
|
|
+ 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.getTableData();
|
|
|
+ },
|
|
|
+ //切换设备
|
|
|
+ changeWind(val) {
|
|
|
+ this.windVal = val;
|
|
|
+ this.getTableData();
|
|
|
+ },
|
|
|
+ async getTableData() {
|
|
|
+ let params = {
|
|
|
+ companys: this.companyVal,
|
|
|
+ wpid: this.stationVal,
|
|
|
+ wtid: this.windVal,
|
|
|
+ date: this.dateTime,
|
|
|
+ pageSize: this.page.pagesize,
|
|
|
+ pageNum: this.page.currentPage,
|
|
|
+ };
|
|
|
+ const { data } = await getApiCleanAnalyse(params);
|
|
|
+ this.stationAnalyseData = data.records.map((item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ actualPower: item.actualPower ? item.actualPower.toFixed(2) : 0,
|
|
|
+ theoreticalPower: item.theoreticalPower
|
|
|
+ ? item.theoreticalPower.toFixed(2)
|
|
|
+ : 0,
|
|
|
+ curveDeviationRate: item.curveDeviationRate
|
|
|
+ ? item.curveDeviationRate.toFixed(2)
|
|
|
+ : 0,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ this.page.total = data.total;
|
|
|
+ },
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.page.currentPage = val;
|
|
|
+ this.getTableData();
|
|
|
+ },
|
|
|
+ handleRowClick(row) {
|
|
|
+ this.dialogCurveVisible = true;
|
|
|
+ this.dialogTitle = "支路功率曲线";
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.cleanDetail.starttime = dayjs()
|
|
|
+ .add(-1, "day")
|
|
|
+ .startOf("day")
|
|
|
+ .format("YYYY-MM-DD HH:mm:ss");
|
|
|
+ this.$refs.cleanDetail.endtime = dayjs()
|
|
|
+ .add(-1, "day")
|
|
|
+ .endOf("day")
|
|
|
+ .format("YYYY-MM-DD HH:mm:ss");
|
|
|
+ this.$refs.cleanDetail.init(row);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ 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 {
|
|
|
+ .historyBtn {
|
|
|
+ cursor: pointer;
|
|
|
+ color: #1c99ff;
|
|
|
+ padding: 3px 10px;
|
|
|
+ }
|
|
|
+ margin: 0 5px 5px 5px;
|
|
|
+ padding-bottom: 10px;
|
|
|
+ .pagination-wrapper {
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+ padding-right: 20px;
|
|
|
+ .el-pagination {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .btn-prev,
|
|
|
+ .btn-next,
|
|
|
+ .btn-quickprev,
|
|
|
+ .btn-quicknext,
|
|
|
+ .el-pager,
|
|
|
+ .number {
|
|
|
+ background: rgba(58, 63, 75, 0.4);
|
|
|
+ color: #fff;
|
|
|
+ border-radius: 2px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-pager .active {
|
|
|
+ background: #083c94;
|
|
|
+ color: #fff;
|
|
|
+ border-radius: 2px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-pagination__total,
|
|
|
+ .el-pagination__jump {
|
|
|
+ color: #fff;
|
|
|
+ .el-input__inner {
|
|
|
+ background: rgba(58, 63, 75, 0.2);
|
|
|
+ border: 1px solid #3e4349;
|
|
|
+ color: #fff;
|
|
|
+ border-radius: 2px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .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;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .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>
|