peng.peng 1 year ago
parent
commit
709243fe65
  1. 8
      api/app/lib/controllers/latestMetadata/index.js
  2. 16
      web/client/src/sections/metadataManagement/components/releaseModal.js

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

@ -529,14 +529,6 @@ async function postMetadataResourceApplications(ctx) {
try {
const { resourceName, applyBy, resourceType, resourceId } = ctx.request.body;
if (!resourceName || !applyBy || !resourceType || !resourceId) {
ctx.status = 400;
ctx.body = { message: '参数不全,请重新申请资源' }
} else {
const models = ctx.fs.dc.models;
const postOne = await models.ResourceConsumption.findOne({
where: { applyBy: applyBy, resourceName: resourceName, resourceId, resourceType }
});
if (postOne) {
ctx.status = 400;
ctx.body = { message: '参数不全,请重新申请资源' }
} else {

16
web/client/src/sections/metadataManagement/components/releaseModal.js

@ -179,17 +179,17 @@ const ReleaseModal = ({ actions, dispatch, onConfirm, onCancel, editData = {} })
<Input style={{ width: 180, marginLeft: 20 }} placeholder='请输入' />
</div>
<div style={{ display: 'flex', marginLeft: 20 }}>返回值
<div style={{ display: 'flex', width: 250, flexDirection: 'column', alignItems: 'center' }}>
<div key={'fieldData' + index} style={{ display: 'flex' }}>
<div style={{ width: 80, border: '1px solid #dcc' }}>名称</div>
<div style={{ width: 80, border: '1px solid #dcc' }}>意义</div>
<div style={{ width: 80, border: '1px solid #dcc' }}>说明</div>
<div style={{ display: 'flex', width: 310, flexDirection: 'column', alignItems: 'center' }}>
<div style={{ display: 'flex' }}>
<div style={{ width: 100, border: '1px solid #dcc', textAlign: 'center' }}>名称</div>
<div style={{ width: 100, border: '1px solid #dcc', textAlign: 'center' }}>意义</div>
<div style={{ width: 100, border: '1px solid #dcc', textAlign: 'center' }}>说明</div>
</div>
{fieldData?.map((s, index) => {
return <div key={'fieldData' + index} style={{ display: 'flex' }}>
<div style={{ width: 80, border: '1px solid #dcc' }}>{s.code}</div>
<div style={{ width: 80, border: '1px solid #dcc' }}>{s.name}</div>
<div style={{ width: 80, border: '1px solid #dcc' }}>{s.type}</div>
<div style={{ width: 100, border: '1px solid #dcc', textAlign: 'center' }}>{s.code}</div>
<div style={{ width: 100, border: '1px solid #dcc', textAlign: 'center' }}>{s.name}</div>
<div style={{ width: 100, border: '1px solid #dcc', textAlign: 'center' }}>{s.type}</div>
</div>
})}
</div>

Loading…
Cancel
Save