fix(项目管理): 误报规则日志记录有误

--bug=1039536 --user=宋昌昌 【项目管理】日志-用户添加误报规则的操作对象是空 https://www.tapd.cn/55049933/s/1500149
This commit is contained in:
song-cc-rock 2024-04-17 19:11:16 +08:00 committed by 刘瑞斌
parent 6668378d9c
commit 4893acce0c
6 changed files with 19 additions and 6 deletions

View File

@ -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);

View File

@ -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";
// 项目管理-项目与权限-用户组

View File

@ -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', // 项目管理-项目与权限-项目版本

View File

@ -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',

View File

@ -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': '功能用例',

View File

@ -32,7 +32,7 @@
</div>
<MsBaseTable v-bind="propsRes" ref="tableRef" v-on="propsEvent">
<template #defaultTemplate="{ record }">
<div v-if="record.enableDefault || isEnableOrdTemplate">
<div v-if="record.enableDefault">
<a-tooltip :content="t('system.orgTemplate.must.open.one')" :mouse-enter-delay="500">
<a-switch
v-model="record.enableDefault"
@ -46,7 +46,7 @@
<a-switch
v-else
v-model="record.enableDefault"
:disabled="record.enableDefault || isEnableOrdTemplate"
:disabled="record.enableDefault"
size="small"
type="line"
@change="(value) => changeDefault(value, record)"