From 84dbf885ee3a12784541b70e01858969839638a2 Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Mon, 19 Oct 2020 21:36:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=A1=B9=E7=9B=AE=E5=9B=A2?= =?UTF-8?q?=E9=98=9F=E6=88=90=E5=91=98=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routes/project/info.js | 16 ++++++++++++++++ routes/project/project.js | 7 ++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/routes/project/info.js b/routes/project/info.js index 99c5cd9..1c5d1db 100644 --- a/routes/project/info.js +++ b/routes/project/info.js @@ -30,4 +30,20 @@ router.post('/info', multipartMiddleware,function (req, res, next) { res.json(mock.ok(`数据自动保存成功,最后更新时间:${moment().format(util.dateFormat)}`)) }) +//获取团队成员 +router.get('/member', function (req, res, next) { + var data=mock.page(req,'获取团队成员成功',{ + name:()=>Mock.Random.name(), + email:()=>Mock.Random.email(), + cellphone:/1[34578][0-9]{9}/, + post:()=>Mock.Random.word(), + company:()=>Mock.Random.word(), + department:()=>Mock.Random.word(), + specialty:()=>Mock.Random.word(), + time:()=>Mock.Random.datetime(), + note:()=>Mock.Random.sentence(3, 5) + }) + res.json(data) +}) + module.exports = router \ No newline at end of file diff --git a/routes/project/project.js b/routes/project/project.js index a6db11d..f5998ec 100644 --- a/routes/project/project.js +++ b/routes/project/project.js @@ -10,7 +10,9 @@ router.get('/menu', function (req, res, next) { body: { menus: function () { let menus = [] - let config = [{name: '项目基本信息', childMenu: [{name: '一般信息',path:'/project/info/baseinfo',selected:true}, {name: '团队成员'}, {name: '会议信息'}]} + let config = [{name: '项目基本信息', isOpen:true,childMenu: [ + {name: '一般信息',path:'/project/info/baseinfo',selected:true}, + {name: '团队成员',path:'/project/info/team_members'}, {name: '会议信息'}]} ,{name: '项目准备', childMenu: [{name: 'HAZOP节点划分'}, {name: 'HAZOP节点复用'}, {name: 'SIF节点划分'}, {name: '矩阵选择'}]} ,{name: 'HAZOP分析', childMenu: [{name: 'HAZOP分析'}, {name: 'HAZOP所有'}]} ,{name:'LOPA定级', childMenu: [{name:'LOPA'},{name:'LOPA表单'},{name:'LOPA所有节点'}]} @@ -19,14 +21,13 @@ router.get('/menu', function (req, res, next) { let menu = { menuId: `a${index}`, menuName: item.name, - isOpen: Mock.Random.boolean() + isOpen: item.isOpen?item.isOpen:false } let childMenu = [] item.childMenu.forEach((item, index) => { childMenu.push({ menuId: index, menuName: item.name, - isSelected: item.selected?item.selected:false, path:item.path?item.path:'' }) })