生产管理系统前端 - 主页滚动条开发完毕

This commit is contained in:
2025-10-22 16:43:15 +08:00
parent f1ffcc72fc
commit 8ea90d980b
15 changed files with 182 additions and 143 deletions

View File

@@ -1,15 +1,7 @@
"use client" export default function AssetLabelingLayout({
import '@/styles/globals.css' children,
export default function RootLayout({
}: { }: {
children: React.ReactNode children: React.ReactNode
}) { }) {
return ( return <>{children}</>
<html lang="zh-CN">
<body >
</body>
</html>
)
} }

View File

@@ -1,22 +1,7 @@
import { ReactNode } from 'react'
export default function AgriculturalAssetLayout({ export default function AgriculturalAssetLayout({
children, children,
}: { }: {
children: ReactNode children: React.ReactNode
}) { }) {
return ( return <>{children}</>
<div className="min-h-screen bg-gray-50">
<header className="bg-white shadow-sm border-b">
<div className="container mx-auto px-4 py-4">
<h1 className="text-2xl font-bold text-green-900">
📦
</h1>
</div>
</header>
<main className="container mx-auto px-4 py-8">
{children}
</main>
</div>
)
} }

View File

@@ -1,22 +1,7 @@
import { ReactNode } from 'react'
export default function AgriculturalMachineryLayout({ export default function AgriculturalMachineryLayout({
children, children,
}: { }: {
children: ReactNode children: React.ReactNode
}) { }) {
return ( return <>{children}</>
<div className="min-h-screen bg-gray-50">
<header className="bg-white shadow-sm border-b">
<div className="container mx-auto px-4 py-4">
<h1 className="text-2xl font-bold text-green-900">
🚙
</h1>
</div>
</header>
<main className="container mx-auto px-4 py-8">
{children}
</main>
</div>
)
} }

View File

@@ -1,22 +1,7 @@
import { ReactNode } from 'react'
export default function AiCropModelLayout({ export default function AiCropModelLayout({
children, children,
}: { }: {
children: ReactNode children: React.ReactNode
}) { }) {
return ( return <>{children}</>
<div className="min-h-screen bg-gray-50">
<header className="bg-white shadow-sm border-b">
<div className="container mx-auto px-4 py-4">
<h1 className="text-2xl font-bold text-green-900">
🤖 AI作物模型精准决策系统
</h1>
</div>
</header>
<main className="container mx-auto px-4 py-8">
{children}
</main>
</div>
)
} }

View File

@@ -1,6 +1,6 @@
"use client" "use client"
import { ReactNode } from 'react' import { ReactNode } from 'react'
import {SideBarOld} from '@/components/layouts/SideBar/SideBarOld' // import {SideBarOld} from '@/components/layouts/SideBar/SideBarOld'
// 中心配置路由数据 // 中心配置路由数据
const centralConfigData = { const centralConfigData = {
@@ -138,5 +138,5 @@ export default function CentralConfigLayout({
}: { }: {
children: ReactNode children: ReactNode
}) { }) {
return <SideBarOld data={centralConfigData}>{children}</SideBarOld> return <>{children}</>
} }

View File

@@ -1,22 +1,7 @@
import { ReactNode } from 'react'
export default function FarmingOperationLayout({ export default function FarmingOperationLayout({
children, children,
}: { }: {
children: ReactNode children: React.ReactNode
}) { }) {
return ( return <>{children}</>
<div className="min-h-screen bg-gray-50">
<header className="bg-white shadow-sm border-b">
<div className="container mx-auto px-4 py-4">
<h1 className="text-2xl font-bold text-green-900">
📋
</h1>
</div>
</header>
<main className="container mx-auto px-4 py-8">
{children}
</main>
</div>
)
} }

View File

@@ -1,22 +1,7 @@
import { ReactNode } from 'react'
export default function LandInformationLayout({ export default function LandInformationLayout({
children, children,
}: { }: {
children: ReactNode children: React.ReactNode
}) { }) {
return ( return <>{children}</>
<div className="min-h-screen bg-gray-50">
<header className="bg-white shadow-sm border-b">
<div className="container mx-auto px-4 py-4">
<h1 className="text-2xl font-bold text-green-900">
🌾
</h1>
</div>
</header>
<main className="container mx-auto px-4 py-8">
{children}
</main>
</div>
)
} }

View File

@@ -1,18 +1,7 @@
import {Navbar1} from "@/components/layouts/NavBar" export default function AppLayout({
import '@/styles/globals.css'
export default function DashboardLayout({
children, children,
}: { }: {
children: React.ReactNode children: React.ReactNode
}) { }) {
return ( return <>{children}</>
<div>
{/* 布局 UI */}
{/* 将 children 放在您希望渲染页面或嵌套布局的位置 */}
<main>
<Navbar1></Navbar1>
{children}</main>
</div>
)
} }

View File

