|
|
@ -21,12 +21,75 @@ router.get('/lopa/repository/:know', function (req, res, next) { |
|
|
|
initialEventDescription:function (){ |
|
|
|
initialEventDescription:function (){ |
|
|
|
return this.label |
|
|
|
return this.label |
|
|
|
}, |
|
|
|
}, |
|
|
|
initialEventProbability:()=>Mock.Random.float(0,1) |
|
|
|
initialEventProbability:()=>Mock.Random.float(0,1), |
|
|
|
|
|
|
|
assumptionsy:()=>Mock.Random.word(), |
|
|
|
|
|
|
|
referenceData:()=>Mock.Random.word(), |
|
|
|
|
|
|
|
note:()=>Mock.Random.word() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
case "independentProtectiveLayerDescription":{ |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
type:function (){ |
|
|
|
|
|
|
|
return this.label |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
independentProtectiveLayerType:()=>Mock.Random.word(), |
|
|
|
|
|
|
|
independentProtectiveLayerDescription:()=>Mock.Random.word(), |
|
|
|
|
|
|
|
failureProbability:()=>Mock.Random.word(), |
|
|
|
|
|
|
|
reductionFactor:()=>Mock.Random.word(), |
|
|
|
|
|
|
|
note:()=>Mock.Random.word() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}})(req.params.know)}) |
|
|
|
}})(req.params.know)}) |
|
|
|
res.json(data) |
|
|
|
res.json(data) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//lopa所有
|
|
|
|
|
|
|
|
router.get('/lopa/all', function (req, res, next) { |
|
|
|
|
|
|
|
var sst=Mock.mock({ |
|
|
|
|
|
|
|
"si|1-100":[{ |
|
|
|
|
|
|
|
t:/\d{3}/ |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var data=Mock.mock({ |
|
|
|
|
|
|
|
...mock.ok(`LOPA获取节点${req.params.id},${req.params.sif}数据成功`), |
|
|
|
|
|
|
|
...{ |
|
|
|
|
|
|
|
body:{ |
|
|
|
|
|
|
|
sst, |
|
|
|
|
|
|
|
sheetData:{ |
|
|
|
|
|
|
|
row:function (){ |
|
|
|
|
|
|
|
let rowCount=50 |
|
|
|
|
|
|
|
let colCount=23 |
|
|
|
|
|
|
|
let rows=Array.from(new Array(rowCount).keys()) |
|
|
|
|
|
|
|
let cols=Array.from(new Array(colCount).keys()) |
|
|
|
|
|
|
|
for(let row in rows){ |
|
|
|
|
|
|
|
rows[+row]={ |
|
|
|
|
|
|
|
r:+row+1, |
|
|
|
|
|
|
|
spans:`1:${colCount}`, |
|
|
|
|
|
|
|
c:[] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
for(let col in cols){ |
|
|
|
|
|
|
|
col=String.fromCharCode(+col+"A".charCodeAt()) |
|
|
|
|
|
|
|
rows[row].c.push({ |
|
|
|
|
|
|
|
r: `${col}${+row + 1}`, |
|
|
|
|
|
|
|
s: 1, |
|
|
|
|
|
|
|
t: 's', |
|
|
|
|
|
|
|
v: Mock.Random.integer(0, sst.si.length - 1) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return rows |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
mergeCells:{ |
|
|
|
|
|
|
|
mergeCell:[{ref:'A1:A10'}, {ref:'A11:A20'}, {ref:'A21:A30'}, {ref:'A31:A40'}, {ref:'A41:A50'}], |
|
|
|
|
|
|
|
count:5 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
res.json(data) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
//lopa
|
|
|
|
//lopa
|
|
|
|
router.get('/lopa/:id/:sif', function (req, res, next) { |
|
|
|
router.get('/lopa/:id/:sif', function (req, res, next) { |
|
|
|