Browse Source

文件元数据查询、删除修改

master
zmh 2 years ago
parent
commit
d5672e99c1
  1. 2
      api/app/lib/controllers/latestMetadata/index.js
  2. 5
      web/client/src/sections/metadataManagement/containers/filesTable.js

2
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: [

5
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) => {
<a style={{ marginLeft: 10 }} onClick={() => onEdit(record)}>编辑</a>
<Popconfirm
title="是否确认删除该元数据?"
onConfirm={() => confirmDelete(record.id)}
onConfirm={() => confirmDelete(record)}
> <a style={{ marginLeft: 10 }}>删除</a></Popconfirm>
<a style={{ marginLeft: 10 }} onClick={() => marking(record.id)}>打标</a>
{resourceApplicationsRecords.length === 0 ?

Loading…
Cancel
Save