From 611fc1202aa20e5a8cdd7ca380f543f4fcf698f6 Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Fri, 23 Oct 2020 15:26:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B6=88=E6=81=AF=E8=AE=BE=E7=BD=AE):?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E8=AE=BE=E7=BD=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../organization/TaskNotification.vue | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/frontend/src/business/components/settings/organization/TaskNotification.vue b/frontend/src/business/components/settings/organization/TaskNotification.vue index ab7692076c..56fc13fba3 100644 --- a/frontend/src/business/components/settings/organization/TaskNotification.vue +++ b/frontend/src/business/components/settings/organization/TaskNotification.vue @@ -500,6 +500,7 @@ export default { }, initForm() { this.result = this.$get('/notice/search/message', response => { + this.form = response.data }) }, @@ -568,17 +569,20 @@ export default { handleAddTask(index, data) { let list = [] if (data.event && data.userIds.length > 0 && data.type) { + console.log(data.type) if (data.type === 'NAIL_ROBOT' || data.type === 'NAIL_ROBOT') { - this.$warning(this.$t('organization.message.message_webhook')); - } else { - data.isSet = false - list.push(data) - let param = {}; - param.messageDetail = list - this.result = this.$post("/notice/save/message/task", param, () => { - this.initForm() - this.$success(this.$t('commons.save_success')); - }) + if (!data.webhook) { + this.$warning(this.$t('organization.message.message_webhook')); + } else { + data.isSet = false + list.push(data) + let param = {}; + param.messageDetail = list + this.result = this.$post("/notice/save/message/task", param, () => { + this.initForm() + this.$success(this.$t('commons.save_success')); + }) + } } } else { this.$warning(this.$t('organization.message.message'));