|
@@ -44,7 +44,7 @@
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
<el-button class="seachBtu" type="primary" plain icon="el-icon-search" size="small"
|
|
<el-button class="seachBtu" type="primary" plain icon="el-icon-search" size="small"
|
|
- @click="getListWindResources">搜索
|
|
|
|
|
|
+ @click="seach">搜索
|
|
</el-button>
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
<div class="mainBox">
|
|
<div class="mainBox">
|
|
@@ -124,6 +124,10 @@ export default {
|
|
this.getListP()
|
|
this.getListP()
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ seach(){
|
|
|
|
+ this.getListWindResources()
|
|
|
|
+ this.getListP()
|
|
|
|
+ },
|
|
//年平均风速
|
|
//年平均风速
|
|
async getListWindResources() {
|
|
async getListWindResources() {
|
|
const param = {
|
|
const param = {
|
|
@@ -135,6 +139,9 @@ export default {
|
|
if (!this.wsYearChart) {
|
|
if (!this.wsYearChart) {
|
|
this.wsYearChart = this.$echarts.init(document.getElementById('wsYearChart'))
|
|
this.wsYearChart = this.$echarts.init(document.getElementById('wsYearChart'))
|
|
}
|
|
}
|
|
|
|
+ if (!this.wpdYearChart) {
|
|
|
|
+ this.wpdYearChart = this.$echarts.init(document.getElementById('wpdYearChart'))
|
|
|
|
+ }
|
|
|
|
|
|
// 调用showLoading方法
|
|
// 调用showLoading方法
|
|
this.wsYearChart.showLoading({
|
|
this.wsYearChart.showLoading({
|
|
@@ -144,15 +151,23 @@ export default {
|
|
maskColor: 'rgba(255, 255, 255, 0.2)',
|
|
maskColor: 'rgba(255, 255, 255, 0.2)',
|
|
zlevel: 0,
|
|
zlevel: 0,
|
|
});
|
|
});
|
|
|
|
+ this.wpdYearChart.showLoading({
|
|
|
|
+ text: 'loading',
|
|
|
|
+ color: '#c23531',
|
|
|
|
+ textColor: '#000',
|
|
|
|
+ maskColor: 'rgba(255, 255, 255, 0.2)',
|
|
|
|
+ zlevel: 0,
|
|
|
|
+ });
|
|
await listWindResources(param).then(async res => {
|
|
await listWindResources(param).then(async res => {
|
|
//风功率密度数据
|
|
//风功率密度数据
|
|
this.wpdData = res.rows[1]
|
|
this.wpdData = res.rows[1]
|
|
this.wpdDisabled = false
|
|
this.wpdDisabled = false
|
|
this.windResourcesData = res.rows[0]
|
|
this.windResourcesData = res.rows[0]
|
|
- this.drawWsYearInChart(this.windResourcesData)
|
|
|
|
-
|
|
|
|
|
|
+ this.drawWsYearInChart(this.windResourcesData)
|
|
|
|
+ this.drawWpdYearInChart(this.wpdData)
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
this.wsYearChart.hideLoading();
|
|
this.wsYearChart.hideLoading();
|
|
|
|
+ this.wpdYearChart.hideLoading();
|
|
this.$message.error('获取风速数据异常')
|
|
this.$message.error('获取风速数据异常')
|
|
console.log('获取风速数据异常:' + err)
|
|
console.log('获取风速数据异常:' + err)
|
|
})
|
|
})
|
|
@@ -186,11 +201,20 @@ export default {
|
|
endTime: new Date(this.endTime).getTime(),
|
|
endTime: new Date(this.endTime).getTime(),
|
|
eqId: this.cftId,
|
|
eqId: this.cftId,
|
|
}
|
|
}
|
|
|
|
+ if (!this.pYearChart) {
|
|
|
|
+ this.pYearChart = this.$echarts.init(document.getElementById('pYearChart'))
|
|
|
|
+ }
|
|
|
|
+ this.pYearChart.showLoading({
|
|
|
|
+ text: 'loading',
|
|
|
|
+ color: '#c23531',
|
|
|
|
+ textColor: '#000',
|
|
|
|
+ maskColor: 'rgba(255, 255, 255, 0.2)',
|
|
|
|
+ zlevel: 0,
|
|
|
|
+ });
|
|
listDensity(param).then(async res => {
|
|
listDensity(param).then(async res => {
|
|
-
|
|
|
|
this.pData = res.rows
|
|
this.pData = res.rows
|
|
this.airDisabled = false
|
|
this.airDisabled = false
|
|
- // this.drawPYearInChart(this.pData)
|
|
|
|
|
|
+ this.drawPYearInChart(this.pData)
|
|
|
|
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
this.pYearChart.hideLoading();
|
|
this.pYearChart.hideLoading();
|
|
@@ -202,7 +226,9 @@ export default {
|
|
|
|
|
|
//年平均风速曲线图
|
|
//年平均风速曲线图
|
|
drawWsYearInChart(data) {
|
|
drawWsYearInChart(data) {
|
|
- this.wsYearChart = this.$echarts.init(document.getElementById('wsYearChart'))
|
|
|
|
|
|
+ if (!this.wsYearChart) {
|
|
|
|
+ this.wsYearChart = this.$echarts.init(document.getElementById('wsYearChart'))
|
|
|
|
+ }
|
|
/*拼接曲线图的serise*/
|
|
/*拼接曲线图的serise*/
|
|
let serise = []
|
|
let serise = []
|
|
let legend = []
|
|
let legend = []
|
|
@@ -297,7 +323,9 @@ export default {
|
|
},
|
|
},
|
|
//风功率密度图
|
|
//风功率密度图
|
|
drawWpdYearInChart(data) {
|
|
drawWpdYearInChart(data) {
|
|
- this.wpdYearChart = this.$echarts.init(document.getElementById('wpdYearChart'))
|
|
|
|
|
|
+ if (!this.wpdYearChart) {
|
|
|
|
+ this.wpdYearChart = this.$echarts.init(document.getElementById('wpdYearChart'))
|
|
|
|
+ }
|
|
/*拼接曲线图的serise*/
|
|
/*拼接曲线图的serise*/
|
|
let serise = []
|
|
let serise = []
|
|
let legend = []
|
|
let legend = []
|
|
@@ -391,7 +419,9 @@ export default {
|
|
},
|
|
},
|
|
//空气密度图
|
|
//空气密度图
|
|
drawPYearInChart(data) {
|
|
drawPYearInChart(data) {
|
|
- this.pYearChart = this.$echarts.init(document.getElementById('pYearChart'))
|
|
|
|
|
|
+ if (!this.pYearChart) {
|
|
|
|
+ this.pYearChart = this.$echarts.init(document.getElementById('pYearChart'))
|
|
|
|
+ }
|
|
/*拼接曲线图的serise*/
|
|
/*拼接曲线图的serise*/
|
|
let serise = []
|
|
let serise = []
|
|
let legend = []
|
|
let legend = []
|
|
@@ -511,34 +541,34 @@ export default {
|
|
} else if (this.activeName == 'second') {
|
|
} else if (this.activeName == 'second') {
|
|
this.wpdYearChart = null
|
|
this.wpdYearChart = null
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- if (!this.wpdYearChart) {
|
|
|
|
- this.wpdYearChart = this.$echarts.init(document.getElementById('wpdYearChart'))
|
|
|
|
- }
|
|
|
|
- // 调用showLoading方法
|
|
|
|
- this.wpdYearChart.showLoading({
|
|
|
|
- text: 'loading',
|
|
|
|
- color: '#c23531',
|
|
|
|
- textColor: '#000',
|
|
|
|
- maskColor: 'rgba(255, 255, 255, 0.2)',
|
|
|
|
- zlevel: 0,
|
|
|
|
- });
|
|
|
|
|
|
+ // if (!this.wpdYearChart) {
|
|
|
|
+ // this.wpdYearChart = this.$echarts.init(document.getElementById('wpdYearChart'))
|
|
|
|
+ // }
|
|
|
|
+ // // 调用showLoading方法
|
|
|
|
+ // this.wpdYearChart.showLoading({
|
|
|
|
+ // text: 'loading',
|
|
|
|
+ // color: '#c23531',
|
|
|
|
+ // textColor: '#000',
|
|
|
|
+ // maskColor: 'rgba(255, 255, 255, 0.2)',
|
|
|
|
+ // zlevel: 0,
|
|
|
|
+ // });
|
|
this.drawWpdYearInChart(this.wpdData)
|
|
this.drawWpdYearInChart(this.wpdData)
|
|
this.wpdYearChart.resize()
|
|
this.wpdYearChart.resize()
|
|
})
|
|
})
|
|
} else if (this.activeName == 'third') {
|
|
} else if (this.activeName == 'third') {
|
|
this.pYearChart = null
|
|
this.pYearChart = null
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- if (!this.pYearChart) {
|
|
|
|
- this.pYearChart = this.$echarts.init(document.getElementById('pYearChart'))
|
|
|
|
- }
|
|
|
|
- // 调用showLoading方法
|
|
|
|
- this.pYearChart.showLoading({
|
|
|
|
- text: 'loading',
|
|
|
|
- color: '#c23531',
|
|
|
|
- textColor: '#000',
|
|
|
|
- maskColor: 'rgba(255, 255, 255, 0.2)',
|
|
|
|
- zlevel: 0,
|
|
|
|
- });
|
|
|
|
|
|
+ // if (!this.pYearChart) {
|
|
|
|
+ // this.pYearChart = this.$echarts.init(document.getElementById('pYearChart'))
|
|
|
|
+ // }
|
|
|
|
+ // // 调用showLoading方法
|
|
|
|
+ // this.pYearChart.showLoading({
|
|
|
|
+ // text: 'loading',
|
|
|
|
+ // color: '#c23531',
|
|
|
|
+ // textColor: '#000',
|
|
|
|
+ // maskColor: 'rgba(255, 255, 255, 0.2)',
|
|
|
|
+ // zlevel: 0,
|
|
|
|
+ // });
|
|
this.drawPYearInChart(this.pData)
|
|
this.drawPYearInChart(this.pData)
|
|
this.pYearChart.resize()
|
|
this.pYearChart.resize()
|
|
})
|
|
})
|