|
@@ -6,35 +6,37 @@
|
|
<div class="item" @click="tabSelect(1)" :class="{ active: tabIndex == 1 }">风机日详细信息</div>
|
|
<div class="item" @click="tabSelect(1)" :class="{ active: tabIndex == 1 }">风机日详细信息</div>
|
|
<div class="item" @click="tabSelect(2)" :class="{ active: tabIndex == 2 }">风场玫瑰图</div>
|
|
<div class="item" @click="tabSelect(2)" :class="{ active: tabIndex == 2 }">风场玫瑰图</div>
|
|
<div class="item" @click="tabSelect(3)" :class="{ active: tabIndex == 3 }">风机玫瑰图</div>
|
|
<div class="item" @click="tabSelect(3)" :class="{ active: tabIndex == 3 }">风机玫瑰图</div>
|
|
- <div class="item" @click="tabSelect(3)" :class="{ active: tabIndex == 4 }">风机切入切出分析</div>
|
|
|
|
|
|
+ <div class="item" @click="tabSelect(4)" :class="{ active: tabIndex == 4 }">风机切入切出分析</div>
|
|
</div>
|
|
</div>
|
|
<div class="query mg-b-16">
|
|
<div class="query mg-b-16">
|
|
<div class="query-items">
|
|
<div class="query-items">
|
|
<div class="query-item">
|
|
<div class="query-item">
|
|
<div class="lable">风场:</div>
|
|
<div class="lable">风场:</div>
|
|
<div class="search-input">
|
|
<div class="search-input">
|
|
- <el-select v-model="value1" clearable placeholder="请选择" popper-class="select">
|
|
|
|
- <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option>
|
|
|
|
|
|
+ <el-select v-model="wpId" clearable placeholder="请选择" popper-class="select" @change="getWtArray">
|
|
|
|
+ <el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="query-item">
|
|
<div class="query-item">
|
|
<div class="lable">风机:</div>
|
|
<div class="lable">风机:</div>
|
|
<div class="search-input">
|
|
<div class="search-input">
|
|
- <el-select v-model="value2" multiple placeholder="请选择" popper-class="select">
|
|
|
|
- <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option>
|
|
|
|
|
|
+ <el-select v-model="wtId" clearable placeholder="请选择" popper-class="select">
|
|
|
|
+ <el-option v-for="item in wtArray" :key="item.id" :value="item.id" :label="item.name" />
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="query-item">
|
|
<div class="query-item">
|
|
<div class="lable">日期:</div>
|
|
<div class="lable">日期:</div>
|
|
<div class="search-input">
|
|
<div class="search-input">
|
|
- <el-date-picker v-model="value4" type="date" placeholder="选择日期" popper-class="date-select"> </el-date-picker>
|
|
|
|
|
|
+ <el-date-picker v-model="recorddate" type="date" value-format="YYYY-MM-DD" placeholder="选择日期"
|
|
|
|
+ popper-class="date-select">
|
|
|
|
+ </el-date-picker>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="query-actions">
|
|
<div class="query-actions">
|
|
- <button class="btn green">搜索</button>
|
|
|
|
|
|
+ <button class="btn green" @click="search">搜索</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -42,7 +44,8 @@
|
|
<!-- tab1 -->
|
|
<!-- tab1 -->
|
|
<div v-if="tabIndex == 0" class="tab-1">
|
|
<div v-if="tabIndex == 0" class="tab-1">
|
|
<panel :title="'损失电量分析'" class="mg-b-16">
|
|
<panel :title="'损失电量分析'" class="mg-b-16">
|
|
- <area-bar-chart :height="'23.1481vh'" />
|
|
|
|
|
|
+ <area-bar-chart :height="'23.1481vh'" :bardata="{ legend: [] }" :lineData="lostChartData" :units="lostChartUnit"
|
|
|
|
+ :areaData="LostChartBgColorData" />
|
|
</panel>
|
|
</panel>
|
|
<panel :title="'电量'" class="mg-b-16">
|
|
<panel :title="'电量'" class="mg-b-16">
|
|
<multiple-bar-line-chart :height="'16.6667vh'" />
|
|
<multiple-bar-line-chart :height="'16.6667vh'" />
|
|
@@ -245,8 +248,8 @@ import panel from "../../components/coms/panel/panel.vue";
|
|
import Table from "../../components/coms/table/table.vue";
|
|
import Table from "../../components/coms/table/table.vue";
|
|
export default {
|
|
export default {
|
|
components: { panel, AreaBarChart, MultipleBarLineChart, Table, MarkerLineChart, DirectionRadarChart, DualPieChart },
|
|
components: { panel, AreaBarChart, MultipleBarLineChart, Table, MarkerLineChart, DirectionRadarChart, DualPieChart },
|
|
- setup() {},
|
|
|
|
- data() {
|
|
|
|
|
|
+ setup () { },
|
|
|
|
+ data () {
|
|
return {
|
|
return {
|
|
tabIndex: 0,
|
|
tabIndex: 0,
|
|
tableData: {
|
|
tableData: {
|
|
@@ -278,6 +281,18 @@ export default {
|
|
},
|
|
},
|
|
],
|
|
],
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ wpArray: [],
|
|
|
|
+ wpId: "",
|
|
|
|
+ wtArray: [],
|
|
|
|
+ wtId: "",
|
|
|
|
+
|
|
|
|
+ recorddate: new Date((new Date().getTime() - 3600 * 1000 * 24)).formatDate("yyyy-MM-dd"),
|
|
|
|
+
|
|
|
|
+ lostChartData: [],
|
|
|
|
+ lostChartUnit: [],
|
|
|
|
+ LostChartBgColorData: [],
|
|
|
|
+
|
|
options: [
|
|
options: [
|
|
{
|
|
{
|
|
value: "选项1",
|
|
value: "选项1",
|
|
@@ -308,14 +323,117 @@ export default {
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- tabSelect(state) {
|
|
|
|
|
|
+ // 获取风场
|
|
|
|
+ getWpArray () {
|
|
|
|
+ let that = this;
|
|
|
|
+ that.API.requestData({
|
|
|
|
+ method: "GET",
|
|
|
|
+ subUrl: "powercompare/windfarmAjax",
|
|
|
|
+ success (res) {
|
|
|
|
+ that.wpArray = res.data;
|
|
|
|
+ that.wpId = res.data[0].id;
|
|
|
|
+ that.getWtArray(that.wpId, true);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 获取风场
|
|
|
|
+ getWtArray (wpId, keepRequest) {
|
|
|
|
+ let that = this;
|
|
|
|
+ if (wpId) {
|
|
|
|
+ that.API.requestData({
|
|
|
|
+ method: "GET",
|
|
|
|
+ subUrl: "powercompare/windturbineAjax",
|
|
|
|
+ data: {
|
|
|
|
+ wpId
|
|
|
|
+ },
|
|
|
|
+ success (res) {
|
|
|
|
+ that.wtArray = res.data;
|
|
|
|
+ that.wtId = res.data[0].id;
|
|
|
|
+ if (keepRequest) {
|
|
|
|
+ that.getLostChartData();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ that.wtArray = [];
|
|
|
|
+ that.wtId = "";
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 获取损失电量分析图表数据
|
|
|
|
+ getLostChartData () {
|
|
|
|
+ let that = this;
|
|
|
|
+ that.API.requestData({
|
|
|
|
+ method: "POST",
|
|
|
|
+ subUrl: "goodness/findWtRealPowerChar",
|
|
|
|
+ data: {
|
|
|
|
+ wtId: that.wtId,
|
|
|
|
+ recorddate: that.recorddate
|
|
|
|
+ },
|
|
|
|
+ success (res) {
|
|
|
|
+ console.log(111, res.data);
|
|
|
|
+ const keyArray = ["value1", "value2", "value3", "value4"];
|
|
|
|
+
|
|
|
|
+ let lostChartData = [[], [], [], []];
|
|
|
|
+ const lostChartUnit = ["实发功率", "保证功率", "风速", "状态"];
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ keyArray.forEach((key, keyIndex) => {
|
|
|
|
+ res.data.forEach(ele => {
|
|
|
|
+ lostChartData[keyIndex].push(ele[key]);
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ that.lostChartData = lostChartData;
|
|
|
|
+ that.lostChartUnit = lostChartUnit;
|
|
|
|
+ that.getLostChartBgColorData();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 获取损失电量分析图表背景颜色
|
|
|
|
+ getLostChartBgColorData () {
|
|
|
|
+ let that = this;
|
|
|
|
+ that.API.requestData({
|
|
|
|
+ method: "POST",
|
|
|
|
+ subUrl: "goodness/getplotBands",
|
|
|
|
+ data: {
|
|
|
|
+ wtId: that.wtId,
|
|
|
|
+ recorddate: that.recorddate
|
|
|
|
+ },
|
|
|
|
+ success (res) {
|
|
|
|
+ console.log(222, res.data);
|
|
|
|
+ let LostChartBgColorData = [];
|
|
|
|
+ res.data.forEach((pEle, pIndex) => {
|
|
|
|
+ LostChartBgColorData.push({
|
|
|
|
+ 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
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ console.log(333, LostChartBgColorData);
|
|
|
|
+ that.LostChartBgColorData = LostChartBgColorData;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ tabSelect (state) {
|
|
this.tabIndex = state;
|
|
this.tabIndex = state;
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ // 搜索
|
|
|
|
+ search () {
|
|
|
|
+ if (this.tabIndex === 0) {
|
|
|
|
+ this.getLostChartData();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
},
|
|
},
|
|
- created() {
|
|
|
|
|
|
+ created () {
|
|
for (let i = 1; i < 50; i++) {
|
|
for (let i = 1; i < 50; i++) {
|
|
this.tableData.data.push(JSON.parse(JSON.stringify(this.tableData.data[0])));
|
|
this.tableData.data.push(JSON.parse(JSON.stringify(this.tableData.data[0])));
|
|
}
|
|
}
|
|
|
|
+ this.getWpArray();
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|