"use client" import { Card } from "@/components/ui/card" import { Checkbox } from "@/components/ui/checkbox" import { Label } from "@/components/ui/label" import { Badge } from "@/components/ui/badge" interface CustomerServiceRepProps { id: string name: string deviceId: string status: "online" | "offline" avatar?: string selected: boolean disabled?: boolean onSelect: (id: string, checked: boolean) => void } /** * 客服代表选择卡片 * 用于选择客服代表 */ export function CustomerServiceRepCard({ id, name, deviceId, status, avatar, selected, disabled = false, onSelect, }: CustomerServiceRepProps) { return ( !disabled && onSelect(id, !selected)} >
!disabled && onSelect(id, !selected)} disabled={disabled} id={`rep-${id}`} />
{status === "online" ? "在线" : "离线"}
设备ID: {deviceId}
客服ID: {id}
) } interface DeviceSelectProps { allDevices: boolean newDevices: boolean targetDevices: string[] onAllDevicesChange: (checked: boolean) => void onNewDevicesChange: (checked: boolean) => void onShowDeviceSelector: () => void } /** * 设备选择组件 * 用于选择设备 */ export function DeviceSelectSection({ allDevices, newDevices, targetDevices, onAllDevicesChange, onNewDevicesChange, onShowDeviceSelector, }: DeviceSelectProps) { return (
onAllDevicesChange(checked === true)} /> (系统自动分配流量到所有在线设备)
onNewDevicesChange(checked === true)} disabled={allDevices} /> (仅针对新添加设备进行流量分发)

选择特定的设备进行流量分发

) }