From e5cb2be8bd99f54d9e23988731f82815ea05813f Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Tue, 14 May 2024 18:00:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9cr=E6=8F=90=E5=88=B0=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/requrls/test-plan/testPlan.ts | 2 +- frontend/src/config/testPlan.ts | 2 +- frontend/src/models/testPlan/testPlan.ts | 1 - .../components/tabContent/tabBug/bugList.vue | 12 ++++++++++-- .../components/tabContent/tabBug/tabDefect.vue | 7 +++---- .../test-plan/testPlan/components/planTable.vue | 8 ++++---- .../testPlan/components/statusProgress.vue | 6 +++--- .../detail/featureCase/detail/bug/index.vue | 13 ++++++------- .../testPlan/detail/featureCase/detail/index.vue | 5 +++-- .../src/views/test-plan/testPlan/detail/index.vue | 10 ++++------ 10 files changed, 35 insertions(+), 31 deletions(-) diff --git a/frontend/src/api/requrls/test-plan/testPlan.ts b/frontend/src/api/requrls/test-plan/testPlan.ts index c1d48fd4f2..1392b83c9b 100644 --- a/frontend/src/api/requrls/test-plan/testPlan.ts +++ b/frontend/src/api/requrls/test-plan/testPlan.ts @@ -30,7 +30,7 @@ export const archivedPlanUrl = '/test-plan/archived'; export const batchCopyPlanUrl = '/test-plan/batch-copy'; // 批量移动 export const batchMovePlanUrl = '/test-plan/batch/move'; -// 批量移动 +// 批量归档 export const batchArchivedPlanUrl = '/test-plan/batch-archived'; // 计划详情缺陷管理列表 export const planDetailBugPageUrl = '/test-plan/bug/page'; diff --git a/frontend/src/config/testPlan.ts b/frontend/src/config/testPlan.ts index 7656f9d47a..54beed4b49 100644 --- a/frontend/src/config/testPlan.ts +++ b/frontend/src/config/testPlan.ts @@ -23,7 +23,7 @@ export const testPlanDefaultDetail: TestPlanDetail = { underReviewedCount: 0, }; -export const initDetailCount: PassRateCountDetail = { +export const defaultDetailCount: PassRateCountDetail = { id: '', passThreshold: 0, passRate: 0, diff --git a/frontend/src/models/testPlan/testPlan.ts b/frontend/src/models/testPlan/testPlan.ts index cc8c826027..bd9e7820de 100644 --- a/frontend/src/models/testPlan/testPlan.ts +++ b/frontend/src/models/testPlan/testPlan.ts @@ -56,7 +56,6 @@ export interface AddTestPlanParams { functionalCaseCount?: number; } -// TODO: 对照后端字段 export interface TestPlanDetail extends AddTestPlanParams { num: number; groupName?: string; diff --git a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/bugList.vue b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/bugList.vue index 6a36918ca7..21453b570a 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/bugList.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/bugList.vue @@ -116,7 +116,7 @@ // status: statusFilterValue.value, // handleUser: handleUserFilterValue.value, }; - // TODO 不知道干啥的 要和后台同学确认一下 + // TODO 要和后台同学确认一下 filterParams[severityColumnId.value] = severityFilterValue.value; return { keyword: props.keyword, @@ -149,9 +149,17 @@ searchData(); }); + watch( + () => props.bugColumns, + (val) => { + if (val) { + bugTableRef.value.initColumn(val); + } + } + ); + defineExpose({ searchData, - bugTableRef, }); diff --git a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/tabDefect.vue b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/tabDefect.vue index 5928985753..9c6caaada1 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/tabDefect.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/tabDefect.vue @@ -180,7 +180,7 @@ const router = useRouter(); const route = useRoute(); - const columns: MsTableColumn = [ + const columns = ref([ { title: 'caseManagement.featureCase.tableColumnID', dataIndex: 'num', @@ -244,7 +244,7 @@ showInTable: true, showDrag: false, }, - ]; + ]); const testPlanColumns: MsTableColumn = [ { @@ -342,8 +342,7 @@ handleUser: handleUserFilterOptions.value, }; if (showType.value === 'link') { - const columnList = makeColumns(optionsMap, columns); - bugTableListRef.value.bugTableRef.initColumn(columnList); + columns.value = makeColumns(optionsMap, columns.value); } else { const planColumnList = makeColumns(optionsMap, testPlanColumns); planTableRef.value.initColumn(planColumnList); diff --git a/frontend/src/views/test-plan/testPlan/components/planTable.vue b/frontend/src/views/test-plan/testPlan/components/planTable.vue index 958be8f35b..2d213897d4 100644 --- a/frontend/src/views/test-plan/testPlan/components/planTable.vue +++ b/frontend/src/views/test-plan/testPlan/components/planTable.vue @@ -112,7 +112,7 @@ @@ -100,7 +100,7 @@ const keyword = ref(''); - const columns: MsTableColumn = [ + const columns = ref([ { title: 'caseManagement.featureCase.tableColumnID', dataIndex: 'num', @@ -164,7 +164,7 @@ showInTable: true, showDrag: false, }, - ]; + ]); const bugTableListRef = ref(); @@ -241,8 +241,7 @@ status: statusFilterOptions.value, handleUser: handleUserFilterOptions.value, }; - const columnList = makeColumns(optionsMap, columns); - bugTableListRef.value.bugTableRef.initColumn(columnList); + columns.value = makeColumns(optionsMap, columns.value); } } diff --git a/frontend/src/views/test-plan/testPlan/detail/featureCase/detail/index.vue b/frontend/src/views/test-plan/testPlan/detail/featureCase/detail/index.vue index 02b9dbc832..ff6b9a3568 100644 --- a/frontend/src/views/test-plan/testPlan/detail/featureCase/detail/index.vue +++ b/frontend/src/views/test-plan/testPlan/detail/featureCase/detail/index.vue @@ -81,7 +81,8 @@ />
- + +
@@ -98,8 +99,8 @@ import ExecuteResult from '@/components/business/ms-case-associate/executeResult.vue'; import MsStatusTag from '@/components/business/ms-status-tag/index.vue'; import BugList from './bug/index.vue'; - import ExecutionHistory from '@/views/test-plan/testPlan/detail/featureCase/detail/executionHistory/index.vue'; + // import ExecutionHistory from '@/views/test-plan/testPlan/detail/featureCase/detail/executionHistory/index.vue'; import { getPlanDetailFeatureCaseList } from '@/api/modules/test-plan/testPlan'; import { useI18n } from '@/hooks/useI18n'; import useAppStore from '@/store/modules/app'; diff --git a/frontend/src/views/test-plan/testPlan/detail/index.vue b/frontend/src/views/test-plan/testPlan/detail/index.vue index 7647850e79..aa71ef3525 100644 --- a/frontend/src/views/test-plan/testPlan/detail/index.vue +++ b/frontend/src/views/test-plan/testPlan/detail/index.vue @@ -65,8 +65,7 @@
{{ t('testPlan.testPlanDetail.executed') }} - - - + {{ hasExecutedCount }} /{{ countDetail.caseTotal }}
{{ t('caseManagement.caseReview.passRate') }} - - + {{ countDetail.passRate }}%
@@ -132,7 +130,7 @@ getTestPlanDetail, getTestPlanModule, } from '@/api/modules/test-plan/testPlan'; - import { initDetailCount, testPlanDefaultDetail } from '@/config/testPlan'; + import { defaultDetailCount, testPlanDefaultDetail } from '@/config/testPlan'; import { useI18n } from '@/hooks/useI18n'; import useModal from '@/hooks/useModal'; import useAppStore from '@/store/modules/app'; @@ -159,7 +157,7 @@ ...testPlanDefaultDetail, }); - const countDetail = ref({ ...initDetailCount }); + const countDetail = ref({ ...defaultDetailCount }); const hasExecutedCount = computed(() => { const { successCount, fakeErrorCount, errorCount, blockCount } = countDetail.value;