From c83ccb456e2544d6fdd65a1ba7a93f94264bc55f Mon Sep 17 00:00:00 2001 From: RubyLiu Date: Mon, 16 Oct 2023 19:13:55 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E7=AE=A1=E7=90=86=E5=88=97=E8=A1=A8=E9=A1=B5?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project-management/menuManagement.ts | 22 +- .../pure/ms-time-selector/MsTimeSelector.vue | 1 + .../projectManagement/menuManagement.ts | 14 +- .../menuManagement/locale/zh-CN.ts | 7 + .../menuManagement/menuManagement.vue | 236 ++++++++++++++---- 5 files changed, 210 insertions(+), 70 deletions(-) diff --git a/frontend/src/api/modules/project-management/menuManagement.ts b/frontend/src/api/modules/project-management/menuManagement.ts index fbef36aab5..455e637461 100644 --- a/frontend/src/api/modules/project-management/menuManagement.ts +++ b/frontend/src/api/modules/project-management/menuManagement.ts @@ -45,32 +45,32 @@ export async function getAuditorOptions(projectId: string, type: MenuEnum) { return MSR.get({ url: `/project/application/${suffix}/user/${projectId}` }); } -export function postUpdateMenu(data: MenuTableListParams) { - let suffix = ''; - switch (data.type) { +export function postUpdateMenu(data: MenuTableListParams, suffix: string) { + let suffixUrl = ''; + switch (suffix) { case MenuEnum.workstation: - suffix = 'workstation'; + suffixUrl = 'workstation'; break; case MenuEnum.testPlan: - suffix = 'test-plan'; + suffixUrl = 'test-plan'; break; case MenuEnum.bugManagement: - suffix = 'bug'; + suffixUrl = 'bug'; break; case MenuEnum.caseManagement: - suffix = 'case'; + suffixUrl = 'case'; break; case MenuEnum.apiTest: - suffix = 'api'; + suffixUrl = 'api'; break; case MenuEnum.uiTest: - suffix = 'uiTest'; + suffixUrl = 'ui'; break; default: - suffix = 'performance-test'; + suffixUrl = 'performance-test'; break; } - return MSR.post({ url: `${Url.updateConfigByMenuTypeUrl}${suffix}`, data }); + return MSR.post({ url: `${Url.updateConfigByMenuTypeUrl}${suffixUrl}`, data }); } export function getConfigByMenuItem(data: MenuTableListParams) { diff --git a/frontend/src/components/pure/ms-time-selector/MsTimeSelector.vue b/frontend/src/components/pure/ms-time-selector/MsTimeSelector.vue index 5dc097f233..07d296ac7c 100644 --- a/frontend/src/components/pure/ms-time-selector/MsTimeSelector.vue +++ b/frontend/src/components/pure/ms-time-selector/MsTimeSelector.vue @@ -8,6 +8,7 @@ hide-button size="small" @blur="handleBlur" + @press-enter="handleBlur" >