'use strict'; module.exports = (route, method) => { const rou = route.replace('/api/train/', ''); const keys = rou.split('/'); if (keys <= 0) return; const routeWord = { common: '工具函数相关', util: '工具函数相关', setting: '设置相关', subject: '科目', teacher: '教师', task: '作业', question: '问卷题库', questionnaire: '问卷', student: '学生', headteacher: '班主任', bedroom: '寝室', class: '班级', department: '部门', location: '位置', trainplan: '培训计划', trainplanyear: '批次计划', festival: '节假日', lesson: '课表', schtime: '学校时间上报', teaplan: '班主任安排', apply: '教师安排', leave: '请假/退出', group: '小组', experience: '培训心得', duty: '职责', uploadtask: '上交作业', uploadquestion: '填写问卷', attendance: '考勤', school: '学校', nation: '字典表-民族', region: '字典表-行政区划', user: '用户', auth: '微信登录', login: '用户密码登录', qrcode: '扫码登陆', score: '教师分数', material: '教师资料', materialscore: '教师资料评分', notice: '通知', lessonmode: '课程模板', trainmodel: '计划模板', countstudent: '统计', classtype: '班级类型', job: '学校上传名单', message: '消息', personalscore: '学生个人分', groupscore: '学生小组分', cerconfirm: '校验学生证书资格', talented: '新人才报', y: '云就业相关', }; let word = routeWord[keys[0]]; if (method === 'DELETE') { return `${word}删除`; } else if (!word.includes('相关')) { if (rou.includes('update')) { word = `${word}修改`; } else if (rou.includes('export')) { word = `${word}导出`; } else if (keys.length === 1) { word = `新建${word}`; } } // const student = { // '/api/train/student/upjob': '修改职位', // '/api/train/student/deleteclass': '删除学生班级', // }; return word; };