diff --git a/frontend/src/config/workbench.ts b/frontend/src/config/workbench.ts
index 70f3a9109b..a80707874e 100644
--- a/frontend/src/config/workbench.ts
+++ b/frontend/src/config/workbench.ts
@@ -42,7 +42,7 @@ export const contentTabList: ModuleCardItem[] = [
count: 0,
},
{
- label: 'workbench.homePage.apiPlan',
+ label: 'workbench.homePage.testPlan',
value: WorkOverviewEnum.TEST_PLAN,
icon: WorkOverviewIconEnum.TEST_PLAN,
color: 'rgb(var(--link-6))',
diff --git a/frontend/src/views/workbench/homePage/components/overview.vue b/frontend/src/views/workbench/homePage/components/overview.vue
index 7e4f05c46d..e333557c78 100644
--- a/frontend/src/views/workbench/homePage/components/overview.vue
+++ b/frontend/src/views/workbench/homePage/components/overview.vue
@@ -27,7 +27,7 @@
-
+
@@ -90,7 +90,7 @@
}
);
- const hasRoom = computed(() => innerProjectIds.value.length >= 7);
+ const hasRoom = computed(() => innerProjectIds.value.length >= 7 || props.item.projectIds.length === 0);
const options = ref>({});
@@ -119,10 +119,10 @@
// 处理data数据
options.value.series = detail.projectCountList.map((item) => {
- const countData: Record = item.count.map((e) => {
+ const countData: Record[] = item.count.map((e) => {
return {
name: item.name,
- value: e !== 0 ? e : undefined,
+ value: e,
tooltip: {
show: true,
trigger: 'item',
@@ -159,12 +159,22 @@
borderRadius: [2, 2, 0, 0], // 上边圆角
},
data: countData,
+ barMinHeight: ((optionData: Record[]) => {
+ optionData.forEach((itemValue: any, index: number) => {
+ if (itemValue.value === 0) optionData[index].value = null;
+ });
+ let hasZero = false;
+ for (let i = 0; i < optionData.length; i++) {
+ if (optionData[i].value === 0) {
+ hasZero = true;
+ break;
+ }
+ }
+ return hasZero ? 0 : 5;
+ })(countData),
};
});
options.value.yAxis[0].max = maxAxis < 100 ? 50 : maxAxis + 50;
-
- options.value.series[0].barGap = 4;
- options.value.series[0].barCategoryGap = 24;
}
async function initOverViewDetail() {
diff --git a/frontend/src/views/workbench/homePage/components/ratioPie.vue b/frontend/src/views/workbench/homePage/components/ratioPie.vue
index cb07cb7af7..d85c288a50 100644
--- a/frontend/src/views/workbench/homePage/components/ratioPie.vue
+++ b/frontend/src/views/workbench/homePage/components/ratioPie.vue
@@ -100,7 +100,6 @@
series: {
name: '',
type: 'pie',
- padAngle: 1,
radius: ['50%', '58%'],
center: ['50%', '32%'],
color: [],
diff --git a/frontend/src/views/workbench/homePage/locale/en-US.ts b/frontend/src/views/workbench/homePage/locale/en-US.ts
index f736c89008..bc16c4f31f 100644
--- a/frontend/src/views/workbench/homePage/locale/en-US.ts
+++ b/frontend/src/views/workbench/homePage/locale/en-US.ts
@@ -8,7 +8,7 @@ export default {
'workbench.homePage.interfaceAPI': 'Interface API',
'workbench.homePage.interfaceCASE': 'Interface CASE',
'workbench.homePage.interfaceScenario': 'Interface Scene',
- 'workbench.homePage.apiPlan': 'Interface plan',
+ 'workbench.homePage.apiPlan': 'Test plan',
'workbench.homePage.bugCount': 'Defect quantity',
'workbench.homePage.nearlyThreeDays': 'Nearly 3 days',
'workbench.homePage.nearlySevenDays': 'Nearly 3 days',
diff --git a/frontend/src/views/workbench/homePage/locale/zh-CN.ts b/frontend/src/views/workbench/homePage/locale/zh-CN.ts
index 977e7c592e..fa23fcf173 100644
--- a/frontend/src/views/workbench/homePage/locale/zh-CN.ts
+++ b/frontend/src/views/workbench/homePage/locale/zh-CN.ts
@@ -8,7 +8,7 @@ export default {
'workbench.homePage.interfaceAPI': '接口 API',
'workbench.homePage.interfaceCASE': '接口 CASE',
'workbench.homePage.interfaceScenario': '接口场景',
- 'workbench.homePage.apiPlan': '接口计划',
+ 'workbench.homePage.testPlan': '测试计划',
'workbench.homePage.bugCount': '缺陷数',
'workbench.homePage.nearlyThreeDays': '近3天',
'workbench.homePage.nearlySevenDays': '近7天',
diff --git a/frontend/src/views/workbench/homePage/utils.ts b/frontend/src/views/workbench/homePage/utils.ts
index 0fba11042a..c45885e560 100644
--- a/frontend/src/views/workbench/homePage/utils.ts
+++ b/frontend/src/views/workbench/homePage/utils.ts
@@ -45,7 +45,7 @@ export const commonColorConfig = [
export const colorMapConfig: Record = {
[WorkCardEnum.CASE_COUNT]: ['#ED0303', '#FFA200', '#3370FF', '#D4D4D8'],
[WorkCardEnum.ASSOCIATE_CASE_COUNT]: ['#00C261', '#3370FF'],
- [WorkCardEnum.REVIEW_CASE_COUNT]: ['#D4D4D8', '#3370FF', '#00C261', '#ED0303', '#9441B1', '#3370FF'],
+ [WorkCardEnum.REVIEW_CASE_COUNT]: ['#D4D4D8', '#3370FF', '#00C261', '#ED0303', '#FFA200'],
[WorkCardEnum.TEST_PLAN_COUNT]: ['#9441B1', '#3370FF', '#00C261', '#D4D4D8'],
[WorkCardEnum.PLAN_LEGACY_BUG]: ['#9441B1', '#3370FF', '#00C261', '#D4D4D8'],
[WorkCardEnum.BUG_COUNT]: ['#FFA200', '#D4D4D8', '#00C261'],
@@ -84,7 +84,7 @@ export function getCommonBarOptions(hasRoom: boolean, color: string[]): Record
${item.seriesName}
- ${addCommasToNumber(item.value)}
+ ${addCommasToNumber(item.value || 0)}
`
)
@@ -100,7 +100,7 @@ export function getCommonBarOptions(hasRoom: boolean, color: string[]): Record