From d5672e99c1bc815338bd16d163145d580a67975f Mon Sep 17 00:00:00 2001 From: zhangminghua Date: Thu, 6 Apr 2023 09:44:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=85=83=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E3=80=81=E5=88=A0=E9=99=A4=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/latestMetadata/index.js | 2 +- .../src/sections/metadataManagement/containers/filesTable.js | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/api/app/lib/controllers/latestMetadata/index.js b/api/app/lib/controllers/latestMetadata/index.js index b9c87f4..850d4f1 100644 --- a/api/app/lib/controllers/latestMetadata/index.js +++ b/api/app/lib/controllers/latestMetadata/index.js @@ -170,7 +170,7 @@ async function getMetadataFiles(ctx) { const { catalog, limit, offset, keywords, orderBy = 'updateAt', orderDirection = 'desc' } = ctx.query; const where = { catalog: catalog }; if (keywords) { - where['$or'] = [{ name: { $iLike: `%${keywords}%` } }, { type: { $iLike: `%${keywords}%` } }] + where['$or'] = [{ name: { $iLike: `%${keywords}%` } }, { type: { $iLike: `%${keywords}%` }, fileName: { $not: null } }] } const findObj = { include: [ diff --git a/web/client/src/sections/metadataManagement/containers/filesTable.js b/web/client/src/sections/metadataManagement/containers/filesTable.js index 5d9d1ad..9fa5beb 100644 --- a/web/client/src/sections/metadataManagement/containers/filesTable.js +++ b/web/client/src/sections/metadataManagement/containers/filesTable.js @@ -60,8 +60,7 @@ const FilesTable = (props) => { files: record.fileName ? [{ url: "\\assets\\files\\common\\" + record.fileName, name: record.fileName.split('_').pop() }] : [] - }, - // metadataModels: res.payload.data + } }); setModalVisible(true); } @@ -210,7 +209,7 @@ const FilesTable = (props) => { onEdit(record)}>编辑 confirmDelete(record.id)} + onConfirm={() => confirmDelete(record)} > 删除 marking(record.id)}>打标 {resourceApplicationsRecords.length === 0 ?