|
|
@ -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); |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|