From 0e81b85b57d31314b689ca4e21b920d2fd4a8f08 Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Wed, 11 Nov 2020 18:02:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0sif=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routes/project/sif.js | 48 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/routes/project/sif.js b/routes/project/sif.js index 355bf2f..0d444fd 100644 --- a/routes/project/sif.js +++ b/routes/project/sif.js @@ -8,6 +8,48 @@ var moment = require("moment") var util=require("../../public/javascripts/util") var route=require('../../public/javascripts/route') +router.get('/sif/instrumentData', function (req, res, next) { + var data=mock.page(req,'获取仪表失效数据成功',{ + //仪表名称/Name + instrumentName:()=>Mock.Random.name(), + //制造商 + manufacturer:()=>Mock.Random.name(), + //仪表型号 + instrumentModel:()=>Mock.Random.name(), + //数据来源 + dataSources:()=>Mock.Random.name(), + //仪表类型 + instrumentType:()=>Mock.Random.name(), + //SD + sd:()=>Mock.Random.integer(1,999), + //SU + su:()=>Mock.Random.integer(1,999), + //DD + dd:()=>Mock.Random.integer(1,999), + //DU + du:()=>Mock.Random.integer(1,999), + //架构类型 + architectureType:'A', + //TSD + tsd:()=>Mock.Random.integer(1,999), + //MTTR + mttr:()=>Mock.Random.integer(1,999), + //TI + ti:()=>Mock.Random.integer(1,999), + //CTR + ctr:()=>Mock.Random.integer(1,999), + //LT + lt:()=>Mock.Random.integer(1,999), + //HTF + htf:0, + //SIL认证 + silCertification:'2/3', + //Route + route:'2H' + }) + res.json(data) +}) + router.get('/sif/:nodeId/:sifId', function (req, res, next) { var sst=Mock.mock({ "si|1-100":[{ @@ -23,7 +65,7 @@ router.get('/sif/:nodeId/:sifId', function (req, res, next) { sheetData:{ row:function (){ let rowCount=50 - let colCount=39 + let colCount=47 let rows=Array.from(new Array(rowCount).keys()) let cols=Array.from(new Array(colCount).keys()) for(let row in rows){ @@ -47,8 +89,8 @@ router.get('/sif/:nodeId/:sifId', function (req, res, next) { } }, mergeCells:{ - mergeCell:[{ref:'F1:F3'},{ref:'F5:F6'}], - count:1 + mergeCell:[], + count:0 } } }