Browse Source

文件上传代码意外注释

master
wenlele 2 years ago
parent
commit
465f2093d4
  1. 15
      web/client/src/sections/metadataManagement/components/metadataFileModal.js

15
web/client/src/sections/metadataManagement/components/metadataFileModal.js

@ -11,14 +11,13 @@ const MetadataFileModal = (props) => {
const handleOk = () => {
form.validateFields().then(values => {
if (onConfirm) {
console.log(values);
// let dataSave = JSON.parse(JSON.stringify(values));
// dataSave.attributesParam = {};
// metadataModels.filter(mm => mm.modelType === '文件').map(m => {
// dataSave.attributesParam[m.attributeCode] = values[m.attributeCode];
// delete dataSave[m.attributeCode];
// })
// onConfirm(dataSave);
let dataSave = JSON.parse(JSON.stringify(values));
dataSave.attributesParam = {};
metadataModels.filter(mm => mm.modelType === '文件').map(m => {
dataSave.attributesParam[m.attributeCode] = values[m.attributeCode];
delete dataSave[m.attributeCode];
})
onConfirm(dataSave);
}
})
}

Loading…
Cancel
Save