From 88427cab998111330270f222b347a6e3dd0c5c24 Mon Sep 17 00:00:00 2001 From: 18631081161 <2088094923@qq.com> Date: Tue, 20 Jan 2026 15:08:16 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E9=A2=9D=E8=BF=9B=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/allocations/AllocationList.vue | 34 ++++++++++++++++--- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/src/frontend/src/views/allocations/AllocationList.vue b/src/frontend/src/views/allocations/AllocationList.vue index bf21a6c..6fd5ae5 100644 --- a/src/frontend/src/views/allocations/AllocationList.vue +++ b/src/frontend/src/views/allocations/AllocationList.vue @@ -195,14 +195,16 @@
总进度
-
+
+ {{ getTotalProgressPercentage() }}%
@@ -554,6 +556,12 @@ function getProgressStatus(rate: number): string { return 'warning' } +function getProgressColor(percentage: number): string { + if (percentage >= 100) return '#67c23a' // 绿色 + if (percentage >= 60) return '#409eff' // 蓝色 + return '#e6a23c' // 橙色 +} + function getUnitLevelTagType(level: string): string { switch (level) { case 'Division': return 'danger' @@ -632,13 +640,18 @@ function getTotalConsumed(): number { if (authStore.organizationalLevelNum >= 3 && selectedAllocation.value) { return (selectedAllocation.value as any).visibleActualCompletion || 0 } + // 师部账号:使用 selectedAllocation 中的 distributions 数据 + if (selectedAllocation.value?.distributions) { + return selectedAllocation.value.distributions.reduce((sum, d) => sum + (d.actualCompletion || 0), 0) + } return distributions.value.reduce((sum, d) => sum + (d.actualCompletion || 0), 0) } function getTotalProgressPercentage(): number { if (!selectedAllocation.value || !selectedAllocation.value.totalQuota) return 0 const consumed = getTotalConsumed() - return Math.round((consumed / selectedAllocation.value.totalQuota) * 100) + const percentage = Math.round((consumed / selectedAllocation.value.totalQuota) * 100) + return percentage } // 根据时间范围筛选后的分配数据 @@ -1046,6 +1059,17 @@ onMounted(() => { gap: 4px; } +.summary-value.progress-value { + align-items: center; + gap: 12px; +} + +.progress-text { + font-size: 22px; + font-weight: bold; + color: #303133; +} + .summary-value .number { font-size: 24px; font-weight: 700;