|
@@ -35,7 +35,7 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
- <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">搜索
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<div class="mainBox">
|
|
@@ -63,6 +63,7 @@ export default {
|
|
|
name: "index",
|
|
|
data() {
|
|
|
return {
|
|
|
+ btuLoading:true,
|
|
|
frequeryChart: null,
|
|
|
dataTime: [new Date(new Date().toLocaleDateString()).getTime() - 168 * 60 * 60 * 1000, new Date(new Date().toLocaleDateString()).getTime()],
|
|
|
height: "10",
|
|
@@ -144,6 +145,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getData() {
|
|
|
+ this.btuLoading = true
|
|
|
var param = {
|
|
|
startTime: new Date(this.dataTime[0]).getTime(),
|
|
|
endTime: new Date(this.dataTime[1]).getTime() - 1,
|
|
@@ -178,7 +180,9 @@ export default {
|
|
|
wsFrequery.push([wsFreData[j].ws, wsFreData[j].cont])
|
|
|
}
|
|
|
this.drawFrequeryChart(parameter, wsFrequery)
|
|
|
+ this.btuLoading = false
|
|
|
} else {
|
|
|
+ this.btuLoading = false
|
|
|
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);
|
|
|
}
|
|
|
|