You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.2 KiB
43 lines
1.2 KiB
var express = require('express');
|
|
var router = express.Router();
|
|
var mock = require('../../public/javascripts/mock')
|
|
var Mock = require("mockjs")
|
|
var multipart = require('connect-multiparty');
|
|
var multipartMiddleware = multipart();
|
|
var moment = require("moment")
|
|
var util=require("../../public/javascripts/util")
|
|
var route=require('../../public/javascripts/route')
|
|
|
|
//获取HAZOP节点划分
|
|
router.get('/hdivide', function (req, res, next) {
|
|
var data=mock.page(req,'获取HAOZP节点划分成功',{
|
|
//节点
|
|
node:()=>Mock.Random.word(),
|
|
//节点编号
|
|
nodeId:/Node\d{3}/,
|
|
//节点描述
|
|
nodeDesc:()=>Mock.Random.sentence(3, 5),
|
|
//节点PID号
|
|
nodePid:/PID\d{3}/
|
|
})
|
|
res.json(data)
|
|
})
|
|
|
|
route.addContextMenu(router,'hdivide','HAZOP节点划分')
|
|
|
|
//获取节点复用
|
|
router.get('/hreuse', function (req, res, next) {
|
|
var data=mock.page(req,'获取HAZOP节点复用成功',{
|
|
//节点
|
|
node:()=>Mock.Random.word(),
|
|
//偏差
|
|
deviation:()=>Mock.Random.sentence(1, 3),
|
|
//偏差描述
|
|
deviationDesc:()=>Mock.Random.sentence(3, 5)
|
|
})
|
|
res.json(data)
|
|
})
|
|
|
|
route.addContextMenu(router,'hreuse','HAZOP节点复用')
|
|
|
|
module.exports=router |