From 8ae0002dda1ecf429019f0afdb9c250a57bb20c7 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Tue, 15 Nov 2022 10:49:48 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E9=A1=B9=E7=9B=AE=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8Djenkins=E6=B6=88=E6=81=AF=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E6=8E=A5=E5=8F=97=E4=BA=BA=E5=9B=9E=E6=98=BE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001018894 --- .../notification/jenkins/JenkinsNotification.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/project-management/frontend/src/business/menu/notification/jenkins/JenkinsNotification.vue b/project-management/frontend/src/business/menu/notification/jenkins/JenkinsNotification.vue index aa00b146d8..4ed58ad9d0 100644 --- a/project-management/frontend/src/business/menu/notification/jenkins/JenkinsNotification.vue +++ b/project-management/frontend/src/business/menu/notification/jenkins/JenkinsNotification.vue @@ -30,7 +30,7 @@ import {hasLicense} from "metersphere-frontend/src/utils/permission"; import MsCodeEdit from "metersphere-frontend/src/components/MsCodeEdit"; import MsTipButton from "metersphere-frontend/src/components/MsTipButton"; import NotificationTable from "metersphere-frontend/src/components/notification/NotificationTable"; -import {searchNoticeByType} from "../../../../api/notification"; +import {searchNoticeByType} from "@/api/notification"; import MxNoticeTemplate from "metersphere-frontend/src/components/MxNoticeTemplate"; const TASK_TYPE = 'JENKINS_TASK'; @@ -82,10 +82,14 @@ export default { this.jenkinsTask = response.data; // 上报通知数 this.$emit("noticeSize", {module: 'jenkins', data: this.jenkinsTask, taskType: TASK_TYPE}); + this.jenkinsTask.forEach(jenkinsTask => { + this.handleReceivers(jenkinsTask); + }); }) }, handleAddTaskModel() { let Task = {}; + Task.receiverOptions = this.jenkinsReceiverOptions; Task.event = ''; Task.userIds = []; Task.type = ''; @@ -114,6 +118,13 @@ export default { handleReceivers(row) { row.receiverOptions = JSON.parse(JSON.stringify(this.jenkinsReceiverOptions)); } + }, + watch: { + jenkinsReceiverOptions(value) { + if (value && value.length > 0) { + this.initForm(); + } + } } };