From cbbb74d1939cfa3dfb2b1438831243b4c8ce4079 Mon Sep 17 00:00:00 2001 From: LUCAS Date: Fri, 29 Jul 2022 11:21:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=A1=A3=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/file/index.js | 7 +++++++ web/client/src/sections/fillion/components/fileTable.js | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/api/app/lib/controllers/file/index.js b/api/app/lib/controllers/file/index.js index 8870da3e..d0b5b3a3 100644 --- a/api/app/lib/controllers/file/index.js +++ b/api/app/lib/controllers/file/index.js @@ -167,6 +167,10 @@ async function getFileList(ctx, next) { queryOptions.roadId = roadId } + rslt.road = await models.FileRoad.findOne({ + where: { rId: roadId } + }) + rslt.type = await models.FileType.findOne({ where: { fId } }) @@ -179,6 +183,9 @@ async function getFileList(ctx, next) { ['id', 'DESC'] ] }) + + + rslt.counter = await models.Files.count({ where: queryOptions }) diff --git a/web/client/src/sections/fillion/components/fileTable.js b/web/client/src/sections/fillion/components/fileTable.js index a58840f3..0c89863a 100644 --- a/web/client/src/sections/fillion/components/fileTable.js +++ b/web/client/src/sections/fillion/components/fileTable.js @@ -80,15 +80,15 @@ const DetailList = (props) => { dataIndex: 'road', align: 'center', render: (text, record) => { - return ''; + return fileList?.road?.roadName; } }, { title: '资料类型', - key: 'address', - dataIndex: 'address', + key: 'fileType', + dataIndex: 'fileType', align: 'center', render: (text, record) => { - return ''; + return fileList?.type?.fileType; } }, {