Browse Source

feat:fix bugs

master
zhaobing 1 year ago
parent
commit
c30f4cad96
  1. 8
      api/app/lib/controllers/patrolManage/patrolRecord.js
  2. 11
      weapp/package/troubleshooting/index.js

8
api/app/lib/controllers/patrolManage/patrolRecord.js

@ -308,8 +308,14 @@ async function getPatrolRecordIssueHandle(ctx) {
model: models.PatrolRecord, model: models.PatrolRecord,
where: { where: {
} },
include:[{
model:models.Project,
attributes:['type']
}] }]
},
]
} }
if (pointId) { if (pointId) {

11
weapp/package/troubleshooting/index.js

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

Loading…
Cancel
Save