Browse Source

feat:fix bugs

master
zhaobing 1 year ago
parent
commit
19868332ee
  1. 8
      api/app/lib/controllers/patrolManage/patrolRecord.js
  2. 4
      weapp/package/troubleshooting/index.js
  3. 2
      weapp/package/troubleshooting/index.wxml

8
api/app/lib/controllers/patrolManage/patrolRecord.js

@ -298,7 +298,7 @@ async function getPatrolRecordIssueHandle(ctx) {
const { models } = ctx.fs.dc; const { models } = ctx.fs.dc;
const { userId, userInfo } = ctx.fs.api const { userId, userInfo } = ctx.fs.api
const { type, pointId, startTime, endTime } = ctx.query const { type, pointId, startTime, endTime,wx } = ctx.query
let findOption = { let findOption = {
where: { where: {
@ -319,6 +319,12 @@ async function getPatrolRecordIssueHandle(ctx) {
findOption.where.createTime = { findOption.where.createTime = {
$between: [moment(parseInt(startTime)).format(), moment(parseInt(endTime)).format()] $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' let isSuperA = userInfo.username == 'SuperAdmin'

4
weapp/package/troubleshooting/index.js

@ -56,7 +56,7 @@ Page({
getData (params) { getData (params) {
//已办 //已办
Request.get(getPatrolRecordIssueHandle(), { Request.get(getPatrolRecordIssueHandle(), {
...params,type:'haveDone' ...params,type:'haveDone',wx:true
}).then(res => { }).then(res => {
this.setData({ this.setData({
doneLength:res.length, doneLength:res.length,
@ -71,7 +71,7 @@ Page({
}) })
//待办 //待办
Request.get(getPatrolRecordIssueHandle(), { Request.get(getPatrolRecordIssueHandle(), {
...params,type:'backlog' ...params,type:'backlog',wx:true
}).then(res => { }).then(res => {
this.setData({ this.setData({
willLength:res.length, willLength:res.length,

2
weapp/package/troubleshooting/index.wxml

@ -36,7 +36,7 @@
<!-- </van-checkbox-group> --> <!-- </van-checkbox-group> -->
</view> </view>
</van-dropdown-item> </van-dropdown-item>
<van-dropdown-item title="{{ '巡检记录时间' }}" bind:close="onDropDownClose"> <van-dropdown-item title="{{ '时间' }}" bind:close="onDropDownClose">
<view style="max-height:60%; display:flex" class="time-option"> <view style="max-height:60%; display:flex" class="time-option">
<van-datetime-picker show-toolbar="{{false}}" type="date" value="{{ startTime }}" bind:input="onStartTimeChange" min-date="{{1640966400000}}"/> <van-datetime-picker show-toolbar="{{false}}" type="date" value="{{ startTime }}" bind:input="onStartTimeChange" min-date="{{1640966400000}}"/>
<view style="display:flex; align-items:center">至</view> <view style="display:flex; align-items:center">至</view>

Loading…
Cancel
Save