From 938a76aa07289af5b401817238acc7043a9e17bc Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Tue, 21 Feb 2023 14:56:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A1=E6=A3=80=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/.vscode/launch.json | 3 +- api/app/lib/schedule/clearExpiredData.js | 6 +- api/app/lib/schedule/metting.js | 64 --- api/app/lib/utils/member.js | 415 ------------------ api/package-lock.json | 9 + .../sections/patrolManage/containers/index.js | 3 +- .../patrolManage/containers/patrolTemplate.js | 164 +++++++ .../src/sections/patrolManage/nav-item.js | 5 +- .../src/sections/patrolManage/routes.js | 9 +- 9 files changed, 189 insertions(+), 489 deletions(-) delete mode 100644 api/app/lib/schedule/metting.js delete mode 100644 api/app/lib/utils/member.js create mode 100644 web/client/src/sections/patrolManage/containers/patrolTemplate.js diff --git a/api/.vscode/launch.json b/api/.vscode/launch.json index f490bb1..0e5cef4 100644 --- a/api/.vscode/launch.json +++ b/api/.vscode/launch.json @@ -15,7 +15,8 @@ "args": [ "-p 4900", // 研发 - "-g postgres://postgres:123456@10.8.16.184:5432/XunJian", + "-g postgres://FashionAdmin:123456@10.8.30.39:5432/Inspection", + // "-g postgres://FashionAdmin:123456@10.8.30.156:5432/inspection", // 测试 // "--apiEmisUrl http://10.8.30.161:1111", // "--qnak XuDgkao6cL0HidoMAPnA5OB10Mc_Ew08mpIfRJK5", diff --git a/api/app/lib/schedule/clearExpiredData.js b/api/app/lib/schedule/clearExpiredData.js index 00daf06..eb9d51f 100644 --- a/api/app/lib/schedule/clearExpiredData.js +++ b/api/app/lib/schedule/clearExpiredData.js @@ -22,11 +22,7 @@ module.exports = function (app, opts) { expired: { $lt: now } } }) - await models.PhoneValidateCode.destroy({ - where: { - expired: { $lt: now } - } - }) + fs.readdir(path.join(__dirname, `../../downloadFiles`), function (err, files) { if (err) { return; diff --git a/api/app/lib/schedule/metting.js b/api/app/lib/schedule/metting.js deleted file mode 100644 index 9c98a36..0000000 --- a/api/app/lib/schedule/metting.js +++ /dev/null @@ -1,64 +0,0 @@ -const moment = require('moment') - -const TEST = false -// const TEST = true - -module.exports = function (app, opts) { - const mettingGenerate = app.fs.scheduleInit( - { - interval: '0 0 0 */1 * *', - immediate: TEST, - proRun: !TEST, - }, - async () => { - try { - const { models } = app.fs.dc - const today = moment() - const date = today.date() - const dateFormat = moment().format('YYYY-MM-DD') - let sites = await models.Site.findAll({ - where: { del: false }, - attributes: ['id', 'name'] - }); - let datasM = [], datasB = [], datasD = [], datas6 = [] - sites.map(s => { - datasM.push({ - siteId: s.id, - type: '月度安全例会', - date: dateFormat - }); - datasB.push({ - siteId: s.id, - type: '班前会', - date: dateFormat - }); - datasD.push({ - siteId: s.id, - type: '日调度会', - date: dateFormat - }); - datas6.push({ - siteId: s.id, - type: '逢六教育培训', - date: dateFormat - }) - }) - if (date == 1) { - await models.Metting.bulkCreate(datasM) - } - await models.Metting.bulkCreate(datasB) - await models.Metting.bulkCreate(datasD) - if (parseInt(date) % 10 == 6) { - await models.Metting.bulkCreate(datas6) - } - - } catch (error) { - app.fs.logger.error(`sechedule: mettingGenerate, error: ${error}`); - } - } - ); - - return { - mettingGenerate - } -} \ No newline at end of file diff --git a/api/app/lib/utils/member.js b/api/app/lib/utils/member.js deleted file mode 100644 index 1a5c404..0000000 --- a/api/app/lib/utils/member.js +++ /dev/null @@ -1,415 +0,0 @@ -'use strict'; -const moment = require('moment') -const request = require('superagent'); - -module.exports = function (app, opts) { - - async function memberList ({ - keywordTarget, keyword, limit, page, state, - hiredateStart, hiredateEnd, marital, native, workPlace, - orderBy, orderDirection, - nowAttendanceTime, - overtimeDayStatisticStartDate, overtimeDayStatisticendDate, - overtimeCountStatistic, overtimeCountStatisticStartDate, overtimeCountStatisticendDate, - vacateDayStatisticStartDate, vacateDayStatisticendDate, - vacateDurationStatistic, vacateCountStatistic, vacateCountStatisticStartDate, vacateCountStatisticendDate - }) { - const { judgeHoliday } = app.fs.utils - const { clickHouse } = app.fs - const { database: pepEmis } = clickHouse.pepEmis.opts.config - - const curDay = moment().format('YYYY-MM-DD') - const nowTime = moment() - let whereOption = [] - let whereFromSelectOption = [] - let returnEmpty = false - if (state == 'inOffice') { - // 在岗 - const holidayJudge = await judgeHoliday(curDay) - if (holidayJudge) { - if ( - holidayJudge.workday - && nowTime.isAfter(moment(curDay + ' 08:30')) - && nowTime.isBefore(moment(curDay + ' 17:30')) - ) { - // 在工作日的工作时间范围 无请假记录 - whereFromSelectOption.push(`vacateStartTime = '1970-01-01 00:00:00.000000'`) - } else { - returnEmpty = true - } - } else { - returnEmpty = true - } - } - if (state == 'dayoff') { - // 放假 - const holidayJudge = await judgeHoliday(curDay) - if (holidayJudge) { - if ( - holidayJudge.dayoff || holidayJudge.festivals - ) { - // 在休息日范围内且无加班申请 - whereFromSelectOption.push(`overtimeStartTime = '1970-01-01 00:00:00.000000'`) - } else { - returnEmpty = true - } - } else { - returnEmpty = true - } - } - if (returnEmpty) { - return { - count: 0, - rows: [] - } - } - - let overtimeDayStatisticWhere = [] - if (overtimeDayStatisticStartDate) { - overtimeDayStatisticWhere.push(`overtime_day.day >= '${moment(overtimeDayStatisticStartDate).format('YYYY-MM-DD')}'`) - } - if (overtimeDayStatisticendDate) { - overtimeDayStatisticWhere.push(`overtime_day.day <= '${moment(overtimeDayStatisticendDate).format('YYYY-MM-DD')}'`) - } - - let overtimeCountStatisticWhere = [] - if (overtimeCountStatisticStartDate) { - overtimeCountStatisticWhere.push(`overtime.start_time >= '${moment(overtimeCountStatisticStartDate).startOf('day').format('YYYY-MM-DD HH:mm:ss')}'`) - } - if (overtimeCountStatisticendDate) { - overtimeCountStatisticWhere.push(`overtime.end_time <= '${moment(overtimeCountStatisticendDate).endOf('day').format('YYYY-MM-DD HH:mm:ss')}'`) - } - - let vacateDayStatisticWhere = [] - if (vacateDayStatisticStartDate) { - vacateDayStatisticWhere.push(`vacate_day.day >= '${moment(vacateDayStatisticStartDate).format('YYYY-MM-DD')}'`) - } - if (vacateDayStatisticendDate) { - vacateDayStatisticWhere.push(`vacate_day.day <= '${moment(vacateDayStatisticendDate).format('YYYY-MM-DD')}'`) - } - - let vacateCountStatisticWhere = [] - if (vacateCountStatisticStartDate) { - vacateCountStatisticWhere.push(`vacate.start_time >= '${moment(vacateCountStatisticStartDate).startOf('day').format('YYYY-MM-DD HH:mm:ss')}'`) - } - if (vacateCountStatisticendDate) { - vacateCountStatisticWhere.push(`vacate.end_time <= '${moment(vacateCountStatisticendDate).endOf('day').format('YYYY-MM-DD HH:mm:ss')}'`) - } - // CRAZY - const innerSelectQuery = ` - FROM member - INNER JOIN ${pepEmis}.user AS user - ON member.pep_user_id = user.id - ${keywordTarget == 'number' && keyword ? ` - AND user.people_code LIKE '%${keyword}%' - `: ''} - ${keywordTarget == 'name' && keyword ? ` - AND user.name LIKE '%${keyword}%' - `: ''} - - ${nowAttendanceTime ? ` - ${state == 'vacate' ? 'INNER' : 'LEFT'} JOIN ( - SELECT - pep_user_id, - any(start_time) AS vacateStartTime, - any(end_time) AS vacateEndTime - FROM vacate - WHERE - start_time <= '${nowTime.format('YYYY-MM-DD HH:mm:ss')}' - AND end_time > '${nowTime.format('YYYY-MM-DD HH:mm:ss')}' - GROUP BY pep_user_id - ) AS hrVacate - ON hrVacate.pep_user_id = member.pep_user_id - `: ''} - ${nowAttendanceTime ? ` - LEFT JOIN ( - SELECT - pep_user_id, - any(start_time) AS overtimeStartTime, - any(end_time) AS overtimeEndTime - FROM overtime - WHERE - start_time <= '${nowTime.format('YYYY-MM-DD HH:mm:ss')}' - AND end_time > '${nowTime.format('YYYY-MM-DD HH:mm:ss')}' - GROUP BY pep_user_id - ) AS hrOvertime - ON hrOvertime.pep_user_id = member.pep_user_id - `: ''} - - ${orderBy == 'overtimeTakeRestSum' || - orderBy == 'overtimePaySum' || - orderBy == 'overtimeSum' ? - `LEFT JOIN ( - SELECT - overtime.pep_user_id AS pepUserId, - sum(overtime_day.duration) AS duration - FROM overtime_day - INNER JOIN overtime - ON overtime.id = overtime_day.overtime_id - ${orderBy == 'overtimeTakeRestSum' ? `AND overtime.compensate = '调休'` : ''} - ${orderBy == 'overtimePaySum' ? `AND overtime.compensate = '发放加班补偿'` : ''} - ${overtimeDayStatisticWhere.length ? ` - WHERE ${overtimeDayStatisticWhere.join(' AND ')} - `: ''} - GROUP BY overtime.pep_user_id - ) AS overtimeDayStatistic - ON overtimeDayStatistic.pepUserId = member.pep_user_id`: ''} - - ${overtimeCountStatistic ? ` - LEFT JOIN ( - SELECT - overtime.pep_user_id AS pepUserId, - count(pep_process_story_id) AS count - FROM overtime - ${overtimeCountStatisticWhere.length ? ` - WHERE ${overtimeCountStatisticWhere.join(' AND ')} - `: ''} - GROUP BY overtime.pep_user_id - ) AS overtimeCountStatistic - ON overtimeCountStatistic.pepUserId = member.pep_user_id - `: ''} - - ${vacateDurationStatistic || - orderBy == 'vacateSum' ? - `LEFT JOIN ( - SELECT - vacate.pep_user_id AS pepUserId, - sum(vacate_day.duration) AS duration - FROM vacate_day - INNER JOIN vacate - ON vacate.id = vacate_day.vacate_id - ${vacateDayStatisticWhere.length ? ` - WHERE ${vacateDayStatisticWhere.join(' AND ')} - `: ''} - GROUP BY vacate.pep_user_id - ) AS vacateDayStatistic - ON vacateDayStatistic.pepUserId = member.pep_user_id`: ''} - - ${vacateCountStatistic ? ` - LEFT JOIN ( - SELECT - vacate.pep_user_id AS pepUserId, - count(pep_process_story_id) AS count - FROM vacate - ${vacateCountStatisticWhere.length ? ` - WHERE ${vacateCountStatisticWhere.join(' AND ')} - `: ''} - GROUP BY vacate.pep_user_id - ) AS vacateCountStatistic - ON vacateCountStatistic.pepUserId = member.pep_user_id - `: ''} - WHERE - member.del = '0' - ${keywordTarget == 'post' && keyword ? ` - AND user.post IN ( - SELECT basicDataPost.id - FROM ${pepEmis}.basicdata_post AS basicDataPost - where basicDataPost.name LIKE '%${keyword}%' - ) - ` : ''} - ${keywordTarget == 'dep' && keyword ? ` - AND user.id IN ( - SELECT department_user.user - FROM ${pepEmis}.department_user AS department_user - INNER JOIN ${pepEmis}.department AS department - ON department.id = department_user.department - AND department.name LIKE '%${keyword}%' - ) - ` : ''} - ${state == 'dimission' ? `AND member.dimission_date IS NOT null` : ''} - ${state == 'onJob' ? `AND member.dimission_date IS null` : ''} - ${whereFromSelectOption.length && nowAttendanceTime ? `AND ${whereFromSelectOption.join('AND')}` : ''} - ${hiredateStart ? ` - AND member.hiredate >= '${moment(hiredateStart).format('YYYY-MM-DD')}' - `: ''} - ${hiredateEnd ? ` - AND member.hiredate <= '${moment(hiredateEnd).format('YYYY-MM-DD')}' - ` : ''} - ${marital ? ` - AND member.marital = '${marital}' - `: ''} - ${native ? ` - AND member.native_place = '${native}' - `: ''} - ${workPlace ? ` - AND member.work_place = '${workPlace}' - `: ''} - ` - - const userRes = await clickHouse.hr.query(` - SELECT - hrMember."member.pep_user_id" AS pepUserId, - hrMember.*, - user.name AS userName, - user.people_code AS userCode, - basicDataPost.name AS userPost, - role.name AS roleName, - role.id AS roleId, - department.name AS depName, - department.id AS depId, - user.job AS userJob, - user.active_status AS userActiveStatus, - user.organization AS userOrganization - FROM ( - SELECT - ${orderBy == 'overtimeTakeRestSum' - || orderBy == 'overtimePaySum' - || orderBy == 'overtimeSum' ? ` - overtimeDayStatistic.duration AS overtimeDayStatisticDuration, - `: ''} - - ${overtimeCountStatistic ? ` - overtimeCountStatistic.count AS overtimeCount, - `: ''} - - ${orderBy == 'vacateSum' || vacateDurationStatistic ? ` - vacateDayStatistic.duration AS vacateDayStatisticDuration, - `: ''} - - ${vacateCountStatistic ? ` - vacateCountStatistic.count AS vacateCount, - `: ''} - - ${nowAttendanceTime ? ` - hrVacate.vacateStartTime AS vacateStartTime, - hrVacate.vacateEndTime AS vacateEndTime, - hrOvertime.overtimeStartTime AS overtimeStartTime, - hrOvertime.overtimeEndTime AS overtimeEndTime, - `: ''} - - member.* - ${innerSelectQuery} - ${limit ? `LIMIT ${limit}` : ''} - ${limit && page ? 'OFFSET ' + parseInt(limit) * parseInt(page) : ''} - ) AS hrMember - - LEFT JOIN ${pepEmis}.user AS user - ON pepUserId = user.id - LEFT JOIN ${pepEmis}.user_role AS user_role - ON ${pepEmis}.user_role.user = user.id - LEFT JOIN ${pepEmis}.role AS role - ON ${pepEmis}.role.id = user_role.role - LEFT JOIN ${pepEmis}.basicdata_post AS basicDataPost - ON ${pepEmis}.basicdata_post.id = user.post - LEFT JOIN ${pepEmis}.department_user AS department_user - ON department_user.user = user.id - LEFT JOIN ${pepEmis}.department AS department - ON department.id = department_user.department - ${whereOption.length ? `WHERE ${whereOption.join(' AND ')}` : ''} - ORDER BY ${orderBy == 'code' ? - 'user.people_code' - : orderBy == 'hiredate' - ? 'hrMember."member.hiredate"' - : orderBy == 'age' - ? 'hrMember."member.birthday"' - : orderBy == 'overtimeTakeRestSum' - || orderBy == 'overtimePaySum' - || orderBy == 'overtimeSum' ? - 'hrMember.overtimeDayStatisticDuration' - : orderBy == 'overtimeCount' ? - 'hrMember.overtimeCount' - : orderBy == 'vacateSum' ? - 'hrMember.vacateDayStatisticDuration' - : orderBy == 'vacateCount' ? - 'hrMember.vacateCount' - : 'user.people_code'} - ${orderDirection || 'ASC'} - `).toPromise() - - const countRes = await clickHouse.hr.query(` - SELECT - count(member.pep_user_id) AS count - ${innerSelectQuery} - `).toPromise() - - return { - count: countRes[0].count, - rows: userRes - } - } - - async function packageUserData (userRes, option = {}) { - - const { judgeHoliday, } = app.fs.utils - let workTime = false - let dayoffTime = false - if (option.state) { - const curDay = moment().format('YYYY-MM-DD') - const nowTime = moment() - const holidayJudge = await judgeHoliday(curDay) - if (holidayJudge) { - if ( - holidayJudge.workday - && nowTime.isAfter(moment(curDay + ' 08:30')) - && nowTime.isBefore(moment(curDay + ' 17:30')) - ) { - workTime = true - } else if (holidayJudge.dayoff || holidayJudge.festivals) { - dayoffTime = true - } - } - } - - let returnD = [] - let pepUserIds = [-1] - userRes.rows.forEach(u => { - let existUser = returnD.find(r => r.pepUserId == u.pepUserId) - if (existUser) { - if (u.depId && !existUser.departmrnt.some(d => d.id == u.depId)) { - existUser.departmrnt.push({ - id: u.depId, - name: u.depName - }) - } - if (u.roleId && !existUser.role.some(r => r.id == u.roleId)) { - existUser.role.push({ - id: u.roleId, - name: u.roleName - }) - } - } else { - let obj = {} - for (let k in u) { - let nextKey = k.replace('hrMember.', '') - .replace('member.', '') - if (nextKey.includes('_')) { - nextKey = nextKey.toLowerCase() - .replace( - /(_)[a-z]/g, - (L) => L.toUpperCase() - ) - .replace(/_/g, '') - } - obj[nextKey] = u[k] == '1970-01-01 00:00:00.000000' || u[k] == '1970-01-01 08:00:00.000000' ? null : u[k] - } - pepUserIds.push(u.pepUserId) - console.log("查询到的用户信息:", obj); - returnD.push({ - ...obj, - departmrnt: u.depId ? [{ - id: u.depId, - name: u.depName - }] : [], - role: u.roleId ? [{ - id: u.roleId, - name: u.roleName - }] : [], - state: option.state ? - obj['dimissionDate'] ? 'dimission' : - obj['vacateStartTime'] ? 'vacate' : - workTime ? 'inOffice' : - dayoffTime ? 'dayoff' : 'rest' - : undefined, - del: undefined, - pepuserid: undefined - }) - } - }) - return { packageUser: returnD, pepUserIds } - } - - return { - memberList, - packageUserData - } -} \ No newline at end of file diff --git a/api/package-lock.json b/api/package-lock.json index d2de4d4..cf5e6b3 100644 --- a/api/package-lock.json +++ b/api/package-lock.json @@ -1604,6 +1604,15 @@ "resolved": "http://10.8.30.22:7000/fresh/-/fresh-0.5.2.tgz", "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" }, + "fs-attachment": { + "version": "1.0.0", + "resolved": "http://10.8.30.22:7000/fs-attachment/-/fs-attachment-1.0.0.tgz", + "integrity": "sha512-wuOjl1Dtcnj5cbiF5OrT8jyEV4OUencDsL8OAMA7LZNHyUopChWEqEGXnRF01VLRY9xdbXlcXiTcD4PowKkXHA==", + "requires": { + "qiniu": "^7.1.1", + "uuid": "^3.1.0" + } + }, "fs-constants": { "version": "1.0.0", "resolved": "http://10.8.30.22:7000/fs-constants/-/fs-constants-1.0.0.tgz", diff --git a/web/client/src/sections/patrolManage/containers/index.js b/web/client/src/sections/patrolManage/containers/index.js index d83768a..480a30c 100644 --- a/web/client/src/sections/patrolManage/containers/index.js +++ b/web/client/src/sections/patrolManage/containers/index.js @@ -2,5 +2,6 @@ import PatrolPlan from './patrolPlan'; import PatrolReocrd from './patrolRecord'; +import PlanTemplate from './patrolTemplate' -export { PatrolPlan, PatrolReocrd }; \ No newline at end of file +export { PatrolPlan, PatrolReocrd, PlanTemplate }; \ No newline at end of file diff --git a/web/client/src/sections/patrolManage/containers/patrolTemplate.js b/web/client/src/sections/patrolManage/containers/patrolTemplate.js new file mode 100644 index 0000000..f080c66 --- /dev/null +++ b/web/client/src/sections/patrolManage/containers/patrolTemplate.js @@ -0,0 +1,164 @@ +import React, { useState, useRef } from 'react'; +import { connect } from 'react-redux'; +import { Button, Popconfirm } from 'antd'; +import ProTable from '@ant-design/pro-table'; +import PlanModal from '../components/planModal'; +import { createPatrolPlan, delPatrolPlan, updatePatrolPlan, getPatrolPlan } from '../actions/plan'; +import moment from 'moment'; + +function PatrolTemplate (props) { + const { dispatch, user } = props; + const tableRef = useRef(); + const [dataSource, setDataSource] = useState([{}]); + const [visible, setVisible] = useState(false); + const [type, setType] = useState(); + const [curRecord, setCurRecord] = useState(); + + const onCreate = (values) => { + if (type === 'create') { + dispatch(createPatrolPlan(values)).then(res => { + if (res.success) { + tableRef.current.reload(); + } + }) + } else { + dispatch(updatePatrolPlan({ ...values, id: curRecord.id })).then(res => { + if (res.success) { + tableRef.current.reload(); + } + }) + } + setVisible(false); + }; + + const columns = [{ + title: '结构物名称', + dataIndex: 'struName', + key: 'struName', + ellipsis: true, + render: (_, record) => { + return
{record?.project?.name}
+ } + }, { + title: '巡检任务名称', + dataIndex: 'name', + key: 'name', + ellipsis: true + }, { + title: '开始时间', + dataIndex: 'startTime', + key: 'startTime', + ellipsis: true, + render: (_, record) => moment(record.startTime).format('YYYY-MM-DD') + }, { + title: '结束时间', + dataIndex: 'endTime', + key: 'endTime', + ellipsis: true, + render: (_, record) => moment(record.endTime).format('YYYY-MM-DD') + + }, { + title: '巡检频次', + dataIndex: 'frequency', + key: 'frequency', + ellipsis: true, + }, { + title: '巡检点位', + dataIndex: 'patrolPoints', + key: 'patrolPoints', + ellipsis: true, + render: (_, record) =>
{record?.points?.length ? record?.points?.map(p => p.name).join() : '-'}
+ }, { + title: '巡检人', + dataIndex: 'patrolPerson', + key: 'patrolPerson', + ellipsis: true, + render: (_, record) =>
{record?.user?.name}
+ }, { + title: '巡检次数统计', + dataIndex: 'patrolCount', + key: 'patrolCount', + ellipsis: true, + }, { + title: '操作', + dataIndex: 'action', + key: 'action', + search: false, + width: 200, + render: (_, record) => { + return <> + + + { + dispatch(delPatrolPlan(record.id)).then(res => { + if (res.success) { + tableRef.current.reload(); + } + }) + }}> + + + + }, + }]; + + return ( + <> + { + const res = await dispatch(getPatrolPlan(params)); + setDataSource(res?.payload.data?.rows); + return { ...res }; + }} + onReset={() => { }} + toolBarRender={() => [ + + ]} + /> + { + visible ? + { + setVisible(false); + }} + /> : null + } + + ) +} + +function mapStateToProps (state) { + const { auth } = state + return { + user: auth.user + } +} +export default connect(mapStateToProps)(PatrolTemplate); diff --git a/web/client/src/sections/patrolManage/nav-item.js b/web/client/src/sections/patrolManage/nav-item.js index c3bdb3d..86bda99 100644 --- a/web/client/src/sections/patrolManage/nav-item.js +++ b/web/client/src/sections/patrolManage/nav-item.js @@ -5,7 +5,7 @@ import { SettingOutlined } from '@ant-design/icons'; const SubMenu = Menu.SubMenu; -export function getNavItem(user, dispatch) { +export function getNavItem (user, dispatch) { // if (!Func.isAuthorized("ORG_MANAGE")) { // return null // } @@ -17,6 +17,9 @@ export function getNavItem(user, dispatch) { 巡检记录 + + 巡检模板 + ); } \ No newline at end of file diff --git a/web/client/src/sections/patrolManage/routes.js b/web/client/src/sections/patrolManage/routes.js index ddd494a..e2f75b8 100644 --- a/web/client/src/sections/patrolManage/routes.js +++ b/web/client/src/sections/patrolManage/routes.js @@ -1,5 +1,5 @@ 'use strict'; -import { PatrolPlan, PatrolReocrd } from './containers'; +import { PatrolPlan, PatrolReocrd, PlanTemplate } from './containers'; export default [{ type: 'inner', @@ -12,11 +12,16 @@ export default [{ key: 'patrolPlan', component: PatrolPlan, breadcrumb: '巡检计划制定', - },{ + }, { path: '/patrolRecord', key: 'patrolRecord', component: PatrolReocrd, breadcrumb: '巡检记录', + }, { + path: '/patrolTemplate', + key: 'patrolTemplate', + component: PlanTemplate, + breadcrumb: '巡检模板', }] } }]; \ No newline at end of file