Browse Source

文档管理 查询接口修改

dev
LUCAS 3 years ago
parent
commit
cbbb74d193
  1. 7
      api/app/lib/controllers/file/index.js
  2. 8
      web/client/src/sections/fillion/components/fileTable.js

7
api/app/lib/controllers/file/index.js

@ -167,6 +167,10 @@ async function getFileList(ctx, next) {
queryOptions.roadId = roadId queryOptions.roadId = roadId
} }
rslt.road = await models.FileRoad.findOne({
where: { rId: roadId }
})
rslt.type = await models.FileType.findOne({ rslt.type = await models.FileType.findOne({
where: { fId } where: { fId }
}) })
@ -179,6 +183,9 @@ async function getFileList(ctx, next) {
['id', 'DESC'] ['id', 'DESC']
] ]
}) })
rslt.counter = await models.Files.count({ rslt.counter = await models.Files.count({
where: queryOptions where: queryOptions
}) })

8
web/client/src/sections/fillion/components/fileTable.js

@ -80,15 +80,15 @@ const DetailList = (props) => {
dataIndex: 'road', dataIndex: 'road',
align: 'center', align: 'center',
render: (text, record) => { render: (text, record) => {
return ''; return fileList?.road?.roadName;
} }
}, { }, {
title: '资料类型', title: '资料类型',
key: 'address', key: 'fileType',
dataIndex: 'address', dataIndex: 'fileType',
align: 'center', align: 'center',
render: (text, record) => { render: (text, record) => {
return ''; return fileList?.type?.fileType;
} }
}, },
{ {

Loading…
Cancel
Save