|
|
|
@ -25,7 +25,7 @@ router.get('/hdivide', function (req, res, next) { |
|
|
|
|
|
|
|
|
|
router.get('/hdivide/all', function (req, res, next) { |
|
|
|
|
var data=mock.page(req,'获取HAOZP节点划分成功',{ |
|
|
|
|
//节点
|
|
|
|
|
//节点id
|
|
|
|
|
id:/\d{3}/, |
|
|
|
|
//节点
|
|
|
|
|
node:()=>Mock.Random.word(), |
|
|
|
@ -37,8 +37,8 @@ router.get('/hdivide/all', function (req, res, next) { |
|
|
|
|
res.json(data) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
router.patch('/hdivide/:id', function (req, res, next) { |
|
|
|
|
var data=mock.ok(`节点${req.params.id}更新成功`) |
|
|
|
|
router.patch('/hdivide/:nodeId', function (req, res, next) { |
|
|
|
|
var data=mock.ok(`节点${req.params.nodeId}更新成功`) |
|
|
|
|
res.json(data) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
@ -60,12 +60,14 @@ router.get('/hreuse', function (req, res, next) { |
|
|
|
|
route.addContextMenu(router,'hreuse','HAZOP节点复用') |
|
|
|
|
|
|
|
|
|
//SIF节点划分
|
|
|
|
|
router.get('/sdivide/:id', function (req, res, next) { |
|
|
|
|
var data=mock.page(req,`获取节点${req.params.id}SIF节点划分成功`,{ |
|
|
|
|
router.get('/sdivide/:nodeId', function (req, res, next) { |
|
|
|
|
var data=mock.page(req,`获取节点${req.params.nodeId}SIF节点划分成功`,{ |
|
|
|
|
//sif_id
|
|
|
|
|
id:/\d{3}/, |
|
|
|
|
//SIF名称
|
|
|
|
|
name:()=>Mock.Random.name(), |
|
|
|
|
//SIF编号
|
|
|
|
|
id:/SIF\d{3}/, |
|
|
|
|
sifId:/SIF\d{3}/, |
|
|
|
|
//SIF描述
|
|
|
|
|
desc:()=>Mock.Random.sentence(3, 5), |
|
|
|
|
//SIF连带动作
|
|
|
|
@ -91,6 +93,11 @@ router.get('/sdivide/:id', function (req, res, next) { |
|
|
|
|
res.json(data) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
router.patch('/sdivide/:nodeId/:id', function (req, res, next) { |
|
|
|
|
var data=mock.ok(`节点:${req.params.nodeId},SIF:${req.params.id}更新成功`) |
|
|
|
|
res.json(data) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
route.addContextMenu(router,'sdivide','SIF节点划分') |
|
|
|
|
|
|
|
|
|
router.get('/matrix', function (req, res, next) { |
|
|
|
|