fix(测试计划&接口测试): 修改测试计划参数问题和报告切换不生效问题_紧急
This commit is contained in:
parent
e51c44db3c
commit
10b1489afa
|
@ -354,7 +354,7 @@
|
|||
(
|
||||
e: 'filterChange',
|
||||
dataIndex: string,
|
||||
value: string[] | (string | number)[] | undefined,
|
||||
value: string[] | (string | number | boolean)[] | undefined,
|
||||
isCustomParam: boolean
|
||||
): void;
|
||||
(e: 'resetFilter', filterValue: Record<string, any>): void;
|
||||
|
@ -645,7 +645,7 @@
|
|||
});
|
||||
|
||||
const handleFilterConfirm = (
|
||||
value: string[] | (string | number)[] | undefined,
|
||||
value: string[] | (string | number | boolean)[] | undefined,
|
||||
dataIndex: string,
|
||||
isCustomParam: boolean
|
||||
) => {
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
}
|
||||
);
|
||||
const emit = defineEmits<{
|
||||
(e: 'handleConfirm', value: (string | number)[] | string[] | undefined): void;
|
||||
(e: 'handleConfirm', value: (string | number | boolean)[] | string[] | undefined): void;
|
||||
}>();
|
||||
|
||||
const visible = ref(false);
|
||||
|
|
|
@ -116,7 +116,7 @@
|
|||
loadList();
|
||||
}
|
||||
|
||||
function filterChange(dataIndex: string, value: string[] | (string | number)[] | undefined) {
|
||||
function filterChange(dataIndex: string, value: string[] | (string | number | boolean)[] | undefined) {
|
||||
loadHistory(value as string[]);
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
:action-config="tableBatchActions"
|
||||
v-on="propsEvent"
|
||||
@batch-action="handleTableBatch"
|
||||
@filter-change="filterChange"
|
||||
>
|
||||
<template #name="{ record, rowIndex }">
|
||||
<div
|
||||
|
@ -273,11 +274,28 @@
|
|||
rename
|
||||
);
|
||||
|
||||
function initData() {
|
||||
const typeFilter = computed(() => {
|
||||
if (showType.value === 'All') {
|
||||
return [];
|
||||
}
|
||||
return showType.value === 'INDEPENDENT' ? [false] : [true];
|
||||
});
|
||||
|
||||
function initData(dataIndex?: string, value?: string[] | (string | number | boolean)[] | undefined) {
|
||||
const filterParams = {
|
||||
...propsRes.value.filter,
|
||||
};
|
||||
if (dataIndex && value) {
|
||||
filterParams[dataIndex] = value;
|
||||
}
|
||||
setLoadListParams({
|
||||
keyword: keyword.value,
|
||||
projectId: appStore.currentProjectId,
|
||||
moduleType: props.moduleType,
|
||||
filter: {
|
||||
integrated: typeFilter.value,
|
||||
...filterParams,
|
||||
},
|
||||
});
|
||||
loadList();
|
||||
}
|
||||
|
@ -376,6 +394,10 @@
|
|||
initData();
|
||||
}
|
||||
|
||||
function filterChange(dataIndex: string, value: string[] | (string | number | boolean)[] | undefined) {
|
||||
initData(dataIndex, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 报告详情 showReportDetail
|
||||
*/
|
||||
|
|
|
@ -59,8 +59,8 @@
|
|||
:bug-columns="columns"
|
||||
:load-bug-list-api="associatedBugPage"
|
||||
:load-params="{
|
||||
testPlanCaseId: route.query.testPlanCaseId,
|
||||
caseId: props.caseId,
|
||||
testPlanCaseId: props.testPlanCaseId,
|
||||
}"
|
||||
@link="emit('link')"
|
||||
@new="emit('new')"
|
||||
|
@ -93,7 +93,7 @@
|
|||
const appStore = useAppStore();
|
||||
const props = defineProps<{
|
||||
caseId: string;
|
||||
testPlanId: string;
|
||||
testPlanCaseId: string;
|
||||
}>();
|
||||
|
||||
const keyword = ref<string>('');
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
const { t } = useI18n();
|
||||
const props = defineProps<{
|
||||
caseId: string;
|
||||
testPlanCaseId: string;
|
||||
}>();
|
||||
|
||||
const executeHistoryList = ref<ExecuteHistoryItem[]>([]);
|
||||
|
@ -69,7 +70,7 @@
|
|||
try {
|
||||
executeHistoryList.value = await executeHistory({
|
||||
caseId: props.caseId,
|
||||
id: route.query.testPlanCaseId as string,
|
||||
id: props.testPlanCaseId,
|
||||
testPlanId: route.query.id as string,
|
||||
});
|
||||
} catch (error) {
|
||||
|
|
|
@ -162,11 +162,15 @@
|
|||
v-if="activeTab === 'defectList'"
|
||||
ref="bugRef"
|
||||
:case-id="activeCaseId"
|
||||
:test-plan-id="route.query.id as string"
|
||||
:test-plan-case-id="activeId"
|
||||
@link="linkDefect"
|
||||
@new="addBug"
|
||||
/>
|
||||
<ExecutionHistory v-if="activeTab === 'executionHistory'" :case-id="activeCaseId" />
|
||||
<ExecutionHistory
|
||||
v-if="activeTab === 'executionHistory'"
|
||||
:case-id="activeCaseId"
|
||||
:test-plan-case-id="activeId"
|
||||
/>
|
||||
</div>
|
||||
</a-spin>
|
||||
</div>
|
||||
|
@ -181,8 +185,8 @@
|
|||
<AddDefectDrawer
|
||||
v-model:visible="showDrawer"
|
||||
:case-id="activeCaseId"
|
||||
::extra-params="{
|
||||
testPlanCaseId: route.query.testPlanCaseId,
|
||||
:extra-params="{
|
||||
testPlanCaseId: activeId,
|
||||
caseId: activeCaseId,
|
||||
testPlanId:route.query.id as string,
|
||||
}"
|
||||
|
@ -505,7 +509,7 @@
|
|||
...params,
|
||||
caseId: activeCaseId.value,
|
||||
testPlanId: route.query.id as string,
|
||||
testPlanCaseId: route.query.testPlanCaseId as string,
|
||||
testPlanCaseId: activeId.value,
|
||||
});
|
||||
Message.success(t('caseManagement.featureCase.associatedSuccess'));
|
||||
showLinkDrawer.value = false;
|
||||
|
|
Loading…
Reference in New Issue