feat(用例管理): 用例详情关联缺陷放开测试计划页
This commit is contained in:
parent
b1279b4ebc
commit
0626f5c048
|
@ -21,9 +21,11 @@ import java.util.Map;
|
|||
public class AssociateBugPageRequest extends BaseProviderCondition {
|
||||
|
||||
@Schema(description = "用例id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{functional_case.id.not_blank}")
|
||||
private String caseId;
|
||||
|
||||
@Schema(description = "关联测试计划用例ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String testPlanCaseId;
|
||||
|
||||
@Schema(description = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{functional_case.project_id.not_blank}")
|
||||
private String projectId;
|
||||
|
|
|
@ -136,6 +136,9 @@
|
|||
<if test="request.caseId != null and request.caseId != ''">
|
||||
and brc.case_id = #{request.caseId}
|
||||
</if>
|
||||
<if test="request.testPlanCaseId != null and request.testPlanCaseId != ''">
|
||||
and brc.test_plan_case_id = #{request.testPlanCaseId}
|
||||
</if>
|
||||
<if test="request.keyword != null and request.keyword != ''">
|
||||
and b.title like concat('%', #{request.keyword},'%')
|
||||
</if>
|
||||
|
|
|
@ -17,6 +17,7 @@ export interface BugListItem {
|
|||
createTime: string; // 创建时间
|
||||
updateTime: string; // 更新时间
|
||||
deleted: boolean; // 删除标志
|
||||
testPlanId: string; // 测试计划ID
|
||||
}
|
||||
|
||||
export interface BugOptionItem {
|
||||
|
|
|
@ -36,14 +36,14 @@
|
|||
t('caseManagement.featureCase.testPlanLinkList')
|
||||
}}</div>
|
||||
<div class="mb-4">
|
||||
<!-- <a-radio-group v-model:model-value="showType" type="button" class="file-show-type ml-[4px]">
|
||||
<a-radio-group v-model:model-value="showType" type="button" class="file-show-type ml-[4px]">
|
||||
<a-radio value="link" class="show-type-icon p-[2px]">{{
|
||||
t('caseManagement.featureCase.directLink')
|
||||
}}</a-radio>
|
||||
<a-radio value="testPlan" class="show-type-icon p-[2px]">{{
|
||||
<a-radio value="testPlan" class="show-type-icon p-[2px]">{{
|
||||
t('caseManagement.featureCase.testPlan')
|
||||
}}</a-radio>
|
||||
</a-radio-group>-->
|
||||
</a-radio-group>
|
||||
<a-input-search
|
||||
v-model:model-value="keyword"
|
||||
:placeholder="t('caseManagement.featureCase.searchByName')"
|
||||
|
@ -149,6 +149,9 @@
|
|||
</template>
|
||||
</a-popover>
|
||||
</template>
|
||||
<template #testPlanName="{ record }">
|
||||
<a-button type="text" class="px-0" @click="goToPlan(record)">{{ record.testPlanName }}</a-button>
|
||||
</template>
|
||||
<template #handleUserFilter="{ columnConfig }">
|
||||
<TableFilter
|
||||
v-model:visible="handleUserFilterVisible"
|
||||
|
@ -197,10 +200,7 @@
|
|||
</template>
|
||||
<template v-if="(keyword || '').trim() === ''" #empty>
|
||||
<div class="flex w-full items-center justify-center text-[var(--color-text-4)]">
|
||||
{{ t('caseManagement.caseReview.tableNoData') }}
|
||||
<MsButton class="ml-[8px]" @click="createDefect">
|
||||
{{ t('caseManagement.featureCase.createDefect') }}
|
||||
</MsButton>
|
||||
{{ t('caseManagement.caseReview.tableNoDataNoPermission') }}
|
||||
</div>
|
||||
</template>
|
||||
</ms-base-table>
|
||||
|
@ -219,6 +219,7 @@
|
|||
* @description 用例管理-详情抽屉-tab-缺陷
|
||||
*/
|
||||
import { ref } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
|
||||
import MsButton from '@/components/pure/ms-button/index.vue';
|
||||
|
@ -240,8 +241,9 @@
|
|||
import useFeatureCaseStore from '@/store/modules/case/featureCase';
|
||||
import { hasAnyPermission } from '@/utils/permission';
|
||||
|
||||
import { BugOptionItem } from '@/models/bug-management';
|
||||
import { BugListItem, BugOptionItem } from '@/models/bug-management';
|
||||
import type { TableQueryParams } from '@/models/common';
|
||||
import { TestPlanRouteEnum } from '@/enums/routeEnum';
|
||||
|
||||
const featureCaseStore = useFeatureCaseStore();
|
||||
|
||||
|
@ -266,6 +268,9 @@
|
|||
const severityFilterValue = ref<string[]>([]);
|
||||
const severityColumnId = ref('');
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
||||
const columns: MsTableColumn = [
|
||||
{
|
||||
title: 'caseManagement.featureCase.tableColumnID',
|
||||
|
@ -341,7 +346,7 @@
|
|||
const testPlanColumns: MsTableColumn = [
|
||||
{
|
||||
title: 'caseManagement.featureCase.tableColumnID',
|
||||
dataIndex: 'id',
|
||||
dataIndex: 'num',
|
||||
width: 200,
|
||||
showInTable: true,
|
||||
showTooltip: true,
|
||||
|
@ -360,8 +365,8 @@
|
|||
},
|
||||
{
|
||||
title: 'caseManagement.featureCase.planName',
|
||||
slotName: 'testPlan',
|
||||
dataIndex: 'testPlan',
|
||||
slotName: 'testPlanName',
|
||||
dataIndex: 'testPlanName',
|
||||
showInTable: true,
|
||||
showTooltip: true,
|
||||
width: 300,
|
||||
|
@ -378,6 +383,16 @@
|
|||
ellipsis: true,
|
||||
showDrag: false,
|
||||
},
|
||||
{
|
||||
title: 'caseManagement.featureCase.updateUser',
|
||||
slotName: 'handleUserName',
|
||||
dataIndex: 'handleUserName',
|
||||
titleSlotName: 'handleUserFilter',
|
||||
showInTable: true,
|
||||
showTooltip: true,
|
||||
width: 300,
|
||||
ellipsis: true,
|
||||
},
|
||||
];
|
||||
|
||||
const {
|
||||
|
@ -438,7 +453,11 @@
|
|||
const { msPagination } = linkPropsRes.value;
|
||||
featureCaseStore.setListCount(featureCaseStore.activeTab, msPagination?.total || 0);
|
||||
} else {
|
||||
setTestPlanListParams({ keyword: keyword.value, projectId: appStore.currentProjectId, caseId: props.caseId });
|
||||
setTestPlanListParams({
|
||||
keyword: keyword.value,
|
||||
projectId: appStore.currentProjectId,
|
||||
testPlanCaseId: props.caseId,
|
||||
});
|
||||
await testPlanLinkList();
|
||||
featureCaseStore.getCaseCounts(props.caseId);
|
||||
}
|
||||
|
@ -534,12 +553,25 @@
|
|||
}
|
||||
|
||||
function changeHandler() {
|
||||
console.log(keyword.value);
|
||||
if (keyword.value.trim().length === 0) {
|
||||
getFetch();
|
||||
}
|
||||
}
|
||||
|
||||
// 去测试计划页面
|
||||
function goToPlan(record: BugListItem) {
|
||||
router.push({
|
||||
name: TestPlanRouteEnum.TEST_PLAN_INDEX,
|
||||
query: {
|
||||
...route.query,
|
||||
id: record.testPlanId,
|
||||
},
|
||||
state: {
|
||||
params: JSON.stringify(setTestPlanListParams()),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.caseId,
|
||||
(val) => {
|
||||
|
|
Loading…
Reference in New Issue