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

View File

@ -257,16 +257,18 @@
const pieBorderWidth = executeData.filter((e) => Number(e.value) > 0).length === 1 ? 0 : 1;
execOptions.value.series.data = executeData.map((e) => {
return {
...e,
itemStyle: {
borderWidth: pieBorderWidth,
borderColor: '#ffffff',
color: e.color,
},
};
});
execOptions.value.series.data = executeData
.map((e) => {
return {
...e,
itemStyle: {
borderWidth: pieBorderWidth,
borderColor: '#ffffff',
color: e.color,
},
};
})
.filter((e) => e.value !== 0);
}
const showSkeleton = ref(false);