|
|
|
|
@ -119,6 +119,9 @@ export default {
|
|
|
|
|
"uploaded-a":
|
|
|
|
|
file.status === "success",
|
|
|
|
|
},
|
|
|
|
|
style: {
|
|
|
|
|
'padding': '0 4px'
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
file.name
|
|
|
|
|
),
|
|
|
|
|
@ -216,7 +219,7 @@ export default {
|
|
|
|
|
? info._params.map((i) =>
|
|
|
|
|
h("el-option", {
|
|
|
|
|
props: {
|
|
|
|
|
label: i.key || i.name || i.no || i.value || i.id,
|
|
|
|
|
label: i.key || i.value || i.name || i.no || i.mingcheng || i.id,
|
|
|
|
|
value: info._relations ? i[info._relations.foreign_key] : i.value,
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
@ -337,14 +340,21 @@ export default {
|
|
|
|
|
this.form = Object.assign({}, this.form);
|
|
|
|
|
|
|
|
|
|
this.formInfo.forEach((i) => {
|
|
|
|
|
if (i && i.edit_input === "file") {
|
|
|
|
|
this.file[i.field] = [
|
|
|
|
|
{
|
|
|
|
|
name: res[i.link_with_name]?.original_name,
|
|
|
|
|
url: res[i.link_with_name]?.url,
|
|
|
|
|
response: res[i.link_with_name],
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
if (i && (i.edit_input === "file" || i.edit_input === 'files')) {
|
|
|
|
|
res[i._relations.link_with_name] ? (
|
|
|
|
|
this.file[i.field] = res[i._relations.link_with_name] instanceof Array ? res[i._relations.link_with_name].map(i => {
|
|
|
|
|
return {
|
|
|
|
|
name: i?.original_name,
|
|
|
|
|
url: i?.url,
|
|
|
|
|
response: i
|
|
|
|
|
}
|
|
|
|
|
}) : [{
|
|
|
|
|
name: res[i._relations.link_with_name]?.original_name,
|
|
|
|
|
url: res[i._relations.link_with_name]?.url,
|
|
|
|
|
response: res[i._relations.link_with_name]
|
|
|
|
|
}]
|
|
|
|
|
) : this.file[i.field] = []
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
@ -367,7 +377,7 @@ export default {
|
|
|
|
|
if (validate) {
|
|
|
|
|
this.formInfo.forEach((info) => {
|
|
|
|
|
if (info.edit_input === "files") {
|
|
|
|
|
this.form[info.field] = info._fileList.map(
|
|
|
|
|
this.form[info.field] = this.file[info.field].map(
|
|
|
|
|
(i) => i?.response?.id
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|