From 29cce60bafcccd896a63757b4923ce98403fa295 Mon Sep 17 00:00:00 2001 From: caiZhou <67539158+ywywZhou@users.noreply.github.com> Date: Wed, 20 Nov 2024 10:35:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=91=A8=E6=9C=9F=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=96=B9=E5=BC=8F=E6=95=B0=E6=8D=AE=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=8D=E5=AF=B9=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=20--bug=3D120383214=20(#7615)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Reviewed, transaction id: 24257 --- .../PeriodicList/ModifyPeriodicDialog.vue | 5 ++- .../TemplateSetting/NotifyTypeConfig.vue | 31 +++++++++++++++---- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/frontend/desktop/src/pages/task/PeriodicList/ModifyPeriodicDialog.vue b/frontend/desktop/src/pages/task/PeriodicList/ModifyPeriodicDialog.vue index 9dfbe92f4e..76faca096c 100644 --- a/frontend/desktop/src/pages/task/PeriodicList/ModifyPeriodicDialog.vue +++ b/frontend/desktop/src/pages/task/PeriodicList/ModifyPeriodicDialog.vue @@ -199,6 +199,7 @@ :project_id="project_id" :is-view-mode="true" :notify-type-list="[{ text: $t('任务状态') }]" + :notify-type-extra-info="notifyTypeExtraInfo" :receiver-group="receiverGroup"> @@ -296,6 +297,7 @@ selectedNodes: [], notifyType: [[]], receiverGroup: [], + notifyTypeExtraInfo: {}, saveLoading: false, periodicRule: { required: true, @@ -506,8 +508,9 @@ // 获取流程模板的通知配置 const { notify_receivers, notify_type } = templateData this.notifyType = [notify_type.success.slice(0), notify_type.fail.slice(0)] - const receiverGroup = JSON.parse(notify_receivers).receiver_group + const { receiver_group: receiverGroup, extra_info: extraInfo = {} } = JSON.parse(notify_receivers) this.receiverGroup = receiverGroup && receiverGroup.slice(0) + this.notifyTypeExtraInfo = extraInfo const pipelineDate = JSON.parse(templateData.pipeline_tree) this.selectedNodes = Object.keys(pipelineDate.activities) this.templateData = Object.assign({}, templateData, { pipeline_tree: pipelineDate }) diff --git a/frontend/desktop/src/pages/template/TemplateEdit/TemplateSetting/NotifyTypeConfig.vue b/frontend/desktop/src/pages/template/TemplateEdit/TemplateSetting/NotifyTypeConfig.vue index dd3d4094b7..02143fd67b 100644 --- a/frontend/desktop/src/pages/template/TemplateEdit/TemplateSetting/NotifyTypeConfig.vue +++ b/frontend/desktop/src/pages/template/TemplateEdit/TemplateSetting/NotifyTypeConfig.vue @@ -122,13 +122,12 @@ project_id: [String, Number] }, data () { - const formData = { - notifyType: tools.deepClone(this.notifyType), - notifyTypeExtraInfo: tools.deepClone(this.notifyTypeExtraInfo), - receiverGroup: tools.deepClone(this.receiverGroup) - } return { - formData, + formData: { + notifyType: [[]], + receiverGroup: [], + notifyTypeExtraInfo: {} + }, notifyTypeLoading: false, allNotifyTypeList: [], notifyGroupLoading: false, @@ -153,6 +152,26 @@ return list } }, + watch: { + notifyType: { + handler (val) { + this.formData.notifyType = tools.deepClone(val) + }, + immediate: true + }, + receiverGroup: { + handler (val) { + this.formData.receiverGroup = tools.deepClone(val) + }, + immediate: true + }, + notifyTypeExtraInfo: { + handler (val) { + this.formData.notifyTypeExtraInfo = tools.deepClone(val) + }, + immediate: true + } + }, created () { this.getNotifyTypeList() if (!this.common) {