|
@@ -44,8 +44,8 @@
|
|
|
<!-- tab1 -->
|
|
|
<div v-if="tabIndex == 0" class="tab-1">
|
|
|
<panel :title="'损失电量分析'" class="mg-b-16">
|
|
|
- <area-bar-chart :height="'23.1481vh'" :bardata="{ legend: [] }" :lineData="lostChartData" :units="lostChartUnit"
|
|
|
- :areaData="LostChartBgColorData" :showLegend="true" />
|
|
|
+ <area-line-chart :height="'23.1481vh'" :lineData="lostChartData" :units="lostChartUnit" :areaData="LostChartBgColorData"
|
|
|
+ @areaClick="areaBarChartClick" :showLegend="true" />
|
|
|
</panel>
|
|
|
<panel :title="'电量'" class="mg-b-16">
|
|
|
<multiple-bar-line-chart :height="'16.6667vh'" :barData="powerChartData" :lineData="powerChartLineData" :units="['(kWh)']"
|
|
@@ -446,11 +446,24 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
+ <el-dialog title="区域详情查看" v-model="dialogShow" width="85%" top="10vh" custom-class="modal" :close-on-click-modal="true">
|
|
|
+ <el-form ref="form" label-width="100px" inline>
|
|
|
+ <el-form-item style="width: 32%;" label="开始时间:">{{form.ks}}</el-form-item>
|
|
|
+ <el-form-item style="width: 32%;" label="结束时间:">{{form.js}}</el-form-item>
|
|
|
+ <el-form-item style="width: 32%;" label="时长:">{{form.sc}}(小时)</el-form-item>
|
|
|
+ <el-form-item style="width: 32%;" label="风速:">{{form.fs}}(m/s)</el-form-item>
|
|
|
+ <el-form-item style="width: 32%;" label="功率:">{{form.gl}}(KW)</el-form-item>
|
|
|
+ <el-form-item style="width: 32%;" label="理论发电量:">{{form.llfdl}}(KWh)</el-form-item>
|
|
|
+ <el-form-item style="width: 32%;" label="发电量:">{{form.fdl}}(KWh)</el-form-item>
|
|
|
+ <el-form-item style="width: 32%;" label="损失电量:">{{form.ssdl}}(KWh)</el-form-item>
|
|
|
+ <el-form-item style="width: 32%;" label="风机状态:">{{form.fjzt}}</el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import AreaBarChart from "../../components/chart/combination/area-bar-chart.vue";
|
|
|
+import AreaLineChart from "../../components/chart/combination/area-line-chart.vue";
|
|
|
import MultipleBarLineChart from "../../components/chart/combination/multiple-bar-line-chart.vue";
|
|
|
import MarkerLineChart from "../../components/chart/line/multiple-line-chart.vue";
|
|
|
import DualPieChart from "../../components/chart/pie/dual-pie-chart.vue";
|
|
@@ -458,7 +471,7 @@ import DirectionRadarChart from "@com/chart/radar/radar-chart.vue";
|
|
|
import panel from "../../components/coms/panel/panel.vue";
|
|
|
import Table from "../../components/coms/table/table.vue";
|
|
|
export default {
|
|
|
- components: { panel, AreaBarChart, MultipleBarLineChart, Table, MarkerLineChart, DirectionRadarChart, DualPieChart },
|
|
|
+ components: { panel, AreaLineChart, MultipleBarLineChart, Table, MarkerLineChart, DirectionRadarChart, DualPieChart },
|
|
|
setup () { },
|
|
|
data () {
|
|
|
return {
|
|
@@ -494,9 +507,14 @@ export default {
|
|
|
|
|
|
recorddate: new Date((new Date().getTime() - 3600 * 1000 * 24)).formatDate("yyyy-MM-dd"),
|
|
|
|
|
|
- lostChartData: [],
|
|
|
+ lostChartData: [{
|
|
|
+ text: "",
|
|
|
+ value: []
|
|
|
+ }],
|
|
|
lostChartUnit: [],
|
|
|
- LostChartBgColorData: [],
|
|
|
+ LostChartBgColorData: [{
|
|
|
+ name: ""
|
|
|
+ }],
|
|
|
|
|
|
powerChartData: [{
|
|
|
title: "",
|
|
@@ -688,7 +706,11 @@ export default {
|
|
|
yearWindPieData: [],
|
|
|
dayStopPieData: [],
|
|
|
monthStopPieData: [],
|
|
|
- yearStopPieData: []
|
|
|
+ yearStopPieData: [],
|
|
|
+
|
|
|
+ dialogShow: false,
|
|
|
+
|
|
|
+ form: {}
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -746,13 +768,30 @@ export default {
|
|
|
success (res) {
|
|
|
const keyArray = ["value1", "value2", "value3", "value4"];
|
|
|
|
|
|
- let lostChartData = [[], [], [], []];
|
|
|
+ let lostChartData = [{
|
|
|
+ text: "实发功率",
|
|
|
+ value: [{
|
|
|
+ text: "1",
|
|
|
+ value: 1,
|
|
|
+ }]
|
|
|
+ }, {
|
|
|
+ text: "保证功率",
|
|
|
+ value: []
|
|
|
+ }, {
|
|
|
+ text: "风速",
|
|
|
+ value: []
|
|
|
+ }, {
|
|
|
+ text: "状态",
|
|
|
+ value: []
|
|
|
+ }];
|
|
|
const lostChartUnit = ["实发功率", "保证功率", "风速", "状态"];
|
|
|
|
|
|
-
|
|
|
keyArray.forEach((key, keyIndex) => {
|
|
|
res.data.forEach(ele => {
|
|
|
- lostChartData[keyIndex].push(ele[key]);
|
|
|
+ lostChartData[keyIndex].value.push({
|
|
|
+ text: new Date(ele.time).formatDate("hh:mm"),
|
|
|
+ value: ele[key]
|
|
|
+ });
|
|
|
});
|
|
|
});
|
|
|
that.lostChartData = lostChartData;
|
|
@@ -779,7 +818,10 @@ export default {
|
|
|
name: pEle[0].name,
|
|
|
start: (pIndex ? LostChartBgColorData[pIndex - 1].end : 0),
|
|
|
end: (pIndex ? LostChartBgColorData[pIndex - 1].end : 0) + ((new Date(pEle[0].time2).getTime() / 1000) - (new Date(pEle[0].time1).getTime() / 1000)),
|
|
|
- color: pEle[0].itemStyle.color
|
|
|
+ color: pEle[0].itemStyle.color,
|
|
|
+ beginDate: pEle[0].time1,
|
|
|
+ endDate: pEle[0].time2,
|
|
|
+ wtId: that.wtId
|
|
|
});
|
|
|
});
|
|
|
that.LostChartBgColorData = LostChartBgColorData;
|
|
@@ -787,6 +829,24 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
+ // 损失电量分析图背景颜色区域点击事件
|
|
|
+ areaBarChartClick (item) {
|
|
|
+ let that = this;
|
|
|
+ that.API.requestData({
|
|
|
+ method: "POST",
|
|
|
+ subUrl: "goodness/plotBandAjax",
|
|
|
+ data: {
|
|
|
+ wtId: item.data.wtId,
|
|
|
+ beginDate: item.data.beginDate,
|
|
|
+ endDate: item.data.endDate
|
|
|
+ },
|
|
|
+ success (res) {
|
|
|
+ that.form = res.data || {};
|
|
|
+ that.dialogShow = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
// tab1 - 获取电量图表数据
|
|
|
getPowerChartData () {
|
|
|
let that = this;
|
|
@@ -1001,10 +1061,12 @@ export default {
|
|
|
}]
|
|
|
};
|
|
|
|
|
|
- res.data.data.forEach((ele) => {
|
|
|
- windResourcesData.indicator.push(ele.name);
|
|
|
- windResourcesData.data[0].value.push(ele.data1);
|
|
|
- });
|
|
|
+ if (res.data.data) {
|
|
|
+ res.data.data.forEach((ele) => {
|
|
|
+ windResourcesData.indicator.push(ele.name);
|
|
|
+ windResourcesData.data[0].value.push(ele.data1);
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
that.windResourcesData = windResourcesData;
|
|
|
}
|