From 21e12756d9509c114dd6e2ca675497b4dc2219da Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Wed, 23 Oct 2024 14:00:51 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E5=88=86=E4=BA=AB=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1047818 --user=宋昌昌 【接口测试】定义-分享-新建/编辑分享-操作日志-点击名称跳转报错 https://www.tapd.cn/55049933/s/1596290 --- .../api/service/definition/ApiDocShareLogService.java | 6 +++--- .../system/log/constants/OperationLogModule.java | 1 + frontend/src/config/pathMap.ts | 9 +++++++++ .../src/views/setting/system/log/components/logCards.vue | 3 ++- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDocShareLogService.java b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDocShareLogService.java index b62f6ce780..db1310f40c 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDocShareLogService.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDocShareLogService.java @@ -26,7 +26,7 @@ public class ApiDocShareLogService { * @return 日志 */ public LogDTO addLog(ApiDocShareEditRequest request) { - LogDTO dto = new LogDTO(request.getProjectId(), null, null, null,OperationLogType.SHARE.name(), OperationLogModule.API_TEST_MANAGEMENT_DEFINITION, request.getName()); + LogDTO dto = new LogDTO(request.getProjectId(), null, null, null,OperationLogType.SHARE.name(), OperationLogModule.API_TEST_MANAGEMENT_DEFINITION_SHARE, request.getName()); dto.setHistory(true); dto.setMethod(HttpMethodConstants.POST.name()); dto.setOriginalValue(JSON.toJSONBytes(request)); @@ -40,7 +40,7 @@ public class ApiDocShareLogService { * @return 日志 */ public LogDTO updateLog(ApiDocShareEditRequest request) { - LogDTO dto = new LogDTO(request.getProjectId(), null, null, null,OperationLogType.UPDATE.name(), OperationLogModule.API_TEST_MANAGEMENT_DEFINITION, "【分享接口功能】" + request.getName()); + LogDTO dto = new LogDTO(request.getProjectId(), null, null, null,OperationLogType.UPDATE.name(), OperationLogModule.API_TEST_MANAGEMENT_DEFINITION_SHARE, request.getName()); dto.setHistory(true); dto.setMethod(HttpMethodConstants.POST.name()); dto.setOriginalValue(JSON.toJSONBytes(request)); @@ -55,7 +55,7 @@ public class ApiDocShareLogService { */ public LogDTO deleteLog(String id) { ApiDocShare docShare = apiDocShareMapper.selectByPrimaryKey(id); - LogDTO dto = new LogDTO(docShare.getProjectId(), null, null, null,OperationLogType.DELETE.name(), OperationLogModule.API_TEST_MANAGEMENT_DEFINITION, "【分享接口功能】" + docShare.getName()); + LogDTO dto = new LogDTO(docShare.getProjectId(), null, null, null,OperationLogType.DELETE.name(), OperationLogModule.API_TEST_MANAGEMENT_DEFINITION_SHARE, docShare.getName()); dto.setHistory(true); dto.setMethod(HttpMethodConstants.POST.name()); dto.setOriginalValue(JSON.toJSONBytes(docShare)); 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 e9fe9a9b88..443d3b8525 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 @@ -20,6 +20,7 @@ public class OperationLogModule { public static final String API_AUTOMATION_REPORT = "API_AUTOMATION_REPORT"; // 接口管理 public static final String API_TEST_MANAGEMENT_DEFINITION = "API_TEST_MANAGEMENT_DEFINITION"; + public static final String API_TEST_MANAGEMENT_DEFINITION_SHARE = "API_TEST_MANAGEMENT_DEFINITION_SHARE"; public static final String API_TEST_MANAGEMENT_MODULE = "API_TEST_MANAGEMENT_MODULE"; public static final String API_TEST_MANAGEMENT_MOCK = "API_TEST_MANAGEMENT_MOCK"; public static final String API_TEST_MANAGEMENT_CASE = "API_TEST_MANAGEMENT_CASE"; diff --git a/frontend/src/config/pathMap.ts b/frontend/src/config/pathMap.ts index 73a91b2c1b..08f2fb9584 100644 --- a/frontend/src/config/pathMap.ts +++ b/frontend/src/config/pathMap.ts @@ -81,6 +81,15 @@ export const pathMap: PathMapItem[] = [ routeQuery: { tab: 'api', }, + children: [ + { + key: 'API_TEST_MANAGEMENT_DEFINITION_SHARE', // 接口测试-接口定义-模块 + locale: 'common.share', + route: RouteEnum.API_TEST_MANAGEMENT, + permission: [], + level: MENU_LEVEL[2], + }, + ], }, { key: 'API_TEST_MANAGEMENT_MOCK', // 接口测试-接口定义-mock diff --git a/frontend/src/views/setting/system/log/components/logCards.vue b/frontend/src/views/setting/system/log/components/logCards.vue index 413269d479..81425a06e4 100644 --- a/frontend/src/views/setting/system/log/components/logCards.vue +++ b/frontend/src/views/setting/system/log/components/logCards.vue @@ -140,7 +140,8 @@ record.module === 'SYSTEM' || record.type === 'DELETE' || record.module.includes('MODULE') || - record.module.includes('TASK_CENTER') + record.module.includes('TASK_CENTER') || + record.module.includes('API_TEST_MANAGEMENT_DEFINITION_SHARE') " class="one-line-text" >