|
|
@@ -148,8 +148,8 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- console.clear()
|
|
|
- console.log(this.olddata)
|
|
|
+ // console.clear()
|
|
|
+ // console.log(this.olddata)
|
|
|
// this.realtimeTF = true
|
|
|
// for (var key in this.olddata) {
|
|
|
// this.realtimeTF = false
|
|
|
@@ -162,15 +162,17 @@
|
|
|
},
|
|
|
// weather.weather.qxz_data_chart 一天的数据
|
|
|
async onehistory() { //设备列表
|
|
|
- var newtime = +new Date() / 1000
|
|
|
- var oldtime = newtime - 24 * 60 * 60
|
|
|
-
|
|
|
+
|
|
|
+ var date = new Date()
|
|
|
+ var newtime = +date / 1000
|
|
|
+ // var oldtime = newtime - 24 * 60 * 60
|
|
|
+ var oldtime = Number(new Date(date.toLocaleDateString()).getTime()) / 1000;
|
|
|
const res = await this.$myRequest({
|
|
|
url: '/api/api_gateway?method=weather.weather.qxz_data_chart',
|
|
|
data: {
|
|
|
device_id: this.eqinfo.item.equip_id || this.eqinfo.item.device_id,
|
|
|
- begin: parseInt(oldtime),
|
|
|
- end: parseInt(newtime)
|
|
|
+ begin: parseInt(oldtime - 24 * 60 * 60),
|
|
|
+ end: parseInt(newtime - 24 * 60 * 60)
|
|
|
}
|
|
|
})
|
|
|
|
|
|
@@ -237,8 +239,12 @@
|
|
|
var times = new Date(this.onedatas[i].time * 1000)
|
|
|
// console.log(this.onedatas[i].dat[this.olddata[key].value[2]].split("#")[0])
|
|
|
arr.unshift(Number(this.onedatas[i].dat[this.olddata[key].value[2]].split("#")[0]))
|
|
|
- xtitle.unshift(times.getMonth() + 1 + "/" + times.getDate() + "-" + times.getHours() + ":" + times
|
|
|
- .getMinutes())
|
|
|
+ if(times.getMinutes().toString().length>=2){
|
|
|
+ xtitle.unshift(times.getMonth() + 1 + "/" + times.getDate() + "-" + times.getHours() + ":" + times.getMinutes())
|
|
|
+ } else{
|
|
|
+ xtitle.unshift(times.getMonth() + 1 + "/" + times.getDate() + "-" + times.getHours() + ":0" + times.getMinutes())
|
|
|
+ }
|
|
|
+
|
|
|
timearr.unshift(+new Date(times) / 1000)
|
|
|
obj.data.unshift(Number(this.onedatas[i].dat[this.olddata[key].value[2]].split("#")[0]))
|
|
|
}
|
|
|
@@ -263,7 +269,7 @@
|
|
|
} else {
|
|
|
this.tishiTF = false
|
|
|
}
|
|
|
- // console.log(xtitle)
|
|
|
+ console.log(xtitle)
|
|
|
// console.log(linearr)
|
|
|
// return
|
|
|
this.showColumn("canvasColumnA", xtitle, linearr)
|