feat(效能分析): 轨迹流转图时间轴支持工作日/自然天切换
- flow 接口加 mode 参数,workdays 模式把时间偏移换算为排除周末/节假日的工作小时 - 轨迹流转图的横轴随顶部按钮(自然天/工作日)切换,休息日被压缩 - 按钮切换自动重新请求 flow
This commit is contained in:
@ -103,6 +103,7 @@ export interface CapabilityQuery {
|
||||
export interface FlowQuery {
|
||||
product_sns?: string[];
|
||||
spec_models?: string[];
|
||||
mode?: "natural" | "workdays";
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
@ -123,6 +124,7 @@ export async function fetchFlowData(query: FlowQuery): Promise<FlowResponse> {
|
||||
const params: Record<string, string> = {};
|
||||
if (query.product_sns?.length) params.product_sns = query.product_sns.join(",");
|
||||
if (query.spec_models?.length) params.spec_models = query.spec_models.join(",");
|
||||
if (query.mode) params.mode = query.mode;
|
||||
const { data } = await api.get<FlowResponse>("/analytics/flow", { params });
|
||||
return data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user