|
|
@ -54,13 +54,15 @@ Page({ |
|
|
|
}, |
|
|
|
|
|
|
|
getData (params) { |
|
|
|
const userInfo = wx.getStorageSync('userInfo'); |
|
|
|
//已办
|
|
|
|
Request.get(getPatrolRecordIssueHandle(), { |
|
|
|
...params,type:'haveDone',wx:true |
|
|
|
}).then(res => { |
|
|
|
const rslt=userInfo?.role?.includes('管理')?res.filter(item=>item?.project?.type==='管廊'):res |
|
|
|
this.setData({ |
|
|
|
doneLength:res.length, |
|
|
|
dataList: res.map(r => { |
|
|
|
doneLength:rslt.length, |
|
|
|
dataList: rslt.map(r => { |
|
|
|
return { |
|
|
|
...r, |
|
|
|
key:r.id, |
|
|
@ -73,9 +75,10 @@ Page({ |
|
|
|
Request.get(getPatrolRecordIssueHandle(), { |
|
|
|
...params,type:'backlog',wx:true |
|
|
|
}).then(res => { |
|
|
|
const rslt=userInfo?.role?.includes('管理')?res.filter(item=>item?.project?.type==='管廊'):res |
|
|
|
this.setData({ |
|
|
|
willLength:res.length, |
|
|
|
willdoneList: res.map(r => { |
|
|
|
willLength:rslt.length, |
|
|
|
willdoneList: rslt.map(r => { |
|
|
|
return { |
|
|
|
key:r.id, |
|
|
|
...r, |
|
|
|