|
@@ -70,8 +70,8 @@
|
|
|
<text>{{it}}</text>
|
|
|
</view>
|
|
|
<view class="ycdl_data_col_right flex justify-between">
|
|
|
- <text>{{item.inPower}}</text>
|
|
|
- <text>MW</text>
|
|
|
+ <text>{{Math.ceil(item.inPower/10000)}}</text>
|
|
|
+ <text>万MW</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</uni-col>
|
|
@@ -123,7 +123,7 @@
|
|
|
<view class="xsfsgl" v-else>
|
|
|
<view class="xsfsgl_title flex justify-center">
|
|
|
<image src="../../static/jnImage/powerPage/72clock.png" mode=""></image>
|
|
|
- <text>72小时风速功率</text>
|
|
|
+ <text>未来3小时风速功率</text>
|
|
|
</view>
|
|
|
<view class="qiun-chartsLine">
|
|
|
<qiun-data-charts type="mix" :opts="optsLine" :chartData="chartDataLine" />
|
|
@@ -403,7 +403,7 @@
|
|
|
},
|
|
|
getSevenTwoData() {
|
|
|
let that = this
|
|
|
- let threeDays = new Date(new Date().getTime() + 3 * 24 * 60 * 60 * 1000)
|
|
|
+ let threeDays = new Date(new Date().getTime() + 24 * 60 * 60 * 1000)
|
|
|
let params = {
|
|
|
wpId: that.stationWpid,
|
|
|
beginDate: new Date().getFullYear() + '-' + (new Date().getMonth() + 1) + '-' + new Date()
|
|
@@ -412,10 +412,42 @@
|
|
|
}
|
|
|
forecastShortApi(params).then(res => {
|
|
|
if (res && res.data) {
|
|
|
- that.getLineBar(res.data[that.stationWpid])
|
|
|
+ let nowDate = new Date(that.getTimeDaya()).getTime()
|
|
|
+ let showData = []
|
|
|
+ if (res.data[that.stationWpid].length > 0) {
|
|
|
+ res.data[that.stationWpid].forEach((it, index) => {
|
|
|
+ if (nowDate === it.hours) {
|
|
|
+ showData = res.data[that.stationWpid].slice(index, index + 10)
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+ // that.getLineBar(res.data[that.stationWpid])
|
|
|
+ that.getLineBar(showData)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ //获取时间
|
|
|
+ getTimeDaya() {
|
|
|
+ let currentDate = new Date()
|
|
|
+ let year = currentDate.getFullYear()
|
|
|
+ let month = currentDate.getMonth() + 1
|
|
|
+ let day = currentDate.getDate()
|
|
|
+ let hour = currentDate.getHours()
|
|
|
+ let minute = currentDate.getMinutes() < 10 ? '0' + currentDate.getMinutes() : currentDate
|
|
|
+ .getMinutes()
|
|
|
+ let min = ''
|
|
|
+ if (minute > 0 && minute < 15) {
|
|
|
+ min = '00'
|
|
|
+ } else if (minute > 14 && minute < 30) {
|
|
|
+ min = '15'
|
|
|
+ } else if (minute > 29 && minute < 45) {
|
|
|
+ min = '30'
|
|
|
+ } else if (minute > 44 && minute < 59) {
|
|
|
+ min = '45'
|
|
|
+ }
|
|
|
+ return year + '-' + month + '-' + day + ' ' + hour + ':' + min + ':00'
|
|
|
+ },
|
|
|
getLineBar(values) {
|
|
|
let opts = {
|
|
|
color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
|
|
@@ -427,8 +459,8 @@
|
|
|
show: true
|
|
|
},
|
|
|
xAxis: {
|
|
|
- disableGrid: true,
|
|
|
rotateLabel: true,
|
|
|
+ scrollShow: true,
|
|
|
rotateAngle: 90,
|
|
|
axisLineColor: "#A49EAC",
|
|
|
fontColor: "#A49EAC",
|
|
@@ -513,9 +545,10 @@
|
|
|
},
|
|
|
//时间转换
|
|
|
changTime(date) {
|
|
|
- let str = (new Date(date).getMonth() + 1) + '-' + new Date(date).getDate() + ' ' + new Date(date)
|
|
|
- .getHours() + ':'
|
|
|
- new Date(date).getMinutes() < 10 ? '0' + new Date(date).getMinutes() : new Date(date)
|
|
|
+ // let str = (new Date(date).getMonth() + 1) + '-' + new Date(date).getDate() + ' ' + new Date(date)
|
|
|
+ // .getHours() + ':'
|
|
|
+ let str = new Date(date).getHours() + ':' + (new Date(date).getMinutes() < 10 ? '0' + new Date(date)
|
|
|
+ .getMinutes() : new Date(date).getMinutes())
|
|
|
return str
|
|
|
},
|
|
|
changePowerTab(item) {
|