|
@ -13,7 +13,9 @@ Page({ |
|
|
|
|
|
|
|
|
communitySelfInspList:[], |
|
|
communitySelfInspList:[], |
|
|
communitySelfInspTop:{}, |
|
|
communitySelfInspTop:{}, |
|
|
questionnaireUrl:'' |
|
|
questionnaireUrl:'', |
|
|
|
|
|
agencyLevel: '', |
|
|
|
|
|
curMonth: '' |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -25,8 +27,8 @@ Page({ |
|
|
navigationHeight: app.globalData.deviceInfo.navigationHeight, |
|
|
navigationHeight: app.globalData.deviceInfo.navigationHeight, |
|
|
share:app.globalData.share, |
|
|
share:app.globalData.share, |
|
|
agencyName:app.globalData.user.agencyName, |
|
|
agencyName:app.globalData.user.agencyName, |
|
|
|
|
|
agencyLevel: app.globalData.user.level |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
this.getSituation() |
|
|
this.getSituation() |
|
|
this.getInspRecord() |
|
|
this.getInspRecord() |
|
|
}, |
|
|
}, |
|
@ -57,10 +59,16 @@ Page({ |
|
|
} |
|
|
} |
|
|
getInspRecord(parm).then(res=>{ |
|
|
getInspRecord(parm).then(res=>{ |
|
|
res.data.list = res.data.list.reverse(); |
|
|
res.data.list = res.data.list.reverse(); |
|
|
|
|
|
let curMonth = new Date().getMonth() - 0 + 1 |
|
|
|
|
|
let communitySelfInspTop = res.data.list.filter(item => item.monthName-0 === curMonth).length?res.data.list.filter(item => item.monthName-0 === curMonth)[0]:{} |
|
|
|
|
|
let communitySelfInspList = res.data.list.filter(item => item.monthName-0 !== curMonth) |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
communitySelfInspTop:res.data.list.splice(0,1)[0], |
|
|
communitySelfInspTop,communitySelfInspList,curMonth |
|
|
communitySelfInspList:res.data.list.splice(0,2), |
|
|
|
|
|
}) |
|
|
}) |
|
|
|
|
|
// this.setData({
|
|
|
|
|
|
// communitySelfInspTop:res.data.list.splice(0,1)[0],
|
|
|
|
|
|
// communitySelfInspList:res.data.list.splice(0,2),
|
|
|
|
|
|
// })
|
|
|
app.globalData.questionnaireUrl = this.data.communitySelfInspTop.questionnaireUrl |
|
|
app.globalData.questionnaireUrl = this.data.communitySelfInspTop.questionnaireUrl |
|
|
}).catch(err=>{ |
|
|
}).catch(err=>{ |
|
|
wx.hideLoading() |
|
|
wx.hideLoading() |
|
|