diff --git a/backend/src/main/java/io/metersphere/api/controller/APIScenarioReportController.java b/backend/src/main/java/io/metersphere/api/controller/APIScenarioReportController.java
index 217b1a384e..d1989a3d9d 100644
--- a/backend/src/main/java/io/metersphere/api/controller/APIScenarioReportController.java
+++ b/backend/src/main/java/io/metersphere/api/controller/APIScenarioReportController.java
@@ -61,7 +61,7 @@ public class APIScenarioReportController {
}
@PostMapping("/batch/delete")
- @MsAuditLog(module = OperLogModule.API_AUTOMATION_REPORT, type = OperLogConstants.BATCH_DEL, beforeEvent = "#msClass.getLogDetails(#reportRequest.ids)", msClass = ApiScenarioReportService.class)
+ @MsAuditLog(module = OperLogModule.API_AUTOMATION_REPORT, type = OperLogConstants.BATCH_DEL, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = ApiScenarioReportService.class)
@SendNotice(taskType = NoticeConstants.TaskType.API_REPORT_TASK, event = NoticeConstants.Event.DELETE, target = "#targetClass.getByIds(#request.ids)", targetClass = ApiScenarioReportService.class,
subject = "接口报告通知")
public void deleteAPIReportBatch(@RequestBody APIReportBatchRequest request) {
diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtOperatingLogMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtOperatingLogMapper.xml
index 1340fe883d..36f81c3ad0 100644
--- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtOperatingLogMapper.xml
+++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtOperatingLogMapper.xml
@@ -27,10 +27,11 @@
#{projectId}
- or
- t.project_id is null
- or t.project_id = ""
+
+ or t.project_id is null
+ or t.project_id = ""
+
)
and (t.oper_user like #{request.operUser, jdbcType=VARCHAR} or t1.name like
diff --git a/frontend/src/business/components/project/menu/Log.vue b/frontend/src/business/components/project/menu/Log.vue
index 4b77ceb866..2b6bb08e43 100644
--- a/frontend/src/business/components/project/menu/Log.vue
+++ b/frontend/src/business/components/project/menu/Log.vue
@@ -136,7 +136,7 @@ import {
LOG_MODULE_MAP,
LOG_TYPE,
LOG_TYPE_MAP,
- SYSLIST
+ SYSLIST, WORKSYSLIST
} from "@/business/components/settings/operatinglog/config";
import MsLogDetail from "@/business/components/settings/operatinglog/LogDetail";
import MsMainContainer from "@/business/components/common/components/MsMainContainer";
@@ -169,7 +169,7 @@ export default {
LOG_TYPE: new LOG_TYPE(this),
LOG_TYPE_MAP: new LOG_TYPE_MAP(this),
LOG_MODULE_MAP: new LOG_MODULE_MAP(this),
- sysList: new SYSLIST(),
+ sysList: new WORKSYSLIST(),
}
},
mounted() {
diff --git a/frontend/src/business/components/settings/operatinglog/OperatingLog.vue b/frontend/src/business/components/settings/operatinglog/OperatingLog.vue
index 3115e338bb..43363ff14c 100644
--- a/frontend/src/business/components/settings/operatinglog/OperatingLog.vue
+++ b/frontend/src/business/components/settings/operatinglog/OperatingLog.vue
@@ -130,7 +130,7 @@
import MsTablePagination from "../../common/pagination/TablePagination";
import MsTableOperator from "../../common/components/MsTableOperator";
import {getCurrentProjectID, getCurrentWorkspaceId} from "@/common/js/utils";
-import {getUrl, LOG_MODULE_MAP, LOG_TYPE, LOG_TYPE_MAP, SYSLIST} from "./config";
+import {getUrl, LOG_MODULE_MAP, LOG_TYPE, LOG_TYPE_MAP, SYSLIST, WORKSYSLIST} from "./config";
import MsLogDetail from "./LogDetail";
export default {
@@ -158,8 +158,8 @@ export default {
LOG_TYPE: new LOG_TYPE(this),
LOG_TYPE_MAP: new LOG_TYPE_MAP(this),
LOG_MODULE_MAP: new LOG_MODULE_MAP(this),
- sysList:new SYSLIST(),
- loading: false
+ sysList: new SYSLIST(),
+ loading: false,
}
},
mounted() {
@@ -202,7 +202,20 @@ export default {
this.getMember();
break;
}
- }
+ },
+ '$route.path': {
+ handler(toPath, fromPath) {
+ if (toPath === '/setting/operatingLog/workspace') {
+ this.sysList = new WORKSYSLIST();
+ this.condition.workspaceId = getCurrentWorkspaceId();
+ } else {
+ this.sysList = new SYSLIST();
+ this.condition.workspaceId = '';
+ }
+ },
+ deep: true,
+ immediate: true
+ },
},
methods: {
isLink(row) {
diff --git a/frontend/src/business/components/settings/operatinglog/config.js b/frontend/src/business/components/settings/operatinglog/config.js
index adc13dccf1..3eb3751c3f 100644
--- a/frontend/src/business/components/settings/operatinglog/config.js
+++ b/frontend/src/business/components/settings/operatinglog/config.js
@@ -250,26 +250,94 @@ export function SYSLIST() {
value: [i18n.t('commons.personal_information') + "-API Keys", 'PERSONAL_INFORMATION_APIKEYS'],
leaf: true
},
- {
- label: i18n.t('operating_log.auth_title'),
- value: [i18n.t('operating_log.auth_title'), 'AUTH_TITLE'],
- leaf: true
- }
- ]
+ {
+ label: i18n.t('operating_log.auth_title'),
+ value: [i18n.t('operating_log.auth_title'), 'AUTH_TITLE'],
+ leaf: true
+ }
+ ]
},
];
- return sysList;
+ return sysList;
+}
+
+export function WORKSYSLIST() {
+ let worksysList = [
+ {
+ label: i18n.t('test_track.test_track'), value: i18n.t('test_track.test_track'), children: [
+ {
+ label: i18n.t('permission.project_track_case.name'),
+ value: [i18n.t('permission.project_track_case.name'), 'TRACK_TEST_CASE'],
+ leaf: true
+ },
+ {
+ label: i18n.t('test_track.review.test_review'),
+ value: [i18n.t('test_track.review.test_review'), 'TRACK_TEST_CASE_REVIEW'],
+ leaf: true
+ },
+ {
+ label: i18n.t('test_track.plan.test_plan'),
+ value: [i18n.t('test_track.plan.test_plan'), 'TRACK_TEST_PLAN'],
+ leaf: true
+ },
+ {
+ label: i18n.t('test_track.issue.issue_management'),
+ value: [i18n.t('test_track.issue.issue_management'), 'TRACK_BUG'],
+ leaf: true
+ },
+ {label: i18n.t('commons.report'), value: [i18n.t('commons.report'), 'TRACK_REPORT'], leaf: true}]
+ },
+ {
+ label: i18n.t('commons.api'), value: i18n.t('commons.api'), children: [
+ {
+ label: i18n.t('workstation.table_name.api_definition'),
+ value: [i18n.t('workstation.table_name.api_definition'), 'API_DEFINITION'],
+ leaf: true
+ },
+ {
+ label: i18n.t('operating_log.api_definition_case'),
+ value: [i18n.t('operating_log.api_definition_case'), 'API_DEFINITION_CASE'],
+ leaf: true
+ },
+ {
+ label: i18n.t('workstation.table_name.api_automation'),
+ value: [i18n.t('workstation.table_name.api_automation'), 'API_AUTOMATION'],
+ leaf: true
+ },
+ {
+ label: i18n.t('permission.project_api_report.name'),
+ value: [i18n.t('permission.project_api_report.name'), 'API_AUTOMATION_REPORT'],
+ leaf: true
+ }]
+ },
+ {
+ label: i18n.t('workstation.table_name.performance'),
+ value: i18n.t('workstation.table_name.performance'),
+ children: [
+ {
+ label: i18n.t('workstation.table_name.performance'),
+ value: [i18n.t('workstation.table_name.performance'), 'PERFORMANCE_TEST'],
+ leaf: true
+ },
+ {
+ label: i18n.t('report.load_test_report'),
+ value: [i18n.t('report.load_test_report'), 'PERFORMANCE_TEST_REPORT'],
+ leaf: true
+ }]
+ },
+ ];
+ return worksysList;
}
export function getUrl(d, _this) {
- let url = "/#";
- let resourceId = d.sourceId;
- if (resourceId && (resourceId.startsWith("\"") || resourceId.startsWith("["))) {
- resourceId = JSON.parse(d.sourceId);
- }
- if (resourceId instanceof Array) {
- if (resourceId.length === 1) {
+ let url = "/#";
+ let resourceId = d.sourceId;
+ if (resourceId && (resourceId.startsWith("\"") || resourceId.startsWith("["))) {
+ resourceId = JSON.parse(d.sourceId);
+ }
+ if (resourceId instanceof Array) {
+ if (resourceId.length === 1) {
resourceId = resourceId[0];
} else {
return url;