From 5506e1716055fca45aec5796adfc18c6c6f1131f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?zhaobing=E2=80=99?= Date: Mon, 25 Dec 2023 17:34:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=B7=A1=E6=A3=80=E5=BD=95=E5=85=A5?= =?UTF-8?q?=E4=B9=8B=E5=90=8E=EF=BC=8C=E6=B2=A1=E6=9C=89=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/patrolManage/patrolRecord.js | 2 +- weapp/pages/home/home.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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=>