From cb841c313644533d2302b2c04e0d5e0df0cabb8a Mon Sep 17 00:00:00 2001 From: jinna Date: Wed, 29 Apr 2026 18:35:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BE=E6=89=8B=E5=85=8D=E8=B4=A3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/exemption/components/addDialog.vue | 21 ++++++++- .../exemption/components/checkDialog.vue | 31 +++++++++---- .../exemption/components/detailsDialog.vue | 43 +++++++++++++------ 3 files changed, 74 insertions(+), 21 deletions(-) diff --git a/src/views/exemption/components/addDialog.vue b/src/views/exemption/components/addDialog.vue index 2791d67b..5ed51f06 100644 --- a/src/views/exemption/components/addDialog.vue +++ b/src/views/exemption/components/addDialog.vue @@ -13,6 +13,7 @@ :option="option" v-model="formData" :upload-after="uploadAfter" + :upload-preview="uploadPreview" :upload-exceed="uploadExceed" :upload-delete="uploadDelete" > @@ -33,6 +34,7 @@ search-key="id" :debounce-time="500" @change="handleUserChange" + :title="'修改'" /> @@ -68,6 +70,7 @@ export default { data() { return { attachLink:'', + attachName:'', openShow: false, formData: {}, option: { @@ -246,12 +249,22 @@ export default { uploadDelete(file, column) { console.log('uploadDelete', file, column); this.attachLink = ''; + this.attachName = '' this.formData.fileUrl = '' return true; }, uploadExceed(limit, files, fileList, column) { this.$message.error('最多只能上传一个文件'); }, + uploadAfter(res, done, loading, column){ + console.log('res----------------',res) + this.attachLink = res.link; + this.attachName = res.originalName; + done() + }, + uploadPreview(file, column, done) { + return; + }, // 处理工艺员变化 handleProcessUserChange(value) { console.log('【工艺员变化】:', value); @@ -301,6 +314,7 @@ export default { this.openShow = false; this.formData = {}; this.attachLink = ''; + this.attachName = '' this.$emit('closeDialog'); }, @@ -326,9 +340,11 @@ export default { // 添加文件URL,如果是数组则转换为逗号分隔的字符串 if (this.attachLink) { params.fileUrl = this.attachLink; + params.fileName = this.attachName; } else if (Array.isArray(params.fileUrl)) { // 将fileUrl数组转换为逗号分隔的字符串 params.fileUrl = params.fileUrl.map(item => item.link).join(','); + params.fileName = this.attachName; } // 从字典数据中获取工艺员名称 @@ -365,7 +381,7 @@ export default { } } catch (error) { console.error('操作失败', error); - this.$message.error('操作失败,请稍后重试'); + // this.$message.error('操作失败,请稍后重试'); } } }); @@ -376,6 +392,9 @@ export default {