diff --git a/weapp/package/deviceBigdataGraph/deviceBigdataGraph.js b/weapp/package/deviceBigdataGraph/deviceBigdataGraph.js index 9bee0cc..d5a7964 100644 --- a/weapp/package/deviceBigdataGraph/deviceBigdataGraph.js +++ b/weapp/package/deviceBigdataGraph/deviceBigdataGraph.js @@ -24,7 +24,6 @@ Page({ }); chart.setOption(option); this.chart = chart; - wx.hideLoading() return chart; }); @@ -147,12 +146,12 @@ Page({ that.initECharts(option); }, 1000) } 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 => { if (res) { + let normal = 0; let abnormal = 0; let unknown = 0; @@ -231,7 +230,6 @@ Page({ break; } }); - that.setData({dataList:res}) var optionDevice = { tooltip: { trigger: 'item' @@ -267,11 +265,14 @@ Page({ }] }; - that.timeoutId2= setTimeout(() => { - that.initDeviceECharts(optionDevice); - }, 1000) + that.setData({dataList:res},()=>{ + that.timeoutId2= setTimeout(() => { + that.initDeviceECharts(optionDevice); + }, 1000) + }) + + } else { - wx.hideLoading() } }) Request.get(getProjectList()).then(res => { @@ -282,7 +283,6 @@ Page({ // projectList: res // }) } else { - wx.hideLoading() } })