fix(测试计划): 修改cr提到的问题
This commit is contained in:
parent
22e9354a51
commit
e5cb2be8bd
|
@ -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';
|
||||
|
|
|
@ -23,7 +23,7 @@ export const testPlanDefaultDetail: TestPlanDetail = {
|
|||
underReviewedCount: 0,
|
||||
};
|
||||
|
||||
export const initDetailCount: PassRateCountDetail = {
|
||||
export const defaultDetailCount: PassRateCountDetail = {
|
||||
id: '',
|
||||
passThreshold: 0,
|
||||
passRate: 0,
|
||||
|
|
|
@ -56,7 +56,6 @@ export interface AddTestPlanParams {
|
|||
functionalCaseCount?: number;
|
||||
}
|
||||
|
||||
// TODO: 对照后端字段
|
||||
export interface TestPlanDetail extends AddTestPlanParams {
|
||||
num: number;
|
||||
groupName?: string;
|
||||
|
|
|
@ -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,
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -180,7 +180,7 @@
|
|||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
||||
const columns: MsTableColumn = [
|
||||
const columns = ref<MsTableColumn>([
|
||||
{
|
||||
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);
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
|
||||
<template #passRate="{ record }">
|
||||
<div class="mr-[8px] w-[100px]">
|
||||
<StatusProgress :status-detail="initDefaultCountDetailMap[record.id]" height="5px" />
|
||||
<StatusProgress :status-detail="defaultCountDetailMap[record.id]" height="5px" />
|
||||
</div>
|
||||
<div class="text-[var(--color-text-1)]">
|
||||
{{ `${record.passRate || 0}%` }}
|
||||
|
@ -645,13 +645,13 @@
|
|||
});
|
||||
}
|
||||
|
||||
const initDefaultCountDetailMap = ref<Record<string, PassRateCountDetail>>({});
|
||||
const defaultCountDetailMap = ref<Record<string, PassRateCountDetail>>({});
|
||||
|
||||
async function getStatistics(selectedPlanIds: (string | undefined)[]) {
|
||||
try {
|
||||
const result = await getPlanPassRate(selectedPlanIds);
|
||||
result.forEach((item: PassRateCountDetail) => {
|
||||
initDefaultCountDetailMap.value[item.id] = item;
|
||||
defaultCountDetailMap.value[item.id] = item;
|
||||
});
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
|
@ -883,7 +883,7 @@
|
|||
}
|
||||
|
||||
const showStatusDeleteModal = ref<boolean>(false);
|
||||
const activeRecord = ref<TestPlanItem | undefined>();
|
||||
const activeRecord = ref<TestPlanItem>();
|
||||
function deleteStatusHandler(record: TestPlanItem) {
|
||||
activeRecord.value = cloneDeep(record);
|
||||
showStatusDeleteModal.value = true;
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
|
||||
import MsColorLine from '@/components/pure/ms-color-line/index.vue';
|
||||
|
||||
import { initDetailCount } from '@/config/testPlan';
|
||||
import { defaultDetailCount } from '@/config/testPlan';
|
||||
import { useI18n } from '@/hooks/useI18n';
|
||||
|
||||
import type { PassRateCountDetail } from '@/models/testPlan/testPlan';
|
||||
|
@ -81,10 +81,10 @@
|
|||
}>();
|
||||
const { t } = useI18n();
|
||||
|
||||
const detailCount = ref({ ...initDetailCount });
|
||||
const detailCount = ref({ ...defaultDetailCount });
|
||||
watchEffect(() => {
|
||||
detailCount.value = {
|
||||
...initDetailCount,
|
||||
...defaultDetailCount,
|
||||
...props.statusDetail,
|
||||
};
|
||||
});
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
</div>
|
||||
<BugList
|
||||
ref="bugTableListRef"
|
||||
:case-id="props.caseId"
|
||||
:case-id="props.caseId || '653745575542786'"
|
||||
:keyword="keyword"
|
||||
:bug-total="total"
|
||||
:bug-columns="columns"
|
||||
|
@ -63,11 +63,11 @@
|
|||
/>
|
||||
<LinkDefectDrawer
|
||||
v-model:visible="showLinkDrawer"
|
||||
:case-id="props.caseId"
|
||||
:case-id="props.caseId || '653745575542786'"
|
||||
:drawer-loading="drawerLoading"
|
||||
@save="saveHandler"
|
||||
/>
|
||||
<AddDefectDrawer v-model:visible="showDrawer" :case-id="props.caseId" @success="initData()" />
|
||||
<AddDefectDrawer v-model:visible="showDrawer" :case-id="props.caseId || '653745575542786'" @success="initData()" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -100,7 +100,7 @@
|
|||
|
||||
const keyword = ref<string>('');
|
||||
|
||||
const columns: MsTableColumn = [
|
||||
const columns = ref<MsTableColumn>([
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,8 @@
|
|||
/>
|
||||
<div class="tab-content">
|
||||
<BugList v-if="activeTab === 'defectList'" :case-id="caseDetail.id" />
|
||||
<ExecutionHistory v-if="activeTab === 'executionHistory'" :case-id="caseDetail.id" />
|
||||
<!-- TODO 待写页面 还未提交 -->
|
||||
<!-- <ExecutionHistory v-if="activeTab === 'executionHistory'" :case-id="caseDetail.id" /> -->
|
||||
</div>
|
||||
</a-spin>
|
||||
</div>
|
||||
|
@ -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';
|
||||
|
|
|
@ -65,8 +65,7 @@
|
|||
<div class="mb-[8px] flex items-center gap-[24px] text-[12px]">
|
||||
<div class="text-[var(--color-text-4)]">
|
||||
<span class="mr-[8px]">{{ t('testPlan.testPlanDetail.executed') }}</span>
|
||||
<span v-if="detail.status === 'PREPARED'" class="text-[var(--color-text-1)]">-</span>
|
||||
<span v-else>
|
||||
<span>
|
||||
<span class="mr-1 font-medium text-[var(--color-text-1)]"> {{ hasExecutedCount }} </span>/<span
|
||||
class="ml-1"
|
||||
>{{ countDetail.caseTotal }}</span
|
||||
|
@ -75,8 +74,7 @@
|
|||
</div>
|
||||
<div class="text-[var(--color-text-4)]">
|
||||
<span class="mr-[8px]">{{ t('caseManagement.caseReview.passRate') }}</span>
|
||||
<span v-if="detail.status === 'PREPARED'" class="text-[var(--color-text-1)]"></span>
|
||||
<span v-else>
|
||||
<span>
|
||||
<span class="font-medium text-[var(--color-text-1)]"> {{ countDetail.passRate }}% </span>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -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<PassRateCountDetail>({ ...initDetailCount });
|
||||
const countDetail = ref<PassRateCountDetail>({ ...defaultDetailCount });
|
||||
|
||||
const hasExecutedCount = computed(() => {
|
||||
const { successCount, fakeErrorCount, errorCount, blockCount } = countDetail.value;
|
||||
|
|
Loading…
Reference in New Issue