diff --git a/crop-x/src/app/(app)/agricultural-asset/basic-information/asset-labeling/layout.tsx b/crop-x/src/app/(app)/agricultural-asset/basic-information/asset-labeling/layout.tsx index 39b9e33..88f7ff4 100644 --- a/crop-x/src/app/(app)/agricultural-asset/basic-information/asset-labeling/layout.tsx +++ b/crop-x/src/app/(app)/agricultural-asset/basic-information/asset-labeling/layout.tsx @@ -1,15 +1,7 @@ -"use client" -import '@/styles/globals.css' - -export default function RootLayout({ - +export default function AssetLabelingLayout({ + children, }: { children: React.ReactNode }) { - return ( - - - - - ) + return <>{children} } \ No newline at end of file diff --git a/crop-x/src/app/(app)/agricultural-asset/layout.tsx b/crop-x/src/app/(app)/agricultural-asset/layout.tsx index b38674a..e2b7a39 100644 --- a/crop-x/src/app/(app)/agricultural-asset/layout.tsx +++ b/crop-x/src/app/(app)/agricultural-asset/layout.tsx @@ -1,22 +1,7 @@ -import { ReactNode } from 'react' - export default function AgriculturalAssetLayout({ children, }: { - children: ReactNode + children: React.ReactNode }) { - return ( -
-
-
-

- 📦 农业资产管理系统 -

-
-
-
- {children} -
-
- ) + return <>{children} } \ No newline at end of file diff --git a/crop-x/src/app/(app)/agricultural-machinery/layout.tsx b/crop-x/src/app/(app)/agricultural-machinery/layout.tsx index 73f1b99..1e801b7 100644 --- a/crop-x/src/app/(app)/agricultural-machinery/layout.tsx +++ b/crop-x/src/app/(app)/agricultural-machinery/layout.tsx @@ -1,22 +1,7 @@ -import { ReactNode } from 'react' - export default function AgriculturalMachineryLayout({ children, }: { - children: ReactNode + children: React.ReactNode }) { - return ( -
-
-
-

- 🚙 智能农机管理系统 -

-
-
-
- {children} -
-
- ) + return <>{children} } \ No newline at end of file diff --git a/crop-x/src/app/(app)/ai-crop-model/layout.tsx b/crop-x/src/app/(app)/ai-crop-model/layout.tsx index 59fda22..5e73d07 100644 --- a/crop-x/src/app/(app)/ai-crop-model/layout.tsx +++ b/crop-x/src/app/(app)/ai-crop-model/layout.tsx @@ -1,22 +1,7 @@ -import { ReactNode } from 'react' - export default function AiCropModelLayout({ children, }: { - children: ReactNode + children: React.ReactNode }) { - return ( -
-
-
-

- 🤖 AI作物模型精准决策系统 -

-
-
-
- {children} -
-
- ) + return <>{children} } \ No newline at end of file diff --git a/crop-x/src/app/(app)/central-config/layout.tsx b/crop-x/src/app/(app)/central-config/layout.tsx index e8d0b68..edc9b67 100644 --- a/crop-x/src/app/(app)/central-config/layout.tsx +++ b/crop-x/src/app/(app)/central-config/layout.tsx @@ -1,6 +1,6 @@ "use client" import { ReactNode } from 'react' -import {SideBarOld} from '@/components/layouts/SideBar/SideBarOld' +// import {SideBarOld} from '@/components/layouts/SideBar/SideBarOld' // 中心配置路由数据 const centralConfigData = { @@ -138,5 +138,5 @@ export default function CentralConfigLayout({ }: { children: ReactNode }) { - return {children} + return <>{children} } \ No newline at end of file diff --git a/crop-x/src/app/(app)/farming-operation/layout.tsx b/crop-x/src/app/(app)/farming-operation/layout.tsx index 77262c9..86cdcc3 100644 --- a/crop-x/src/app/(app)/farming-operation/layout.tsx +++ b/crop-x/src/app/(app)/farming-operation/layout.tsx @@ -1,22 +1,7 @@ -import { ReactNode } from 'react' - export default function FarmingOperationLayout({ children, }: { - children: ReactNode + children: React.ReactNode }) { - return ( -
-
-
-

- 📋 农事操作管理系统 -

-
-
-
- {children} -
-
- ) + return <>{children} } \ No newline at end of file diff --git a/crop-x/src/app/(app)/land-information/layout.tsx b/crop-x/src/app/(app)/land-information/layout.tsx index 971da50..e8ba546 100644 --- a/crop-x/src/app/(app)/land-information/layout.tsx +++ b/crop-x/src/app/(app)/land-information/layout.tsx @@ -1,22 +1,7 @@ -import { ReactNode } from 'react' - export default function LandInformationLayout({ children, }: { - children: ReactNode + children: React.ReactNode }) { - return ( -
-
-
-

- 🌾 地块信息管理系统 -

-
-
-
- {children} -
-
- ) + return <>{children} } \ No newline at end of file diff --git a/crop-x/src/app/(app)/layout.tsx b/crop-x/src/app/(app)/layout.tsx index 443e505..0f99067 100644 --- a/crop-x/src/app/(app)/layout.tsx +++ b/crop-x/src/app/(app)/layout.tsx @@ -1,18 +1,7 @@ -import {Navbar1} from "@/components/layouts/NavBar" -import '@/styles/globals.css' -export default function DashboardLayout({ +export default function AppLayout({ children, }: { children: React.ReactNode }) { - return ( -
- - {/* 布局 UI */} - {/* 将 children 放在您希望渲染页面或嵌套布局的位置 */} -
- - {children}
-
- ) + return <>{children} } \ No newline at end of file diff --git a/crop-x/src/app/(app)/water-fertilizer-control/layout.tsx b/crop-x/src/app/(app)/water-fertilizer-control/layout.tsx index 9619b1b..a0bbfde 100644 --- a/crop-x/src/app/(app)/water-fertilizer-control/layout.tsx +++ b/crop-x/src/app/(app)/water-fertilizer-control/layout.tsx @@ -1,22 +1,7 @@ -import { ReactNode } from 'react' - export default function WaterFertilizerControlLayout({ children, }: { - children: ReactNode + children: React.ReactNode }) { - return ( -
-
-
-

- 💧 水肥一体化控制系统 -

-
-
-
- {children} -
-
- ) + return <>{children} } \ No newline at end of file diff --git a/crop-x/src/app/layout.tsx b/crop-x/src/app/layout.tsx index ff96900..f12e93c 100644 --- a/crop-x/src/app/layout.tsx +++ b/crop-x/src/app/layout.tsx @@ -1,16 +1,153 @@ - +import {Navbar1} from "@/components/layouts/NavBar" +import {SideBarOld} from '@/components/layouts/SideBar/SideBarOld' 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: React.ReactNode }) { return ( - + - {/* 布局 UI */} - {/* 将 children 放在您希望渲染页面或嵌套布局的位置 */} - {children} +
+ +
+ + {children} + +
+
) diff --git a/crop-x/src/app/page.tsx b/crop-x/src/app/page.tsx index 86fe74e..06c5e69 100644 --- a/crop-x/src/app/page.tsx +++ b/crop-x/src/app/page.tsx @@ -1,8 +1,12 @@ -export default function HomePage() { +export default function HomePage({ + children, +}: { + children: React.ReactNode +}) { return (
- + {children}
) } \ No newline at end of file diff --git a/crop-x/src/components/layouts/SideBar/SideBarOld.tsx b/crop-x/src/components/layouts/SideBar/SideBarOld.tsx index e1343df..9dc2edc 100644 --- a/crop-x/src/components/layouts/SideBar/SideBarOld.tsx +++ b/crop-x/src/components/layouts/SideBar/SideBarOld.tsx @@ -246,9 +246,8 @@ export function SideBarOld({ return allItems; }; - return ( -
+
{/* 左侧导航栏 */}
- {/* 页面内容 */} -
- {children} -
+ {children}
diff --git a/crop-x/src/styles/body.css b/crop-x/src/styles/body.css new file mode 100644 index 0000000..8e15888 --- /dev/null +++ b/crop-x/src/styles/body.css @@ -0,0 +1,10 @@ +.bodyFlexUpDown{ + height: 100vh; + display: flex; + flex-direction: column; +} + +.bodySon2{ + flex: 1; + overflow: auto; +} \ No newline at end of file diff --git a/crop-x/src/styles/globals.css b/crop-x/src/styles/globals.css index 1873707..ab20b79 100644 --- a/crop-x/src/styles/globals.css +++ b/crop-x/src/styles/globals.css @@ -318,4 +318,5 @@ body { @apply bg-background text-foreground; } -} \ No newline at end of file +} +@import "./body.css"; \ No newline at end of file