"use client"
import { useState } from "react"
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
import { PieChart, BarChart, LineChart } from "@/components/charts"
import { Badge } from "@/components/ui/badge"
import { Activity, Filter, Plus, RefreshCw, Search, Smartphone, Laptop, Monitor, Wifi, WifiOff } from "lucide-react"
export default function DevicesPage() {
const [deviceType, setDeviceType] = useState("all")
const [searchQuery, setSearchQuery] = useState("")
return (
设备概览
活跃分析
分布分析
设备活跃度趋势
设备使用时长分布
4小时/天"],
datasets: [
{
data: [15, 25, 30, 20, 10],
backgroundColor: [
"rgb(156, 163, 175)",
"rgb(249, 115, 22)",
"rgb(16, 185, 129)",
"rgb(59, 130, 246)",
"rgb(139, 92, 246)",
],
},
],
}}
height={220}
/>
| 设备ID |
设备名称 |
设备类型 |
系统版本 |
状态 |
最后活跃时间 |
操作 |
{[
{
id: "DEV-001",
name: "iPhone 13 Pro",
type: "iOS",
version: "iOS 16.2",
status: "在线",
lastActive: "2023-07-15 14:30",
},
{
id: "DEV-002",
name: "Samsung Galaxy S21",
type: "Android",
version: "Android 13",
status: "在线",
lastActive: "2023-07-15 13:45",
},
{
id: "DEV-003",
name: "MacBook Pro",
type: "Mac",
version: "macOS 13.1",
status: "在线",
lastActive: "2023-07-15 12:20",
},
{
id: "DEV-004",
name: "Xiaomi 12",
type: "Android",
version: "Android 12",
status: "离线",
lastActive: "2023-07-14 18:10",
},
{
id: "DEV-005",
name: "iPad Pro",
type: "iOS",
version: "iOS 16.1",
status: "在线",
lastActive: "2023-07-15 10:05",
},
{
id: "DEV-006",
name: "Huawei P40",
type: "Android",
version: "Android 11",
status: "离线",
lastActive: "2023-07-13 09:30",
},
{
id: "DEV-007",
name: "Windows Laptop",
type: "Windows",
version: "Windows 11",
status: "在线",
lastActive: "2023-07-15 11:45",
},
{
id: "DEV-008",
name: "OPPO Find X5",
type: "Android",
version: "Android 13",
status: "在线",
lastActive: "2023-07-15 09:20",
},
{
id: "DEV-009",
name: "iPhone 12",
type: "iOS",
version: "iOS 16.2",
status: "离线",
lastActive: "2023-07-14 22:15",
},
{
id: "DEV-010",
name: "Vivo X80",
type: "Android",
version: "Android 12",
status: "在线",
lastActive: "2023-07-15 08:50",
},
].map((device) => (
| {device.id} |
{device.name} |
{device.type === "iOS" && }
{device.type === "Android" && }
{device.type === "Mac" && }
{device.type === "Windows" && }
{device.type}
|
{device.version} |
{device.status}
|
{device.lastActive} |
|
))}
)
}