fix(系统设置): 修复工作空间操作日志中出现了非工作空间操作的日志的缺陷
--bug=1012989 --user=王孝刚 工作空间操作日志中出现了非工作空间操作的日志 https://www.tapd.cn/55049933/s/1153245
This commit is contained in:
parent
4647dbc378
commit
2098ae5f32
|
@ -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) {
|
||||
|
|
|
@ -27,10 +27,11 @@
|
|||
<foreach collection="request.projectIds" item="projectId" separator="," open="(" close=")">
|
||||
#{projectId}
|
||||
</foreach>
|
||||
or
|
||||
</if>
|
||||
t.project_id is null
|
||||
or t.project_id = ""
|
||||
<if test="request.workspaceId == ''">
|
||||
or t.project_id is null
|
||||
or t.project_id = ""
|
||||
</if>
|
||||
)
|
||||
<if test="request.operUser != null and request.operUser != ''">
|
||||
and (t.oper_user like #{request.operUser, jdbcType=VARCHAR} or t1.name like
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue