From bdf49cae43e4bcc1fb2b9bf61c25ae0469089722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <14166000+zhangtonghai@user.noreply.gitee.com> Date: Tue, 24 Sep 2024 17:08:52 +0800 Subject: [PATCH] =?UTF-8?q?=E9=82=AE=E4=BB=B6=E6=A8=A1=E6=9D=BF=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=E8=87=AA=E5=AE=9A=E4=B9=89=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TaskMail/TenantAuditStepModal.vue | 48 +++++++++++++++---- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/src/views/baseinfo/TaskMail/TenantAuditStepModal.vue b/src/views/baseinfo/TaskMail/TenantAuditStepModal.vue index 6e5fb8a0..39d5f663 100644 --- a/src/views/baseinfo/TaskMail/TenantAuditStepModal.vue +++ b/src/views/baseinfo/TaskMail/TenantAuditStepModal.vue @@ -79,21 +79,48 @@ if (DiyFieldIdS.value.length) { DiyFieldIdS.value.forEach((item) => { removeSchemaByField(item.value) + removeSchemaByField(`${item.value}-fileType`) }) } DiyFieldIdS.value.splice(0) data.forEach((item) => { appendSchemaByField( - { - field: item.value, - label: item.label, - component: 'Input', - colProps: { span: 6 }, - componentProps: { - placeholder: '自定义文件名称', + [ + { + field: item.value, + label: item.label, + component: 'Input', + colProps: { span: 6 }, + componentProps: { + placeholder: '自定义文件名称', + }, }, - }, + { + field: `${item.value}-fileType`, + label: `${item.label}-文件类型`, + component: 'Select', + colProps: { span: 6 }, + componentProps: { + placeholder: '自定义文件类型', + allowClear: true, + options: [ + { + label: 'PDF', + value: 1, + }, + { + label: 'Excel', + value: 2, + }, + { + label: 'Word', + value: 3, + }, + ], + }, + }, + ], 'attachments', ) DiyFieldIdS.value.push(item) @@ -140,6 +167,7 @@ isUpdate.value = !!data?.isUpdate DiyFieldIdS.value.forEach((item) => { removeSchemaByField(item.value) + removeSchemaByField(`${item.value}-fileType`) }) DiyFieldIdS.value.splice(0) if (unref(isUpdate)) { @@ -167,6 +195,7 @@ label: element.templateName, }) DiyFieldIdSObj[e.templateId] = e.fileName + DiyFieldIdSObj[`${e.templateId}-fileType`] = e.fileType } }) }) @@ -205,6 +234,7 @@ function handlecloseModal() { DiyFieldIdS.value.forEach((item) => { removeSchemaByField(item.value) + removeSchemaByField(`${item.value}-fileType`) }) closeModal() } @@ -232,6 +262,7 @@ taskMailId: values.id, templateId: item.id, fileName: values[item.id] ? values[item.id] : item.templateName, + fileType: values[`${item.id}-fileType`], }) } }) @@ -272,6 +303,7 @@ async function refresh() { DiyFieldIdS.value.forEach((item) => { removeSchemaByField(item.value) + removeSchemaByField(`${item.value}-fileType`) }) DiyFieldIdS.value.splice(0) const res: API.DataResult = await ApiInfo({ id: unref(rowId) })