diff --git a/api/app/lib/controllers/patrolManage/patrolRecord.js b/api/app/lib/controllers/patrolManage/patrolRecord.js index 698e6ee..bc763b4 100644 --- a/api/app/lib/controllers/patrolManage/patrolRecord.js +++ b/api/app/lib/controllers/patrolManage/patrolRecord.js @@ -298,7 +298,7 @@ async function getPatrolRecordIssueHandle(ctx) { const { models } = ctx.fs.dc; const { userId, userInfo } = ctx.fs.api - const { type, pointId, startTime, endTime } = ctx.query + const { type, pointId, startTime, endTime,wx } = ctx.query let findOption = { where: { @@ -311,7 +311,7 @@ async function getPatrolRecordIssueHandle(ctx) { } }] } - + if (pointId) { findOption.include[0].where.pointId = { $in: pointId.split(',') } } @@ -319,6 +319,12 @@ async function getPatrolRecordIssueHandle(ctx) { findOption.where.createTime = { $between: [moment(parseInt(startTime)).format(), moment(parseInt(endTime)).format()] } + //小程序问题处理界面根据巡检记录筛选时间 + if(wx==='true'){ + findOption.include[0].where.inspectionTime={ + $between: [moment(parseInt(startTime)).format('YYYY-MM-DD HH:mm:ss'), moment(parseInt(endTime)).format('YYYY-MM-DD HH:mm:ss')] + } + } } let isSuperA = userInfo.username == 'SuperAdmin' diff --git a/weapp/package/troubleshooting/index.js b/weapp/package/troubleshooting/index.js index fe146a8..b03fc86 100644 --- a/weapp/package/troubleshooting/index.js +++ b/weapp/package/troubleshooting/index.js @@ -56,7 +56,7 @@ Page({ getData (params) { //已办 Request.get(getPatrolRecordIssueHandle(), { - ...params,type:'haveDone' + ...params,type:'haveDone',wx:true }).then(res => { this.setData({ doneLength:res.length, @@ -71,7 +71,7 @@ Page({ }) //待办 Request.get(getPatrolRecordIssueHandle(), { - ...params,type:'backlog' + ...params,type:'backlog',wx:true }).then(res => { this.setData({ willLength:res.length, diff --git a/weapp/package/troubleshooting/index.wxml b/weapp/package/troubleshooting/index.wxml index cafc8ad..5839841 100644 --- a/weapp/package/troubleshooting/index.wxml +++ b/weapp/package/troubleshooting/index.wxml @@ -36,7 +36,7 @@ - +