From 346aff3b426b65cd16f9f8227c4874c166f3f30d Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Sun, 28 Apr 2024 14:08:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=81=AF=E9=80=9A=E7=9F=A5=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E4=BF=AE=E6=94=B9=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mes/process/index.vue | 1 - src/views/mes/processroute/index.vue | 1 - src/views/mes/productOffline/index.vue | 1 - src/views/system/mail/template/MailTemplateForm.vue | 8 ++++---- src/views/system/notify/template/NotifyTemplateForm.vue | 3 +-- src/views/system/sms/template/SmsTemplateForm.vue | 2 +- 6 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/views/mes/process/index.vue b/src/views/mes/process/index.vue index 352a1b523..3c1a70321 100644 --- a/src/views/mes/process/index.vue +++ b/src/views/mes/process/index.vue @@ -247,7 +247,6 @@ const formsSuccess = async (formType,data) => { // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef) => { nextTick?.(() => { - debugger const setV = {} if (formField === 'productionLineCode'){ const concatenatedValues = val.map(item => item['code']).join(',') diff --git a/src/views/mes/processroute/index.vue b/src/views/mes/processroute/index.vue index 2e174e39d..45d4c879d 100644 --- a/src/views/mes/processroute/index.vue +++ b/src/views/mes/processroute/index.vue @@ -160,7 +160,6 @@ const buttonTableClick = async (val, row) => { const dailogClose=() => { console.log('close'); nextTick?.(()=>{ - debugger getList() }) diff --git a/src/views/mes/productOffline/index.vue b/src/views/mes/productOffline/index.vue index fa7244d44..3a01037f6 100644 --- a/src/views/mes/productOffline/index.vue +++ b/src/views/mes/productOffline/index.vue @@ -80,7 +80,6 @@ const tableColumns = ref(ProductOffline.allSchemas.tableColumns) // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef) => { nextTick?.(() => { - debugger const setV = {} setV[formField] = val[0][searchField] setV['workBillno'] = val[0]['schedulingCode']//工单编码 diff --git a/src/views/system/mail/template/MailTemplateForm.vue b/src/views/system/mail/template/MailTemplateForm.vue index ade78f131..7b1e6513a 100644 --- a/src/views/system/mail/template/MailTemplateForm.vue +++ b/src/views/system/mail/template/MailTemplateForm.vue @@ -41,10 +41,10 @@ const open = async (type: string, id?: number) => { try { const data = await MailTemplateApi.getMailTemplate(id) formRef.value.setValues(data) + showReceiver(data) } finally { formLoading.value = false } - showReceiver(formRef.value) } } defineExpose({ open }) // 提供 open 方法,用于打开弹窗 @@ -136,8 +136,8 @@ const resetReceiverType = () => { }); } -const showReceiver = (formValue) => { - if(formValue){ +const showReceiver = (data) => { + if(data){ // 根据当前receiverType启用相应字段 const fieldMap = { 1: 'roleIdList', @@ -145,7 +145,7 @@ const showReceiver = (formValue) => { 3: 'postIdList', 4: 'userIdList' }; - const enableField = fieldMap[formValue.receiverType]; + const enableField = fieldMap[data.receiverType]; if (enableField) { const itemToEnable = allSchemas.formSchema.find(item => item.field === enableField); if (itemToEnable) { diff --git a/src/views/system/notify/template/NotifyTemplateForm.vue b/src/views/system/notify/template/NotifyTemplateForm.vue index c2d517981..e83a8d686 100644 --- a/src/views/system/notify/template/NotifyTemplateForm.vue +++ b/src/views/system/notify/template/NotifyTemplateForm.vue @@ -167,10 +167,10 @@ const open = async (type: string, id?: number) => { formLoading.value = true try { formData.value = await NotifyTemplateApi.getNotifyTemplate(id) + showReceiver(formData.value) } finally { formLoading.value = false } - showReceiver(formData.value) } } defineExpose({ open }) // 提供 open 方法,用于打开弹窗 @@ -189,7 +189,6 @@ const submitForm = async () => { await NotifyTemplateApi.createNotifyTemplate(data) message.success('新增成功') } else { - debugger await NotifyTemplateApi.updateNotifyTemplate(data) message.success('修改成功') } diff --git a/src/views/system/sms/template/SmsTemplateForm.vue b/src/views/system/sms/template/SmsTemplateForm.vue index 48622d0fa..36df57ef1 100644 --- a/src/views/system/sms/template/SmsTemplateForm.vue +++ b/src/views/system/sms/template/SmsTemplateForm.vue @@ -178,10 +178,10 @@ const open = async (type: string, id?: number) => { formLoading.value = true try { formData.value = await SmsTemplateApi.getSmsTemplate(id) + showReceiver(formData.value) } finally { formLoading.value = false } - showReceiver(formData.value) } // 加载渠道列表 channelList.value = await SmsChannelApi.getSimpleSmsChannelList()