diff --git a/frontend/src/config/fileManagement.ts b/frontend/src/config/fileManagement.ts
index f1e85944e2..fb3d3d068c 100644
--- a/frontend/src/config/fileManagement.ts
+++ b/frontend/src/config/fileManagement.ts
@@ -7,6 +7,7 @@ export const associateFileSourceLocaleMap = {
API_TEST_CASE: 'project.fileManagement.caseTypeApiCase',
API_DEFINITION: 'project.fileManagement.caseTypeApiDefine',
API_DEFINITION_MOCK: 'project.fileManagement.caseTypeApiMock',
+ API_SCENARIO_STEP: 'project.fileManagement.scenarioStep',
};
export default {};
diff --git a/frontend/src/views/project-management/fileManagement/components/fileDetailDrawer.vue b/frontend/src/views/project-management/fileManagement/components/fileDetailDrawer.vue
index e0cf553825..d413267df1 100644
--- a/frontend/src/views/project-management/fileManagement/components/fileDetailDrawer.vue
+++ b/frontend/src/views/project-management/fileManagement/components/fileDetailDrawer.vue
@@ -154,12 +154,12 @@
loadTable()">
-
+
-
{{ t('project.fileManagement.caseList') }}
+
{{ t('project.fileManagement.resourceList') }}
-
+
{{ record.sourceNum }}
@@ -253,7 +253,7 @@
import { hasAnyPermission } from '@/utils/permission';
import { AssociationItem, FileDetail } from '@/models/projectManagement/file';
- import { CaseManagementRouteEnum } from '@/enums/routeEnum';
+ import { ApiTestRouteEnum, BugManagementRouteEnum, CaseManagementRouteEnum } from '@/enums/routeEnum';
import { UploadAcceptEnum } from '@/enums/uploadEnum';
const props = defineProps<{
@@ -408,7 +408,7 @@
title: 'project.fileManagement.caseId',
dataIndex: 'sourceId',
slotName: 'id',
- showTooltip: true,
+ showTooltip: false,
width: 150,
},
{
@@ -479,12 +479,35 @@
}
}
- function goCaseDetail(id: string) {
+ function goCaseDetail(id: string, type: string) {
+ let routerName = '';
+ const routeQuery = ref<{
+ id?: string;
+ dId?: string;
+ cId?: string;
+ }>();
+
+ routeQuery.value = { id };
+ if (type === 'FUNCTIONAL_CASE') {
+ routerName = CaseManagementRouteEnum.CASE_MANAGEMENT_CASE_DETAIL;
+ } else if (type === 'BUG') {
+ routerName = BugManagementRouteEnum.BUG_MANAGEMENT;
+ } else if (type === 'API_DEBUG') {
+ routerName = ApiTestRouteEnum.API_TEST;
+ } else if (type === 'API_SCENARIO') {
+ routerName = ApiTestRouteEnum.API_TEST_SCENARIO;
+ } else if (type === 'API_SCENARIO_STEP') {
+ routerName = ApiTestRouteEnum.API_TEST_SCENARIO;
+ } else if (type === 'API_DEFINITION') {
+ routerName = ApiTestRouteEnum.API_TEST_MANAGEMENT;
+ routeQuery.value = { dId: id };
+ } else if (type === 'API_TEST_CASE') {
+ routerName = ApiTestRouteEnum.API_TEST_MANAGEMENT;
+ routeQuery.value = { cId: id };
+ }
router.push({
- name: CaseManagementRouteEnum.CASE_MANAGEMENT_CASE_DETAIL,
- query: {
- id,
- },
+ name: routerName,
+ query: routeQuery.value,
});
}
diff --git a/frontend/src/views/project-management/fileManagement/locale/en-US.ts b/frontend/src/views/project-management/fileManagement/locale/en-US.ts
index f9340c2888..89e2ec68d0 100644
--- a/frontend/src/views/project-management/fileManagement/locale/en-US.ts
+++ b/frontend/src/views/project-management/fileManagement/locale/en-US.ts
@@ -107,6 +107,7 @@ export default {
'project.fileManagement.gitPath': 'Git path',
'project.fileManagement.gitVersion': 'Git version',
'project.fileManagement.cases': 'Related Use Cases',
+ 'project.fileManagement.resource': 'Related resource',
'project.fileManagement.versionHistory': 'Version history',
'project.fileManagement.updateCaseFile': 'Update use case file',
'project.fileManagement.updateCaseFileSuccess': 'Use case file updated successfully',
@@ -116,6 +117,7 @@ export default {
'project.fileManagement.operator': 'Operator',
'project.fileManagement.operatorTime': 'Operating time',
'project.fileManagement.caseList': 'Use case list',
+ 'project.fileManagement.resourceList': 'Resource list',
'project.fileManagement.search': 'Enter name to search',
'project.fileManagement.storagePlaceholder': 'Please select a repository',
'project.fileManagement.storageNotNull': 'Repository cannot be empty',
@@ -143,4 +145,5 @@ export default {
'project.fileManagement.caseTypeApiCase': 'Api case',
'project.fileManagement.caseTypeApiDefine': 'Api definition',
'project.fileManagement.caseTypeApiMock': 'Api Mock',
+ 'project.fileManagement.scenarioStep': 'Scenario step',
};
diff --git a/frontend/src/views/project-management/fileManagement/locale/zh-CN.ts b/frontend/src/views/project-management/fileManagement/locale/zh-CN.ts
index 6889d8992e..c973e04960 100644
--- a/frontend/src/views/project-management/fileManagement/locale/zh-CN.ts
+++ b/frontend/src/views/project-management/fileManagement/locale/zh-CN.ts
@@ -99,6 +99,7 @@ export default {
'project.fileManagement.gitPath': 'git 路径',
'project.fileManagement.gitVersion': 'git 版本',
'project.fileManagement.cases': '关联用例',
+ 'project.fileManagement.resource': '关联资源',
'project.fileManagement.versionHistory': '版本历史',
'project.fileManagement.updateCaseFile': '更新用例文件',
'project.fileManagement.updateCaseFileSuccess': '用例文件更新成功',
@@ -108,6 +109,7 @@ export default {
'project.fileManagement.operator': '操作人',
'project.fileManagement.operatorTime': '操作时间',
'project.fileManagement.caseList': '用例列表',
+ 'project.fileManagement.resourceList': '资源列表',
'project.fileManagement.search': '输入名称搜索',
'project.fileManagement.storagePlaceholder': '请选择存储库',
'project.fileManagement.storageNotNull': '存储库不能为空',
@@ -124,9 +126,9 @@ export default {
'project.fileManagement.batchMoveConfirm': '移动至所选模块',
'project.fileManagement.batchMoveSuccess': '文件移动成功',
'project.fileManagement.moduleMoveSuccess': '模块移动成功',
- 'project.fileManagement.caseId': '用例 ID',
- 'project.fileManagement.caseName': '用例名称',
- 'project.fileManagement.caseType': '用例类型',
+ 'project.fileManagement.caseId': '资源 ID',
+ 'project.fileManagement.caseName': '资源名称',
+ 'project.fileManagement.caseType': '资源类型',
'project.fileManagement.caseFileVersion': '关联的文件版本',
'project.fileManagement.caseTypeBug': '缺陷',
'project.fileManagement.caseTypeFeature': '功能用例',
@@ -135,4 +137,5 @@ export default {
'project.fileManagement.caseTypeApiCase': '接口用例',
'project.fileManagement.caseTypeApiDefine': '接口定义',
'project.fileManagement.caseTypeApiMock': '接口 Mock',
+ 'project.fileManagement.scenarioStep': '场景步骤',
};