'use strict'; const patrolRecord = require('../../controllers/patrolManage/patrolRecord'); module.exports = function (app, router, opts) { app.fs.api.logAttr['GET/patrolRecord/:patrolPlanId/:startTime/:endTime/:alarm/:pointId'] = { content: '获取巡检记录', visible: true }; // web端、小程序端查数据:patrolPlanId为all,不需要传pointId // 小程序端查点位最新一条数据:startTime、endTime、alarm不传 router.get('/patrolRecord/:patrolPlanId/:startTime/:endTime/:alarm/:pointId', patrolRecord.findPatrolRecord); app.fs.api.logAttr['POST/patrolRecord/add'] = { content: '新增巡检记录', visible: true } router.post('/patrolRecord/add', patrolRecord.addPatrolRecord); app.fs.api.logAttr['POST/patrolRecord/issue/handle'] = { content: '增加维修处理计划', visible: true }; router.post('/patrolRecord/issue/handle', patrolRecord.addPatrolRecordIssueHandle(opts)) // 修改维修处理计划 app.fs.api.logAttr['PUT/patrolRecord/issue/handle/:id'] = { content: '修改维修处理计划', visible: true }; router.put('/patrolRecord/issue/handle/:id', patrolRecord.editPatrolRecordIssueHandle(opts)) };