|
@@ -5,13 +5,11 @@
|
|
<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="wpId" clearable placeholder="请选择" popper-class="select">
|
|
|
|
|
|
+ <el-select v-model="wpId" clearable placeholder="请选择" popper-class="select" @change="(wpId) => { getWt(wpId, true); }">
|
|
<el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
|
|
<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>
|
|
|
|
- <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">
|
|
@@ -22,11 +20,11 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="query-actions">
|
|
<div class="query-actions">
|
|
- <button class="btn green" @click="search()">搜索</button>
|
|
|
|
|
|
+ <button class="btn green" @click="search">搜索</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="df-table">
|
|
<div class="df-table">
|
|
- <ComTable height="100vh" :data="tableData"></ComTable>
|
|
|
|
|
|
+ <ComTable height="35vh" :data="tableData"></ComTable>
|
|
</div>
|
|
</div>
|
|
<Mlc height="300px" :list="chartData" :units="chartUnit" :showLegend="true" />
|
|
<Mlc height="300px" :list="chartData" :units="chartUnit" :showLegend="true" />
|
|
</div>
|
|
</div>
|
|
@@ -87,14 +85,14 @@ export default {
|
|
yAxisIndex: 0,
|
|
yAxisIndex: 0,
|
|
value: []
|
|
value: []
|
|
}],
|
|
}],
|
|
- chartUnit: ["功率(MW)"]
|
|
|
|
|
|
+ chartUnit: ["功率(MW)", "(m/s)"]
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
|
|
// 函数
|
|
// 函数
|
|
methods: {
|
|
methods: {
|
|
// 获取风场
|
|
// 获取风场
|
|
- getWp () {
|
|
|
|
|
|
+ getWp (reGetWp) {
|
|
let that = this;
|
|
let that = this;
|
|
that.API.requestData({
|
|
that.API.requestData({
|
|
method: "GET",
|
|
method: "GET",
|
|
@@ -102,13 +100,13 @@ export default {
|
|
success (res) {
|
|
success (res) {
|
|
that.wpArray = res.data;
|
|
that.wpArray = res.data;
|
|
that.wpId = res.data[0].id;
|
|
that.wpId = res.data[0].id;
|
|
- that.getWt(that.wpId)
|
|
|
|
|
|
+ that.getWt(that.wpId, reGetWp);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
// 获取风机
|
|
// 获取风机
|
|
- getWt (wpid) {
|
|
|
|
|
|
+ getWt (wpid, reGetWp) {
|
|
let that = this;
|
|
let that = this;
|
|
if (that.wpId) {
|
|
if (that.wpId) {
|
|
that.API.requestData({
|
|
that.API.requestData({
|
|
@@ -121,7 +119,9 @@ export default {
|
|
success (res) {
|
|
success (res) {
|
|
that.wtArray = res.data;
|
|
that.wtArray = res.data;
|
|
that.wtId = res.data[0].id;
|
|
that.wtId = res.data[0].id;
|
|
- that.getTab1Data();
|
|
|
|
|
|
+ if (!reGetWp) {
|
|
|
|
+ that.getTab1Data();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -137,10 +137,41 @@ export default {
|
|
},
|
|
},
|
|
success (res) {
|
|
success (res) {
|
|
that.tableData.data = res.data.list;
|
|
that.tableData.data = res.data.list;
|
|
|
|
+ that.getChartData();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
|
|
- const key = ["actualpower", "optimalpower", "optmalpower"];
|
|
|
|
|
|
+ // 获取图表数据
|
|
|
|
+ getChartData () {
|
|
|
|
+ let that = this;
|
|
|
|
+ that.API.requestData({
|
|
|
|
+ method: "POST",
|
|
|
|
+ subUrl: "powersaturation/powersaturationamonutchart",
|
|
|
|
+ data: {
|
|
|
|
+ wtId: that.wtId
|
|
|
|
+ },
|
|
|
|
+ success (res) {
|
|
|
|
+
|
|
|
|
+ const keyArray = [{
|
|
|
|
+ key: "value1",
|
|
|
|
+ title: "风速"
|
|
|
|
+ }, {
|
|
|
|
+ key: "value2",
|
|
|
|
+ title: "实际拟合功率"
|
|
|
|
+ }, {
|
|
|
|
+ key: "value3",
|
|
|
|
+ title: "最优拟合功率"
|
|
|
|
+ }, {
|
|
|
|
+ key: "value4",
|
|
|
|
+ title: "保证功率"
|
|
|
|
+ }];
|
|
|
|
|
|
let chartData = [{
|
|
let chartData = [{
|
|
|
|
+ title: "风速",
|
|
|
|
+ yAxisIndex: 1,
|
|
|
|
+ value: []
|
|
|
|
+ }, {
|
|
title: "实际拟合功率",
|
|
title: "实际拟合功率",
|
|
yAxisIndex: 0,
|
|
yAxisIndex: 0,
|
|
value: []
|
|
value: []
|
|
@@ -154,11 +185,11 @@ export default {
|
|
value: []
|
|
value: []
|
|
}];
|
|
}];
|
|
|
|
|
|
- key.forEach((keyEle, keyIndex)=>{
|
|
|
|
- res.data.list.forEach(ele=>{
|
|
|
|
|
|
+ keyArray.forEach((keyEle, keyIndex) => {
|
|
|
|
+ res.data.forEach(ele => {
|
|
chartData[keyIndex].value.push({
|
|
chartData[keyIndex].value.push({
|
|
- text:ele.id,
|
|
|
|
- value:ele[keyEle]
|
|
|
|
|
|
+ text: "",
|
|
|
|
+ value: ele[keyEle.key]
|
|
});
|
|
});
|
|
});
|
|
});
|
|
});
|
|
});
|
|
@@ -211,7 +242,7 @@ export default {
|
|
overflow: auto;
|
|
overflow: auto;
|
|
flex-grow: 1;
|
|
flex-grow: 1;
|
|
margin-top: 1.481vh;
|
|
margin-top: 1.481vh;
|
|
- height:60vh;
|
|
|
|
|
|
+ height: 30vh;
|
|
|
|
|
|
&:before {
|
|
&:before {
|
|
content: '';
|
|
content: '';
|