feat(platform): expose customer service scope actions

This commit is contained in:
lingniu
2026-07-06 04:30:47 +08:00
parent f068fc772d
commit 2aa7b394a6
4 changed files with 140 additions and 3 deletions

View File

@@ -288,6 +288,8 @@ export function Dashboard({
onOpenHistory,
onOpenMileage,
customerTimeWindow,
onCopyCustomerScope,
onSaveCustomerView,
focusMode = 'overview',
initialTimeMonitorFilters
}: {
@@ -299,6 +301,8 @@ export function Dashboard({
onOpenHistory: (filters?: Record<string, string>) => void;
onOpenMileage: (filters?: Record<string, string>) => void;
customerTimeWindow?: Record<string, string>;
onCopyCustomerScope?: () => void;
onSaveCustomerView?: () => void;
focusMode?: 'overview' | 'time-window';
initialTimeMonitorFilters?: Record<string, string>;
}) {
@@ -913,6 +917,7 @@ export function Dashboard({
}
];
const timeMonitorScopeValue = timeMonitorScope();
const customerServiceScopeLabel = `${timeMonitorScopeValue.keyword || '全部车辆'} / ${timeMonitorScopeValue.protocol || '全部数据通道'} / ${timeMonitorScopeValue.dateFrom || '-'}${timeMonitorScopeValue.dateTo || '-'}`;
const usesCustomerTimeWindow = Boolean(
(customerTimeWindow?.dateFrom || customerTimeWindow?.dateTo)
&& customerTimeWindow?.dateFrom === timeMonitorScopeValue.dateFrom
@@ -2753,6 +2758,22 @@ export function Dashboard({
))}
</div>
</div>
<div className="vp-customer-service-scope" aria-label="客户服务范围">
<div className="vp-customer-service-scope-copy">
<Typography.Text strong></Typography.Text>
<Typography.Text type="secondary">
{customerServiceScopeLabel}
</Typography.Text>
</div>
<div className="vp-customer-service-scope-actions">
<Button size="small" theme="solid" type="primary" aria-label="客户服务范围 复制范围" onClick={onCopyCustomerScope}>
</Button>
<Button size="small" theme="light" type="primary" aria-label="客户服务范围 保存视图" onClick={onSaveCustomerView}>
</Button>
</div>
</div>
</section>
) : null}
{focusMode === 'time-window' ? (