-
-
-
-
{{ t.label }}
-
{{ t.n }} 项
+
+
+
+
+ 临时变更到期提醒情况(共 {{tempTotal}} 项)
+
+
+
+
+ 正常(到期 > {{remindDays}} 天)
+ {{deptStatistics?.kpis?.unclosed_total || 0}} 项
+
-
{{ t.note }}
+
+
+
+ 临期(到期 ≤ {{remindDays}} 天)
+ {{deptStatistics?.kpis?.near_overdue_total || 0}} 项
+
+
+
+
+
+ 已超期
+ {{deptStatistics?.kpis?.overdue_total || 0}} 项
+
+
+
提醒规则:到期前 {{remindDays}} 天触发(可在「我的任务 · 我的申请」中调整)· 临期 / 超期项请按期办理延期、恢复或转永久
- 提醒规则:到期前 7 天触发(可在「待我处理 · 我的申请」中调整)· 临期 / 超期项请按期办理延期、恢复或转永久
-
-
-
-
-
+
+
+
+
+
+
-
diff --git a/src/views/changeStatistics/modules/pieChart.vue b/src/views/changeStatistics/modules/pieChart.vue
index 2078588..55904d3 100644
--- a/src/views/changeStatistics/modules/pieChart.vue
+++ b/src/views/changeStatistics/modules/pieChart.vue
@@ -6,7 +6,7 @@ defineOptions({
name: 'PieChart'
});
-const props = defineProps<{ data?: { name: string; value: number }[]; colors?: string[] }>();
+const props = defineProps(['data','typeList'])
const { domRef, updateOptions } = useEcharts(() => ({
tooltip: {
@@ -47,8 +47,19 @@ const { domRef, updateOptions } = useEcharts(() => ({
function init() {
updateOptions(opts => {
- opts.series[0].data = props.data || [];
- opts.series[0].color = props.colors || [];
+ // 处理数据
+ const result = props.data?.map((item: any) => ({
+ ...item,
+ name: item.label,
+ value: item.count
+ }));
+ opts.series[0].data = result || [];
+ // 处理颜色
+ // 用 Map 建立 value -> color 映射
+ const colorMap = new Map(props.typeList?.map((item: any) => [item.value, item.color]));
+ // 按 list2 的顺序返回 color 数组
+ const colors = result.map((item: any) => colorMap.get(item.key) || null);
+ opts.series[0].color = colors;
return opts;
});
}
diff --git a/src/views/changeStatistics/modules/pieChart2.vue b/src/views/changeStatistics/modules/pieChart2.vue
index 2078588..5290c87 100644
--- a/src/views/changeStatistics/modules/pieChart2.vue
+++ b/src/views/changeStatistics/modules/pieChart2.vue
@@ -6,7 +6,7 @@ defineOptions({
name: 'PieChart'
});
-const props = defineProps<{ data?: { name: string; value: number }[]; colors?: string[] }>();
+const props = defineProps(['data'])
const { domRef, updateOptions } = useEcharts(() => ({
tooltip: {
@@ -47,8 +47,13 @@ const { domRef, updateOptions } = useEcharts(() => ({
function init() {
updateOptions(opts => {
- opts.series[0].data = props.data || [];
- opts.series[0].color = props.colors || [];
+ const result = props.data?.map((item: any) => ({
+ ...item,
+ name: item.label,
+ value: item.count
+ }));
+ opts.series[0].data = result || [];
+ opts.series[0].color = ["#2080f0", "#faad14"];
return opts;
});
}
diff --git a/src/views/changeStatistics/modules/ringChart.vue b/src/views/changeStatistics/modules/ringChart.vue
index 125eb30..ab61cb0 100644
--- a/src/views/changeStatistics/modules/ringChart.vue
+++ b/src/views/changeStatistics/modules/ringChart.vue
@@ -6,7 +6,7 @@ defineOptions({
name: 'RingChart'
});
-const props = defineProps<{ data?: { name: string; value: number }[]; colors?: string[] }>();
+const props = defineProps(['data','total'])
const { domRef, updateOptions } = useEcharts(() => ({
tooltip: {
@@ -24,7 +24,7 @@ const { domRef, updateOptions } = useEcharts(() => ({
},
},
title: {
- text: `{a|22}\n{b|已评价}`,
+ text: `{a|${props.total}}\n{b|已评价}`,
textStyle: {
rich: {
a: {
@@ -72,8 +72,13 @@ const { domRef, updateOptions } = useEcharts(() => ({
function init() {
updateOptions(opts => {
- opts.series[0].data = props.data || [];
- opts.series[0].color = props.colors || [];
+ const result = props.data?.map((item: any) => ({
+ ...item,
+ name: item.label,
+ value: item.count
+ }));
+ opts.series[0].data = result || [];
+ opts.series[0].color = ["#52c41a", "#faad14", "#f5222d", "#94A3B8"];
return opts;
});
}
@@ -82,7 +87,7 @@ init();
-
+