feat(platform): add export template library
This commit is contained in:
@@ -1330,6 +1330,44 @@ export function History({
|
||||
onClick: () => openQueryTab('fields')
|
||||
}
|
||||
];
|
||||
const customerExportTemplateLibraryItems = [
|
||||
{
|
||||
title: '日报运营包',
|
||||
value: '运营早会',
|
||||
detail: '每天交付车辆位置覆盖、轨迹断点、字段证据和质量提示,适合早会复盘。',
|
||||
action: '导出日报',
|
||||
color: locations.total > 0 ? 'green' as const : 'orange' as const,
|
||||
disabled: locations.items.length === 0,
|
||||
onClick: () => exportLocations()
|
||||
},
|
||||
{
|
||||
title: '周报对账包',
|
||||
value: '客户对账',
|
||||
detail: '按固定车辆范围沉淀周报计划,交付轨迹、统计查询链接和异常说明。',
|
||||
action: '复制周报计划',
|
||||
color: 'blue' as const,
|
||||
disabled: false,
|
||||
onClick: () => copyScheduledHistoryReportPlan()
|
||||
},
|
||||
{
|
||||
title: '问题解释包',
|
||||
value: '客户问询',
|
||||
detail: '客户质疑定位、里程或断链时,复制一份包含证据链接的说明。',
|
||||
action: '复制说明',
|
||||
color: deliveryStateColor,
|
||||
disabled: false,
|
||||
onClick: () => copyDeliveryPackage()
|
||||
},
|
||||
{
|
||||
title: '字段稳定包',
|
||||
value: '数据对接',
|
||||
detail: '把客户固定字段保存成模板,后续导出保持字段口径和顺序稳定。',
|
||||
action: '字段配置',
|
||||
color: selectedFieldCount > 0 || rawFieldRows.length > 0 ? 'green' as const : 'orange' as const,
|
||||
disabled: false,
|
||||
onClick: () => openQueryTab('fields')
|
||||
}
|
||||
];
|
||||
const customerReportPurposeItems = [
|
||||
{
|
||||
title: '日报复盘',
|
||||
@@ -2227,6 +2265,38 @@ export function History({
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="vp-history-export-template-library">
|
||||
<div className="vp-history-export-template-library-summary">
|
||||
<Space wrap>
|
||||
<Tag color="blue">客户导出包模板库</Tag>
|
||||
<Tag color={deliveryStateColor}>{deliveryState}</Tag>
|
||||
<Tag color={selectedFieldCount > 0 || rawFieldRows.length > 0 ? 'green' : 'orange'}>
|
||||
{fieldEvidenceCount.toLocaleString()} 字段
|
||||
</Tag>
|
||||
</Space>
|
||||
<Typography.Title heading={5} style={{ margin: 0 }}>把一次性 CSV 下载变成客户可复用的报表模板:日报看运营、周报做对账、临时解释处理质疑、字段模板保持口径稳定。</Typography.Title>
|
||||
<Typography.Text type="secondary">
|
||||
每个模板都绑定同一辆车、同一时间窗和同一套证据口径,客户后续拿到的是稳定报表,而不是临时拼出来的查询结果。
|
||||
</Typography.Text>
|
||||
</div>
|
||||
<div className="vp-history-export-template-library-grid">
|
||||
{customerExportTemplateLibraryItems.map((item) => (
|
||||
<button
|
||||
key={item.title}
|
||||
type="button"
|
||||
className="vp-history-export-template-library-item"
|
||||
disabled={item.disabled}
|
||||
onClick={item.onClick}
|
||||
aria-label={`客户导出包模板库 ${item.title} ${item.value} ${item.action}`}
|
||||
>
|
||||
<Tag color={item.color}>{item.title}</Tag>
|
||||
<strong>{item.value}</strong>
|
||||
<span>{item.detail}</span>
|
||||
<em>{item.action}</em>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
) : null}
|
||||
{mode === 'query' ? (
|
||||
|
||||
Reference in New Issue
Block a user