|
|
|
@ -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:'' |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|