feat(工作台): 工作台测试计划概览未分配调整优化&缺陷数跳转入参调整

This commit is contained in:
xinxin.wu 2024-12-12 17:02:49 +08:00 committed by Craftsman
parent 67d59fbf4a
commit 37ecb924d9
5 changed files with 22 additions and 5 deletions

View File

@ -415,7 +415,9 @@ export const NAV_NAVIGATION: Record<WorkNavValueEnum, any> = {
relatedToPlan: true, relatedToPlan: true,
unresolved: false, unresolved: false,
}, },
[WorkNavValueEnum.BUG_COUNT]: {}, [WorkNavValueEnum.BUG_COUNT]: {
boardCount: true,
},
[WorkNavValueEnum.BUG_COUNT_LEGACY]: { [WorkNavValueEnum.BUG_COUNT_LEGACY]: {
unresolved: true, unresolved: true,
}, },

View File

@ -22,7 +22,6 @@
label-path-mode label-path-mode
path-mode path-mode
popup-container=".cascader-wrapper-self" popup-container=".cascader-wrapper-self"
:search-option-only-label="true"
:load-more="loadMore" :load-more="loadMore"
@change="changeHandler" @change="changeHandler"
> >
@ -36,7 +35,7 @@
<template #option="{ data }"> <template #option="{ data }">
<div :class="`flex ${data.isLeaf ? ' w-[130px]' : 'w-[120px]'} items-center`" title=""> <div :class="`flex ${data.isLeaf ? ' w-[130px]' : 'w-[120px]'} items-center`" title="">
<a-tooltip :mouse-enter-delay="300" :content="t(data.label)"> <a-tooltip :mouse-enter-delay="300" :content="t(data.label)">
<div :class="`one-line-text ${data.isLeaf ? 'max-w-[85%]' : ''}`" title=""> <div class="one-line-text" title="">
{{ t(data.label) }} {{ t(data.label) }}
</div> </div>
</a-tooltip> </a-tooltip>
@ -468,6 +467,12 @@
:deep(.arco-trigger-position-bl) { :deep(.arco-trigger-position-bl) {
transform: translateX(-8%); transform: translateX(-8%);
} }
:deep(.arco-scrollbar) {
transform: translateX(9%);
}
}
:deep(.arco-cascader-option-label, .arco-cascader-search-option-label) {
padding-right: 20px;
} }
</style> </style>

View File

@ -122,4 +122,5 @@ export default {
'workbench.homePage.completeUseCases': 'Complete use case', 'workbench.homePage.completeUseCases': 'Complete use case',
'workbench.homePage.commitDefects': 'Commit defects', 'workbench.homePage.commitDefects': 'Commit defects',
'workbench.homePage.closedDefect': 'Closed defect', 'workbench.homePage.closedDefect': 'Closed defect',
'workbench.homePage.planUnExecutor': 'plan_executor',
}; };

View File

@ -109,4 +109,5 @@ export default {
'workbench.homePage.completeUseCases': '完成用例', 'workbench.homePage.completeUseCases': '完成用例',
'workbench.homePage.commitDefects': '提交缺陷', 'workbench.homePage.commitDefects': '提交缺陷',
'workbench.homePage.closedDefect': '关闭缺陷', 'workbench.homePage.closedDefect': '关闭缺陷',
'workbench.homePage.planUnExecutor': '未分配',
}; };

View File

@ -108,10 +108,16 @@ export function getCommonBarOptions(
}, },
formatter(params: any) { formatter(params: any) {
let testPlanHtml = ''; let testPlanHtml = '';
// 如果是测试计划未分配
let paramsList = [];
if (isTestPlan) { if (isTestPlan) {
const unAssign = params[0].axisValueLabel === t('workbench.homePage.planUnExecutor');
paramsList = unAssign ? params.slice(0, 1) : params;
const [assigning, complete] = params; const [assigning, complete] = params;
const passRate = assigning.value > 0 ? `${((complete.value / assigning.value) * 100).toFixed(2)}%` : '0%'; const passRate = assigning.value > 0 ? `${((complete.value / assigning.value) * 100).toFixed(2)}%` : '0%';
testPlanHtml = `<div class="flex items-center justify-between"> testPlanHtml = unAssign
? ``
: `<div class="flex items-center justify-between">
<div class="flex items-center gap-[8px] text-[var(--color-text-2)]"> <div class="flex items-center gap-[8px] text-[var(--color-text-2)]">
<div style="background:#00C261;" class="flex items-center justify-center w-[11px] h-[11px] rounded-full text-[10px]"> <div style="background:#00C261;" class="flex items-center justify-center w-[11px] h-[11px] rounded-full text-[10px]">
<span class="text-[var(--color-text-fff)] text-center"></span> <span class="text-[var(--color-text-fff)] text-center"></span>
@ -121,12 +127,14 @@ export function getCommonBarOptions(
<div class="text-[rgb(var(--success-6))] font-semibold">${passRate}</div> <div class="text-[rgb(var(--success-6))] font-semibold">${passRate}</div>
</div>`; </div>`;
} else {
paramsList = params;
} }
const html = ` const html = `
<div class="w-[186px] ms-scroll-bar max-h-[236px] overflow-y-auto p-[16px] gap-[8px] flex flex-col"> <div class="w-[186px] ms-scroll-bar max-h-[236px] overflow-y-auto p-[16px] gap-[8px] flex flex-col">
<div class="font-medium max-w-[150px] one-line-text" style="color:#323233">${params[0].axisValueLabel}</div> <div class="font-medium max-w-[150px] one-line-text" style="color:#323233">${params[0].axisValueLabel}</div>
${testPlanHtml} ${testPlanHtml}
${params ${paramsList
.map( .map(
(item: any) => ` (item: any) => `
<div class="flex h-[18px] items-center justify-between"> <div class="flex h-[18px] items-center justify-between">