|
@@ -0,0 +1,317 @@
|
|
|
+<template>
|
|
|
+ <div class="powerLinefitting">
|
|
|
+ <div class="powerLinefitting_top">
|
|
|
+ <div class="form-wrapper">
|
|
|
+ <div class="select-wrapper">
|
|
|
+ <HeaderMultiBtnVue
|
|
|
+ :type="tabEvent"
|
|
|
+ :typeOptions="tabOptions"
|
|
|
+ :select="'brand'"
|
|
|
+ @onChange="onChange"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="date-wrapper">
|
|
|
+ <div class="date-item-wrapper">
|
|
|
+ 开始日期
|
|
|
+ <div class="date-item-date">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="starTime"
|
|
|
+ type="date"
|
|
|
+ value-format="YYYY-MM-DD"
|
|
|
+ placeholder="选择日期"
|
|
|
+ size="mini"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="date-item-wrapper">
|
|
|
+ 结束日期
|
|
|
+ <div class="date-item-date">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="endTime"
|
|
|
+ type="date"
|
|
|
+ value-format="YYYY-MM-DD"
|
|
|
+ placeholder="选择日期"
|
|
|
+ size="mini"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="but">
|
|
|
+ <el-button
|
|
|
+ round
|
|
|
+ size="mini"
|
|
|
+ class="buttons search"
|
|
|
+ @click="getTableData"
|
|
|
+ >查询</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ round
|
|
|
+ size="mini"
|
|
|
+ class="buttons download"
|
|
|
+ @click="downXlsxFn"
|
|
|
+ >导出</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div style="background: rgba(0, 0, 0, 0.4); height: calc(100% - 60px)">
|
|
|
+ <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="100%"
|
|
|
+ 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>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { getApiBrandAnalyse } from "@/api/monthlyPerformanceAnalysis";
|
|
|
+import utils from "@/utils/downXlsx";
|
|
|
+import dayjs from "dayjs";
|
|
|
+import HeaderMultiBtnVue from "@/components/headerBtns/HeaderMultiBtn.vue";
|
|
|
+export default {
|
|
|
+ name: "brandAnalyse", //品牌分析
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ companyVal: "",
|
|
|
+ stationVal: "",
|
|
|
+ brands: "",
|
|
|
+ starTime: "",
|
|
|
+ endTime: "",
|
|
|
+ stationAnalyseData: [],
|
|
|
+ stationLineData: [],
|
|
|
+ tableHeader: [
|
|
|
+ { title: "场站", code: "wpsName" },
|
|
|
+ { title: "型号", code: "modelId" },
|
|
|
+ { title: "转换率", code: "conversionRate" },
|
|
|
+ { title: "利用小时", code: "utilizationHour" },
|
|
|
+ { title: "光能利用率", code: "illuminationUtilizationRate" },
|
|
|
+ { title: "故障率", code: "failureRate" },
|
|
|
+ ],
|
|
|
+ tabEvent: -2,
|
|
|
+ tabOptions: [{ type: -2, name: "光伏" }],
|
|
|
+ };
|
|
|
+ },
|
|
|
+ components: { HeaderMultiBtnVue },
|
|
|
+ created() {
|
|
|
+ this.starTime = dayjs().startOf("month").format("YYYY-MM-DD");
|
|
|
+ this.endTime = dayjs().format("YYYY-MM-DD");
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //切换风电光伏
|
|
|
+ changeBtn() {},
|
|
|
+ onChange({ type, companys, stations, brands, area }) {
|
|
|
+ this.tabEvent = type;
|
|
|
+ this.companyVal = companys.length ? companys : area;
|
|
|
+ this.stationVal = stations;
|
|
|
+ this.brands = brands;
|
|
|
+ this.getTableData();
|
|
|
+ },
|
|
|
+ async getTableData() {
|
|
|
+ let params = {
|
|
|
+ type: this.tabEvent,
|
|
|
+ companys: this.companyVal,
|
|
|
+ wpids: this.stationVal,
|
|
|
+ modelids: this.brands,
|
|
|
+ beginDate: this.starTime,
|
|
|
+ endDate: this.endTime,
|
|
|
+ };
|
|
|
+ const { data } = await getApiBrandAnalyse(params);
|
|
|
+ this.stationAnalyseData = data
|
|
|
+ },
|
|
|
+ downXlsxFn() {
|
|
|
+ let header = [];
|
|
|
+ this.tableHeader.forEach((it) => {
|
|
|
+ header.push(it.title);
|
|
|
+ });
|
|
|
+ utils.exportExcel(this.$refs["fitting_table"].$el, header, "品牌分析");
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.powerLinefitting {
|
|
|
+ padding: 0 23px;
|
|
|
+ height: 100%;
|
|
|
+ .powerLinefitting_top ::v-deep {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 10px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ padding-left: 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 {
|
|
|
+ width: 155px;
|
|
|
+ }
|
|
|
+ .el-input .el-input__inner {
|
|
|
+ font-size: 13px;
|
|
|
+ color: #b3b3b3;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .but {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-content: center;
|
|
|
+ }
|
|
|
+ .el-button + .el-button {
|
|
|
+ margin-left: 0;
|
|
|
+ }
|
|
|
+ .buttons {
|
|
|
+ background: rgba(0, 70, 199, 0.6);
|
|
|
+ border: 1px solid #1f51ae;
|
|
|
+ border-radius: 13px;
|
|
|
+ font-size: 14px;
|
|
|
+ margin-right: 10px;
|
|
|
+
|
|
|
+ &.search {
|
|
|
+ color: #fff;
|
|
|
+ &:hover {
|
|
|
+ background: rgba(14, 90, 229, 0.9);
|
|
|
+ border-radius: 13px;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &.download {
|
|
|
+ background: rgba(67, 81, 107, 0.3);
|
|
|
+ border: 1px solid #3b4c6c;
|
|
|
+ color: #b3b3b3;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .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::v-deep {
|
|
|
+ height: calc(100% - 46px);
|
|
|
+ .historyBtn {
|
|
|
+ cursor: pointer;
|
|
|
+ color: #1c99ff;
|
|
|
+ padding: 3px 10px;
|
|
|
+ }
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|