|
|
@ -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 |