Browse Source

feat:巡检录入之后,没有记录

master
zhaobing’ 1 year ago
parent
commit
5506e17160
  1. 2
      api/app/lib/controllers/patrolManage/patrolRecord.js
  2. 2
      weapp/pages/home/home.js

2
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))

2
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=>

Loading…
Cancel
Save