fix(工作台): 修复工作台测试计划概览缺陷

This commit is contained in:
xinxin.wu 2024-12-11 18:53:51 +08:00 committed by 刘瑞斌
parent 67cdb0ddc3
commit 95503291b6
2 changed files with 32 additions and 28 deletions

View File

@ -147,6 +147,8 @@
radius: ['75%', '90%'], radius: ['75%', '90%'],
center: ['50%', '50%'], center: ['50%', '50%'],
color: [], color: [],
minAngle: 5,
minShowLabelAngle: 10,
avoidLabelOverlap: false, avoidLabelOverlap: false,
label: { label: {
show: false, show: false,
@ -175,9 +177,8 @@
const pieBorderWidth = hasDataLength === 1 ? 0 : 1; const pieBorderWidth = hasDataLength === 1 ? 0 : 1;
options.value.series.data = const seriesData = temData
hasDataLength > 0 .map((e, i) => {
? temData.map((e) => {
return { return {
...e, ...e,
tooltip: { tooltip: {
@ -185,12 +186,15 @@
show: !!props.hasPermission, show: !!props.hasPermission,
}, },
itemStyle: { itemStyle: {
color: color[i],
borderWidth: pieBorderWidth, borderWidth: pieBorderWidth,
borderColor: '#ffffff', borderColor: '#ffffff',
}, },
}; };
}) })
: []; .filter((e) => e.value !== 0);
options.value.series.data = hasDataLength > 0 ? seriesData : [];
legend.value = [...props.data.slice(1)].map((e, i) => { legend.value = [...props.data.slice(1)].map((e, i) => {
return { return {
...e, ...e,
@ -213,8 +217,6 @@
options.value.tooltip.show = !!props.hasPermission; options.value.tooltip.show = !!props.hasPermission;
options.value.title.text = name; options.value.title.text = name;
options.value.series.color = color;
} }
const chartRef = ref<InstanceType<typeof MsChart>>(); const chartRef = ref<InstanceType<typeof MsChart>>();

View File

@ -257,7 +257,8 @@
const pieBorderWidth = executeData.filter((e) => Number(e.value) > 0).length === 1 ? 0 : 1; const pieBorderWidth = executeData.filter((e) => Number(e.value) > 0).length === 1 ? 0 : 1;
execOptions.value.series.data = executeData.map((e) => { execOptions.value.series.data = executeData
.map((e) => {
return { return {
...e, ...e,
itemStyle: { itemStyle: {
@ -266,7 +267,8 @@
color: e.color, color: e.color,
}, },
}; };
}); })
.filter((e) => e.value !== 0);
} }
const showSkeleton = ref(false); const showSkeleton = ref(false);