Browse Source

(*)资源申请功能完善

master
peng.peng 1 year ago
parent
commit
b07791aa72
  1. 2
      api/app/lib/controllers/latestMetadata/index.js
  2. 2
      web/client/src/sections/metadataManagement/containers/databasesTable.js
  3. 2
      web/client/src/sections/metadataManagement/containers/filesTable.js

2
api/app/lib/controllers/latestMetadata/index.js

@ -534,7 +534,7 @@ async function postMetadataResourceApplications(ctx) {
} else {
const models = ctx.fs.dc.models;
const postOne = await models.ResourceConsumption.findOne({
where: { applyBy: applyBy, resourceName: resourceName, resourceId, resourceType }
where: { applyBy: applyBy, resourceName: resourceName, resourceId, resourceType, approve_remarks: null }
});
if (postOne) {
ctx.status = 400;

2
web/client/src/sections/metadataManagement/containers/databasesTable.js

@ -170,7 +170,7 @@ const DatabaseTable = (props) => {
width: '8%',
render: (text, record) => {
let resourceApplicationsRecords = metadataResourceApplications.filter(ra =>
ra.applyBy == user.id && ra.resourceName === record.name && ra.resourceId == record.id);
ra.applyBy == user.id && ra.resourceName === record.name && ra.resourceId == record.id && !!record.token);
return <ButtonGroup>
<a onClick={() => onView(record)}>查看</a>
{user.role == '数据消费者' ? null :

2
web/client/src/sections/metadataManagement/containers/filesTable.js

@ -293,7 +293,7 @@ const FilesTable = (props) => {
if (values.files[0].size) {
obj.size = values.files[0].size;
}
obj.fileName = values.files[0].url.split('\\').pop();
obj.fileName = values.files[0].realName;
}
dispatch(metadataManagement.putMetadataFiles(editData.record.id, obj)).then(res => {
if (res.success) {

Loading…
Cancel
Save