Browse Source

feat:设备状态详情加载不出来

master
zhaobing’ 1 year ago
parent
commit
79a829a40d
  1. 10
      weapp/package/deviceBigdataGraph/deviceBigdataGraph.js

10
weapp/package/deviceBigdataGraph/deviceBigdataGraph.js

@ -24,7 +24,6 @@ Page({
}); });
chart.setOption(option); chart.setOption(option);
this.chart = chart; this.chart = chart;
wx.hideLoading()
return chart; return chart;
}); });
@ -147,12 +146,12 @@ Page({
that.initECharts(option); that.initECharts(option);
}, 1000) }, 1000)
} else { } else {
wx.hideLoading()
} }
}) })
Request.get(getPatrolRecord('all', moment(date1).format('YYYY-MM-DD') + ' 00:00:00', moment('2099-12-31').format('YYYY-MM-DD') + ' 23:59:59', 'null', 'null',{home:false})).then(res => { Request.get(getPatrolRecord('all', moment(date1).format('YYYY-MM-DD') + ' 00:00:00', moment('2099-12-31').format('YYYY-MM-DD') + ' 23:59:59', 'null', 'null',{home:false})).then(res => {
if (res) { if (res) {
let normal = 0; let normal = 0;
let abnormal = 0; let abnormal = 0;
let unknown = 0; let unknown = 0;
@ -231,7 +230,6 @@ Page({
break; break;
} }
}); });
that.setData({dataList:res})
var optionDevice = { var optionDevice = {
tooltip: { tooltip: {
trigger: 'item' trigger: 'item'
@ -267,11 +265,14 @@ Page({
}] }]
}; };
that.setData({dataList:res},()=>{
that.timeoutId2= setTimeout(() => { that.timeoutId2= setTimeout(() => {
that.initDeviceECharts(optionDevice); that.initDeviceECharts(optionDevice);
}, 1000) }, 1000)
})
} else { } else {
wx.hideLoading()
} }
}) })
Request.get(getProjectList()).then(res => { Request.get(getProjectList()).then(res => {
@ -282,7 +283,6 @@ Page({
// projectList: res // projectList: res
// }) // })
} else { } else {
wx.hideLoading()
} }
}) })

Loading…
Cancel
Save