fix(项目设置): 修复jenkins消息通知接受人回显问题

--user=郭雨琦
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001018894
This commit is contained in:
guoyuqi 2022-11-15 10:49:48 +08:00 committed by 刘瑞斌
parent 8cc2a53d77
commit 8ae0002dda
1 changed files with 12 additions and 1 deletions

View File

@ -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();
}
}
}
};
</script>