|
@@ -0,0 +1,314 @@
|
|
|
+<template>
|
|
|
+ <div class="historysingleMachine">
|
|
|
+ <div class="historysingleMachine_top">
|
|
|
+ <div class="station">
|
|
|
+ 风机名称:
|
|
|
+ <el-select
|
|
|
+ size="mini"
|
|
|
+ v-model="stationVal"
|
|
|
+ placeholder="请选择"
|
|
|
+ @change="changeStation"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in stationOptions"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div class="but">
|
|
|
+ <el-button round size="mini" class="buttons" @click="seachData"
|
|
|
+ >搜 索</el-button
|
|
|
+ >
|
|
|
+ <el-button round size="mini" class="buttons" @click="downXlsxFn"
|
|
|
+ >导出</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="economicTable1">
|
|
|
+ <el-table
|
|
|
+ :data="historysingleMachineData"
|
|
|
+ stripe
|
|
|
+ size="mini"
|
|
|
+ height="calc(100% - 40px)"
|
|
|
+ ref="historysingleTable"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ v-for="(item, index) in tableHeader"
|
|
|
+ :key="index"
|
|
|
+ sortable
|
|
|
+ :prop="item.code"
|
|
|
+ :label="item.title"
|
|
|
+ show-overflow-tooltip
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template #header="scope">
|
|
|
+ <div>{{ scope.column.label }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-pagination
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="page.currentPage"
|
|
|
+ :page-size="page.pagesize"
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ :page-sizes="[21, 50, 100, 500]"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="page.total"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import {
|
|
|
+ getApihistorywindturbinegoodnesslist,
|
|
|
+ getApihistorywindturbinegoodnesslistGf,
|
|
|
+ getApiequipmentListByWp,
|
|
|
+} from "@/api/monthlyPerformanceAnalysis";
|
|
|
+import utils from "@/utills/downXlsx";
|
|
|
+import dataJson from "./dataJson.json"
|
|
|
+export default {
|
|
|
+ props: {
|
|
|
+ // historyCompanyOptions: {
|
|
|
+ // type: Array,
|
|
|
+ // default: () => [],
|
|
|
+ // },
|
|
|
+ tabIndex: { type: Number, required: true },
|
|
|
+ historyStationOptions: {
|
|
|
+ type: Array,
|
|
|
+ default: () => [],
|
|
|
+ },
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ // hiscompanyVal: "",
|
|
|
+ hisstationVal: "",
|
|
|
+ hiswindVal: "",
|
|
|
+ pickerTimer: [],
|
|
|
+ historysingleMachineData: [],
|
|
|
+ hisWindOptions: [],
|
|
|
+ showBtn: true,
|
|
|
+ page: {
|
|
|
+ pagesize: 21,
|
|
|
+ currentPage: 1,
|
|
|
+ total: 0,
|
|
|
+ },
|
|
|
+ tableHeader: [
|
|
|
+ { title: "风机名称", code: "wtName" },
|
|
|
+ { title: "离线小时", code: "dayValueE10" },
|
|
|
+ { title: "故障小时", code: "dayValueE11" },
|
|
|
+ { title: "维护小时", code: "dayValueE12" },
|
|
|
+ { title: "最大功率", code: "dayValueE13" },
|
|
|
+ { title: "最小功率", code: "dayValueE14" },
|
|
|
+ { title: "最大风速", code: "dayValueE15" },
|
|
|
+ { title: "最小风速", code: "dayValueE16" },
|
|
|
+ { title: "平均功率", code: "dayValueE17" },
|
|
|
+ { title: "发电量", code: "dayValueE18" },
|
|
|
+ { title: "容量", code: "dayValueE19" },
|
|
|
+ { title: "设备利用小时数", code: "dayValueE20" },
|
|
|
+ { title: "设备可利用率", code: "dayValueE21" },
|
|
|
+ { title: "等效可用系数", code: "dayValueE22" },
|
|
|
+ { title: "有效风时数", code: "dayValueE23" },
|
|
|
+ { title: "安全天数", code: "dayValueE24" },
|
|
|
+ { title: "日历小时", code: "dayValueE25" },
|
|
|
+ { title: "实际发电量", code: "dayValueE1" },
|
|
|
+ { title: "理论发电量", code: "dayValueE2" },
|
|
|
+ { title: "平均风速", code: "dayValueE3" },
|
|
|
+ { title: "设备故障影响电量", code: "dayValueE4" },
|
|
|
+ { title: "调度限电损失电量", code: "dayValueE5" },
|
|
|
+ { title: "维护损失电量", code: "dayValueE6" },
|
|
|
+ { title: "不饱和电量", code: "dayValueE7" },
|
|
|
+ { title: "运行小时", code: "dayValueE8" },
|
|
|
+ { title: "停机小时", code: "dayValueE9" },
|
|
|
+ { title: "受累损失电量", code: "dayValueE26" }
|
|
|
+ ],
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ async init(row) {
|
|
|
+ // this.hiscompanyVal = row.companyId;
|
|
|
+ this.hisstationVal = row.windtpowerstationId;
|
|
|
+ this.hiswindVal = row.windturbineId;
|
|
|
+ await this.getTableData();
|
|
|
+ },
|
|
|
+ dateTimeFn(row) {
|
|
|
+ return row.recordDate
|
|
|
+ ? row.recordDate.substring(0, row.recordDate.indexOf("T"))
|
|
|
+ : row.date.substring(0, row.date.indexOf("T"));
|
|
|
+ },
|
|
|
+ headerArr(label) {
|
|
|
+ let arr = label.split("");
|
|
|
+ let Newarr = [];
|
|
|
+ let num = 0;
|
|
|
+ let str = "";
|
|
|
+ arr.forEach((it, index) => {
|
|
|
+ num++;
|
|
|
+ str += it;
|
|
|
+ if (label.indexOf(it) + 1 !== label.length) {
|
|
|
+ if (num % 2 === 0) {
|
|
|
+ Newarr.push(str);
|
|
|
+ str = "";
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ Newarr.push(str);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return Newarr;
|
|
|
+ },
|
|
|
+ async getWindPowerStation() {
|
|
|
+ const { data } = await getApiequipmentListByWp({
|
|
|
+ wpid: this.hisstationVal,
|
|
|
+ });
|
|
|
+ this.hisWindOptions = data.data;
|
|
|
+ if (!this.hiswindVal && data.data.length) {
|
|
|
+ this.hiswindVal = data.data[0].id;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // changeBtn(id) {
|
|
|
+ // this.tabIndex = id;
|
|
|
+ // this.$emit("getHisStationOptions", this.tabIndex, this.hiscompanyVal);
|
|
|
+ // this.getTableData();
|
|
|
+ // },
|
|
|
+ changeStation(val) {
|
|
|
+ this.hisstationVal = val;
|
|
|
+ this.hiswindVal = "";
|
|
|
+ this.getWindPowerStation();
|
|
|
+ },
|
|
|
+ changeWind(val) {
|
|
|
+ this.hiswindVal = val;
|
|
|
+ this.getTableData();
|
|
|
+ },
|
|
|
+ seachData() {
|
|
|
+ this.getTableData();
|
|
|
+ },
|
|
|
+ async getTableData() {
|
|
|
+ let params = {
|
|
|
+ type: this.tabIndex,
|
|
|
+ pageNum: this.page.currentPage,
|
|
|
+ pageSize: this.page.pagesize,
|
|
|
+ beginDate: this.pickerTimer[0],
|
|
|
+ endDate: this.pickerTimer[1],
|
|
|
+ wpId: this.hisstationVal,
|
|
|
+ wtId: this.hiswindVal,
|
|
|
+ };
|
|
|
+ let datas = [];
|
|
|
+ this.historysingleMachineData = dataJson.detail;
|
|
|
+ this.page.total = dataJson.total;
|
|
|
+ if (this.tabIndex == -1) {
|
|
|
+ // datas = await getApihistorywindturbinegoodnesslist(params);
|
|
|
+ // this.historysingleMachineData = datas.data.data.records;
|
|
|
+ // this.page.total = datas.data.data.total;
|
|
|
+ } else {
|
|
|
+ datas = await getApihistorywindturbinegoodnesslistGf(params);
|
|
|
+ this.historysingleMachineData = datas.data.data;
|
|
|
+ this.page.total = datas.data.data.length;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleSizeChange(val) {
|
|
|
+ this.page.currentPage = 1;
|
|
|
+ this.page.pagesize = val;
|
|
|
+ this.getTableData();
|
|
|
+ },
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.page.currentPage = val;
|
|
|
+ this.getTableData();
|
|
|
+ },
|
|
|
+ //转换时间
|
|
|
+ getchangeTime(date) {
|
|
|
+ var y = date.getFullYear();
|
|
|
+ var m = date.getMonth() + 1;
|
|
|
+ m = m < 10 ? "0" + m : m;
|
|
|
+ var d = date.getDate();
|
|
|
+ d = d < 10 ? "0" + d : d;
|
|
|
+ return y + "-" + m + "-" + d;
|
|
|
+ },
|
|
|
+ downXlsxFn() {
|
|
|
+ let header = ["风机", "日期"];
|
|
|
+ this.tableHeader.forEach((it) => {
|
|
|
+ header.push(it.title);
|
|
|
+ });
|
|
|
+ utils.exportExcel(
|
|
|
+ this.$refs["historysingleTable"].$el,
|
|
|
+ header,
|
|
|
+ "单机性能历史分析数据"
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.historysingleMachine {
|
|
|
+ height: 100%;
|
|
|
+ .historysingleMachine_top {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ padding-top: 10px;
|
|
|
+ padding-bottom: 10px;
|
|
|
+
|
|
|
+ .stationsv {
|
|
|
+ .timeaa {
|
|
|
+ font-size: 14px;
|
|
|
+ font-family: Microsoft YaHei;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #b3b3b3;
|
|
|
+ margin-right: 10px;
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .but {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-content: center;
|
|
|
+ margin-left: 20px;
|
|
|
+ .buttons {
|
|
|
+ background-color: rgba(5, 187, 76, 0.2);
|
|
|
+ border: 1px solid #3b6c53;
|
|
|
+ color: #b3b3b3;
|
|
|
+ font-size: 14px;
|
|
|
+
|
|
|
+ &:hover,
|
|
|
+ &.active {
|
|
|
+ background-color: rgba(5, 187, 76, 0.5);
|
|
|
+ color: #ffffff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .el-date-editor--daterange {
|
|
|
+ background: transparent;
|
|
|
+ border: 1px solid #2a374f;
|
|
|
+ border-radius: 30px;
|
|
|
+ height: 25px;
|
|
|
+ .el-range-input {
|
|
|
+ background: transparent;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ .el-range-separator {
|
|
|
+ width: 10%;
|
|
|
+ color: #fff;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .economicTable1 {
|
|
|
+ height: calc(100% - 58px);
|
|
|
+ }
|
|
|
+}
|
|
|
+.el-pagination ::v-deep {
|
|
|
+ .el-pagination__sizes {
|
|
|
+ .el-input__inner {
|
|
|
+ width: 100% !important;
|
|
|
+ border-radius: 0 !important;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|