@@ -1,22 +1,7 @@
import { ReactNode } from 'react'
export default function WaterFertilizerControlLayout({ export default function WaterFertilizerControlLayout({
children, children,
}: { }: {
children: ReactNode children: React.ReactNode
}) { }) {
return ( return <>{children}</>
<div className="min-h-screen bg-gray-50">
<header className="bg-white shadow-sm border-b">
<div className="container mx-auto px-4 py-4">
<h1 className="text-2xl font-bold text-green-900">
💧
</h1>
</div>
</header>
<main className="container mx-auto px-4 py-8">
{children}
</main>
</div>
)
} }

View File

@@ -1,16 +1,153 @@
import {Navbar1} from "@/components/layouts/NavBar"
import {SideBarOld} from '@/components/layouts/SideBar/SideBarOld'
import '@/styles/globals.css' import '@/styles/globals.css'
export default function DashboardLayout({
const centralConfigData = {
navMain: [
{
title: "租户管理",
url: "/central-config/tenant",
icon: "🏢",
items: [
{
title: "企业审核",
url: "/central-config/tenant/enterprise-audit",
isActive: false
},
{
title: "审核历史",
url: "/central-config/tenant/audit-history",
isActive: false
},
{
title: "企业信息",
url: "/central-config/tenant/enterprise-info",
isActive: false
},
{
title: "用户管理",
url: "/central-config/tenant/user-management",
isActive: false
}
]
},
{
title: "用户管理",
url: "/central-config/user",
icon: "👥",
items: [
{
title: "员工管理",
url: "/central-config/user/employee",
isActive: false
},
{
title: "角色管理",
url: "/central-config/user/role",
isActive: false
},
{
title: "菜单管理",
url: "/central-config/user/menu",
isActive: false
},
{
title: "权限配置管理",
url: "/central-config/user/permission",
isActive: false
}
]
},
{
title: "系统参数",
url: "/central-config/system",
icon: "🔧",
items: [
{
title: "系统设置",
url: "/central-config/system/settings",
isActive: false
},
{
title: "分类字典",
url: "/central-config/system/category",
isActive: false
},
{
title: "数据字典",
url: "/central-config/system/dictionary",
isActive: false
}
]
},
{
title: "系统监控",
url: "/central-config/monitor",
icon: "📈",
items: [
{
title: "登录日志",
url: "/central-config/monitor/login-log",
isActive: false
},
{
title: "操作日志",
url: "/central-config/monitor/operation-log",
isActive: false
},
{
title: "性能监控",
url: "/central-config/monitor/performance",
isActive: false
},
{
title: "网络日志",
url: "/central-config/monitor/network-log",
isActive: false
}
]
},
{
title: "消息中心",
url: "/central-config/message",
icon: "📨",
items: [
{
title: "消息发送",
url: "/central-config/message/send",
isActive: false
},
{
title: "消息模版",
url: "/central-config/message/template",
isActive: false
},
{
title: "消息日志",
url: "/central-config/message/log",
isActive: false
}
]
}
]
}
export default function RootLayout({
children, children,
}: { }: {
children: React.ReactNode children: React.ReactNode
}) { }) {
return ( return (
<html lang="en"> <html lang="zh-CN">
<body> <body>
{/* 布局 UI */} <div className="bodyFlexUpDown">
{/* 将 children 放在您希望渲染页面或嵌套布局的位置 */} <Navbar1 />
{children} <div className="bodySon2">
<SideBarOld data={centralConfigData}>
{children}
</SideBarOld>
</div>
</div>
</body> </body>
</html> </html>
) )

View File

@@ -1,8 +1,12 @@
export default function HomePage() { export default function HomePage({
children,
}: {
children: React.ReactNode
}) {
return ( return (
<div className=""> <div className="">
{children}
</div> </div>
) )
} }

View File

@@ -246,9 +246,8 @@ export function SideBarOld({
return allItems; return allItems;
}; };
return ( return (
<div className="flex h-screen bg-gray-100" style={{ height: '90vh' }}> <div className="flex h-screen bg-gray-100 bodySon2">
{/* 左侧导航栏 */} {/* 左侧导航栏 */}
<LeftSidebar <LeftSidebar
menus={menus} menus={menus}

View File

@@ -99,11 +99,8 @@ export function MainContent({
{/* 主内容区域 */} {/* 主内容区域 */}
<main className="flex-1 overflow-auto"> <main className="flex-1 overflow-auto">
<div className="p-6"> <div className="p-6">
{/* 页面内容 */} {/* 页面内容 */}
<div className="bg-white rounded-lg border border-gray-200 p-6 shadow-sm"> {children}
{children}
</div>
</div> </div>
</main> </main>
</div> </div>

View File

@@ -0,0 +1,10 @@
.bodyFlexUpDown{
height: 100vh;
display: flex;
flex-direction: column;
}
.bodySon2{
flex: 1;
overflow: auto;
}

View File

@@ -318,4 +318,5 @@
body { body {
@apply bg-background text-foreground; @apply bg-background text-foreground;
} }
} }
@import "./body.css";