|
@@ -72,7 +72,7 @@
|
|
|
<div class="bar">
|
|
|
<div
|
|
|
class="bar-percent"
|
|
|
- @click="showChart()"
|
|
|
+ @click="showChart(scope)"
|
|
|
:style="{
|
|
|
width:
|
|
|
(scope.data.count &&
|
|
@@ -88,7 +88,7 @@
|
|
|
<div class="bar">
|
|
|
<div
|
|
|
class="bar-percent"
|
|
|
- @click="showChart()"
|
|
|
+ @click="showChart(scope)"
|
|
|
:style="{
|
|
|
width:
|
|
|
(scope.data.count &&
|
|
@@ -105,7 +105,7 @@
|
|
|
</table-3>
|
|
|
</panel-3>
|
|
|
<el-dialog
|
|
|
- :title="'对比'"
|
|
|
+ :title="dialogTitle"
|
|
|
v-model="dialogVisible"
|
|
|
width="70%"
|
|
|
top="10vh"
|
|
@@ -114,8 +114,8 @@
|
|
|
>
|
|
|
<multiple-y-line-chart-normal
|
|
|
height="500px"
|
|
|
- :list="Powertrend"
|
|
|
- :yAxises="PowertrendYAxises"
|
|
|
+ :list="Analysis"
|
|
|
+ :yAxises="AnalysisYAxises"
|
|
|
:showLegend="true"
|
|
|
/>
|
|
|
</el-dialog>
|
|
@@ -130,28 +130,32 @@ export default {
|
|
|
components: { Panel3, Table3, MultipleYLineChartNormal },
|
|
|
data() {
|
|
|
return {
|
|
|
+ dialogTitle:"",
|
|
|
dialogVisible: false,
|
|
|
wpvalue: "",
|
|
|
- Powertrend: [
|
|
|
+ wpid: "",
|
|
|
+ AnalysisName: "",
|
|
|
+ AnalysisUnit: "",
|
|
|
+ Analysis: [
|
|
|
{
|
|
|
title: "",
|
|
|
yAxisIndex: 0, // 使用单位
|
|
|
value: [],
|
|
|
},
|
|
|
],
|
|
|
- PowertrendYAxises: [
|
|
|
+ AnalysisYAxises: [
|
|
|
{
|
|
|
- name: "功率",
|
|
|
- min: 0,
|
|
|
- max: null,
|
|
|
- unit: "(万kWh)",
|
|
|
+ name: "",
|
|
|
+ min: "",
|
|
|
+ max: "",
|
|
|
+ unit: "",
|
|
|
position: "left",
|
|
|
},
|
|
|
{
|
|
|
- name: "风速",
|
|
|
- min: 0,
|
|
|
- max: 25,
|
|
|
- unit: "(m/s)",
|
|
|
+ name: "",
|
|
|
+ min: "",
|
|
|
+ max: "",
|
|
|
+ unit: "",
|
|
|
position: "right",
|
|
|
},
|
|
|
],
|
|
@@ -257,248 +261,189 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
//对比
|
|
|
- showChart() {
|
|
|
+ showChart(column) {
|
|
|
let that = this;
|
|
|
+ that.dialogTitle = column.column.name
|
|
|
+ // console.log('column:',column)
|
|
|
+ // console.log('name:',column.column.name)
|
|
|
+ // console.log('wtid:',column.row.name)
|
|
|
+ // console.log('starttime:',new Date(that.startdate).getTime())
|
|
|
+ // console.log('endtime:',new Date(that.enddate).getTime())
|
|
|
that.dialogVisible = true;
|
|
|
- let Powertrend = [
|
|
|
- {
|
|
|
- title: "实发功率",
|
|
|
- smooth: true,
|
|
|
- value: [],
|
|
|
- },
|
|
|
- {
|
|
|
- title: "理论功率",
|
|
|
- smooth: true,
|
|
|
- value: [],
|
|
|
- },
|
|
|
- {
|
|
|
- title: "保证功率",
|
|
|
- smooth: true,
|
|
|
- value: [],
|
|
|
- },
|
|
|
- {
|
|
|
- title: "4小时预测功率",
|
|
|
- smooth: true,
|
|
|
- value: [],
|
|
|
- },
|
|
|
- {
|
|
|
- title: "24小时预测功率",
|
|
|
- smooth: true,
|
|
|
- value: [],
|
|
|
+ that.API.requestData({
|
|
|
+ method: "GET",
|
|
|
+ subUrl: "/analysis/detail",
|
|
|
+ data: {
|
|
|
+ station: that.wpvalue,
|
|
|
+ startTs: new Date(that.startdate).getTime(),
|
|
|
+ endTs: new Date(that.enddate).getTime(),
|
|
|
+ interval: 360,
|
|
|
+ wtId: column.row.name,
|
|
|
+ name: column.column.name,
|
|
|
},
|
|
|
- {
|
|
|
- title: "平均风速",
|
|
|
- smooth: true,
|
|
|
- value: [],
|
|
|
+ success(res) {
|
|
|
+ console.log("resAnalysis:", res);
|
|
|
+ let anKey = ["doubleValue"];
|
|
|
+ if (res.data.length == 1) {
|
|
|
+ let yaxises = [
|
|
|
+ {
|
|
|
+ name: "",
|
|
|
+ min: 0,
|
|
|
+ max: null,
|
|
|
+ unit: "",
|
|
|
+ position: "left",
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ // yaxises.name = res.data[0].name;
|
|
|
+ yaxises.unit = res.data[0].unit;
|
|
|
+ that.AnalysisYAxises = yaxises;
|
|
|
+ console.log("AnalysisYAxises:", that.AnalysisYAxises);
|
|
|
+ let aKey1 = ["doubleValue"];
|
|
|
+ let aList1 = [
|
|
|
+ {
|
|
|
+ title: "",
|
|
|
+ smooth: true,
|
|
|
+ value: [],
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ aKey1.forEach((keyEle, keyIndex) => {
|
|
|
+ res.data.forEach((rEle) => {
|
|
|
+ rEle.data.forEach((tEle) => {
|
|
|
+ aList1[keyIndex].title = res.data[0].name
|
|
|
+ aList1[keyIndex].value.push({
|
|
|
+ text: new Date(tEle.ts).formatDate("hh:mm"),
|
|
|
+ value: tEle[keyEle],
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+ that.Analysis = aList1;
|
|
|
+ console.log("that.Analysis1:", that.Analysis);
|
|
|
+ } else if (res.data.length == 2) {
|
|
|
+ let aKey2 = ["doubleValue", "doubleValue"];
|
|
|
+ let aList2 = [
|
|
|
+ {
|
|
|
+ title: "",
|
|
|
+ smooth: true,
|
|
|
+ value: [],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "",
|
|
|
+ smooth: true,
|
|
|
+ value: [],
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ let yaxises1 = [
|
|
|
+ {
|
|
|
+ name: "",
|
|
|
+ min: 0,
|
|
|
+ max: null,
|
|
|
+ unit: "",
|
|
|
+ position: "left",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "",
|
|
|
+ min: 0,
|
|
|
+ max: null,
|
|
|
+ unit: "",
|
|
|
+ position: "right",
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ yaxises1.forEach((aEle, aIndex) => {
|
|
|
+ res.data.forEach((rEle) => {
|
|
|
+ // console.log('rEleName:',rEle.name)
|
|
|
+ // console.log('rEle.unit:',rEle.unit)
|
|
|
+ // aEle.name = rEle.name;
|
|
|
+ aEle.unit = rEle.unit;
|
|
|
+ });
|
|
|
+ });
|
|
|
+ that.AnalysisYAxises = yaxises1;
|
|
|
+ console.log("AnalysisYAxises:", that.AnalysisYAxises);
|
|
|
+ aKey2.forEach((keyEle, keyIndex) => {
|
|
|
+ res.data.forEach((rEle) => {
|
|
|
+ aList2[keyIndex].title=res.data[keyIndex].name
|
|
|
+ rEle.data.forEach((tEle) => {
|
|
|
+ aList2[keyIndex].value.push({
|
|
|
+ text: new Date(tEle.ts).formatDate("hh:mm"),
|
|
|
+ value: tEle[keyEle],
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ that.Analysis = aList2;
|
|
|
+ console.log("that.Analysis2:", that.Analysis);
|
|
|
+ } else if (res.data.length == 4) {
|
|
|
+ let aKey4 = [
|
|
|
+ "doubleValue",
|
|
|
+ "doubleValue",
|
|
|
+ "doubleValue",
|
|
|
+ "doubleValue",
|
|
|
+ ];
|
|
|
+ let aList4 = [
|
|
|
+ {
|
|
|
+ title: "",
|
|
|
+ smooth: true,
|
|
|
+ value: [],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "",
|
|
|
+ smooth: true,
|
|
|
+ value: [],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "",
|
|
|
+ smooth: true,
|
|
|
+ value: [],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "",
|
|
|
+ smooth: true,
|
|
|
+ value: [],
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ let yaxises2 = [
|
|
|
+ {
|
|
|
+ name: "",
|
|
|
+ min: 0,
|
|
|
+ max: null,
|
|
|
+ unit: "",
|
|
|
+ position: "left",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "",
|
|
|
+ min: 0,
|
|
|
+ max: null,
|
|
|
+ unit: "",
|
|
|
+ position: "right",
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ yaxises2.forEach((aEle, aIndex) => {
|
|
|
+ res.data.forEach((rEle) => {
|
|
|
+ // console.log('rEleName:',rEle.name)
|
|
|
+ // console.log('rEle.unit:',rEle.unit)
|
|
|
+ // aEle.name = rEle.name;
|
|
|
+ aEle.unit = rEle.unit;
|
|
|
+ });
|
|
|
+ });
|
|
|
+ that.AnalysisYAxises = yaxises2;
|
|
|
+ console.log("AnalysisYAxises:", that.AnalysisYAxises);
|
|
|
+ aKey4.forEach((keyEle, keyIndex) => {
|
|
|
+ res.data.forEach((rEle) => {
|
|
|
+ aList4[keyIndex].title = res.data[keyIndex].name
|
|
|
+ rEle.data.forEach((tEle) => {
|
|
|
+ aList4[keyIndex].value.push({
|
|
|
+ text: new Date(tEle.ts).formatDate("hh:mm"),
|
|
|
+ value: tEle[keyEle],
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+ that.Analysis = aList4;
|
|
|
+ console.log("that.Analysis4:", that.Analysis);
|
|
|
+ }
|
|
|
},
|
|
|
- ];
|
|
|
- let glKey = ["value2", "value1", "value5", "value4", "value7", "value6"];
|
|
|
- let resData = {
|
|
|
- glvos: [
|
|
|
- {
|
|
|
- time: 1631721600000,
|
|
|
- timestr: null,
|
|
|
- value1: 17,
|
|
|
- value2: 9.18,
|
|
|
- value3: 11,
|
|
|
- value4: 7.27,
|
|
|
- value5: 16,
|
|
|
- value6: 1.95,
|
|
|
- value7: 0,
|
|
|
- value8: null,
|
|
|
- value9: 31,
|
|
|
- value10: null,
|
|
|
- value11: null,
|
|
|
- value12: null,
|
|
|
- value13: null,
|
|
|
- speed: null,
|
|
|
- name: null,
|
|
|
- url: null,
|
|
|
- aName: null,
|
|
|
- desc: null,
|
|
|
- datefomat: null,
|
|
|
- minRange: null,
|
|
|
- pointInterval: null,
|
|
|
- year: null,
|
|
|
- month: null,
|
|
|
- day: null,
|
|
|
- id: null,
|
|
|
- hours: null,
|
|
|
- minutes: null,
|
|
|
- seconds: null,
|
|
|
- beginDate: null,
|
|
|
- endDate: null,
|
|
|
- beginDateDay: null,
|
|
|
- endDateDay: null,
|
|
|
- value: null,
|
|
|
- valueObjVo: null,
|
|
|
- },
|
|
|
- {
|
|
|
- time: 1631725200000,
|
|
|
- timestr: null,
|
|
|
- value1: 14,
|
|
|
- value2: 5.17,
|
|
|
- value3: 8,
|
|
|
- value4: 0.1,
|
|
|
- value5: 12,
|
|
|
- value6: 2.49,
|
|
|
- value7: 11.94,
|
|
|
- value8: null,
|
|
|
- value9: 29,
|
|
|
- value10: null,
|
|
|
- value11: null,
|
|
|
- value12: null,
|
|
|
- value13: null,
|
|
|
- speed: null,
|
|
|
- name: null,
|
|
|
- url: null,
|
|
|
- aName: null,
|
|
|
- desc: null,
|
|
|
- datefomat: null,
|
|
|
- minRange: null,
|
|
|
- pointInterval: null,
|
|
|
- year: null,
|
|
|
- month: null,
|
|
|
- day: null,
|
|
|
- id: null,
|
|
|
- hours: null,
|
|
|
- minutes: null,
|
|
|
- seconds: null,
|
|
|
- beginDate: null,
|
|
|
- endDate: null,
|
|
|
- beginDateDay: null,
|
|
|
- endDateDay: null,
|
|
|
- value: null,
|
|
|
- valueObjVo: null,
|
|
|
- },
|
|
|
- {
|
|
|
- time: 1631728800000,
|
|
|
- timestr: null,
|
|
|
- value1: 13,
|
|
|
- value2: 5.07,
|
|
|
- value3: 8,
|
|
|
- value4: 0.07,
|
|
|
- value5: 11,
|
|
|
- value6: 2.32,
|
|
|
- value7: 0,
|
|
|
- value8: null,
|
|
|
- value9: 26,
|
|
|
- value10: null,
|
|
|
- value11: null,
|
|
|
- value12: null,
|
|
|
- value13: null,
|
|
|
- speed: null,
|
|
|
- name: null,
|
|
|
- url: null,
|
|
|
- aName: null,
|
|
|
- desc: null,
|
|
|
- datefomat: null,
|
|
|
- minRange: null,
|
|
|
- pointInterval: null,
|
|
|
- year: null,
|
|
|
- month: null,
|
|
|
- day: null,
|
|
|
- id: null,
|
|
|
- hours: null,
|
|
|
- minutes: null,
|
|
|
- seconds: null,
|
|
|
- beginDate: null,
|
|
|
- endDate: null,
|
|
|
- beginDateDay: null,
|
|
|
- endDateDay: null,
|
|
|
- value: null,
|
|
|
- valueObjVo: null,
|
|
|
- },
|
|
|
- {
|
|
|
- time: 1631732400000,
|
|
|
- timestr: null,
|
|
|
- value1: 11,
|
|
|
- value2: 3.3,
|
|
|
- value3: 6,
|
|
|
- value4: 0,
|
|
|
- value5: 9,
|
|
|
- value6: 2.28,
|
|
|
- value7: 0,
|
|
|
- value8: null,
|
|
|
- value9: 21,
|
|
|
- value10: null,
|
|
|
- value11: null,
|
|
|
- value12: null,
|
|
|
- value13: null,
|
|
|
- speed: null,
|
|
|
- name: null,
|
|
|
- url: null,
|
|
|
- aName: null,
|
|
|
- desc: null,
|
|
|
- datefomat: null,
|
|
|
- minRange: null,
|
|
|
- pointInterval: null,
|
|
|
- year: null,
|
|
|
- month: null,
|
|
|
- day: null,
|
|
|
- id: null,
|
|
|
- hours: null,
|
|
|
- minutes: null,
|
|
|
- seconds: null,
|
|
|
- beginDate: null,
|
|
|
- endDate: null,
|
|
|
- beginDateDay: null,
|
|
|
- endDateDay: null,
|
|
|
- value: null,
|
|
|
- valueObjVo: null,
|
|
|
- },
|
|
|
- {
|
|
|
- time: 1631736000000,
|
|
|
- timestr: null,
|
|
|
- value1: 3.91,
|
|
|
- value2: 1.67,
|
|
|
- value3: 1.91,
|
|
|
- value4: 0.3,
|
|
|
- value5: 2.91,
|
|
|
- value6: 1.88,
|
|
|
- value7: 0,
|
|
|
- value8: null,
|
|
|
- value9: 9,
|
|
|
- value10: null,
|
|
|
- value11: null,
|
|
|
- value12: null,
|
|
|
- value13: null,
|
|
|
- speed: null,
|
|
|
- name: null,
|
|
|
- url: null,
|
|
|
- aName: null,
|
|
|
- desc: null,
|
|
|
- datefomat: null,
|
|
|
- minRange: null,
|
|
|
- pointInterval: null,
|
|
|
- year: null,
|
|
|
- month: null,
|
|
|
- day: null,
|
|
|
- id: null,
|
|
|
- hours: null,
|
|
|
- minutes: null,
|
|
|
- seconds: null,
|
|
|
- beginDate: null,
|
|
|
- endDate: null,
|
|
|
- beginDateDay: null,
|
|
|
- endDateDay: null,
|
|
|
- value: null,
|
|
|
- valueObjVo: null,
|
|
|
- },
|
|
|
-
|
|
|
- ],
|
|
|
-
|
|
|
- };
|
|
|
- glKey.forEach((keyEle, keyIndex) => {
|
|
|
- resData.glvos.forEach((cEle) => {
|
|
|
- Powertrend[keyIndex].value.push({
|
|
|
- text: new Date(cEle.time).formatDate("hh:mm"),
|
|
|
- value: cEle[keyEle],
|
|
|
- });
|
|
|
- });
|
|
|
});
|
|
|
-
|
|
|
- that.Powertrend = Powertrend;
|
|
|
},
|
|
|
tabSelect(tab) {},
|
|
|
|
|
@@ -550,7 +495,7 @@ export default {
|
|
|
});
|
|
|
////////
|
|
|
const resData = data.data;
|
|
|
- console.log("resData:", resData);
|
|
|
+ // console.log("resData:", resData);
|
|
|
// const resData =this.resdata;
|
|
|
const column = this.columnObj;
|
|
|
let dataAll = []; // 总数据集合
|
|
@@ -559,6 +504,8 @@ export default {
|
|
|
name: Object.keys(e)[0],
|
|
|
};
|
|
|
let wpid = Object.keys(e)[0];
|
|
|
+ this.wpid = wpid;
|
|
|
+
|
|
|
e[wpid].forEach((k) => {
|
|
|
column.forEach((c) => {
|
|
|
if (k.alertText == c.name) {
|
|
@@ -572,8 +519,11 @@ export default {
|
|
|
});
|
|
|
dataAll.push(obj);
|
|
|
});
|
|
|
+ // console.log('wpid:',this.wpid)
|
|
|
this.tableData.column = column;
|
|
|
+ // console.log('column:',column)
|
|
|
this.tableData.data = dataAll;
|
|
|
+ // console.log('dataAll:',dataAll)
|
|
|
///////////////////// 获取规则list
|
|
|
const map = {};
|
|
|
var windNum = [];
|
|
@@ -632,7 +582,7 @@ export default {
|
|
|
root[f].fobj = fobj;
|
|
|
}
|
|
|
}
|
|
|
- console.log("cascaderOptions:", cascaderOptions);
|
|
|
+ // console.log("cascaderOptions:", cascaderOptions);
|
|
|
this.cascaderOptions = cascaderOptions;
|
|
|
},
|
|
|
},
|