From 0158ad87b38ec476ec7dc802ee4e97efc2617c9c Mon Sep 17 00:00:00 2001
From: ai-coding <ai-coding@devgenie.local>
Date: 星期六, 27 六月 2026 14:57:50 +0800
Subject: [PATCH] feat(commandCenter):kpi新增呼单乘客、今日完单,样式调整

---
 src/views/businessOperations/commandCenter/components/StatusHeader/index.vue |   37 ++++++++++++++++++++++++++++++++++++-
 1 files changed, 36 insertions(+), 1 deletions(-)

diff --git a/src/views/businessOperations/commandCenter/components/StatusHeader/index.vue b/src/views/businessOperations/commandCenter/components/StatusHeader/index.vue
index 307fbf4..f04d35b 100644
--- a/src/views/businessOperations/commandCenter/components/StatusHeader/index.vue
+++ b/src/views/businessOperations/commandCenter/components/StatusHeader/index.vue
@@ -8,14 +8,24 @@
 
 defineProps<{ isOnline: boolean }>()
 
-const emit = defineEmits<{ filterVehicle: [group: MonitorGroup | null] }>()
+const emit = defineEmits<{
+  filterVehicle: [group: MonitorGroup | null]
+  togglePassengerCall: [active: boolean]
+}>()
 
 const store = useCommandCenterStore()
 const kpi = computed(() => store.kpi)
 
 const activeGroup = ref<MonitorGroup | null>(null)
+const passengerCallActive = ref(false)
 
 function handleKpiClick(group: MonitorGroup) {
+  // 点击车辆分组时,取消呼单乘客激活态
+  if (passengerCallActive.value) {
+    passengerCallActive.value = false
+    emit('togglePassengerCall', false)
+  }
+
   if (activeGroup.value === group) {
     activeGroup.value = null
     emit('filterVehicle', null)
@@ -24,6 +34,17 @@
     activeGroup.value = group
     emit('filterVehicle', group)
   }
+}
+
+function handlePassengerCallClick() {
+  // 点击呼单乘客时,取消车辆分组筛选
+  if (activeGroup.value) {
+    activeGroup.value = null
+    emit('filterVehicle', null)
+  }
+
+  passengerCallActive.value = !passengerCallActive.value
+  emit('togglePassengerCall', passengerCallActive.value)
 }
 </script>
 
@@ -66,6 +87,20 @@
         :active="activeGroup === 'ABNORMAL'"
         @click="handleKpiClick('ABNORMAL')"
       />
+      <KpiCard
+        title="呼单乘客"
+        :value="store.passengerCalls.length"
+        color="#f59e0b"
+        subtitle="等待派车"
+        :active="passengerCallActive"
+        @click="handlePassengerCallClick"
+      />
+      <KpiCard
+        title="今日完单"
+        :value="kpi?.todayCompletedOrders ?? 0"
+        color="#2563eb"
+        subtitle="基础统计"
+      />
     </div>
     <div class="status-header__right">
       <Clock />

--
Gitblit v1.7.1