From 6deaf6bd5e332865e69c10e85e628a9a2bda21df Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Wed, 11 Dec 2024 14:39:13 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B6=88=E6=81=AF=E9=80=9A=E7=9F=A5):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8DUI=E6=A8=A1=E7=89=88=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1036128 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001036128 --- .../ui/UiAutomationNotification.vue | 73 +++++++++++++------ 1 file changed, 49 insertions(+), 24 deletions(-) diff --git a/project-management/frontend/src/business/menu/notification/ui/UiAutomationNotification.vue b/project-management/frontend/src/business/menu/notification/ui/UiAutomationNotification.vue index 54670f4c25..83113a45d2 100644 --- a/project-management/frontend/src/business/menu/notification/ui/UiAutomationNotification.vue +++ b/project-management/frontend/src/business/menu/notification/ui/UiAutomationNotification.vue @@ -195,33 +195,58 @@ export default { handleTemplate(index, row) { if (hasLicense()) { let robotTemplate = ""; - searchTemplateById(row.id, row.event).then(response => { - row.template = response.data.template - if (!response.data.template) { - switch (row.event) { - case 'CREATE': - robotTemplate = this.robotTitle; - break; - case 'UPDATE': - robotTemplate = this.robotTitle.replace('创建', '更新'); - break; - case 'DELETE': - robotTemplate = this.robotTitle.replace('创建', '删除'); - break; - case 'EXECUTE_SUCCESSFUL': - robotTemplate = this.robotTitle.replace('创建', '执行') - .replace('UI自动化', 'UI自动化成功'); - break; - case 'EXECUTE_FAILED': - robotTemplate = this.robotTitle.replace('创建', '执行') - .replace('UI自动化', 'UI自动化失败'); - break; - default: - break; + if (row.id) { + searchTemplateById(row.id, row.event).then(response => { + row.template = response.data.template + if (!response.data.template) { + switch (row.event) { + case 'CREATE': + robotTemplate = this.robotTitle; + break; + case 'UPDATE': + robotTemplate = this.robotTitle.replace('创建', '更新'); + break; + case 'DELETE': + robotTemplate = this.robotTitle.replace('创建', '删除'); + break; + case 'EXECUTE_SUCCESSFUL': + robotTemplate = this.robotTitle.replace('创建', '执行') + .replace('UI自动化', 'UI自动化成功'); + break; + case 'EXECUTE_FAILED': + robotTemplate = this.robotTitle.replace('创建', '执行') + .replace('UI自动化', 'UI自动化失败'); + break; + default: + break; + } } + this.$refs.noticeTemplate.open(row, robotTemplate); + }); + } else { + switch (row.event) { + case 'CREATE': + robotTemplate = this.robotTitle; + break; + case 'UPDATE': + robotTemplate = this.robotTitle.replace('创建', '更新'); + break; + case 'DELETE': + robotTemplate = this.robotTitle.replace('创建', '删除'); + break; + case 'EXECUTE_SUCCESSFUL': + robotTemplate = this.robotTitle.replace('创建', '执行') + .replace('UI自动化', 'UI自动化成功'); + break; + case 'EXECUTE_FAILED': + robotTemplate = this.robotTitle.replace('创建', '执行') + .replace('UI自动化', 'UI自动化失败'); + break; + default: + break; } this.$refs.noticeTemplate.open(row, robotTemplate); - }); + } } }, handleReceivers(row) {