|
|
|
@ -25,9 +25,20 @@ 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) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
@ -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编号
|
|
|
|
|