-
-
+
{{ onlineTotal }}
人
@@ -24,8 +23,7 @@
-
-
+
{{ offlineTotal }}
人
@@ -33,6 +31,15 @@
线下来源
+
+
+
+ {{ unMarkTotal }}
+ 人
+
+
未标记
+
+
@@ -73,10 +80,12 @@
};
const askSectionData = inject("askSectionData", ref<{ online: any[]; offline: any[] }>({ online: [], offline: [] }));
+ const gainData = inject("gainData",ref({acqTotal:0}))
const onlineTotal = ref(0);
const offlineTotal = ref(0);
+ const unMarkTotal = ref(0)
const chartData = ref
([]);
watch(
() => askSectionData.value,
@@ -92,9 +101,13 @@
if (askSectionData.value.offline && askSectionData.value.offline.length > 0) {
offlineTotal.value = askSectionData.value.offline.reduce((acc, curr) => acc + curr.total, 0);
}
+ if(gainData.value.acqTotal && askSectionData.value.offline && askSectionData.value.online){
+ unMarkTotal.value = gainData.value.acqTotal - offlineTotal.value - onlineTotal.value
+ }
chartData.value = [
{ name: "线下", value: offlineTotal.value, itemStyle: { color: "rgba(147, 219, 255, 1)" } },
{ name: "线上", value: onlineTotal.value, itemStyle: { color: "rgb(79, 214, 169)" } },
+ {name:'未标记',value: unMarkTotal.value,itemStyle: { color: "#FF4E4E" }}
];
}
diff --git a/src/views/components/chartsComponents/StudentSourceChart.vue b/src/views/components/chartsComponents/StudentSourceChart.vue
index a55b73f..791736a 100644
--- a/src/views/components/chartsComponents/StudentSourceChart.vue
+++ b/src/views/components/chartsComponents/StudentSourceChart.vue
@@ -191,7 +191,50 @@
autoRotate: false,
},
},
- series: series,
+ series: [
+ ...series,
+ {
+ name: "pie2d",
+ type: "pie",
+ labelLine: {
+ length: 18,
+ length2: 18,
+ smooth: true,
+ minTurnAngle: 20,
+ },
+ label: {
+ show: true,
+ position: "outside",
+ color: "inherit",
+ rich: {
+ a: {
+ width: 5,
+ height: 5,
+ borderRadius: 50,
+ backgroundColor: "inherit",
+ },
+ b: {
+ fontSize: 12,
+ },
+ c: {
+ fontSize: 12,
+ },
+ },
+ formatter: "{a|} {b|{b}}{d|{d}}%",
+ },
+ startAngle: 30,
+ clockwise: false,
+ radius: ["30%", "60%"],
+ padAngle: 360,
+ center: ["50%", "50%"],
+ data: props.chartData,
+ itemStyle: {
+ opacity: 1,
+ borderWidth: 0,
+ },
+ z: 1,
+ },
+ ],
graphic: [
{
id: "backgroundImg",