feat: 态势感知模块 - 实时监控面板+后端API

This commit is contained in:
freedakgmail
2026-07-30 09:01:01 +08:00
parent 6bab0ad84a
commit 268e085ffa
9 changed files with 1294 additions and 7 deletions
+3 -2
View File
@@ -1,6 +1,6 @@
import { ReactNode, useState } from 'react'
import { Link, useLocation } from 'react-router-dom'
import { LayoutDashboard, Store, ClipboardList, TrendingUp, Settings, LogOut, Menu, X, Package, DollarSign, ShoppingBag, Users, AlertTriangle, Clock, Database, MapPin, PieChart, Wallet, CalendarClock } from 'lucide-react'
import { LayoutDashboard, Store, ClipboardList, TrendingUp, Settings, LogOut, Menu, X, Package, DollarSign, ShoppingBag, Users, AlertTriangle, Clock, Database, MapPin, PieChart, Wallet, CalendarClock, Activity } from 'lucide-react'
import { cn } from '@/lib/utils'
interface LayoutProps {
@@ -25,6 +25,7 @@ const menuGroups: MenuGroup[] = [
{
title: '经营管理',
items: [
{ path: '/situational-awareness', label: '态势感知', icon: Activity, roles: ['hq', 'dept', 'regional'] },
{ path: '/', label: '总部驾驶舱', icon: LayoutDashboard, roles: ['hq', 'dept', 'regional', 'store'] },
{ path: '/regional', label: '区域经理', icon: Store, roles: ['hq', 'dept', 'regional', 'store'] },
{ path: '/store', label: '店长工作台', icon: ClipboardList, roles: ['hq', 'dept', 'regional', 'store'] },
@@ -82,7 +83,7 @@ export function Layout({ children, user, onLogout }: LayoutProps) {
sidebarOpen ? 'translate-x-0' : '-translate-x-full'
)}>
<div className="flex h-14 items-center border-b px-4">
<span className="text-lg font-bold"></span>
<span className="text-lg font-bold"></span>
</div>
<nav className="space-y-4 p-3">
{visibleGroups.map((group) => (