|
@@ -38,12 +38,9 @@
|
|
时间:
|
|
时间:
|
|
<el-date-picker
|
|
<el-date-picker
|
|
v-model="pickerTimer"
|
|
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"
|
|
|
|
|
|
+ type="date"
|
|
|
|
+ size="mini"
|
|
|
|
+ popper-class="date-select"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div class="but">
|
|
<div class="but">
|
|
@@ -56,7 +53,7 @@
|
|
<div
|
|
<div
|
|
style="
|
|
style="
|
|
background: rgba(0, 0, 0, 0.4);
|
|
background: rgba(0, 0, 0, 0.4);
|
|
- height: calc(100% - 39px);
|
|
|
|
|
|
+ height: calc(100% - 52px);
|
|
padding-bottom: 15px;
|
|
padding-bottom: 15px;
|
|
"
|
|
"
|
|
>
|
|
>
|
|
@@ -73,32 +70,48 @@
|
|
ref="Eval_table"
|
|
ref="Eval_table"
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
>
|
|
>
|
|
- <el-table-column prop="stationId" label="设备" align="center" width="100">
|
|
|
|
- <template #default="{ row }">
|
|
|
|
- <span>{{ '#'+row.stationId }}</span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="状态">
|
|
|
|
- <template #default="{ row }">
|
|
|
|
- <div style="width: 100%;">
|
|
|
|
- <span v-for="(it,index) in row.data" :key="index" class="comStr"
|
|
|
|
- :style="{width: `${Number(it.time/((pickerTimer[1].getTime()-pickerTimer[0].getTime())/1000).toFixed(2))*100}%`}"
|
|
|
|
- :title="`${it.stationId}在${getTimedate(it.startTime)}至${getTimedate(it.endTime)}是${eventData(it.event)}状态`"
|
|
|
|
- :class="rowState(it)"></span>
|
|
|
|
- </div>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
-
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="stationId"
|
|
|
|
+ label="设备"
|
|
|
|
+ align="center"
|
|
|
|
+ width="100"
|
|
|
|
+ >
|
|
|
|
+ <template #default="{ row }">
|
|
|
|
+ <span>{{ "#" + row.stationId }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="状态">
|
|
|
|
+ <template #default="{ row }">
|
|
|
|
+ <div style="width: 100%">
|
|
|
|
+ <span
|
|
|
|
+ v-for="(it, index) in row.data"
|
|
|
|
+ :key="index"
|
|
|
|
+ class="comStr"
|
|
|
|
+ :style="{
|
|
|
|
+ width: `${
|
|
|
|
+ Number(it.time / (timeCount / 1000).toFixed(2)) * 100
|
|
|
|
+ }%`,
|
|
|
|
+ }"
|
|
|
|
+ :title="`${it.equipmentId}在${getTimedate(
|
|
|
|
+ it.startTime
|
|
|
|
+ )}至${getTimedate(it.endTime)}是${eventData(it.event)}状态`"
|
|
|
|
+ :class="rowState(it)"
|
|
|
|
+ ></span>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
<div style="text-align: right">
|
|
<div style="text-align: right">
|
|
<el-pagination
|
|
<el-pagination
|
|
|
|
+ @size-change="handleSizeChange"
|
|
|
|
+ :page-sizes="[22, 50, 100, 500]"
|
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
@current-change="handlePageChange"
|
|
@current-change="handlePageChange"
|
|
:current-page="page.currentPage"
|
|
:current-page="page.currentPage"
|
|
:page-size="page.pagesize"
|
|
:page-size="page.pagesize"
|
|
- layout="total, prev, pager, next, jumper"
|
|
|
|
|
|
+
|
|
:total="page.total"
|
|
:total="page.total"
|
|
- >
|
|
|
|
- </el-pagination>
|
|
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -109,7 +122,7 @@
|
|
import {
|
|
import {
|
|
getApiphotovoltaicTimelist,
|
|
getApiphotovoltaicTimelist,
|
|
getApicompanyslist,
|
|
getApicompanyslist,
|
|
- getApiwpByCplistlist
|
|
|
|
|
|
+ getApiwpByCplistlist,
|
|
} from "@/api/monthlyPerformanceAnalysis";
|
|
} from "@/api/monthlyPerformanceAnalysis";
|
|
import dayjs from "dayjs";
|
|
import dayjs from "dayjs";
|
|
export default {
|
|
export default {
|
|
@@ -120,21 +133,19 @@ export default {
|
|
companyOptions: [],
|
|
companyOptions: [],
|
|
stationVal: "",
|
|
stationVal: "",
|
|
stationOptions: [],
|
|
stationOptions: [],
|
|
- pickerTimer: [],
|
|
|
|
|
|
+ pickerTimer: "",
|
|
EvaluationData: [],
|
|
EvaluationData: [],
|
|
page: {
|
|
page: {
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
- pagesize: 21,
|
|
|
|
|
|
+ pagesize: 22,
|
|
total: 0,
|
|
total: 0,
|
|
},
|
|
},
|
|
|
|
+ timeCount: 0,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
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))
|
|
|
|
- ]
|
|
|
|
|
|
+ this.getCompanyData();
|
|
|
|
+ this.pickerTimer = dayjs().add(-1, "day").startOf("date");
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
pageHeight() {
|
|
pageHeight() {
|
|
@@ -148,24 +159,30 @@ export default {
|
|
return dayjs(time).format("YYYY-MM-DD HH:mm:ss");
|
|
return dayjs(time).format("YYYY-MM-DD HH:mm:ss");
|
|
},
|
|
},
|
|
eventData(event) {
|
|
eventData(event) {
|
|
- let showStr = ''
|
|
|
|
|
|
+ let showStr = "";
|
|
if (event === 0) {
|
|
if (event === 0) {
|
|
- showStr = '待机'
|
|
|
|
|
|
+ showStr = "待机";
|
|
} else if (event === 1) {
|
|
} else if (event === 1) {
|
|
- showStr = '并网'
|
|
|
|
|
|
+ showStr = "并网";
|
|
} else if (event === 2) {
|
|
} else if (event === 2) {
|
|
- showStr = '故障'
|
|
|
|
|
|
+ showStr = "故障";
|
|
} else if (event === 3) {
|
|
} else if (event === 3) {
|
|
- showStr = '检修'
|
|
|
|
|
|
+ showStr = "检修";
|
|
} else if (event === 4) {
|
|
} else if (event === 4) {
|
|
- showStr = '限电'
|
|
|
|
|
|
+ showStr = "限电";
|
|
} else if (event === 5) {
|
|
} else if (event === 5) {
|
|
- showStr = '受累'
|
|
|
|
|
|
+ showStr = "受累";
|
|
} else if (event === 6) {
|
|
} else if (event === 6) {
|
|
- showStr = '离线'
|
|
|
|
|
|
+ showStr = "离线";
|
|
}
|
|
}
|
|
- return showStr
|
|
|
|
|
|
+ return showStr;
|
|
|
|
+ },
|
|
|
|
+ handleSizeChange(val) {
|
|
|
|
+ this.page.currentPage = 1;
|
|
|
|
+ this.page.pagesize = val;
|
|
|
|
+ this.seachData();
|
|
},
|
|
},
|
|
|
|
+
|
|
handlePageChange(val) {
|
|
handlePageChange(val) {
|
|
this.page.currentPage = val;
|
|
this.page.currentPage = val;
|
|
this.seachData();
|
|
this.seachData();
|
|
@@ -201,23 +218,23 @@ export default {
|
|
this.getTableData();
|
|
this.getTableData();
|
|
},
|
|
},
|
|
rowState(row) {
|
|
rowState(row) {
|
|
- let showStr = ''
|
|
|
|
|
|
+ let showStr = "";
|
|
if (row.event === 0) {
|
|
if (row.event === 0) {
|
|
- showStr = 'daijiStr'
|
|
|
|
|
|
+ showStr = "daijiStr";
|
|
} else if (row.event === 1) {
|
|
} else if (row.event === 1) {
|
|
- showStr = 'bingwangStr'
|
|
|
|
|
|
+ showStr = "bingwangStr";
|
|
} else if (row.event === 2) {
|
|
} else if (row.event === 2) {
|
|
- showStr = 'guzhangStr'
|
|
|
|
|
|
+ showStr = "guzhangStr";
|
|
} else if (row.event === 3) {
|
|
} else if (row.event === 3) {
|
|
- showStr = 'jianxiuStr'
|
|
|
|
|
|
+ showStr = "jianxiuStr";
|
|
} else if (row.event === 4) {
|
|
} else if (row.event === 4) {
|
|
- showStr = 'xiandianStr'
|
|
|
|
|
|
+ showStr = "xiandianStr";
|
|
} else if (row.event === 5) {
|
|
} else if (row.event === 5) {
|
|
- showStr = 'shouleiStr'
|
|
|
|
|
|
+ showStr = "shouleiStr";
|
|
} else if (row.event === 6) {
|
|
} else if (row.event === 6) {
|
|
- showStr = 'lixianStr'
|
|
|
|
|
|
+ showStr = "lixianStr";
|
|
}
|
|
}
|
|
- return showStr
|
|
|
|
|
|
+ return showStr;
|
|
},
|
|
},
|
|
seachData() {
|
|
seachData() {
|
|
this.getTableData();
|
|
this.getTableData();
|
|
@@ -225,36 +242,39 @@ export default {
|
|
async getTableData() {
|
|
async getTableData() {
|
|
let params = {
|
|
let params = {
|
|
stationId: this.stationVal,
|
|
stationId: this.stationVal,
|
|
- type: 'IN',
|
|
|
|
- startTime: this.pickerTimer[0].getTime(),
|
|
|
|
- endTime: this.pickerTimer[1].getTime(),
|
|
|
|
|
|
+ type: "IN",
|
|
|
|
+ startTime: dayjs(this.pickerTimer).valueOf(),
|
|
|
|
+ endTime: dayjs(this.pickerTimer).add(1, "day").valueOf(),
|
|
pageNum: this.page.currentPage,
|
|
pageNum: this.page.currentPage,
|
|
pageSize: this.page.pagesize,
|
|
pageSize: this.page.pagesize,
|
|
};
|
|
};
|
|
const { data: datas } = await getApiphotovoltaicTimelist(params);
|
|
const { data: datas } = await getApiphotovoltaicTimelist(params);
|
|
if (datas && datas.data) {
|
|
if (datas && datas.data) {
|
|
- let arr =[]
|
|
|
|
- for(let i in datas.data) {
|
|
|
|
|
|
+ let arr = [];
|
|
|
|
+ for (let i in datas.data) {
|
|
let obj = {
|
|
let obj = {
|
|
stationId: i.substring(1),
|
|
stationId: i.substring(1),
|
|
- data: datas.data[i]
|
|
|
|
- }
|
|
|
|
- arr.push(obj)
|
|
|
|
|
|
+ data: datas.data[i],
|
|
|
|
+ };
|
|
|
|
+ arr.push(obj);
|
|
}
|
|
}
|
|
- this.EvaluationData = arr.sort(this.sortBy('stationId'))
|
|
|
|
|
|
+ this.timeCount =
|
|
|
|
+ dayjs(this.pickerTimer).add(1, "day").valueOf() -
|
|
|
|
+ dayjs(this.pickerTimer).valueOf();
|
|
|
|
+ this.EvaluationData = arr.sort(this.sortBy("stationId"));
|
|
}
|
|
}
|
|
- this.page.total = datas.data.total;
|
|
|
|
|
|
+ this.page.total = datas.total;
|
|
},
|
|
},
|
|
sortBy(stationId) {
|
|
sortBy(stationId) {
|
|
- return (x, y) =>{
|
|
|
|
- return x[stationId]- y[stationId]
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ return (x, y) => {
|
|
|
|
+ return x[stationId] - y[stationId];
|
|
|
|
+ };
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<style lang="less">
|
|
|
|
|
|
+<style lang="less" scoped>
|
|
.timeTransition {
|
|
.timeTransition {
|
|
padding: 0 20px;
|
|
padding: 0 20px;
|
|
height: 100%;
|
|
height: 100%;
|
|
@@ -382,28 +402,16 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- .but {
|
|
|
|
- display: flex;
|
|
|
|
- flex-direction: row;
|
|
|
|
- align-content: center;
|
|
|
|
- margin-left: 20px;
|
|
|
|
- .buttons:nth-child(1) {
|
|
|
|
- background: rgba(5, 187, 76, 0.6);
|
|
|
|
- border: 1px solid #3b6c53;
|
|
|
|
- border-radius: 13px;
|
|
|
|
- color: #fff;
|
|
|
|
- &:hover {
|
|
|
|
- background: rgba(5, 187, 76, 0.9);
|
|
|
|
- border-radius: 13px;
|
|
|
|
- color: #fff;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- .buttons:nth-child(2) {
|
|
|
|
- background: rgba(67, 81, 107, 0.3);
|
|
|
|
- border: 1px solid #3b6c53;
|
|
|
|
- border-radius: 13px;
|
|
|
|
- font-size: 14px;
|
|
|
|
- color: #b3b3b3;
|
|
|
|
|
|
+ .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;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -424,30 +432,30 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .comStr{
|
|
|
|
|
|
+ .comStr {
|
|
display: inline-block;
|
|
display: inline-block;
|
|
// width: 10px;
|
|
// width: 10px;
|
|
height: 20px;
|
|
height: 20px;
|
|
}
|
|
}
|
|
- .daijiStr{
|
|
|
|
|
|
+ .daijiStr {
|
|
background: #1c99ff;
|
|
background: #1c99ff;
|
|
}
|
|
}
|
|
- .bingwangStr{
|
|
|
|
|
|
+ .bingwangStr {
|
|
background: #05bb4c;
|
|
background: #05bb4c;
|
|
}
|
|
}
|
|
- .guzhangStr{
|
|
|
|
|
|
+ .guzhangStr {
|
|
background: #ba3237;
|
|
background: #ba3237;
|
|
}
|
|
}
|
|
- .jianxiuStr{
|
|
|
|
|
|
+ .jianxiuStr {
|
|
background: #e17d24;
|
|
background: #e17d24;
|
|
}
|
|
}
|
|
- .xiandianStr{
|
|
|
|
|
|
+ .xiandianStr {
|
|
background: #c530c8;
|
|
background: #c530c8;
|
|
}
|
|
}
|
|
- .shouleiStr{
|
|
|
|
|
|
+ .shouleiStr {
|
|
background: #ffffff;
|
|
background: #ffffff;
|
|
}
|
|
}
|
|
- .lixianStr{
|
|
|
|
|
|
+ .lixianStr {
|
|
background: #606769;
|
|
background: #606769;
|
|
}
|
|
}
|
|
|
|
|