feat(ops): 优化仪表盘图表与客流统计交互
- 工单仪表盘:趋势图改为当月vs上月对比,漏斗图改为状态分布环形饼图,新增工牌队列统计图表,移除无用的 hourly/heatmap 死代码 - 客流统计:小时趋势和趋势图支持日期选择器,移除昨日对比线,API 支持日期参数 - 工作台:紧急任务过滤已取消和已完成状态,在岗人员仅显示在岗数 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -206,6 +206,16 @@ export interface DashboardStatsResp {
|
||||
functionType: string;
|
||||
rate: number;
|
||||
}>;
|
||||
// 当月与上月工单趋势对比
|
||||
monthlyTrendData?: {
|
||||
currentMonth: { createdData: number[]; dates: string[] };
|
||||
lastMonth: { createdData: number[]; dates: string[] };
|
||||
};
|
||||
// 工牌近7天队列数量统计
|
||||
badgeQueueStats?: {
|
||||
dates: string[];
|
||||
queueCounts: number[];
|
||||
};
|
||||
}
|
||||
|
||||
/** 近7天客流趋势响应 */
|
||||
|
||||
@@ -76,13 +76,17 @@ export interface TrafficTrendQuery {
|
||||
// ==================== 迁移接口(路径变更) ====================
|
||||
|
||||
/** 获取全局实时客流数据 */
|
||||
export function getTrafficRealtime() {
|
||||
return requestClient.get<TrafficRealtimeResp>('/ops/traffic/realtime');
|
||||
export function getTrafficRealtime(date?: string) {
|
||||
return requestClient.get<TrafficRealtimeResp>('/ops/traffic/realtime', {
|
||||
params: date ? { date } : undefined,
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取全局近7天客流趋势 */
|
||||
export function getTrafficTrend() {
|
||||
return requestClient.get<TrafficTrendResp>('/ops/traffic/trend');
|
||||
export function getTrafficTrend(params?: TrafficTrendQuery) {
|
||||
return requestClient.get<TrafficTrendResp>('/ops/traffic/trend', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
// ==================== 新增接口 ====================
|
||||
@@ -96,9 +100,9 @@ export function getDeviceRealtime(deviceId: number) {
|
||||
}
|
||||
|
||||
/** 获取区域实时客流(汇总,返回与全局一致的结构) */
|
||||
export function getAreaRealtime(areaIds: number[]) {
|
||||
export function getAreaRealtime(areaIds: number[], date?: string) {
|
||||
return requestClient.get<TrafficRealtimeResp>('/ops/traffic/area/realtime', {
|
||||
params: { areaIds: areaIds.join(',') },
|
||||
params: { areaIds: areaIds.join(','), ...(date ? { date } : {}) },
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user