feat(platform): expose customer service scope actions
This commit is contained in:
@@ -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' ? (
|
||||
|
||||
Reference in New Issue
Block a user