@@ -38,7 +38,7 @@
</el-select>
</div>
- <el-button class="seachBtu" type="primary" plain icon="el-icon-search" size="small" @click="getListAirDensity">
+ <el-button class="seachBtu" type="primary" plain icon="el-icon-search" size="small" @click="getListAirDensity" :loading="btuLoading">
搜索
</el-button>
@@ -65,6 +65,7 @@ export default {
name: "index",
data() {
return {
+ btuLoading:true,
dataTime: [new Date(new Date().getFullYear(), new Date().getMonth() - 1, 1).getTime(), new Date(new Date().getFullYear(), new Date().getMonth(), 1)],
cftId: '',
uid: '1',
@@ -121,6 +122,7 @@ export default {
}
},
async getListAirDensity() {
+ this.btuLoading=true
const param = {
startTime: new Date(this.dataTime[0]).getTime(),
endTime: new Date(this.dataTime[1]).getTime(),
@@ -151,9 +153,10 @@ export default {
this.airData = res.rows[0]
this.drawAirDensityInChart(this.airData)
-
+ this.btuLoading = false
}).catch(err => {
this.airChart.hideLoading();
this.$message.error('获取空气密度数据异常')
console.log('获取空气密度数据异常:' + err)
})
@@ -37,7 +37,7 @@
</el-option>
- <el-button class="seachBtu" type="primary" plain icon="el-icon-search" size="small" @click="getListShear">搜索
+ <el-button class="seachBtu" type="primary" plain icon="el-icon-search" size="small" @click="getListShear" :loading="btuLoading">搜索
<div class="mainBox">
@@ -64,6 +64,7 @@ export default {
dataTime: [new Date(new Date().getFullYear(), new Date().getMonth() - 11, 1).getTime(), new Date(new Date().getFullYear(), new Date().getMonth(), 1)],
// dateTime:new Date(new Date().getFullYear(),0).getTime(),
@@ -101,6 +102,7 @@ export default {
async getListShear() {
+ this.btuLoading = true
@@ -129,9 +131,10 @@ export default {
this.shearData = res.rows[0]
this.drawShearInChart(this.shearData)
this.shearChart.hideLoading();
this.$message.error('获取风速数据异常')
console.log('获取风速数据异常:' + err)
@@ -16,16 +16,16 @@
<div class="conditionTwo">
- <span>时间:</span>
- <el-date-picker
- v-model="dataTime"
- type="monthrange"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- >
- </el-date-picker>
- </div>
+ <span>时间:</span>
+ <el-date-picker
+ v-model="dataTime"
+ type="monthrange"
+ range-separator="至"
+ start-placeholder="开始日期"
+ end-placeholder="结束日期"
+ >
+ </el-date-picker>
+ </div>
<span>时间维度:</span>
<el-select v-model="uid" placeholder="请选择">
@@ -49,7 +49,8 @@
- <el-button class="seachBtu" type="primary" plain icon="el-icon-search" size="small" @click="getListWs">搜索
+ <el-button class="seachBtu" type="primary" plain icon="el-icon-search" size="small" @click="getListWs"
+ :loading="btuLoading">搜索
@@ -79,6 +80,7 @@ export default {
+ btuLoading: true,
dataTime: [],
@@ -123,6 +125,7 @@ export default {
async getListWs() {
@@ -157,9 +160,10 @@ export default {
this.wsData = res.rows[0]
this.drawWsInChart(this.wsData)
this.wsChart.hideLoading();
- <el-button class="seachBtu" type="primary" plain icon="el-icon-search" size="small" @click="getListTurbulence">
+ <el-button class="seachBtu" type="primary" plain icon="el-icon-search" size="small" @click="getListTurbulence" :loading="btuLoading">
value: '',
@@ -104,6 +105,7 @@ export default {
async getListTurbulence() {
@@ -133,9 +135,10 @@ export default {
this.turData = res.rows[0]
this.drawTurInChart(this.turData)
this.turChart.hideLoading();
this.$message.error('获取湍流数据异常')
console.log('获取湍流数据异常:' + err)
@@ -43,7 +43,7 @@
- <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" :loading="btuLoading"
@click="seach">搜索
@@ -77,6 +77,7 @@ export default {
startTime: new Date(new Date().getFullYear() - 1, 0),
endTime: new Date(new Date().getFullYear(), 0),
@@ -130,6 +131,7 @@ export default {
//年平均风速
async getListWindResources() {
startTime: new Date(this.startTime).getTime(),
endTime: new Date(this.endTime).getTime(),
@@ -165,9 +167,11 @@ export default {
this.windResourcesData = res.rows[0]
this.drawWsYearInChart(this.windResourcesData)
this.drawWpdYearInChart(this.wpdData)
this.wsYearChart.hideLoading();
this.wpdYearChart.hideLoading();
@@ -50,7 +50,7 @@
- <el-button class="seachBtu" type="primary" plain icon="el-icon-search" size="small" @click="getListWpd">搜索
+ <el-button class="seachBtu" type="primary" plain icon="el-icon-search" size="small" @click="getListWpd" :loading="btuLoading">搜索
@@ -78,6 +78,7 @@ export default {
@@ -117,6 +118,7 @@ export default {
async getListWpd() {
@@ -146,9 +148,10 @@ export default {
this.wpdData = res.rows[0]
this.drawWpdInChart(this.wpdData)
this.wpdChart.hideLoading();
@@ -24,7 +24,8 @@
end-placeholder="结束日期">
</el-date-picker>
- <el-button class="seachBtu" type="primary" plain icon="el-icon-search" size="small" @click="seachTPAndAirdensity">
+ <el-button class="seachBtu" type="primary" plain icon="el-icon-search" size="small" @click="seachTPAndAirdensity"
+ :loading="btuLoading">
@@ -75,6 +76,7 @@ export default {
startDateAndEndDate: [],
tableData: [],
@@ -143,6 +145,7 @@ export default {
seachTPAndAirdensity() {
this.tableLoading = true
var param = {
@@ -191,8 +194,9 @@ export default {
this.TPChart.hideLoading();
this.tableLoading = false
this.$message.error('查询失败')
console.log('获取风况数据异常:' + err)
@@ -248,7 +252,7 @@ export default {
name: '温度(°C)',
alignTicks: true,
axisLine: {
- show:true
+ show: true
// max: 50,
// interval: 10,
@@ -266,10 +270,10 @@ export default {
name: '压强(hpa)',
splitLine: {
- show:true,
+ show: true,
lineStyle: {
type: 'dotted'
- <el-button class="seachBtu" type="primary" plain icon="el-icon-search" size="small" @click="getTurbulence">搜索
+ <el-button class="seachBtu" type="primary" plain icon="el-icon-search" size="small" @click="getTurbulence" :loading="btuLoading">搜索
@@ -68,6 +68,7 @@ export default {
dataTime: [new Date(new Date().toLocaleDateString()).getTime() - 168 * 60 * 60 * 1000, new Date(new Date().toLocaleDateString()).getTime()],
options: [],
allOptions: [],
@@ -133,6 +134,7 @@ export default {
methods: {
getTurbulence() {
const param =
{
@@ -185,8 +187,10 @@ export default {
return bHeight - aHeight
this.drawTunInChart(this.turData)
this.$message.success('查询成功')
this.tunInChart.hideLoading();
@@ -36,7 +36,7 @@
- <el-button class="seachBtu" type="primary" plain icon="el-icon-search" size="small" @click="getData">搜索
+ <el-button class="seachBtu" type="primary" plain icon="el-icon-search" size="small" @click="getData" :loading="btuLoading">搜索
@@ -114,6 +114,7 @@ export default {
height: "10",
charts: null,
@@ -230,6 +231,7 @@ export default {
getData() {
let param = {
endTime: new Date(this.dataTime[1]).getTime() - 1,
@@ -266,9 +268,11 @@ export default {
this.drawChart(res.data.AverageWindSpeed, res.data.WindPowerDensity)
this.$message.success("查询成功")
this.charts.hideLoading();
- <el-button class="seachBtu" type="primary" plain icon="el-icon-search" size="small" @click="seachWindRose">搜索
+ <el-button class="seachBtu" type="primary" plain icon="el-icon-search" size="small" @click="seachWindRose" :loading="btuLoading">搜索
height: "",
loading: false,
activeName: 'first',
@@ -129,6 +130,7 @@ export default {
/*查询三个玫瑰图*/
seachWindRose() {
@@ -186,6 +188,7 @@ export default {
this.$message.error('查询湍流玫瑰图异常')
console.log("查询湍流玫瑰图异常:" + err)
/*切换测风塔找到它对应的层高*/
changeCft() {
@@ -95,7 +95,7 @@ export default {
- btuLoading: false,
tableLoading: false,
shearChart: null,
@@ -303,7 +303,7 @@ export default {
let data = this.startDateAndEndDate.find(w => w.value == this.cftId)
this.getDataTime(this.cftId)
this.changeHeight(data)
- // this.getWindShear()
+ this.getWindShear()
getDataTime(cftId) {
this.dataTime = [new Date(new Date().toLocaleDateString()).getTime() - 168 * 60 * 60 * 1000, new Date(new Date().toLocaleDateString()).getTime()]
- <el-button class="seachBtu" type="primary" plain icon="el-icon-search" size="small" @click="getCharts">搜索
+ <el-button class="seachBtu" type="primary" plain icon="el-icon-search" size="small" :loading="btuLoading" @click="getCharts">搜索
@@ -71,6 +71,7 @@ export default {
height: null,
@@ -151,6 +152,7 @@ export default {
/*搜索,默认搜索风速的曲线图*/
async getCharts() {
@@ -209,7 +211,9 @@ export default {
//曲线图
this.wdData = res.data.wd[0]
this.drawWdChart(this.wdData, this.timeData)
this.wdChart.hideLoading();
@@ -35,7 +35,7 @@
@@ -63,6 +63,7 @@ export default {
frequeryChart: null,
@@ -144,6 +145,7 @@ export default {
@@ -178,7 +180,9 @@ export default {
wsFrequery.push([wsFreData[j].ws, wsFreData[j].cont])
this.drawFrequeryChart(parameter, wsFrequery)
} else {
this.$message.warning('此时间段测风塔没有数据')
this.frequeryChart.hideLoading();
@@ -229,8 +233,10 @@ export default {
xAxis: {
name: '风速区间 [x-0.5,x+0.5)',
type: 'category',
- axisLabel: {interval: 1},
- axisTick: {alignWithLabel: true},
+ axisLabel: {
+ // interval: 1
+ },
+ // axisTick: {alignWithLabel: true},
nameLocation: 'center',
nameGap: 25,
data: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]
@@ -260,6 +266,7 @@ export default {
series: [{
name: '风速频率(%)',
type: 'bar',
+ // barWidth: '98%',
smooth: false,
symbol: 'none', // 这句就是去掉点的
data: ws
@@ -308,7 +315,7 @@ export default {
#frequeryChart {
- width: 100%;
+ width: 95%;
height: calc(71vh);