From a277f16dc920d5fa5ab31ebeb0b3dd60f4e115a0 Mon Sep 17 00:00:00 2001 From: wbc <942429426@qq.com> Date: Tue, 1 Apr 2025 16:34:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E9=99=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/project/contractManage/addModal.vue | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/views/project/contractManage/addModal.vue b/src/views/project/contractManage/addModal.vue index 8808211..c42c2b0 100644 --- a/src/views/project/contractManage/addModal.vue +++ b/src/views/project/contractManage/addModal.vue @@ -120,8 +120,10 @@ 上传 @@ -142,6 +144,7 @@ const title = ref('新增'); const formRef = ref(); const visible = ref(false); + const filelists = ref([]); let form = reactive({ contractName: '', contractCode: '', @@ -189,7 +192,15 @@ form.attachment = data.attachment ? data.attachment : []; } }; - + const beforeUpload = async (file) => { + console.log(file); + form.attachment = file; + return false; + }; + const importChange = ({ fileList }) => { + filelists.value = fileList; + console.log(fileList); + }; const handleOk = () => { formRef.value.validate().then((valid) => { if (valid) { @@ -232,6 +243,9 @@ projectNameOptions, formRef, closeModal, + beforeUpload, + importChange, + filelists, }; }, };