diff --git a/frontend/desktop/src/pages/task/PeriodicList/ModifyPeriodicDialog.vue b/frontend/desktop/src/pages/task/PeriodicList/ModifyPeriodicDialog.vue index 9dfbe92f4..76faca096 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 dd3d4094b..02143fd67 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) {