|
@@ -18,10 +18,10 @@
|
|
|
</div>
|
|
|
<div class="Inverter-Info-body">
|
|
|
<div class="Inverter-Info-title">
|
|
|
- <div class="title">{{info.name}}</div>
|
|
|
+ <div class="title">{{ info.name }}</div>
|
|
|
|
|
|
<div class="title-tools-left">
|
|
|
- <div class="other">逆变器型号:{{info.modelid}}</div>
|
|
|
+ <div class="other">逆变器型号:{{ info.modelid }}</div>
|
|
|
<div class="state">
|
|
|
状态:
|
|
|
<div class="dot" :class="stateColor"></div>
|
|
@@ -39,40 +39,74 @@
|
|
|
<div class="form">
|
|
|
<div>
|
|
|
<table class="table-form mg-b-8" height="60%">
|
|
|
- <tr v-for="(aiarr) in aiData" :key="aiarr">
|
|
|
- <td class="text gray">{{aiarr[0].name}}</td>
|
|
|
- <td class="value green">{{aiarr[0].value}}</td>
|
|
|
- <td class="unit gray">{{aiarr[0].unit}}</td>
|
|
|
- <td class="text gray" v-if="aiarr.length>1">{{aiarr[1].name}}</td>
|
|
|
- <td class="value green" v-if="aiarr.length>1">{{aiarr[1].value}}</td>
|
|
|
- <td class="unit gray" v-if="aiarr.length>1">{{aiarr[1].unit}}</td>
|
|
|
+ <tr v-for="aiarr in aiData" :key="aiarr">
|
|
|
+ <td class="text gray">{{ aiarr[0].name }}</td>
|
|
|
+ <td class="value green">{{ aiarr[0].value }}</td>
|
|
|
+ <td class="unit gray">{{ aiarr[0].unit }}</td>
|
|
|
+ <td class="text gray" v-if="aiarr.length > 1">
|
|
|
+ {{ aiarr[1].name }}
|
|
|
+ </td>
|
|
|
+ <td class="value green" v-if="aiarr.length > 1">
|
|
|
+ {{ aiarr[1].value }}
|
|
|
+ </td>
|
|
|
+ <td class="unit gray" v-if="aiarr.length > 1">
|
|
|
+ {{ aiarr[1].unit }}
|
|
|
+ </td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
</div>
|
|
|
<div>
|
|
|
<panel class="line-panel" :title="'开网频率'">
|
|
|
- <multiple-line-chart :list="lineValue" :units="['']" height="100%" />
|
|
|
+ <multiple-line-chart
|
|
|
+ :list="lineValue"
|
|
|
+ :units="['']"
|
|
|
+ height="100%"
|
|
|
+ />
|
|
|
</panel>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="states">
|
|
|
<div class="counts">
|
|
|
- <div class="all">
|
|
|
+ <div class="all" @click="handleChange(0)">
|
|
|
<span class="text">全部状态</span>
|
|
|
- <span class="value">30</span>
|
|
|
+ <span class="value">{{ diAll.length }}</span>
|
|
|
</div>
|
|
|
- <div class="error">
|
|
|
+ <div class="error" @click="handleChange(1)">
|
|
|
<span class="text">报警状态</span>
|
|
|
- <span class="value">30</span>
|
|
|
+ <span class="value">{{
|
|
|
+ diAll.filter((item) => item.value === 1).length
|
|
|
+ }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="state-list">
|
|
|
<el-scrollbar>
|
|
|
- <div class="list-body">
|
|
|
+ <div class="list-body" v-if="current === 0">
|
|
|
<div v-for="item of diAll" :key="item" class="list-item">
|
|
|
- <div class="text">{{item.name}}</div>
|
|
|
+ <div class="text">{{ item.name }}</div>
|
|
|
<div class="state">
|
|
|
- <div :class="{ red: item.value == 1, green: item.value != 1 }"></div>
|
|
|
+ <div
|
|
|
+ :class="{
|
|
|
+ red: item.value == 1,
|
|
|
+ green: item.value != 1,
|
|
|
+ }"
|
|
|
+ ></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="list-body" v-if="current === 1">
|
|
|
+ <div
|
|
|
+ v-for="item of errorList"
|
|
|
+ :key="item"
|
|
|
+ class="list-item"
|
|
|
+ >
|
|
|
+ <div class="text">{{ item.name }}</div>
|
|
|
+ <div class="state">
|
|
|
+ <div
|
|
|
+ :class="{
|
|
|
+ red: item.value == 1,
|
|
|
+ green: item.value != 1,
|
|
|
+ }"
|
|
|
+ ></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -93,6 +127,7 @@ import List from "@com/coms/list/list.vue";
|
|
|
import Panel from "../../../components/coms/panel/panel.vue";
|
|
|
import MultipleLineChart from "../../../components/chart/line/multiple-line-chart.vue";
|
|
|
import collapseList from "@/components/coms/collapse/collapse-list.vue";
|
|
|
+import api from "@api/cockpit/matrix/index.js";
|
|
|
export default {
|
|
|
// 名称
|
|
|
name: "Box",
|
|
@@ -102,15 +137,17 @@ export default {
|
|
|
List,
|
|
|
Panel,
|
|
|
MultipleLineChart,
|
|
|
- collapseList
|
|
|
+ collapseList,
|
|
|
},
|
|
|
// 数据
|
|
|
data() {
|
|
|
return {
|
|
|
timmer: null,
|
|
|
timmer1: null,
|
|
|
+ current: 0,
|
|
|
WindSites: [],
|
|
|
diAll: [],
|
|
|
+ errorList: [],
|
|
|
diOn: [],
|
|
|
info: {},
|
|
|
stateColor: "blue",
|
|
@@ -119,9 +156,9 @@ export default {
|
|
|
datas: [
|
|
|
{
|
|
|
text: "1#逆变室",
|
|
|
- color: "blue"
|
|
|
- }
|
|
|
- ]
|
|
|
+ color: "blue",
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
wtId: "PL01_01",
|
|
|
aiData: [],
|
|
@@ -131,22 +168,22 @@ export default {
|
|
|
value: [
|
|
|
{
|
|
|
text: "00:00",
|
|
|
- value: 0
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- ]
|
|
|
+ value: 0,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
};
|
|
|
},
|
|
|
// 函数
|
|
|
methods: {
|
|
|
- selectList: function(item) {
|
|
|
+ selectList: function (item) {
|
|
|
console.log(item);
|
|
|
},
|
|
|
- select: function(item) {
|
|
|
+ select: function (item) {
|
|
|
console.log(item);
|
|
|
},
|
|
|
- onReturn: function() {
|
|
|
+ onReturn: function () {
|
|
|
console.log("return");
|
|
|
},
|
|
|
// 点击左侧菜单
|
|
@@ -154,45 +191,38 @@ export default {
|
|
|
// console.log(res);
|
|
|
this.wpId = res.wpId;
|
|
|
this.wtId = res.wtId;
|
|
|
- this.$router.replace(`/monitor/windsite/inverter-info/${res.wpId}/${res.wtId}`);
|
|
|
+ this.$router.replace(
|
|
|
+ `/monitor/windsite/inverter-info/${res.wpId}/${res.wtId}`
|
|
|
+ );
|
|
|
this.getData();
|
|
|
this.getLineChart();
|
|
|
},
|
|
|
async buildSelectList() {
|
|
|
- let res = await this.API.requestData({
|
|
|
- method: "POST",
|
|
|
- // baseURL: "http://localhost:8082/",
|
|
|
- subUrl: "matrix/findPVSimpleMatrixAll"
|
|
|
- });
|
|
|
+ let res = await api.findPVSimpleMatrixAll();
|
|
|
let WindSites = [];
|
|
|
- res.data.data.forEach((ele, index) => {
|
|
|
- ele.inverterls.forEach(function(inver) {
|
|
|
+ res?.data?.data?.forEach((ele, index) => {
|
|
|
+ ele.inverterls.forEach(function (inver) {
|
|
|
// inver["text"] = inver["wtnum"];
|
|
|
inver["text"] = inver["wtnum"];
|
|
|
inver["color"] = "blue";
|
|
|
inver["id"] = inver["wtId"];
|
|
|
-
|
|
|
});
|
|
|
WindSites.push({
|
|
|
id: String(index),
|
|
|
text: ele.wpName,
|
|
|
- children: ele.inverterls
|
|
|
+ children: ele.inverterls,
|
|
|
});
|
|
|
});
|
|
|
this.WindSites = WindSites;
|
|
|
},
|
|
|
async getData() {
|
|
|
- let res = await this.API.requestData({
|
|
|
- method: "POST",
|
|
|
- // baseURL: "http://localhost:8082/",
|
|
|
- subUrl: "monitorinverter/findInverterInfo",
|
|
|
- data: {
|
|
|
- wtId: this.wtId
|
|
|
- }
|
|
|
+ let res = await api.findInverterInfo({
|
|
|
+ wtId: this.wtId,
|
|
|
});
|
|
|
+ console.log(111111);
|
|
|
const aiData = [];
|
|
|
- if (res.data.data.listAI) {
|
|
|
- const arr = res.data.data.listAI;
|
|
|
+ if (res?.data?.listAI) {
|
|
|
+ const arr = res.data.listAI;
|
|
|
for (let index = 0; index < arr.length; index = index + 2) {
|
|
|
const elem1 = arr[index];
|
|
|
const elem2 = arr[index + 1];
|
|
@@ -204,20 +234,15 @@ export default {
|
|
|
}
|
|
|
this.aiData = aiData;
|
|
|
// di
|
|
|
- if (res.data.data.listDI) {
|
|
|
- this.diAll = res.data.data.listDI.allList;
|
|
|
- this.diOn = res.data.data.listDI.onList;
|
|
|
+ if (res.data.listDI) {
|
|
|
+ this.diAll = res.data.listDI.allList;
|
|
|
+ this.diOn = res.data.listDI.onList;
|
|
|
}
|
|
|
- this.info = res.data.data.info;
|
|
|
+ this.info = res.data.info;
|
|
|
},
|
|
|
async getLineChart() {
|
|
|
- let res = await this.API.requestData({
|
|
|
- method: "POST",
|
|
|
- // baseURL: "http://localhost:8082/",
|
|
|
- subUrl: "monitorinverter/findInverterPowerLine",
|
|
|
- data: {
|
|
|
- wtId: this.wtId
|
|
|
- }
|
|
|
+ let res = await api.findInverterPowerLine({
|
|
|
+ wtId: this.wtId,
|
|
|
});
|
|
|
let date = new Date();
|
|
|
date.setHours(0);
|
|
@@ -228,35 +253,32 @@ export default {
|
|
|
date.setMinutes(i * 30);
|
|
|
result.push({
|
|
|
text: new Date(timt + i * 1000 * 60 * 30).formatDate("hh:mm"),
|
|
|
- value: res.data.data[i]
|
|
|
+ value: res.data.data[i],
|
|
|
});
|
|
|
}
|
|
|
this.lineValue = [
|
|
|
{
|
|
|
title: "功率",
|
|
|
- value: result
|
|
|
- }
|
|
|
+ value: result,
|
|
|
+ },
|
|
|
];
|
|
|
},
|
|
|
async getTurbinesState() {
|
|
|
let that = this;
|
|
|
- let res = await this.API.requestData({
|
|
|
- method: "POST",
|
|
|
- subUrl: "matrix/matrixDetialGfPush"
|
|
|
- });
|
|
|
+ let res = await api.matrixDetialGfPush();
|
|
|
const ztmap = {};
|
|
|
- if (res && res.data && res.data.data && res.data.data.fjmap) {
|
|
|
- res.data.data.fjmap.forEach(function(fcList) {
|
|
|
- fcList.forEach(function(fjItem) {
|
|
|
+ if (res?.data?.data?.fjmap) {
|
|
|
+ res.data.data.fjmap.forEach(function (fcList) {
|
|
|
+ fcList.forEach(function (fjItem) {
|
|
|
ztmap[fjItem["wtId"]] = fjItem["fjzt"];
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
that.stateColor = that.getColor(ztmap[that.wtId]);
|
|
|
if (this.WindSites) {
|
|
|
- this.WindSites.forEach(function(ws) {
|
|
|
+ this.WindSites.forEach(function (ws) {
|
|
|
if (ws.children) {
|
|
|
- ws.children.forEach(function(fj) {
|
|
|
+ ws.children.forEach(function (fj) {
|
|
|
fj["color"] = that.getColor(ztmap[fj.wtId]);
|
|
|
});
|
|
|
}
|
|
@@ -287,7 +309,18 @@ export default {
|
|
|
return "write";
|
|
|
break;
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ handleChange(current) {
|
|
|
+ this.current = current;
|
|
|
+ if (current === 1) {
|
|
|
+ this.errorList = [];
|
|
|
+ this.diAll.forEach((item) => {
|
|
|
+ if (item.value === 1) {
|
|
|
+ this.errorList.push(item);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
// 生命周期钩子
|
|
|
beforeCreate() {
|
|
@@ -328,7 +361,7 @@ export default {
|
|
|
this.timmer = null;
|
|
|
clearInterval(this.timmer1);
|
|
|
this.timmer1 = null;
|
|
|
- }
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|