Browse Source

获取待维修信息

master
巴林闲侠 2 years ago
parent
commit
7b3c60a5ff
  1. 3
      api/app/lib/routes/patrolManage/patrolRecord.js
  2. 20
      weapp/package/troubleshooting/index.js
  3. 4
      weapp/utils/getApiUrl.js

3
api/app/lib/routes/patrolManage/patrolRecord.js

@ -10,6 +10,9 @@ module.exports = function (app, router, opts) {
app.fs.api.logAttr['POST/patrolRecord/add'] = { content: '新增巡检记录', visible: true } app.fs.api.logAttr['POST/patrolRecord/add'] = { content: '新增巡检记录', visible: true }
router.post('/patrolRecord/add', patrolRecord.addPatrolRecord); router.post('/patrolRecord/add', patrolRecord.addPatrolRecord);
app.fs.api.logAttr['GET/patrolRecord/issue/handle'] = { content: '获取维修处理计划', visible: true };
router.get('/patrolRecord/issue/handle', patrolRecord.getPatrolRecordIssueHandle)
app.fs.api.logAttr['POST/patrolRecord/issue/handle'] = { content: '增加维修处理计划', visible: true }; app.fs.api.logAttr['POST/patrolRecord/issue/handle'] = { content: '增加维修处理计划', visible: true };
router.post('/patrolRecord/issue/handle', patrolRecord.addPatrolRecordIssueHandle(opts)) router.post('/patrolRecord/issue/handle', patrolRecord.addPatrolRecordIssueHandle(opts))

20
weapp/package/troubleshooting/index.js

@ -1,4 +1,7 @@
// package/bindTroubleshooting/index.js // package/bindTroubleshooting/index.js
import { getPatrolRecordIssueHandle } from "../../utils/getApiUrl";
import { Request } from "../../common";
Page({ Page({
/** /**
@ -23,15 +26,24 @@ Page({
currentTab: e.currentTarget.dataset.current currentTab: e.currentTarget.dataset.current
}) })
if (e.currentTarget.dataset.current == '0') { if (e.currentTarget.dataset.current == '0') {
} else if (e.currentTarget.dataset.current == '1') {
}
this.setData({ this.setData({
page: 0, page: 0,
dataList: [] dataList: []
}, () => { }, () => {
// this.getPatrolPlan(); this.getData({
type: e.currentTarget.dataset.current == '0' ? 'backlog' : 'haveDone'
});
})
},
getData (params) {
Request.get(getPatrolRecordIssueHandle, {}).then(res => {
console.log(res);
}) })
} else if (e.currentTarget.dataset.current == '1') {
// this.getPatrolRecord();
}
}, },
// 筛选选择 // 筛选选择

4
weapp/utils/getApiUrl.js

@ -32,3 +32,7 @@ exports.getPatrolRecord = (patrolPlanId, startTime, endTime, alarm, pointId) =>
exports.getPatrolTemplate = (id) => { exports.getPatrolTemplate = (id) => {
return `/patrolTemplate?id=${id}` return `/patrolTemplate?id=${id}`
} }
exports.getPatrolRecordIssueHandle = (id) => {
return `/patrolRecord/issue/handle`
}
Loading…
Cancel
Save