From d79016eda0dc33fcd53d7bdaac465785a441fa10 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Thu, 27 Oct 2022 15:03:55 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E9=A1=B9=E7=9B=AE=E8=AE=BE=E7=BD=AE):?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E6=B6=88=E6=81=AF=E9=80=9A=E7=9F=A5mock?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=8E=A5=E6=94=B6=E4=BA=BA=E4=B8=8D=E5=8A=A0?= =?UTF-8?q?=E5=85=B3=E6=B3=A8=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --user=郭雨琦 https://www.tapd.cn/55049933/prong/stories/view/1155049933001009922 --- .../api/ApiDefinitionNotification.vue | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/project-management/frontend/src/business/menu/notification/api/ApiDefinitionNotification.vue b/project-management/frontend/src/business/menu/notification/api/ApiDefinitionNotification.vue index dedb06fc4d..0c062737ae 100644 --- a/project-management/frontend/src/business/menu/notification/api/ApiDefinitionNotification.vue +++ b/project-management/frontend/src/business/menu/notification/api/ApiDefinitionNotification.vue @@ -422,18 +422,15 @@ export default { } break; case "MOCK_CREATE": - receiverOptions.unshift({id: 'FOLLOW_PEOPLE', name: this.$t('api_test.automation.follow_people')}); - receiverOptions.unshift({id: 'CREATOR', name: this.$t('commons.create_user')}); - if (row.isSet) { - if (i < 0) { - row.userIds.unshift('FOLLOW_PEOPLE'); - } + if (i2 > -1) { + row.userIds.splice(i2, 1); + } + if (i > -1) { + row.userIds.splice(i, 1); } break; case "UPDATE": case "CASE_UPDATE": - case "MOCK_UPDATE": - case "MOCK_DELETE": receiverOptions.unshift({id: 'FOLLOW_PEOPLE', name: this.$t('api_test.automation.follow_people')}); receiverOptions.unshift({id: 'CREATOR', name: this.$t('commons.create_user')}); if (row.isSet) { @@ -445,6 +442,16 @@ export default { } } break; + case "MOCK_UPDATE": + case "MOCK_DELETE": + receiverOptions.unshift({id: 'FOLLOW_PEOPLE', name: this.$t('api_test.automation.follow_people')}); + receiverOptions.unshift({id: 'CREATOR', name: this.$t('commons.create_user')}); + if (row.isSet) { + if (i2 < 0) { + row.userIds.unshift('CREATOR'); + } + } + break; case "DELETE": case "CASE_DELETE": case "EXECUTE_SUCCESSFUL":