diff --git a/frontend/src/assets/svg/caseReview.svg b/frontend/src/assets/svg/caseReview.svg new file mode 100644 index 0000000000..4c5f39517a --- /dev/null +++ b/frontend/src/assets/svg/caseReview.svg @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/src/config/pathMap.ts b/frontend/src/config/pathMap.ts index 8bf8bb9b95..b142a3cce4 100644 --- a/frontend/src/config/pathMap.ts +++ b/frontend/src/config/pathMap.ts @@ -352,12 +352,19 @@ export const pathMap: PathMapItem[] = [ level: MENU_LEVEL[2], }, { - key: 'FEATURE_TEST_CASE_DETAIL', // 功能测试-功能用例 + key: 'FEATURE_TEST_CASE_DETAIL', // 功能测试-功能用例详情 locale: 'menu.featureTest.featureCaseDetail', route: RouteEnum.FEATURE_TEST_CASE_DETAIL, permission: [], level: MENU_LEVEL[2], }, + { + key: 'FEATURE_TEST_CASE_CREATE_SUCCESS', // 功能测试-功能用例创建成功页面 + locale: 'menu.featureTest.featureCaseCreateSuccess', + route: RouteEnum.FEATURE_TEST_CASE_CREATE_SUCCESS, + permission: [], + level: MENU_LEVEL[2], + }, { key: 'FEATURE_TEST_CASE_RECYCLE', // 功能测试-功能用例-回收站 locale: 'menu.featureTest.featureCaseRecycle', diff --git a/frontend/src/enums/routeEnum.ts b/frontend/src/enums/routeEnum.ts index 3d317f0917..6e4dbffd09 100644 --- a/frontend/src/enums/routeEnum.ts +++ b/frontend/src/enums/routeEnum.ts @@ -9,6 +9,7 @@ export enum BugManagementRouteEnum { export enum FeatureTestRouteEnum { FEATURE_TEST = 'featureTest', FEATURE_TEST_CASE = 'featureTestCase', + FEATURE_TEST_CASE_CREATE_SUCCESS = 'featureTestCaseCreateSuccess', FEATURE_TEST_CASE_RECYCLE = 'featureTestCaseRecycle', FEATURE_TEST_CASE_DETAIL = 'featureTestCaseDetail', } diff --git a/frontend/src/locale/en-US/index.ts b/frontend/src/locale/en-US/index.ts index cc2e022869..906051d728 100644 --- a/frontend/src/locale/en-US/index.ts +++ b/frontend/src/locale/en-US/index.ts @@ -31,6 +31,10 @@ export default { 'menu.projectManagement.messageManagement': 'Message Management', 'menu.projectManagement.messageManagementEdit': 'Update Template', 'menu.featureTest.featureCase': 'Feature Case', + 'menu.featureTest.featureCaseRecycle': 'Recycle', + 'menu.featureTest.featureCaseList': 'Case list', + 'menu.featureTest.featureCaseDetail': 'Create Case', + 'menu.featureTest.featureCaseCreateSuccess': 'Create Success', 'meun.workstation': 'Workstation', 'menu.loadTest': 'Performance Test', 'menu.caseManagement': 'Feature Test', diff --git a/frontend/src/locale/zh-CN/index.ts b/frontend/src/locale/zh-CN/index.ts index 8e2b774b21..a6a4f80395 100644 --- a/frontend/src/locale/zh-CN/index.ts +++ b/frontend/src/locale/zh-CN/index.ts @@ -38,6 +38,7 @@ export default { 'menu.featureTest.featureCaseRecycle': '回收站', 'menu.featureTest.featureCaseList': '用例列表', 'menu.featureTest.featureCaseDetail': '创建用例', + 'menu.featureTest.featureCaseCreateSuccess': '创建用例成功', 'menu.projectManagement.projectPermission': '项目与权限', 'menu.settings': '系统设置', 'menu.settings.system': '系统', diff --git a/frontend/src/router/routes/modules/caseManagement.ts b/frontend/src/router/routes/modules/caseManagement.ts index 747112aae7..799147f9b6 100644 --- a/frontend/src/router/routes/modules/caseManagement.ts +++ b/frontend/src/router/routes/modules/caseManagement.ts @@ -47,6 +47,16 @@ const FeatureTest: AppRouteRecordRaw = { ], }, }, + // 创建用例成功 + { + path: 'featureCaseCreateSuccess', + name: FeatureTestRouteEnum.FEATURE_TEST_CASE_CREATE_SUCCESS, + component: () => import('@/views/case-management/caseManagementFeature/components/createSuccess.vue'), + meta: { + locale: 'menu.featureTest.featureCaseCreateSuccess', + roles: ['*'], + }, + }, // 功能用例回收站 { path: 'featureCaseRecycle', diff --git a/frontend/src/views/case-management/caseManagementFeature/components/caseDetail.vue b/frontend/src/views/case-management/caseManagementFeature/components/caseDetail.vue index ba723bcd50..c5d713b17a 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/caseDetail.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/caseDetail.vue @@ -27,6 +27,7 @@ import { createCaseRequest, updateCaseRequest } from '@/api/modules/case-management/featureCase'; import { useI18n } from '@/hooks/useI18n'; + import useVisit from '@/hooks/useVisit'; import useFeatureCaseStore from '@/store/modules/case/featureCase'; import { scrollIntoView } from '@/utils/dom'; @@ -37,8 +38,12 @@ const { t } = useI18n(); const route = useRoute(); const router = useRouter(); + const featureCaseStore = useFeatureCaseStore(); + const visitedKey = 'doNotNextTipCreateCase'; + const { getIsVisited } = useVisit(visitedKey); + const caseDetailInfo = ref>({ request: {}, fileList: [], @@ -56,6 +61,7 @@ const isEdit = computed(() => !!route.query.id); const isContinueFlag = ref(false); + const isShowTip = ref(true); async function save() { try { @@ -69,6 +75,12 @@ } router.push({ name: FeatureTestRouteEnum.FEATURE_TEST_CASE, query: { ...route.query } }); featureCaseStore.setIsAlreadySuccess(true); + isShowTip.value = !getIsVisited(); + if (isShowTip.value) { + router.push({ + name: FeatureTestRouteEnum.FEATURE_TEST_CASE_CREATE_SUCCESS, + }); + } } catch (error) { console.log(error); } finally { diff --git a/frontend/src/views/case-management/caseManagementFeature/components/createSuccess.vue b/frontend/src/views/case-management/caseManagementFeature/components/createSuccess.vue new file mode 100644 index 0000000000..215c1f091c --- /dev/null +++ b/frontend/src/views/case-management/caseManagementFeature/components/createSuccess.vue @@ -0,0 +1,141 @@ + + + + + diff --git a/frontend/src/views/case-management/caseManagementFeature/components/recycleCaseTable.vue b/frontend/src/views/case-management/caseManagementFeature/components/recycleCaseTable.vue index 13aed0f99f..a5ff0fe07c 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/recycleCaseTable.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/recycleCaseTable.vue @@ -36,7 +36,7 @@ :data="caseTree" :keyword="groupKeyword" :expand-all="isExpandAll" - :empty-text="t('featureTest.featureCase.caseEmptyContent')" + :empty-text="t('featureTest.featureCase.caseEmptyRecycle')" draggable :virtual-list-props="virtualListProps" block-node diff --git a/frontend/src/views/case-management/caseManagementFeature/index.vue b/frontend/src/views/case-management/caseManagementFeature/index.vue index a45065e25a..20a2518d1b 100644 --- a/frontend/src/views/case-management/caseManagementFeature/index.vue +++ b/frontend/src/views/case-management/caseManagementFeature/index.vue @@ -234,6 +234,12 @@ }); } + function test() { + router.push({ + name: FeatureTestRouteEnum.FEATURE_TEST_CASE_CREATE_SUCCESS, + }); + } + // 设置默认选中状态 router.beforeEach((to: any, from: any, next) => { const routeEnumValues = Object.values(FeatureTestRouteEnum); diff --git a/frontend/src/views/case-management/caseManagementFeature/locale/en-US.ts b/frontend/src/views/case-management/caseManagementFeature/locale/en-US.ts index 8ed32e9c62..63f718fa5b 100644 --- a/frontend/src/views/case-management/caseManagementFeature/locale/en-US.ts +++ b/frontend/src/views/case-management/caseManagementFeature/locale/en-US.ts @@ -110,4 +110,12 @@ export default { 'featureTest.featureCase.pleaseEnterInputTags': 'Please enter content Enter add label', 'featureTest.featureCase.copy': 'Copy', 'featureTest.featureCase.copyCase': 'Copy case', + 'featureTest.featureCase.countDownTip': 'Seconds after back in case list, also can manually back in case list', + 'featureTest.featureCase.caseDetail': 'Case details', + 'featureTest.featureCase.addContinueCreate': 'Continue to create', + 'featureTest.featureCase.backCaseList': 'Back', + 'featureTest.featureCase.notNextTip': 'Next time no longer remind', + 'featureTest.featureCase.mightWantTo': 'You might want to', + 'featureTest.featureCase.createTestPlan': 'Create a test plan', + 'featureTest.featureCase.createCaseReview': 'Create use case reviews', }; diff --git a/frontend/src/views/case-management/caseManagementFeature/locale/zh-CN.ts b/frontend/src/views/case-management/caseManagementFeature/locale/zh-CN.ts index 7a4ca43076..754c056e22 100644 --- a/frontend/src/views/case-management/caseManagementFeature/locale/zh-CN.ts +++ b/frontend/src/views/case-management/caseManagementFeature/locale/zh-CN.ts @@ -7,6 +7,7 @@ export default { 'featureTest.featureCase.allCase': '全部用例', 'featureTest.featureCase.searchTip': '请输入分组名称', 'featureTest.featureCase.caseEmptyContent': '暂无用例数据,请点击上方按钮创建或导入', + 'featureTest.featureCase.caseEmptyRecycle': '暂无用例数据', 'featureTest.featureCase.addSubModule': '添加子模块', 'featureTest.featureCase.rename': '重命名', 'featureTest.featureCase.recycle': '回收站', @@ -108,4 +109,12 @@ export default { 'featureTest.featureCase.pleaseEnterInputTags': '请输入内容回车添加标签', 'featureTest.featureCase.copy': '复制', 'featureTest.featureCase.copyCase': '复制用例', + 'featureTest.featureCase.countDownTip': '秒后回到用例列表,也可以手动回到用例列表', + 'featureTest.featureCase.caseDetail': '用例详情', + 'featureTest.featureCase.addContinueCreate': '继续创建', + 'featureTest.featureCase.backCaseList': '回到用例列表', + 'featureTest.featureCase.notNextTip': '下次不再提醒', + 'featureTest.featureCase.mightWantTo': '你可能还想', + 'featureTest.featureCase.createTestPlan': '创建测试计划', + 'featureTest.featureCase.createCaseReview': '创建用例评审', };