diff --git a/src/components/Form/src/components/Upload.vue b/src/components/Form/src/components/Upload.vue
index 40c41a5..527ff66 100644
--- a/src/components/Form/src/components/Upload.vue
+++ b/src/components/Form/src/components/Upload.vue
@@ -225,7 +225,8 @@ import { methodOf } from 'lodash-es';
}
},
{
- immediate: true
+ immediate: true,
+ deep: true,
}
);
diff --git a/src/components/Form/src/components/UploadList.vue b/src/components/Form/src/components/UploadList.vue
index 376f9a7..d66ceb8 100644
--- a/src/components/Form/src/components/UploadList.vue
+++ b/src/components/Form/src/components/UploadList.vue
@@ -2,7 +2,7 @@
@@ -62,10 +62,10 @@
default: '上传'
},
tip: String,
- fileList: Array,
+ list: Array,
});
const emit = defineEmits(['update:value', 'change', 'click', 'update:tableName', 'update:columnName']);
- function changeUplod (val) {
+ function changeUpload (val) {
dataFile.value = []
val.forEach(v => {
v.fileOrg = v.fileOrg || v.fileName,
@@ -73,6 +73,7 @@
v.fileSize = v.fileSize
dataFile.value.push(v)
})
+ emit('change', dataFile.value);
console.log(val, 532, dataFile.value)
}
const handleDownload = (info) => {
@@ -96,6 +97,7 @@
}
dataFile.value[index] = dataFile.value.splice(index+1, 1, dataFile.value[index])[0];
}
+ emit('change', dataFile.value);
}
const getFileList = () => {
@@ -110,11 +112,12 @@
}
},
{
- immediate: true
+ immediate: true,
+ deep: true,
}
);
watch(
- () => props.fileList,
+ () => props.list,
async (val) => {
dataFile.value = val || []
tableId.value = props.value
@@ -122,7 +125,8 @@
columnName.value = props.columnName
},
{
- immediate: true
+ immediate: true,
+ deep: true,
}
);
defineExpose({
diff --git a/src/views/sales/Customer/components/createForm.vue b/src/views/sales/Customer/components/createForm.vue
index 19b8fbf..b6d9222 100644
--- a/src/views/sales/Customer/components/createForm.vue
+++ b/src/views/sales/Customer/components/createForm.vue
@@ -284,7 +284,7 @@
(上传公司财报等附件)
-
+
@@ -455,6 +455,9 @@
}
});
+ const uploadListChange = (val) => {
+ dataFile.value = val
+ }
async function getList(id) {
spinning.value = true
try {
@@ -617,13 +620,12 @@
v.dateFrom = v.dateFrom ? dayjs(v.dateFrom ).format('YYYY-MM-DD HH:mm:ss') : '';
v.dateTo = v.dateTo ? dayjs(v.dateTo ).format('YYYY-MM-DD HH:mm:ss'): '';
})
- let file = await uploadFile.value.getFileList()
let obj = {
...formState,
lngCustomerBankList: dataBank,
lngCustomerDocList: arrCertificate,
lngCustomerContactList: dataContact,
- lngFileUploadList: file
+ lngFileUploadList: dataFile.value
}
spinning.value = true;