123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436 |
- <template>
- <div class="stateTransition">
- <div class="Evaluation_topall">
- <div class="Evaluation_top">
- <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>
- <div class="station">
- 场站:
- <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>
- </div>
- <div class="station">
- 时间:
- <el-date-picker
- v-model="pickerTimer"
- type="datetimerange"
- start-placeholder="开始时间"
- end-placeholder="结束时间"
- format="YYYY-MM-DD HH:mm:ss"
- date-format="YYYY/MM/DD ddd"
- time-format="A hh:mm:ss"
- />
- </div>
- <div class="but">
- <el-button round size="mini" class="buttons" @click="seachData"
- >搜 索</el-button
- >
- </div>
- </div>
- </div>
- <div
- style="
- background: rgba(0, 0, 0, 0.4);
- height: calc(100% - 52px);
- padding-bottom: 15px;
- "
- >
- <div class="Evaluation_title clearfix">
- <div class="leftContent floatLeft"><span>状态时间分析</span></div>
- </div>
- <div class="economicTable1">
- <el-table
- :data="EvaluationData"
- stripe
- size="mini"
- height="calc(100% - 40px)"
- ref="Eval_table"
- style="width: 100%"
- >
- <el-table-column prop="deviceId" label="风机名称" align="center" />
- <el-table-column label="待机时间(H)" align="center">
- <template #default="{ row }">
- <span>{{ row.standbyTime.toFixed(2) }}</span>
- </template>
- </el-table-column>
- <el-table-column label="并网时间(H)" align="center">
- <template #default="{ row }">
- <span>{{ row.gridConnectionTime.toFixed(2) }}</span>
- </template>
- </el-table-column>
- <el-table-column label="故障时间(H)" align="center">
- <template #default="{ row }">
- <span>{{ row.faultTime.toFixed(2) }}</span>
- </template>
- </el-table-column>
- <el-table-column label="检修时间(H)" align="center">
- <template #default="{ row }">
- <span>{{ row.maintenanceTime.toFixed(2) }}</span>
- </template>
- </el-table-column>
- <el-table-column label="限电时间(H)" align="center">
- <template #default="{ row }">
- <span>{{ row.powerLimitTime.toFixed(2) }}</span>
- </template>
- </el-table-column>
- <el-table-column label="受累时间(H)" align="center">
- <template #default="{ row }">
- <span>{{ row.faultTime.toFixed(2) }}</span>
- </template>
- </el-table-column>
- <el-table-column label="离线时间(H)" align="center">
- <template #default="{ row }">
- <span>{{ row.offlineTime.toFixed(2) }}</span>
- </template>
- </el-table-column>
- <el-table-column label="合计时间(H)" align="center">
- <template #default="{ row }">
- <span>{{ row.total }}</span>
- </template>
- </el-table-column>
- </el-table>
- <div style="text-align: right">
- <el-pagination
- @size-change="handleSizeChange"
- :page-sizes="[22, 50, 100, 500]"
- layout="total, sizes, prev, pager, next, jumper"
- @current-change="handlePageChange"
- :current-page="page.currentPage"
- :page-size="page.pagesize"
- :total="page.total"
- >
- </el-pagination>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import {
- getApiphotovoltaiclist,
- getApicompanyslist,
- getApiwpByCplistlist,
- } from "@/api/monthlyPerformanceAnalysis";
- import dayjs from "dayjs";
- export default {
- name: "PerformanceAssess",
- data() {
- return {
- companyVal: "",
- companyOptions: [],
- stationVal: "",
- stationOptions: [],
- pickerTimer: [],
- EvaluationData: [],
- page: {
- currentPage: 1,
- pagesize: 22,
- total: 0,
- },
- };
- },
- mounted() {
- this.getCompanyData();
- this.pickerTimer = [
- new Date(
- new Date(new Date().getTime() - 24 * 60 * 60 * 1000).setHours(
- 0,
- 0,
- 0,
- 0
- )
- ),
- new Date(new Date(new Date().getTime()).setHours(0, 0, 0, 0)),
- ];
- },
- computed: {
- pageHeight() {
- return {
- height: document.documentElement.clientHeight - 130 + "px",
- };
- },
- },
- methods: {
- handleSizeChange(val) {
- this.page.currentPage = 1;
- this.page.pagesize = val;
- this.seachData();
- },
- handlePageChange(val) {
- this.page.currentPage = val;
- this.seachData();
- },
- // 获取公司列表
- async getCompanyData() {
- this.companyOptions = [];
- const { data: datas } = await getApicompanyslist();
- this.companyOptions = datas.data;
- this.companyVal = datas.data[0]?.id;
- this.getStationData();
- },
- changeCompan(val) {
- this.companyVal = val;
- this.stationOptions = [];
- this.stationVal = "";
- this.getStationData();
- },
- // 获取场站列表
- async getStationData() {
- this.stationOptions = [];
- let params = {
- type: -1,
- companyid: this.companyVal,
- };
- const { data: datas } = await getApiwpByCplistlist(params);
- this.stationOptions = datas.data;
- this.stationVal = datas.data[0].id;
- this.getTableData();
- },
- changeStation(val) {
- this.stationVal = val;
- this.getTableData();
- },
- seachData() {
- this.getTableData();
- },
- async getTableData() {
- let params = {
- stationId: this.stationVal,
- type: "WT",
- startTime: this.pickerTimer[0].getTime(),
- endTime: this.pickerTimer[1].getTime(),
- pageNum: this.page.currentPage,
- pageSize: this.page.pagesize,
- };
- const { data: datas } = await getApiphotovoltaiclist(params);
- this.EvaluationData = datas.data;
- this.page.total = datas.total;
- },
- },
- };
- </script>
- <style lang="less">
- .stateTransition {
- padding: 0 20px;
- height: 100%;
- .Evaluation_title {
- .leftContent {
- width: 242px;
- height: 41px;
- line-height: 41px;
- background: url("~@/assets/imgs/title_left_bg1.png") no-repeat;
- span {
- font-size: 16px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #05bb4c;
- 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;
- }
- .Evaluation_topall {
- display: flex;
- justify-content: space-between;
- .selections {
- position: relative;
- right: 120px;
- display: flex;
- margin-top: 10px;
- .selections_btn {
- flex: 0 0 55px;
- text-align: center;
- height: 33px;
- line-height: 33px;
- margin-right: 8px;
- color: #b9b9b9;
- font-size: 1.296vh;
- background: fade(#606769, 20);
- border: 1px solid fade(#606769, 20);
- border-radius: 20px;
- &:hover,
- &.active {
- background: fade(#05bb4c, 80);
- border: 1px solid #05bb4c;
- color: #fff;
- cursor: pointer;
- }
- }
- }
- .Evaluation_top {
- display: flex;
- flex-direction: row;
- align-items: center;
- padding-top: 10px;
- padding-bottom: 10px;
- .station {
- display: flex;
- flex-direction: row;
- align-items: center;
- font-size: 14px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #b3b3b3;
- margin-right: 10px;
- margin-left: 10px;
- }
- .search-input {
- margin-left: 10px;
- .el-input__inner {
- width: 175px;
- }
- .el-input__suffix {
- right: -50px;
- }
- }
- .tabCut {
- display: inline-block;
- margin: 0 10px;
- div {
- display: inline-block;
- width: 60px;
- height: 27px;
- border: 1px solid #274934;
- text-align: center;
- line-height: 25px;
- cursor: pointer;
- }
- div:nth-child(1) {
- border-radius: 13px 0px 0px 13px;
- border-right-width: 0;
- }
- div:nth-child(2) {
- border-radius: 0px 13px 13px 0px;
- }
- .active {
- background-color: rgba(5, 187, 76, 0.9);
- color: #fff;
- }
- }
- .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;
- }
- }
- }
- }
- .economicTable1 {
- height: calc(100% - 40px);
- .el-table--mini {
- .el-table__header-wrapper {
- .el-checkbox {
- display: none;
- }
- }
- .el-table__body-wrapper {
- .el-checkbox {
- .el-checkbox__input {
- display: block;
- }
- }
- }
- }
- .historyBtn {
- background: #43516b;
- border-radius: 15px;
- margin-top: 5px;
- border: 1px solid #43516b;
- span {
- color: #fff;
- }
- }
- }
- .el-overlay {
- .el-overlay-dialog {
- overflow-y: hidden !important;
- .EvaluationhistoryModel {
- margin-top: 0 !important;
- .el-dialog__body {
- height: calc(100% - 51px - 50px);
- }
- }
- .contrastModal {
- .el-dialog__header {
- border: none;
- }
- .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>
|