fix(测试计划): 修复计划生成自定义报告后重置计划明细表头设置展示字段

This commit is contained in:
xinxin.wu 2024-09-20 17:42:15 +08:00 committed by Craftsman
parent 4fe35c8578
commit 1b0bdd63d5
5 changed files with 23 additions and 13 deletions

View File

@ -94,11 +94,14 @@ export enum TableKeyEnum {
JSON_SCHEMA = 'jsonSchema', JSON_SCHEMA = 'jsonSchema',
TEST_PLAN_REPORT_FUNCTIONAL_TABLE = 'testPlanReportFunctionTable', TEST_PLAN_REPORT_FUNCTIONAL_TABLE = 'testPlanReportFunctionTable',
TEST_PLAN_REPORT_FUNCTIONAL_TABLE_GROUP = 'testPlanReportFunctionTableGroup', TEST_PLAN_REPORT_FUNCTIONAL_TABLE_GROUP = 'testPlanReportFunctionTableGroup',
TEST_PLAN_REPORT_FUNCTIONAL_TABLE_NOT_PREVIEW = 'testPlanReportFunctionTableNotPreview',
TEST_PLAN_REPORT_API_TABLE = 'testPlanReportApiTable', TEST_PLAN_REPORT_API_TABLE = 'testPlanReportApiTable',
TEST_PLAN_REPORT_API_TABLE_NOT_PREVIEW = 'testPlanReportApiTableNotPreview',
TEST_PLAN_REPORT_API_TABLE_GROUP = 'testPlanReportApiTableGroup', TEST_PLAN_REPORT_API_TABLE_GROUP = 'testPlanReportApiTableGroup',
TEST_PLAN_REPORT_SCENARIO_TABLE = 'testPlanReportScenarioTable', TEST_PLAN_REPORT_SCENARIO_TABLE = 'testPlanReportScenarioTable',
TEST_PLAN_REPORT_SCENARIO_TABLE_GROUP = 'testPlanReportScenarioTableGroup', TEST_PLAN_REPORT_SCENARIO_TABLE_GROUP = 'testPlanReportScenarioTableGroup',
TEST_PLAN_REPORT_BUG_TABLE_DETAIL = 'testPlanReportBugDetailTable', TEST_PLAN_REPORT_BUG_TABLE_DETAIL = 'testPlanReportBugDetailTable',
TEST_PLAN_REPORT_BUG_TABLE_DETAIL_NOT_PREVIEW = 'testPlanReportBugDetailTableNotPreview',
TEST_PLAN_REPORT_BUG_TABLE_DETAIL_GROUP = 'testPlanReportBugDetailTableGroup', TEST_PLAN_REPORT_BUG_TABLE_DETAIL_GROUP = 'testPlanReportBugDetailTableGroup',
} }

View File

@ -263,6 +263,7 @@
() => props.visible, () => props.visible,
(val) => { (val) => {
if (val) { if (val) {
keyword.value = '';
currentCaseTable.value.resetSelector(); currentCaseTable.value.resetSelector();
getFetch(); getFetch();
} }

View File

@ -194,10 +194,10 @@
}; };
const tableKey = computed(() => { const tableKey = computed(() => {
if (isGroup.value) { if (props.isPreview) {
return keyMap.GROUP[props.activeType]; return isGroup.value ? keyMap.GROUP[props.activeType] : keyMap.TEST_PLAN[props.activeType];
} }
return keyMap.TEST_PLAN[props.activeType]; return TableKeyEnum.TEST_PLAN_REPORT_API_TABLE_NOT_PREVIEW;
}); });
const useApiTable = useTable(getApiPage, { const useApiTable = useTable(getApiPage, {

View File

@ -116,11 +116,14 @@
return !props.shareId ? getReportBugList : getReportShareBugList; return !props.shareId ? getReportBugList : getReportShareBugList;
}; };
const tableKey = computed(() => const tableKey = computed(() => {
isGroup.value if (props.isPreview) {
return isGroup.value
? TableKeyEnum.TEST_PLAN_REPORT_BUG_TABLE_DETAIL_GROUP ? TableKeyEnum.TEST_PLAN_REPORT_BUG_TABLE_DETAIL_GROUP
: TableKeyEnum.TEST_PLAN_REPORT_BUG_TABLE_DETAIL : TableKeyEnum.TEST_PLAN_REPORT_BUG_TABLE_DETAIL;
); }
return TableKeyEnum.TEST_PLAN_REPORT_BUG_TABLE_DETAIL_NOT_PREVIEW;
});
const { propsRes, propsEvent, loadList, setLoadListParams } = useTable(reportBugList(), { const { propsRes, propsEvent, loadList, setLoadListParams } = useTable(reportBugList(), {
tableKey: tableKey.value, tableKey: tableKey.value,
scroll: { x: '100%' }, scroll: { x: '100%' },

View File

@ -203,11 +203,14 @@
return !props.shareId ? getReportFeatureCaseList : getReportShareFeatureCaseList; return !props.shareId ? getReportFeatureCaseList : getReportShareFeatureCaseList;
}; };
const tableKey = computed(() => const tableKey = computed(() => {
isGroup.value if (props.isPreview) {
return isGroup.value
? TableKeyEnum.TEST_PLAN_REPORT_FUNCTIONAL_TABLE_GROUP ? TableKeyEnum.TEST_PLAN_REPORT_FUNCTIONAL_TABLE_GROUP
: TableKeyEnum.TEST_PLAN_REPORT_FUNCTIONAL_TABLE : TableKeyEnum.TEST_PLAN_REPORT_FUNCTIONAL_TABLE;
); }
return TableKeyEnum.TEST_PLAN_REPORT_FUNCTIONAL_TABLE_NOT_PREVIEW;
});
const { propsRes, propsEvent, loadList, setLoadListParams } = useTable(reportFeatureCaseList(), { const { propsRes, propsEvent, loadList, setLoadListParams } = useTable(reportFeatureCaseList(), {
tableKey: tableKey.value, tableKey: tableKey.value,
columns: columns.value, columns: columns.value,