Browse Source

feat:fix bugs

master
zhaobing 10 months 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,
where: {
}
},
include:[{
model:models.Project,
attributes:['type']
}]
},
]
}
if (pointId) {

11
weapp/package/troubleshooting/index.js

@ -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,

Loading…
Cancel
Save