diff --git a/api/app/lib/controllers/patrolManage/patrolRecord.js b/api/app/lib/controllers/patrolManage/patrolRecord.js index ff450cd..9fbcb75 100644 --- a/api/app/lib/controllers/patrolManage/patrolRecord.js +++ b/api/app/lib/controllers/patrolManage/patrolRecord.js @@ -135,7 +135,7 @@ async function findPatrolRecord(ctx, next) { if (userInfo.username != 'SuperAdmin') { if (userInfo.structure) { if(home=='true'){ - rslt=rslt.filter(s => userInfo.structure.find(x => x == s.dataValues.project_id)) + rslt=rslt.filter(s => userInfo.structure.find(x => x == s.dataValues.projectId)) }else{ rslt = rslt.filter(s => userInfo.structure.find(x => x == s.points.project.id)) diff --git a/weapp/pages/home/home.js b/weapp/pages/home/home.js index b5aa82c..009bdc5 100644 --- a/weapp/pages/home/home.js +++ b/weapp/pages/home/home.js @@ -102,7 +102,7 @@ Page({ //与自己相关的所有巡检记录 let list=res[0] if(userInfo.username!=='SuperAdmin'){ - list=res[0]?.filter(item=> userInfo.structure.find((x) => x === item.project_id))||[] + list=res[0]?.filter(item=> userInfo.structure.find((x) => x === item.projectId))||[] } //过去七天的所有巡检记录 const sevenDaysList=list?.filter(item=>