更新项目准备接口

master
pan 4 years ago
parent 7de68ef749
commit e9da9d5b8e
  1. 15
      routes/project/prepare.js
  2. 2
      routes/project/project.js

@ -25,12 +25,23 @@ router.get('/hdivide', function (req, res, next) {
router.get('/hdivide/node', function (req, res, next) {
var data=mock.page(req,'获取HAOZP节点划分成功',{
//节点
id:/\d{3}/,
//节点
node:()=>Mock.Random.word(),
//节点编号
nodeId:/Node\d{3}/,
//节点描述
nodeDesc:()=>Mock.Random.sentence(3, 5),
})
res.json(data)
})
router.patch('/hdivide/:id', function (req, res, next) {
var data=mock.ok(`节点${req.params.id}更新成功`)
res.json(data)
})
route.addContextMenu(router,'hdivide','HAZOP节点划分')
//获取节点复用
@ -49,8 +60,8 @@ 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节点划分成功',{
router.get('/sdivide/:id', function (req, res, next) {
var data=mock.page(req,`获取节点${req.params.id}SIF节点划分成功`,{
//SIF名称
name:()=>Mock.Random.name(),
//SIF编号

@ -19,7 +19,7 @@ router.get('/menu', function (req, res, next) {
{name: 'HAZOP节点复用',path: '/project/prepare/hreuse'},
{name: 'SIF节点划分',path:'/project/prepare/sdivide'},
{name: '矩阵选择',path:'/project/prepare/matrix'}]}
,{name: 'HAZOP分析', childMenu: [{name: 'HAZOP分析'}, {name: 'HAZOP所有'}]}
,{name: 'HAZOP分析', childMenu: [{name: 'HAZOP分析',path:'/project/hazop/analyse'}, {name: 'HAZOP所有'}]}
,{name:'LOPA定级', childMenu: [{name:'LOPA'},{name:'LOPA表单'},{name:'LOPA所有节点'}]}
,{name:'SIL验算', childMenu: [{name:'SIL验算'},{name:'SIL验算[Nodes]'},{name:'SIL验算-总'}]}]
config.forEach((item, index) => {

Loading…
Cancel
Save