增加HAZOP节点复用接口

增加SIF节点划分接口
master
pan 4 years ago
parent 2008afee83
commit 3f66f8c49d
  1. 43
      routes/project/prepare.js
  2. 3
      routes/project/project.js

@ -23,6 +23,14 @@ router.get('/hdivide', function (req, res, next) {
res.json(data) res.json(data)
}) })
router.get('/hdivide/node', function (req, res, next) {
var data=mock.page(req,'获取HAOZP节点划分成功',{
//节点
node:()=>Mock.Random.word(),
})
res.json(data)
})
route.addContextMenu(router,'hdivide','HAZOP节点划分') route.addContextMenu(router,'hdivide','HAZOP节点划分')
//获取节点复用 //获取节点复用
@ -40,4 +48,39 @@ router.get('/hreuse', function (req, res, next) {
route.addContextMenu(router,'hreuse','HAZOP节点复用') route.addContextMenu(router,'hreuse','HAZOP节点复用')
//SIF节点划分
router.get('/sdivide', function (req, res, next) {
var data=mock.page(req,'获取SIF节点划分成功',{
//SIF名称
name:()=>Mock.Random.name(),
//SIF编号
id:/SIF\d{3}/,
//SIF描述
desc:()=>Mock.Random.sentence(3, 5),
//SIF连带动作
action:()=>Mock.Random.word(),
//需求模式
demandModel:()=>Mock.Random.integer(1,3),
//SIL等级要求
level:()=>Mock.Random.integer(1,10),
//触发机构
impactMmechanism:()=>Mock.Random.word(),
//后果描述
consequence:()=>Mock.Random.sentence(3, 5),
//安全状态
status:()=>Mock.Random.word(),
//安全失效等级
loseEfficacy:()=>Mock.Random.integer(1,10),
//PID号
pid:/PID\d{3}/,
//备注
note:()=>Mock.Random.sentence(3, 5)
})
res.json(data)
})
route.addContextMenu(router,'sdivide','SIF节点划分')
module.exports=router module.exports=router

@ -16,7 +16,8 @@ router.get('/menu', function (req, res, next) {
{name: '一般信息',path:'/project/info/baseinfo',selected:true}, {name: '一般信息',path:'/project/info/baseinfo',selected:true},
{name: '团队成员',path:'/project/info/team_members'}, {name: '会议信息',path:'/project/info/meeting'}]} {name: '团队成员',path:'/project/info/team_members'}, {name: '会议信息',path:'/project/info/meeting'}]}
,{name: '项目准备', childMenu: [{name: 'HAZOP节点划分',path:'/project/prepare/hdivide'}, ,{name: '项目准备', childMenu: [{name: 'HAZOP节点划分',path:'/project/prepare/hdivide'},
{name: 'HAZOP节点复用',path: '/project/prepare/hreuse'}, {name: 'SIF节点划分'}, {name: '矩阵选择'}]} {name: 'HAZOP节点复用',path: '/project/prepare/hreuse'},
{name: 'SIF节点划分',path:'/project/prepare/sdivide'}, {name: '矩阵选择'}]}
,{name: 'HAZOP分析', childMenu: [{name: 'HAZOP分析'}, {name: 'HAZOP所有'}]} ,{name: 'HAZOP分析', childMenu: [{name: 'HAZOP分析'}, {name: 'HAZOP所有'}]}
,{name:'LOPA定级', childMenu: [{name:'LOPA'},{name:'LOPA表单'},{name:'LOPA所有节点'}]} ,{name:'LOPA定级', childMenu: [{name:'LOPA'},{name:'LOPA表单'},{name:'LOPA所有节点'}]}
,{name:'SIL验算', childMenu: [{name:'SIL验算'},{name:'SIL验算[Nodes]'},{name:'SIL验算-总'}]}] ,{name:'SIL验算', childMenu: [{name:'SIL验算'},{name:'SIL验算[Nodes]'},{name:'SIL验算-总'}]}]

Loading…
Cancel
Save