From 3f66f8c49db590fb78cd20ca1dc5d000981bfa11 Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Sat, 24 Oct 2020 20:03:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0HAZOP=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E5=A4=8D=E7=94=A8=E6=8E=A5=E5=8F=A3=20=E5=A2=9E=E5=8A=A0SIF?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E5=88=92=E5=88=86=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routes/project/prepare.js | 43 +++++++++++++++++++++++++++++++++++++++ routes/project/project.js | 3 ++- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/routes/project/prepare.js b/routes/project/prepare.js index 951d76b..0be294f 100644 --- a/routes/project/prepare.js +++ b/routes/project/prepare.js @@ -23,6 +23,14 @@ router.get('/hdivide', function (req, res, next) { 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节点划分') //获取节点复用 @@ -40,4 +48,39 @@ router.get('/hreuse', function (req, res, next) { 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 \ No newline at end of file diff --git a/routes/project/project.js b/routes/project/project.js index 74f28d5..87418f8 100644 --- a/routes/project/project.js +++ b/routes/project/project.js @@ -16,7 +16,8 @@ router.get('/menu', function (req, res, next) { {name: '一般信息',path:'/project/info/baseinfo',selected:true}, {name: '团队成员',path:'/project/info/team_members'}, {name: '会议信息',path:'/project/info/meeting'}]} ,{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:'LOPA定级', childMenu: [{name:'LOPA'},{name:'LOPA表单'},{name:'LOPA所有节点'}]} ,{name:'SIL验算', childMenu: [{name:'SIL验算'},{name:'SIL验算[Nodes]'},{name:'SIL验算-总'}]}]