From 4893acce0cd198a12d329b025b167943d5ba334a Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Wed, 17 Apr 2024 19:11:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E8=AF=AF=E6=8A=A5=E8=A7=84=E5=88=99=E6=97=A5=E5=BF=97=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E6=9C=89=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1039536 --user=宋昌昌 【项目管理】日志-用户添加误报规则的操作对象是空 https://www.tapd.cn/55049933/s/1500149 --- .../io/metersphere/project/service/FakeErrorService.java | 8 ++++---- .../system/log/constants/OperationLogModule.java | 2 ++ frontend/src/config/pathMap.ts | 9 +++++++++ frontend/src/locale/en-US/index.ts | 1 + frontend/src/locale/zh-CN/index.ts | 1 + .../template/components/templateManagement.vue | 4 ++-- 6 files changed, 19 insertions(+), 6 deletions(-) diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/service/FakeErrorService.java b/backend/services/project-management/src/main/java/io/metersphere/project/service/FakeErrorService.java index 92d1a1704b..516ba45186 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/service/FakeErrorService.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/service/FakeErrorService.java @@ -201,7 +201,7 @@ public class FakeErrorService { fakeError.getId(), userId, OperationLogType.ADD.name(), - OperationLogModule.PROJECT_PROJECT_MANAGER, + OperationLogModule.PROJECT_MANAGEMENT_PERMISSION_MENU_MANAGEMENT_FAKE_ERROR, fakeError.getName()); dto.setMethod(HttpMethodConstants.POST.name()); dto.setPath("/fake/error/add"); @@ -225,7 +225,7 @@ public class FakeErrorService { fakeError.getId(), userId, OperationLogType.UPDATE.name(), - OperationLogModule.PROJECT_PROJECT_MANAGER, + OperationLogModule.PROJECT_MANAGEMENT_PERMISSION_MENU_MANAGEMENT_FAKE_ERROR, fakeError.getName()); dto.setMethod(HttpMethodConstants.POST.name()); dto.setPath("/fake/error/update"); @@ -258,7 +258,7 @@ public class FakeErrorService { fakeError.getId(), null, OperationLogType.UPDATE.name(), - OperationLogModule.PROJECT_PROJECT_MANAGER, + OperationLogModule.PROJECT_MANAGEMENT_PERMISSION_MENU_MANAGEMENT_FAKE_ERROR, fakeError.getName()); dto.setOriginalValue(JSON.toJSONBytes(fakeError)); logs.add(dto); @@ -319,7 +319,7 @@ public class FakeErrorService { fakeError.getId(), null, OperationLogType.UPDATE.name(), - OperationLogModule.PROJECT_PROJECT_MANAGER, + OperationLogModule.PROJECT_MANAGEMENT_PERMISSION_MENU_MANAGEMENT_FAKE_ERROR, fakeError.getName()); dto.setOriginalValue(JSON.toJSONBytes(fakeError)); logs.add(dto); diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/log/constants/OperationLogModule.java b/backend/services/system-setting/src/main/java/io/metersphere/system/log/constants/OperationLogModule.java index 83cad4f0e7..4c6c99d0b0 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/log/constants/OperationLogModule.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/log/constants/OperationLogModule.java @@ -95,6 +95,8 @@ public class OperationLogModule { public static final String PROJECT_MANAGEMENT = "PROJECT_MANAGEMENT"; // 项目管理-项目与权限 public static final String PROJECT_MANAGEMENT_PERMISSION = "PROJECT_MANAGEMENT_PERMISSION"; + // 项目管理-项目与权限-应用设置-误报库 + public static final String PROJECT_MANAGEMENT_PERMISSION_MENU_MANAGEMENT_FAKE_ERROR = "PROJECT_MANAGEMENT_PERMISSION_MENU_MANAGEMENT_FAKE"; // 项目管理-项目与权限-成员 public static final String PROJECT_MANAGEMENT_PERMISSION_MEMBER = "PROJECT_MANAGEMENT_PERMISSION_MEMBER"; // 项目管理-项目与权限-用户组 diff --git a/frontend/src/config/pathMap.ts b/frontend/src/config/pathMap.ts index c95f62f815..f99f65c6d2 100644 --- a/frontend/src/config/pathMap.ts +++ b/frontend/src/config/pathMap.ts @@ -523,6 +523,15 @@ export const pathMap: PathMapItem[] = [ route: RouteEnum.PROJECT_MANAGEMENT_PERMISSION_MENU_MANAGEMENT, permission: [], level: MENU_LEVEL[2], + children: [ + { + key: 'PROJECT_MANAGEMENT_PERMISSION_MENU_MANAGEMENT_FAKE', // 项目管理-项目与权限-菜单管理-误报 + locale: 'menu.projectManagement.fakeError', + route: RouteEnum.PROJECT_MANAGEMENT_MENU_MANAGEMENT_ERROR_REPORT_RULE, + permission: [], + level: MENU_LEVEL[2], + }, + ], }, { key: 'PROJECT_MANAGEMENT_PERMISSION_VERSION', // 项目管理-项目与权限-项目版本 diff --git a/frontend/src/locale/en-US/index.ts b/frontend/src/locale/en-US/index.ts index 2e471cba98..c0cfa6d2a2 100644 --- a/frontend/src/locale/en-US/index.ts +++ b/frontend/src/locale/en-US/index.ts @@ -39,6 +39,7 @@ export default { 'menu.projectManagement.fileManagement': 'File', 'menu.projectManagement.messageManagement': 'Message', 'menu.projectManagement.commonScript': 'Common Script', + 'menu.projectManagement.fakeError': 'Fake Error', 'menu.projectManagement.messageManagementEdit': 'Update Template', 'menu.caseManagement.featureCase': 'Feature Case', 'menu.caseManagement.featureCaseRecycle': 'Recycle', diff --git a/frontend/src/locale/zh-CN/index.ts b/frontend/src/locale/zh-CN/index.ts index 53b95e5b5f..19534d617c 100644 --- a/frontend/src/locale/zh-CN/index.ts +++ b/frontend/src/locale/zh-CN/index.ts @@ -45,6 +45,7 @@ export default { 'menu.projectManagement.fileManagement': '文件管理', 'menu.projectManagement.messageManagement': '消息管理', 'menu.projectManagement.commonScript': '公共脚本', + 'menu.projectManagement.fakeError': '误报库', 'menu.projectManagement.messageManagementEdit': '更新模板', 'menu.projectManagement.environmentManagement': '环境管理', 'menu.caseManagement.featureCase': '功能用例', diff --git a/frontend/src/views/project-management/template/components/templateManagement.vue b/frontend/src/views/project-management/template/components/templateManagement.vue index 5d92c4635c..4edc3992d8 100644 --- a/frontend/src/views/project-management/template/components/templateManagement.vue +++ b/frontend/src/views/project-management/template/components/templateManagement.vue @@ -32,7 +32,7 @@