fix(测试计划): 修改测试计划缺陷徽标展示&缺陷管理字段添加&缺陷管理样式调整
This commit is contained in:
parent
15ea1d13a7
commit
1735124242
|
@ -19,7 +19,7 @@
|
|||
</template>
|
||||
<a-form ref="formRef" :model="form" layout="vertical">
|
||||
<div class="flex flex-row">
|
||||
<div class="left mt-[16px] min-w-[732px] grow">
|
||||
<div class="left mt-[16px] w-[calc(100%-428px)] grow">
|
||||
<!-- 平台默认模板不展示缺陷名称, 描述 -->
|
||||
<a-form-item
|
||||
v-if="!isPlatformDefaultTemplate"
|
||||
|
@ -151,7 +151,7 @@
|
|||
</MsFileList>
|
||||
</div>
|
||||
<a-divider class="ml-[16px]" direction="vertical" />
|
||||
<div class="right mt-[16px] max-w-[433px] grow pr-[24px]">
|
||||
<div class="right mt-[16px] w-[428px] grow pr-[24px]">
|
||||
<div class="min-w-[250px] overflow-auto">
|
||||
<a-skeleton v-if="isLoading" :loading="isLoading" :animation="true">
|
||||
<a-space direction="vertical" class="w-full" size="large">
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
</MsButton>
|
||||
<span v-if="hasAnyPermission(['PROJECT_BUG:READ+ADD'])">{{ t('caseManagement.featureCase.or') }}</span>
|
||||
<MsButton v-permission="['PROJECT_BUG:READ+ADD']" class="ml-[8px]" @click="createDefect">
|
||||
{{ t('caseManagement.featureCase.createDefect') }}
|
||||
{{ t('testPlan.featureCase.noBugDataNewBug') }}
|
||||
</MsButton>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<template #content>
|
||||
{{ t('caseManagement.featureCase.noAssociatedDefect') }}
|
||||
<span v-permission="['PROJECT_BUG:READ+ADD']" class="text-[rgb(var(--primary-4))]" @click="createDefect">{{
|
||||
t('caseManagement.featureCase.createDefect')
|
||||
t('testPlan.featureCase.noBugDataNewBug')
|
||||
}}</span>
|
||||
</template>
|
||||
<a-button
|
||||
|
@ -29,7 +29,7 @@
|
|||
{{ t('caseManagement.featureCase.linkDefect') }}
|
||||
</a-button>
|
||||
<a-button v-permission="['PROJECT_BUG:READ+ADD']" type="outline" @click="createDefect"
|
||||
>{{ t('caseManagement.featureCase.createDefect') }}
|
||||
>{{ t('testPlan.featureCase.noBugDataNewBug') }}
|
||||
</a-button>
|
||||
</div>
|
||||
<div v-else v-permission="['FUNCTIONAL_CASE:READ+UPDATE']" class="font-medium">{{
|
||||
|
|
|
@ -177,7 +177,7 @@ export default {
|
|||
'system.orgTemplate.templateCase': '用例',
|
||||
'system.orgTemplate.templateApi': '接口',
|
||||
'system.orgTemplate.templateBug': '缺陷',
|
||||
'system.orgTemplate.enableTip': '确认启用项目模版吗',
|
||||
'system.orgTemplate.enableTip': '确认启用项目模板吗',
|
||||
'system.orgTemplate.enableWarningTip': '启用后,不可恢复为组织模版,请谨慎操作!',
|
||||
'system.orgTemplate.typeEmptyTip': '字段类型不能为空',
|
||||
'system.orgTemplate.searchOrgPlaceholder': '请输入组织名称',
|
||||
|
|
|
@ -102,6 +102,7 @@
|
|||
(e: 'link'): void;
|
||||
(e: 'new'): void;
|
||||
(e: 'save', params: TableQueryParams): void;
|
||||
(e: 'updateCount'): void;
|
||||
}>();
|
||||
|
||||
const columns = ref<MsTableColumn>([
|
||||
|
@ -137,6 +138,14 @@
|
|||
ellipsis: true,
|
||||
showDrag: false,
|
||||
},
|
||||
{
|
||||
title: 'common.creator',
|
||||
slotName: 'createUser',
|
||||
dataIndex: 'createUser',
|
||||
showInTable: true,
|
||||
width: 200,
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: 'caseManagement.featureCase.updateUser',
|
||||
slotName: 'handleUserName',
|
||||
|
@ -218,6 +227,7 @@
|
|||
await testPlanCancelBug(id);
|
||||
Message.success(t('caseManagement.featureCase.cancelLinkSuccess'));
|
||||
initData();
|
||||
emit('updateCount');
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
} finally {
|
||||
|
|
|
@ -78,9 +78,9 @@
|
|||
</div>
|
||||
<MsTab
|
||||
v-model:active-key="activeTab"
|
||||
:show-badge="false"
|
||||
:content-tab-list="contentTabList"
|
||||
no-content
|
||||
:get-text-func="getTotal"
|
||||
class="relative mx-[16px] border-b"
|
||||
/>
|
||||
<div :class="[' flex-1', activeTab !== 'detail' ? 'tab-content' : 'overflow-hidden']">
|
||||
|
@ -123,7 +123,7 @@
|
|||
<MsTag type="danger" theme="light" size="medium" class="ml-4">
|
||||
<MsIcon type="icon-icon_defect" class="!text-[14px] text-[rgb(var(--danger-6))]" size="16" />
|
||||
<span class="ml-1 text-[rgb(var(--danger-6))]"> {{ t('testPlan.featureCase.bug') }}</span>
|
||||
<span class="ml-1 text-[rgb(var(--danger-6))]">{{ bugCount }}</span>
|
||||
<span class="ml-1 text-[rgb(var(--danger-6))]">{{ caseDetail.bugListCount }}</span>
|
||||
</MsTag>
|
||||
<a-dropdown @select="handleSelect">
|
||||
<a-button type="outline" size="mini" class="ml-1">
|
||||
|
@ -174,6 +174,7 @@
|
|||
:test-plan-case-id="activeId"
|
||||
@link="linkDefect"
|
||||
@new="addBug"
|
||||
@update-count="loadCaseDetail()"
|
||||
/>
|
||||
<ExecutionHistory
|
||||
v-if="activeTab === 'executionHistory'"
|
||||
|
@ -199,7 +200,7 @@
|
|||
caseId: activeCaseId,
|
||||
testPlanId:route.query.id as string,
|
||||
}"
|
||||
@success="addSuccess"
|
||||
@success="loadCaseDetail()"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
@ -455,8 +456,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
const bugCount = ref<number>(0);
|
||||
|
||||
const showLinkDrawer = ref<boolean>(false);
|
||||
const drawerLoading = ref<boolean>(false);
|
||||
|
||||
|
@ -482,27 +481,21 @@
|
|||
}
|
||||
const bugRef = ref();
|
||||
|
||||
async function getBugTotal() {
|
||||
try {
|
||||
const params = {
|
||||
testPlanCaseId: activeId.value,
|
||||
caseId: activeCaseId.value,
|
||||
projectId: appStore.currentProjectId,
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
const res = await associatedBugPage(params);
|
||||
bugCount.value = res.total;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
|
||||
function addSuccess() {
|
||||
if (activeTab.value === 'defectList') {
|
||||
bugRef.value?.initData();
|
||||
} else {
|
||||
getBugTotal();
|
||||
}
|
||||
}
|
||||
|
||||
function getTotal(key: string) {
|
||||
const { bugListCount, historyCount } = caseDetail.value;
|
||||
switch (key) {
|
||||
case 'defectList':
|
||||
return bugListCount > 99 ? `99+` : `${bugListCount}`;
|
||||
case 'executionHistory':
|
||||
return historyCount > 99 ? `99+` : `${historyCount}`;
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -518,6 +511,7 @@
|
|||
Message.success(t('caseManagement.featureCase.associatedSuccess'));
|
||||
showLinkDrawer.value = false;
|
||||
addSuccess();
|
||||
loadCaseDetail();
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
} finally {
|
||||
|
@ -559,9 +553,9 @@
|
|||
moduleIds,
|
||||
};
|
||||
}
|
||||
if (activeTab.value === 'detail') {
|
||||
getBugTotal();
|
||||
}
|
||||
// if (activeTab.value === 'detail') {
|
||||
// getBugTotal();
|
||||
// }
|
||||
getPlanDetail();
|
||||
initBugList();
|
||||
await loadCase();
|
||||
|
@ -571,16 +565,6 @@
|
|||
() => {
|
||||
loadCaseDetail();
|
||||
initBugList();
|
||||
getBugTotal();
|
||||
}
|
||||
);
|
||||
|
||||
watch(
|
||||
() => activeTab.value,
|
||||
(val) => {
|
||||
if (val === 'detail') {
|
||||
getBugTotal();
|
||||
}
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
|
|
@ -64,8 +64,7 @@ export default {
|
|||
'testPlan.testPlanIndex.apiScenarioCase': '接口场景用例',
|
||||
'testPlan.testPlanIndex.deleteArchivedPlan': '计划 已归档,删除后数据不可恢复,请谨慎操作!',
|
||||
'testPlan.testPlanIndex.deletePendingPlan': '计划 未执行,删除后数据不可恢复,请谨慎操作!',
|
||||
'testPlan.testPlanIndex.deleteRunningPlan':
|
||||
'计划 进行中,删除后,终止执行且不可恢复,定时任务停止并删除,请谨慎操作!',
|
||||
'testPlan.testPlanIndex.deleteRunningPlan': '计划 进行中,删除后,终止执行且不可恢复,请谨慎操作!',
|
||||
'testPlan.testPlanIndex.deleteCompletedPlan':
|
||||
'建议计划 已完成 ,选择归档,用例信息及执行结果都将被保留;若继续删除,数据将不会恢复,请谨慎操作!',
|
||||
'testPlan.testPlanIndex.confirmArchivePlan': '归档后,执行信息不再更新且不可编辑,数据不可恢复,请谨慎操作!',
|
||||
|
|
Loading…
Reference in New Issue