fix(项目设置): 修复操作日志已知缺陷

--bug=1012882 --user=王孝刚 【系统设置】操作日志问题汇总
https://www.tapd.cn/55049933/s/1151175
--bug=1012874 --user=王孝刚
【系统设置】github#13126,工作空间和项目设置的操作日志,通过添加操作对象搜索条件,无法正确查出对应数据
https://www.tapd.cn/55049933/s/1151197
This commit is contained in:
wxg0103 2022-04-28 18:17:26 +08:00 committed by 刘瑞斌
parent ecf43fc120
commit 0a02d654ae
3 changed files with 380 additions and 356 deletions

View File

@ -33,7 +33,8 @@
or t.project_id = "" or t.project_id = ""
) )
<if test="request.operUser != null and request.operUser != ''"> <if test="request.operUser != null and request.operUser != ''">
and (t.oper_user like #{request.operUser, jdbcType=VARCHAR} or t1.name like #{request.operUser, jdbcType=VARCHAR}) and (t.oper_user like #{request.operUser, jdbcType=VARCHAR} or t1.name like
#{request.operUser, jdbcType=VARCHAR})
</if> </if>
<if test="request.projectId != null and request.projectId !=''"> <if test="request.projectId != null and request.projectId !=''">
and t.project_id = #{request.projectId} and t.project_id = #{request.projectId}
@ -42,7 +43,10 @@
and t.oper_type like #{request.operType, jdbcType=VARCHAR} and t.oper_type like #{request.operType, jdbcType=VARCHAR}
</if> </if>
<if test="request.operModule != null and request.operModule != ''"> <if test="request.operModule != null and request.operModule != ''">
and t.oper_module like #{request.operModule, jdbcType=VARCHAR} and
<foreach collection="request.operModule" index="index" open="(" close=")" separator="or" item="item">
t.oper_module like CONCAT('%',#{item},'%')
</foreach>
</if> </if>
<if test="request.startTime != null and request.endTime != null"> <if test="request.startTime != null and request.endTime != null">
AND t.oper_time BETWEEN #{request.startTime} AND #{request.endTime} AND t.oper_time BETWEEN #{request.startTime} AND #{request.endTime}

View File

@ -22,7 +22,7 @@ public class OperatingLogRequest implements Serializable {
private Long endTime; private Long endTime;
private String operModule; private List<String> operModule;
private String operTitle; private String operTitle;

View File

@ -1,382 +1,402 @@
import i18n from "@/i18n/i18n"; import i18n from "@/i18n/i18n";
export function LOG_TYPE(_this) { export function LOG_TYPE(_this) {
let LOG_TYPE = [ let LOG_TYPE = [
{id: 'CREATE', label: _this.$t('api_test.definition.request.create_info')}, {id: 'CREATE', label: _this.$t('api_test.definition.request.create_info')},
{id: 'DELETE', label: _this.$t('commons.delete')}, {id: 'DELETE', label: _this.$t('commons.delete')},
{id: 'UPDATE', label: _this.$t('commons.update')}, {id: 'UPDATE', label: _this.$t('commons.update')},
{id: 'IMPORT', label: _this.$t('api_test.api_import.label')}, {id: 'IMPORT', label: _this.$t('api_test.api_import.label')},
{id: 'EXPORT', label: _this.$t('commons.export')}, {id: 'EXPORT', label: _this.$t('commons.export')},
{id: 'ASSOCIATE_CASE', label: _this.$t('test_track.review_view.relevance_case')}, {id: 'ASSOCIATE_CASE', label: _this.$t('test_track.review_view.relevance_case')},
{id: 'ASSOCIATE_ISSUE', label: _this.$t('test_track.case.relate_issue')}, {id: 'ASSOCIATE_ISSUE', label: _this.$t('test_track.case.relate_issue')},
{id: 'UN_ASSOCIATE_CASE', label: _this.$t('test_track.case.unlink')}, {id: 'UN_ASSOCIATE_CASE', label: _this.$t('test_track.case.unlink')},
{id: 'REVIEW', label: _this.$t('test_track.review_view.start_review')}, {id: 'REVIEW', label: _this.$t('test_track.review_view.start_review')},
{id: 'COPY', label: _this.$t('commons.copy')}, {id: 'COPY', label: _this.$t('commons.copy')},
{id: 'EXECUTE', label: _this.$t('api_test.automation.execute')}, {id: 'EXECUTE', label: _this.$t('api_test.automation.execute')},
{id: 'CREATE_PRE_TEST', label: _this.$t('api_test.create_performance_test')}, {id: 'CREATE_PRE_TEST', label: _this.$t('api_test.create_performance_test')},
{id: 'SHARE', label: _this.$t('operating_log.share')}, {id: 'SHARE', label: _this.$t('operating_log.share')},
{id: 'LOGIN', label: _this.$t('commons.login')}, {id: 'LOGIN', label: _this.$t('commons.login')},
{id: 'RESTORE', label: _this.$t('commons.reduction')}, {id: 'RESTORE', label: _this.$t('commons.reduction')},
{id: 'DEBUG', label: _this.$t('api_test.request.debug')}, {id: 'DEBUG', label: _this.$t('api_test.request.debug')},
{id: 'GC', label: _this.$t('api_test.automation.trash')}, {id: 'GC', label: _this.$t('api_test.automation.trash')},
{id: 'BATCH_DEL', label: _this.$t('api_test.definition.request.batch_delete')}, {id: 'BATCH_DEL', label: _this.$t('api_test.definition.request.batch_delete')},
{id: 'BATCH_UPDATE', label: _this.$t('api_test.definition.request.batch_edit')}, {id: 'BATCH_UPDATE', label: _this.$t('api_test.definition.request.batch_edit')},
{id: 'BATCH_ADD', label: _this.$t('commons.batch_add')}, {id: 'BATCH_ADD', label: _this.$t('commons.batch_add')},
{id: 'BATCH_RESTORE', label: _this.$t('commons.batch_restore')}, {id: 'BATCH_RESTORE', label: _this.$t('commons.batch_restore')},
{id: 'BATCH_GC', label: _this.$t('commons.batch_gc')} {id: 'BATCH_GC', label: _this.$t('commons.batch_gc')}
]; ];
return LOG_TYPE; return LOG_TYPE;
} }
export function LOG_TYPE_MAP(_this) { export function LOG_TYPE_MAP(_this) {
let LOG_TYPE_MAP = new Map([ let LOG_TYPE_MAP = new Map([
['CREATE', _this.$t('api_test.definition.request.create_info')], ['CREATE', _this.$t('api_test.definition.request.create_info')],
['DELETE', _this.$t('commons.delete')], ['DELETE', _this.$t('commons.delete')],
['UPDATE', _this.$t('commons.update')], ['UPDATE', _this.$t('commons.update')],
['IMPORT', _this.$t('api_test.api_import.label')], ['IMPORT', _this.$t('api_test.api_import.label')],
['EXPORT', _this.$t('commons.export')], ['EXPORT', _this.$t('commons.export')],
['ASSOCIATE_CASE', _this.$t('test_track.review_view.relevance_case')], ['ASSOCIATE_CASE', _this.$t('test_track.review_view.relevance_case')],
['ASSOCIATE_ISSUE', _this.$t('test_track.case.relate_issue')], ['ASSOCIATE_ISSUE', _this.$t('test_track.case.relate_issue')],
['UN_ASSOCIATE_CASE', _this.$t('test_track.case.unlink')], ['UN_ASSOCIATE_CASE', _this.$t('test_track.case.unlink')],
['REVIEW', _this.$t('test_track.review_view.start_review')], ['REVIEW', _this.$t('test_track.review_view.start_review')],
['COPY', _this.$t('commons.copy')], ['COPY', _this.$t('commons.copy')],
['EXECUTE', _this.$t('api_test.automation.execute')], ['EXECUTE', _this.$t('api_test.automation.execute')],
['CREATE_PRE_TEST', _this.$t('api_test.create_performance_test')], ['CREATE_PRE_TEST', _this.$t('api_test.create_performance_test')],
['SHARE', _this.$t('operating_log.share')], ['SHARE', _this.$t('operating_log.share')],
['LOGIN', _this.$t('commons.login')], ['LOGIN', _this.$t('commons.login')],
['RESTORE', _this.$t('commons.reduction')], ['RESTORE', _this.$t('commons.reduction')],
['DEBUG', _this.$t('api_test.request.debug')], ['DEBUG', _this.$t('api_test.request.debug')],
['GC', _this.$t('api_test.automation.trash')], ['GC', _this.$t('api_test.automation.trash')],
['BATCH_DEL', _this.$t('api_test.definition.request.batch_delete')], ['BATCH_DEL', _this.$t('api_test.definition.request.batch_delete')],
['BATCH_UPDATE', _this.$t('api_test.definition.request.batch_edit')], ['BATCH_UPDATE', _this.$t('api_test.definition.request.batch_edit')],
['BATCH_ADD', _this.$t('commons.batch_add')], ['BATCH_ADD', _this.$t('commons.batch_add')],
['BATCH_RESTORE', _this.$t('commons.batch_restore')], ['BATCH_RESTORE', _this.$t('commons.batch_restore')],
['BATCH_GC', _this.$t('commons.batch_gc')], ['BATCH_GC', _this.$t('commons.batch_gc')],
]); ]);
return LOG_TYPE_MAP; return LOG_TYPE_MAP;
} }
export function LOG_MODULE_MAP(_this) { export function LOG_MODULE_MAP(_this) {
let LOG_MODULE_MAP = new Map([ let LOG_MODULE_MAP = new Map([
['SYSTEM_PARAMETER_SETTING', _this.$t('operating_log.system_parameter_setting')], ['SYSTEM_PARAMETER_SETTING', _this.$t('operating_log.system_parameter_setting')],
['SYSTEM_TEST_RESOURCE', _this.$t('operating_log.system_test_resource')], ['SYSTEM_TEST_RESOURCE', _this.$t('operating_log.system_test_resource')],
['SYSTEM_USER', _this.$t('operating_log.system_user')], ['SYSTEM_USER', _this.$t('operating_log.system_user')],
['SYSTEM_WORKSPACE', _this.$t('operating_log.system_workspace')], ['SYSTEM_WORKSPACE', _this.$t('operating_log.system_workspace')],
['WORKSPACE_TEMPLATE_SETTINGS', _this.$t('operating_log.workspace_template_settings')], ['WORKSPACE_TEMPLATE_SETTINGS', _this.$t('operating_log.workspace_template_settings')],
['WORKSPACE_MESSAGE_SETTINGS', _this.$t('operating_log.workspace_message_settings')], ['WORKSPACE_MESSAGE_SETTINGS', _this.$t('operating_log.workspace_message_settings')],
['WORKSPACE_TEMPLATE_SETTINGS_FIELD', _this.$t('operating_log.workspace_template_settings_field')], ['WORKSPACE_TEMPLATE_SETTINGS_FIELD', _this.$t('operating_log.workspace_template_settings_field')],
['WORKSPACE_TEMPLATE_SETTINGS_ISSUE', _this.$t('operating_log.workspace_template_settings_issue')], ['WORKSPACE_TEMPLATE_SETTINGS_ISSUE', _this.$t('operating_log.workspace_template_settings_issue')],
['WORKSPACE_SERVICE_INTEGRATION', _this.$t('operating_log.workspace_service_integration')], ['WORKSPACE_SERVICE_INTEGRATION', _this.$t('operating_log.workspace_service_integration')],
['WORKSPACE_TEMPLATE_SETTINGS_CASE', _this.$t('operating_log.workspace_template_settings_case')], ['WORKSPACE_TEMPLATE_SETTINGS_CASE', _this.$t('operating_log.workspace_template_settings_case')],
['WORKSPACE_MEMBER', _this.$t('operating_log.workspace_member')], ['WORKSPACE_MEMBER', _this.$t('operating_log.workspace_member')],
['API_AUTOMATION', _this.$t('operating_log.api_automation')], ['API_AUTOMATION', _this.$t('operating_log.api_automation')],
['API_AUTOMATION_REPORT', _this.$t('operating_log.api_automation_report')], ['API_AUTOMATION_REPORT', _this.$t('operating_log.api_automation_report')],
['API_DEFINITION', _this.$t('operating_log.api_definition')], ['API_DEFINITION', _this.$t('operating_log.api_definition')],
['API_DEFINITION_CASE', _this.$t('operating_log.api_definition_case')], ['API_DEFINITION_CASE', _this.$t('operating_log.api_definition_case')],
['TRACK_TEST_PLAN', _this.$t('operating_log.track_test_plan')], ['TRACK_TEST_PLAN', _this.$t('operating_log.track_test_plan')],
['TRACK_BUG', _this.$t('operating_log.track_bug')], ['TRACK_BUG', _this.$t('operating_log.track_bug')],
['TRACK_TEST_CASE_REVIEW', _this.$t('operating_log.track_test_case_review')], ['TRACK_TEST_CASE_REVIEW', _this.$t('operating_log.track_test_case_review')],
['TRACK_TEST_CASE', _this.$t('operating_log.track_test_case')], ['TRACK_TEST_CASE', _this.$t('operating_log.track_test_case')],
['TRACK_REPORT', _this.$t('operating_log.track_report')], ['TRACK_REPORT', _this.$t('operating_log.track_report')],
['AUTH_TITLE', _this.$t('operating_log.auth_title')], ['AUTH_TITLE', _this.$t('operating_log.auth_title')],
['PROJECT_PROJECT_JAR', _this.$t('operating_log.project_project_jar')], ['PROJECT_PROJECT_JAR', _this.$t('operating_log.project_project_jar')],
['PROJECT_ENVIRONMENT_SETTING', _this.$t('operating_log.project_environment_setting')], ['PROJECT_ENVIRONMENT_SETTING', _this.$t('operating_log.project_environment_setting')],
['PROJECT_PROJECT_MANAGER', _this.$t('operating_log.project_project_manager')], ['PROJECT_PROJECT_MANAGER', _this.$t('operating_log.project_project_manager')],
['PROJECT_FILE_MANAGEMENT', _this.$t('operating_log.project_file_management')], ['PROJECT_FILE_MANAGEMENT', _this.$t('operating_log.project_file_management')],
['PROJECT_PROJECT_MEMBER', _this.$t('operating_log.project_project_member')], ['PROJECT_PROJECT_MEMBER', _this.$t('operating_log.project_project_member')],
['PERSONAL_INFORMATION_PERSONAL_SETTINGS', _this.$t('operating_log.personal_information_personal_settings')], ['PERSONAL_INFORMATION_PERSONAL_SETTINGS', _this.$t('operating_log.personal_information_personal_settings')],
['PERSONAL_INFORMATION_APIKEYS', _this.$t('operating_log.personal_information_apikeys')], ['PERSONAL_INFORMATION_APIKEYS', _this.$t('operating_log.personal_information_apikeys')],
['GROUP_PERMISSION', _this.$t('operating_log.group_permission')], ['GROUP_PERMISSION', _this.$t('operating_log.group_permission')],
['PERFORMANCE_TEST_REPORT', _this.$t('operating_log.performance_test_report')], ['PERFORMANCE_TEST_REPORT', _this.$t('operating_log.performance_test_report')],
['PERFORMANCE_TEST', _this.$t('operating_log.performance_test')], ['PERFORMANCE_TEST', _this.$t('operating_log.performance_test')],
['ERROR_REPORT_LIBRARY', _this.$t('operating_log.error_report_library')], ['ERROR_REPORT_LIBRARY', _this.$t('operating_log.error_report_library')],
['SYSTEM_QUOTA_MANAGEMENT', _this.$t('operating_log.system_quota_management')], ['SYSTEM_QUOTA_MANAGEMENT', _this.$t('operating_log.system_quota_management')],
['ENTERPRISE_TEST_REPORT', _this.$t('operating_log.enterprise_test_report')], ['ENTERPRISE_TEST_REPORT', _this.$t('operating_log.enterprise_test_report')],
['SYSTEM_AUTHORIZATION_MANAGEMENT', _this.$t('operating_log.system_authorization_management')], ['SYSTEM_AUTHORIZATION_MANAGEMENT', _this.$t('operating_log.system_authorization_management')],
]); ]);
return LOG_MODULE_MAP; return LOG_MODULE_MAP;
} }
export function SYSLIST() { export function SYSLIST() {
let sysList = [ let sysList = [
{
label: i18n.t('test_track.test_track'), value: i18n.t('test_track.test_track'), children: [
{ {
label: i18n.t('permission.project_track_case.name'), label: i18n.t('test_track.test_track'), value: i18n.t('test_track.test_track'), children: [
value: i18n.t('permission.project_track_case.name'), {
leaf: true label: i18n.t('permission.project_track_case.name'),
}, value: [i18n.t('permission.project_track_case.name'), 'TRACK_TEST_CASE'],
{label: i18n.t('test_track.review.test_review'), value: i18n.t('test_track.review.test_review'), leaf: true}, leaf: true
{label: i18n.t('test_track.plan.test_plan'), value: i18n.t('test_track.plan.test_plan'), leaf: true}, },
{ {
label: i18n.t('test_track.issue.issue_management'), label: i18n.t('test_track.review.test_review'),
value: i18n.t('test_track.issue.issue_management'), value: [i18n.t('test_track.review.test_review'), 'TRACK_TEST_CASE_REVIEW'],
leaf: true leaf: true
}, },
{label: i18n.t('commons.report'), value: i18n.t('commons.report'), leaf: true}] {
}, label: i18n.t('test_track.plan.test_plan'),
{ value: [i18n.t('test_track.plan.test_plan'), 'TRACK_TEST_PLAN'],
label: i18n.t('commons.api'), value: i18n.t('commons.api'), children: [ leaf: true
{ },
label: i18n.t('workstation.table_name.api_definition'), {
value: i18n.t('workstation.table_name.api_definition'), label: i18n.t('test_track.issue.issue_management'),
leaf: true 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('workstation.table_name.api_automation'), label: i18n.t('commons.api'), value: i18n.t('commons.api'), children: [
value: i18n.t('workstation.table_name.api_automation'), {
leaf: true 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('permission.project_api_report.name'), label: i18n.t('workstation.table_name.performance'),
value: i18n.t('permission.project_api_report.name'), value: i18n.t('workstation.table_name.performance'),
leaf: true children: [
}] {
}, label: i18n.t('workstation.table_name.performance'),
{ value: [i18n.t('workstation.table_name.performance'), 'PERFORMANCE_TEST'],
label: i18n.t('workstation.table_name.performance'), leaf: true
value: i18n.t('workstation.table_name.performance'), },
children: [ {
{ label: i18n.t('report.load_test_report'),
label: i18n.t('workstation.table_name.performance'), value: [i18n.t('report.load_test_report'), 'PERFORMANCE_TEST_REPORT'],
value: i18n.t('workstation.table_name.performance'), leaf: true
leaf: true }]
},
{label: i18n.t('report.load_test_report'), value: i18n.t('report.load_test_report'), leaf: true}]
},
{
label: i18n.t('commons.system_setting'), value: i18n.t('commons.system_setting'), children: [
{
label: i18n.t('commons.system') + "-" + i18n.t('commons.user'),
value: i18n.t('commons.system') + "-" + i18n.t('commons.user'),
leaf: true
}, },
{ {
label: i18n.t('commons.system') + "-" + i18n.t('commons.test_resource_pool'), label: i18n.t('commons.system_setting'), value: i18n.t('commons.system_setting'), children: [
value: i18n.t('commons.system') + "-" + i18n.t('commons.test_resource_pool'), {
leaf: true label: i18n.t('commons.system') + "-" + i18n.t('commons.user'),
}, value: [i18n.t('commons.system') + "-" + i18n.t('commons.user'), 'SYSTEM_USER'],
{ leaf: true
label: i18n.t('commons.system') + "-" + i18n.t('commons.system_parameter_setting'), },
value: i18n.t('commons.system') + "-" + i18n.t('commons.system_parameter_setting'), {
leaf: true label: i18n.t('commons.system') + "-" + i18n.t('commons.test_resource_pool'),
}, value: [i18n.t('commons.system') + "-" + i18n.t('commons.test_resource_pool'), 'SYSTEM_TEST_RESOURCE'],
{ leaf: true
label: i18n.t('commons.system') + "-" + i18n.t('commons.quota'), },
value: i18n.t('commons.system') + "-" + i18n.t('commons.quota'), {
leaf: true label: i18n.t('commons.system') + "-" + i18n.t('commons.system_parameter_setting'),
}, value: [i18n.t('commons.system') + "-" + i18n.t('commons.system_parameter_setting'), 'SYSTEM_PARAMETER_SETTING'],
{ leaf: true
label: i18n.t('commons.system') + "-" + i18n.t('license.title'), },
value: i18n.t('commons.system') + "-" + i18n.t('license.title'), {
leaf: true label: i18n.t('commons.system') + "-" + i18n.t('commons.quota'),
}, value: [i18n.t('commons.system') + "-" + i18n.t('commons.quota'), 'SYSTEM_QUOTA_MANAGEMENT'],
leaf: true
},
{
label: i18n.t('commons.system') + "-" + i18n.t('license.title'),
value: [i18n.t('commons.system') + "-" + i18n.t('license.title'), 'SYSTEM_AUTHORIZATION_MANAGEMENT'],
leaf: true
},
{label: i18n.t('commons.workspace'), value: i18n.t('commons.workspace'), leaf: true}, {
{ label: i18n.t('commons.workspace'),
label: i18n.t('commons.workspace') + "-" + i18n.t('permission.workspace_service.name'), value: [i18n.t('commons.workspace'), 'SYSTEM_WORKSPACE'],
value: i18n.t('commons.workspace') + "-" + i18n.t('permission.workspace_service.name'), leaf: true
leaf: true },
}, {
{ label: i18n.t('commons.workspace') + "-" + i18n.t('permission.workspace_service.name'),
label: i18n.t('commons.workspace') + "-" + i18n.t('permission.workspace_message.name'), value: [i18n.t('commons.workspace') + "-" + i18n.t('permission.workspace_service.name'), 'WORKSPACE_SERVICE_INTEGRATION'],
value: i18n.t('commons.workspace') + "-" + i18n.t('permission.workspace_message.name'), leaf: true
leaf: true },
}, {
{ label: i18n.t('commons.workspace') + "-" + i18n.t('permission.project_message.name'),
label: i18n.t('commons.workspace') + "-" + i18n.t('permission.project_user.name'), value: [i18n.t('commons.workspace') + "-" + i18n.t('permission.project_message.name'), 'WORKSPACE_MESSAGE_SETTINGS'],
value: i18n.t('commons.workspace') + "-" + i18n.t('permission.project_user.name'), leaf: true
leaf: true },
}, {
{ label: i18n.t('commons.workspace') + "-" + i18n.t('permission.project_user.name'),
label: i18n.t('commons.workspace') + "-" + i18n.t('permission.workspace_template.name'), value: [i18n.t('commons.workspace') + "-" + i18n.t('permission.project_user.name'), 'WORKSPACE_MEMBER'],
value: i18n.t('commons.workspace') + "-" + i18n.t('permission.workspace_template.name'), leaf: true
leaf: true },
}, {
{ label: i18n.t('commons.workspace') + "-" + i18n.t('permission.project_template.name'),
label: i18n.t('commons.workspace') + "-" + i18n.t('permission.workspace_project_manager.name'), value: [i18n.t('commons.workspace') + "-" + i18n.t('permission.project_template.name'), 'WORKSPACE_TEMPLATE_SETTINGS_CASE'],
value: i18n.t('commons.workspace') + "-" + i18n.t('permission.workspace_project_manager.name'), leaf: true
leaf: true },
}, {
label: i18n.t('commons.project') + "-" + i18n.t('project.manager'),
value: [i18n.t('commons.project') + "-" + i18n.t('project.manager'), 'PROJECT_PROJECT_MANAGER'],
leaf: true
},
{
label: i18n.t('commons.project') + "-" + i18n.t('permission.project_user.name'),
value: [i18n.t('commons.project') + "-" + i18n.t('permission.project_user.name'), 'PROJECT_PROJECT_MEMBER'],
leaf: true
},
{
label: i18n.t('commons.project') + "-" + i18n.t('api_test.jar_config.jar_manage'),
value: [i18n.t('commons.project') + "-" + i18n.t('api_test.jar_config.jar_manage'), 'PROJECT_PROJECT_JAR'],
leaf: true
},
{
label: i18n.t('commons.project') + "-" + i18n.t('permission.workspace_project_environment.name'),
value: [i18n.t('commons.project') + "-" + i18n.t('permission.workspace_project_environment.name'), 'PROJECT_ENVIRONMENT_SETTING'],
leaf: true
},
{
label: i18n.t('commons.project') + "-" + i18n.t('permission.project_file.name'),
value: [i18n.t('commons.project') + "-" + i18n.t('permission.project_file.name'), 'PROJECT_FILE_MANAGEMENT'],
leaf: true
},
{ {
label: i18n.t('commons.project') + "-" + i18n.t('project.manager'), label: i18n.t('commons.personal_information') + "-" + i18n.t('commons.personal_setting'),
value: i18n.t('commons.project') + "-" + i18n.t('project.manager'), value: [i18n.t('commons.personal_information') + "-" + i18n.t('commons.personal_setting'), 'PERSONAL_INFORMATION_PERSONAL_SETTINGS'],
leaf: true leaf: true
},
{
label: i18n.t('commons.personal_information') + "-API Keys",
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('commons.project') + "-" + i18n.t('permission.project_user.name'), return sysList;
value: i18n.t('commons.project') + "-" + i18n.t('permission.project_user.name'),
leaf: true
},
{
label: i18n.t('commons.project') + "-" + i18n.t('api_test.jar_config.jar_manage'),
value: i18n.t('commons.project') + "-" + i18n.t('api_test.jar_config.jar_manage'),
leaf: true
},
{
label: i18n.t('commons.project') + "-" + i18n.t('permission.workspace_project_environment.name'),
value: i18n.t('commons.project') + "-" + i18n.t('permission.workspace_project_environment.name'),
leaf: true
},
{
label: i18n.t('commons.project') + "-" + i18n.t('permission.project_file.name'),
value: i18n.t('commons.project') + "-" + i18n.t('permission.project_file.name'),
leaf: true
},
{
label: i18n.t('commons.personal_information') + "-" + i18n.t('commons.personal_setting'),
value: i18n.t('commons.personal_information') + "-" + i18n.t('commons.personal_setting'),
leaf: true
},
{
label: i18n.t('commons.personal_information') + "-API Keys",
value: i18n.t('commons.personal_information') + "-API Keys",
leaf: true
}
]
},
];
return sysList;
} }
export function getUrl(d, _this) { export function getUrl(d, _this) {
let url = "/#"; let url = "/#";
let resourceId = d.sourceId; let resourceId = d.sourceId;
if (resourceId && (resourceId.startsWith("\"") || resourceId.startsWith("["))) { if (resourceId && (resourceId.startsWith("\"") || resourceId.startsWith("["))) {
resourceId = JSON.parse(d.sourceId); resourceId = JSON.parse(d.sourceId);
}
if (resourceId instanceof Array) {
if (resourceId.length === 1) {
resourceId = resourceId[0];
} else {
return url;
} }
} if (resourceId instanceof Array) {
let moduleMap = LOG_MODULE_MAP(_this); if (resourceId.length === 1) {
let module = moduleMap.get(d.operModule) ? moduleMap.get(d.operModule) : d.operModule; resourceId = resourceId[0];
switch (module) { } else {
case "接口自动化" : return url;
case "Api automation" : }
case"接口自動化": }
url += "/api/automation?resourceId=" + resourceId; let moduleMap = LOG_MODULE_MAP(_this);
break; let module = moduleMap.get(d.operModule) ? moduleMap.get(d.operModule) : d.operModule;
case "测试计划" : switch (module) {
case "測試計劃" : case "接口自动化" :
case "Test plan": case "Api automation" :
url += "/track/plan/view/" + resourceId; case"接口自動化":
break; url += "/api/automation?resourceId=" + resourceId;
case "用例评审" : break;
case "Case review" : case "测试计划" :
case "用例評審": case "測試計劃" :
url += "/track/review/view/" + resourceId; case "Test plan":
break; url += "/track/plan/view/" + resourceId;
case "缺陷管理" : break;
case "Defect management": case "用例评审" :
url += "/track/issue"; case "Case review" :
break; case "用例評審":
case "SWAGGER_TASK" : url += "/track/review/view/" + resourceId;
url += "/api/definition"; break;
break; case "缺陷管理" :
case "接口定义" : case "Defect management":
case "接口定義" : url += "/track/issue";
case "Api definition": break;
url += "/api/definition?resourceId=" + resourceId; case "SWAGGER_TASK" :
break; url += "/api/definition";
case "接口定义用例" : break;
case "接口定義用例": case "接口定义" :
case "Api definition case": case "接口定義" :
url += "/api/definition?caseId=" + resourceId; case "Api definition":
break; url += "/api/definition?resourceId=" + resourceId;
case "测试报告" : break;
case "測試報告" : case "接口定义用例" :
case "Test Report": case "接口定義用例":
url += "/api/automation/report"; case "Api definition case":
break; url += "/api/definition?caseId=" + resourceId;
case "性能测试报告" : break;
case "性能測試報告" : case "测试报告" :
case "Performance test report" : case "測試報告" :
url += "/performance/report/all"; case "Test Report":
break; url += "/api/automation/report";
case "性能测试" : break;
case "性能測試" : case "性能测试报告" :
case "Performance test" : case "性能測試報告" :
url += "/performance/test/edit/" + resourceId; case "Performance test report" :
break; url += "/performance/report/all";
case "测试用例" : break;
case "測試用例" : case "性能测试" :
case "Test case": case "性能測試" :
url += "/track/case/all?resourceId=" + resourceId; case "Performance test" :
break; url += "/performance/test/edit/" + resourceId;
case "系统-用户": break;
case "System user": case "测试用例" :
url += "/setting/user"; case "測試用例" :
break; case "Test case":
case "系统-组织" : url += "/track/case/all?resourceId=" + resourceId;
case "系統-組織" : break;
case "System organization": case "系统-用户":
url += "/setting/organization"; case "System user":
break; url += "/setting/user";
case "工作空间" : break;
case "系统-工作空间" : case "系统-组织" :
case "workspace" : case "系統-組織" :
url += "/setting/systemworkspace"; case "System organization":
break; url += "/setting/organization";
case "用户组与权限" : break;
case "用戶組與權限" : case "工作空间" :
case "Group" : case "系统-工作空间" :
url += "/setting/usergroup"; case "workspace" :
break; url += "/setting/systemworkspace";
case "系统-测试资源池": break;
case "系统-測試資源池" : case "用户组与权限" :
case "System test resource" : case "用戶組與權限" :
url += "/setting/testresourcepool"; case "Group" :
break; url += "/setting/usergroup";
case "系统-系统参数设置": break;
case "系统-系統參數設置" : case "系统-测试资源池":
case "System parameter setting" : case "系统-測試資源池" :
url += "/setting/systemparametersetting"; case "System test resource" :
break; url += "/setting/testresourcepool";
case "工作空间-成员" : break;
case "工作空間-成員" : case "系统-系统参数设置":
case "Workspace member" : case "系统-系統參數設置" :
url += "/setting/member"; case "System parameter setting" :
break; url += "/setting/systemparametersetting";
case "项目-项目管理" : break;
case "項目-項目管理" : case "工作空间-成员" :
case "Project project manager" : case "工作空間-成員" :
url += "/setting/project/:type"; case "Workspace member" :
break; url += "/setting/member";
case "项目-环境设置" : break;
case "項目-環境設置" : case "项目-项目管理" :
case "Project environment setting" : case "項目-項目管理" :
url += "/project/env"; case "Project project manager" :
break; url += "/setting/project/:type";
case "工作空间-模版设置-自定义字段" : break;
case "工作空間-模版設置-自定義字段" : case "项目-环境设置" :
case "Workspace template settings field" : case "項目-環境設置" :
url += "/setting/workspace/template/field"; case "Project environment setting" :
break; url += "/project/env";
case "工作空间-模版设置-用例模版" : break;
case "工作空間-模版設置-用例模板" : case "工作空间-模版设置-自定义字段" :
case "Workspace template settings case" : case "工作空間-模版設置-自定義字段" :
url += "/setting/workspace/template/case"; case "Workspace template settings field" :
break; url += "/setting/workspace/template/field";
case "工作空间-模版设置-缺陷模版" : break;
case "工作空間-模版設置-缺陷模板" : case "工作空间-模版设置-用例模版" :
case "Workspace template settings issue" : case "工作空間-模版設置-用例模板" :
url += "/setting/workspace/template/issues"; case "Workspace template settings case" :
break; url += "/setting/workspace/template/case";
case "项目-成员": break;
case "項目-成員" : case "工作空间-模版设置-缺陷模版" :
case "Project member" : case "工作空間-模版設置-缺陷模板" :
url += "/project/member"; case "Workspace template settings issue" :
break; url += "/setting/workspace/template/issues";
default: break;
break; case "项目-成员":
case "項目-成員" :
case "Project member" :
url += "/project/member";
break;
default:
break;
} }
return url; return url;
} }