修复了登录页面还存在顶部导航栏的问题

This commit is contained in:
2025-10-21 09:49:59 +08:00
parent 5c783c73e1
commit 4a5d278d89
121 changed files with 5626 additions and 286 deletions

View File

@@ -0,0 +1,94 @@
import { Metadata } from 'next'
export const metadata: Metadata = {
title: '农机档案录入与维护 - Crop-X 智慧农业管理系统',
description: '农机设备信息管理',
}
export default function MachineryEntryPage() {
return (
<div className="space-y-6">
<div className="bg-white rounded-lg shadow p-6">
<h2 className="text-2xl font-bold text-gray-800 mb-6">
📋
</h2>
<div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
<div className="bg-green-50 rounded-lg p-6">
<h3 className="text-lg font-semibold text-green-900 mb-4">
</h3>
<form className="space-y-4">
<div>
<label className="block text-sm font-medium text-gray-700 mb-2">
</label>
<input
type="text"
className="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500"
placeholder="请输入农机编号"
/>
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-2">
</label>
<select className="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500">
<option></option>
<option></option>
<option></option>
<option></option>
</select>
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-2">
</label>
<input
type="date"
className="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500"
/>
</div>
<button
type="submit"
className="w-full px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors"
>
</button>
</form>
</div>
<div className="bg-blue-50 rounded-lg p-6">
<h3 className="text-lg font-semibold text-blue-900 mb-4">
</h3>
<div className="space-y-3">
{[
{ id: 'NJ001', type: '拖拉机', status: '运行中', date: '2023-01-15' },
{ id: 'NJ002', type: '收割机', status: '空闲中', date: '2023-03-20' },
{ id: 'NJ003', type: '播种机', status: '维护中', date: '2023-02-10' },
].map((machine) => (
<div key={machine.id} className="bg-white rounded-lg p-4 shadow-sm">
<div className="flex justify-between items-start">
<div>
<h4 className="font-semibold text-gray-800">{machine.id}</h4>
<p className="text-sm text-gray-600">{machine.type}</p>
<p className="text-xs text-gray-500">: {machine.date}</p>
</div>
<span className={`px-2 py-1 text-xs font-medium rounded-full ${
machine.status === '运行中' ? 'bg-green-100 text-green-800' :
machine.status === '空闲中' ? 'bg-gray-100 text-gray-800' :
'bg-yellow-100 text-yellow-800'
}`}>
{machine.status}
</span>
</div>
</div>
))}
</div>
</div>
</div>
</div>
</div>
)
}

View File

@@ -0,0 +1,71 @@
import { Metadata } from 'next'
export const metadata: Metadata = {
title: '农机档案管理 - Crop-X 智慧农业管理系统',
description: '农机设备档案信息管理',
}
export default function MachineryArchivePage() {
return (
<div className="space-y-6">
<div className="bg-white rounded-lg shadow p-6">
<h2 className="text-2xl font-bold text-gray-800 mb-6">
📋
</h2>
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
<div className="bg-green-50 rounded-lg p-6 hover:bg-green-100 transition-colors cursor-pointer">
<h3 className="font-semibold text-green-900 mb-2">
📝
</h3>
<p className="text-green-700 text-sm">
</p>
</div>
<div className="bg-blue-50 rounded-lg p-6 hover:bg-blue-100 transition-colors cursor-pointer">
<h3 className="font-semibold text-blue-900 mb-2">
🏷
</h3>
<p className="text-blue-700 text-sm">
</p>
</div>
<div className="bg-purple-50 rounded-lg p-6 hover:bg-purple-100 transition-colors cursor-pointer">
<h3 className="font-semibold text-purple-900 mb-2">
📱
</h3>
<p className="text-purple-700 text-sm">
</p>
</div>
</div>
<div className="mt-6 bg-gray-50 rounded-lg p-6">
<h3 className="text-lg font-semibold text-gray-800 mb-4">
📊
</h3>
<div className="grid grid-cols-1 md:grid-cols-4 gap-4">
<div className="bg-white rounded-lg p-4 text-center">
<div className="text-2xl font-bold text-green-600 mb-2">156</div>
<div className="text-sm text-gray-600"></div>
</div>
<div className="bg-white rounded-lg p-4 text-center">
<div className="text-2xl font-bold text-blue-600 mb-2">12</div>
<div className="text-sm text-gray-600"></div>
</div>
<div className="bg-white rounded-lg p-4 text-center">
<div className="text-2xl font-bold text-purple-600 mb-2">89</div>
<div className="text-sm text-gray-600"></div>
</div>
<div className="bg-white rounded-lg p-4 text-center">
<div className="text-2xl font-bold text-orange-600 mb-2">95%</div>
<div className="text-sm text-gray-600"></div>
</div>
</div>
</div>
</div>
</div>
)
}

View File

@@ -0,0 +1,35 @@
'use client'
import { useEffect } from 'react'
export default function AgriculturalMachineryError({
error,
reset,
}: {
error: Error & { digest?: string }
reset: () => void
}) {
useEffect(() => {
console.error('农机管理系统错误:', error)
}, [error])
return (
<div className="min-h-screen bg-gray-50 flex items-center justify-center">
<div className="text-center">
<div className="text-6xl mb-4">🚙</div>
<h2 className="text-2xl font-bold text-red-800 mb-4">
</h2>
<p className="text-red-600 mb-6">
{error.message || '未知系统错误'}
</p>
<button
onClick={reset}
className="px-6 py-3 bg-red-600 text-white rounded-md hover:bg-red-700 transition-colors"
>
</button>
</div>
</div>
)
}

View File

@@ -0,0 +1,22 @@
import { ReactNode } from 'react'
export default function AgriculturalMachineryLayout({
children,
}: {
children: ReactNode
}) {
return (
<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

@@ -0,0 +1,10 @@
export default function AgriculturalMachineryLoading() {
return (
<div className="min-h-screen bg-gray-50 flex items-center justify-center">
<div className="text-center">
<div className="animate-spin rounded-full h-12 w-12 border-b-2 border-green-600 mx-auto mb-4"></div>
<p className="text-gray-600">...</p>
</div>
</div>
)
}

View File

@@ -0,0 +1,93 @@
import { Metadata } from 'next'
export const metadata: Metadata = {
title: '实时位置追踪 - Crop-X 智慧农业管理系统',
description: '农机设备定位监控',
}
export default function RealTimeLocationTrackingPage() {
return (
<div className="space-y-6">
<div className="bg-white rounded-lg shadow p-6">
<h2 className="text-2xl font-bold text-gray-800 mb-6">
📍
</h2>
<div className="grid grid-cols-1 lg:grid-cols-3 gap-6">
<div className="lg:col-span-2">
<div className="bg-gray-100 rounded-lg h-96 flex items-center justify-center">
<div className="text-center">
<div className="text-6xl mb-4">🗺</div>
<h3 className="text-lg font-semibold text-gray-700 mb-2">
</h3>
<p className="text-gray-600">
</p>
</div>
</div>
</div>
<div className="space-y-4">
<div className="bg-green-50 rounded-lg p-4">
<h3 className="font-semibold text-green-900 mb-3">
线
</h3>
<div className="space-y-2">
{[
{ id: 'NJ001', name: '拖拉机-001', location: '东区农田', status: '工作中' },
{ id: 'NJ002', name: '收割机-002', location: '西区农田', status: '工作中' },
{ id: 'NJ003', name: '播种机-003', location: '南区农田', status: '空闲' },
].map((machine) => (
<div key={machine.id} className="bg-white rounded-lg p-3 shadow-sm">
<div className="flex items-center justify-between">
<div>
<h4 className="font-medium text-gray-800">{machine.name}</h4>
<p className="text-sm text-gray-600">{machine.location}</p>
</div>
<div className={`w-2 h-2 rounded-full ${
machine.status === '工作中' ? 'bg-green-500' : 'bg-gray-400'
}`} />
</div>
</div>
))}
</div>
</div>
<div className="bg-blue-50 rounded-lg p-4">
<h3 className="font-semibold text-blue-900 mb-3">
</h3>
<div className="space-y-2">
<div className="flex justify-between">
<span className="text-gray-600"></span>
<span className="font-semibold">12 </span>
</div>
<div className="flex justify-between">
<span className="text-gray-600">线</span>
<span className="font-semibold text-green-600">10 </span>
</div>
<div className="flex justify-between">
<span className="text-gray-600">线</span>
<span className="font-semibold text-gray-600">2 </span>
</div>
</div>
</div>
</div>
</div>
<div className="mt-6 grid grid-cols-1 md:grid-cols-3 gap-4">
<button className="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors">
🔄
</button>
<button className="px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors">
📍
</button>
<button className="px-4 py-2 bg-purple-600 text-white rounded-md hover:bg-purple-700 transition-colors">
📊
</button>
</div>
</div>
</div>
)
}

View File

@@ -0,0 +1,93 @@
import Link from 'next/link'
export default function AgriculturalMachineryPage() {
return (
<div className="space-y-6">
<div className="bg-white rounded-lg shadow p-6">
<h2 className="text-xl font-semibold text-gray-800 mb-4">
</h2>
<p className="text-gray-600 mb-6">
</p>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<Link
href="/agricultural-machinery/archive/machinery-entry"
className="block p-4 bg-green-50 rounded-lg hover:bg-green-100 transition-colors"
>
<h3 className="font-semibold text-green-900 mb-2">
📋
</h3>
<p className="text-green-700 text-sm">
</p>
</Link>
<Link
href="/agricultural-machinery/monitoring/real-time-location-tracking"
className="block p-4 bg-blue-50 rounded-lg hover:bg-blue-100 transition-colors"
>
<h3 className="font-semibold text-blue-900 mb-2">
📍
</h3>
<p className="text-blue-700 text-sm">
</p>
</Link>
<Link
href="/agricultural-machinery/scheduling/task-assignment"
className="block p-4 bg-purple-50 rounded-lg hover:bg-purple-100 transition-colors"
>
<h3 className="font-semibold text-purple-900 mb-2">
📅
</h3>
<p className="text-purple-700 text-sm">
</p>
</Link>
</div>
</div>
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
<div className="bg-white rounded-lg shadow p-6">
<h3 className="text-lg font-semibold text-gray-800 mb-4">
📊
</h3>
<div className="space-y-2">
<div className="flex justify-between items-center">
<span className="text-gray-600"></span>
<span className="text-green-600 font-semibold">12 </span>
</div>
<div className="flex justify-between items-center">
<span className="text-gray-600"></span>
<span className="text-gray-600 font-semibold">8 </span>
</div>
<div className="flex justify-between items-center">
<span className="text-gray-600"></span>
<span className="text-yellow-600 font-semibold">3 </span>
</div>
</div>
</div>
<div className="bg-white rounded-lg shadow p-6">
<h3 className="text-lg font-semibold text-gray-800 mb-4">
🔧
</h3>
<div className="space-y-2">
<button className="w-full px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 transition-colors">
</button>
<button className="w-full px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors">
</button>
<button className="w-full px-4 py-2 bg-purple-600 text-white rounded hover:bg-purple-700 transition-colors">
</button>
</div>
</div>
</div>
</div>
)
}

View File

@@ -0,0 +1,150 @@
import { Metadata } from 'next'
export const metadata: Metadata = {
title: '任务分配 - Crop-X 智慧农业管理系统',
description: '农机作业任务分配',
}
export default function TaskAssignmentPage() {
return (
<div className="space-y-6">
<div className="bg-white rounded-lg shadow p-6">
<h2 className="text-2xl font-bold text-gray-800 mb-6">
📅
</h2>
<div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
<div className="bg-blue-50 rounded-lg p-6">
<h3 className="text-lg font-semibold text-blue-900 mb-4">
</h3>
<form className="space-y-4">
<div>
<label className="block text-sm font-medium text-gray-700 mb-2">
</label>
<input
type="text"
className="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
placeholder="请输入任务名称"
/>
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-2">
</label>
<select className="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
<option>-001</option>
<option>-002</option>
<option>-003</option>
</select>
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-2">
</label>
<select className="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
<option></option>
<option></option>
<option></option>
</select>
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-2">
</label>
<select className="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
<option>-01</option>
<option>西-02</option>
<option>-03</option>
</select>
</div>
<div className="grid grid-cols-2 gap-4">
<div>
<label className="block text-sm font-medium text-gray-700 mb-2">
</label>
<input
type="datetime-local"
className="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
/>
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-2">
</label>
<input
type="datetime-local"
className="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
/>
</div>
</div>
<button
type="submit"
className="w-full px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors"
>
</button>
</form>
</div>
<div className="bg-green-50 rounded-lg p-6">
<h3 className="text-lg font-semibold text-green-900 mb-4">
</h3>
<div className="space-y-3">
{[
{ id: 'T001', name: '东区收割作业', priority: '高', deadline: '2024-10-25' },
{ id: 'T002', name: '南区犁地作业', priority: '中', deadline: '2024-10-26' },
{ id: 'T003', name: '北区播种作业', priority: '低', deadline: '2024-10-27' },
].map((task) => (
<div key={task.id} className="bg-white rounded-lg p-4 shadow-sm">
<div className="flex justify-between items-start">
<div>
<h4 className="font-semibold text-gray-800">{task.name}</h4>
<p className="text-sm text-gray-600">: {task.id}</p>
<p className="text-sm text-gray-600">: {task.deadline}</p>
</div>
<div className="text-right">
<span className={`inline-block px-2 py-1 text-xs font-medium rounded-full mb-2 ${
task.priority === '高' ? 'bg-red-100 text-red-800' :
task.priority === '中' ? 'bg-yellow-100 text-yellow-800' :
'bg-green-100 text-green-800'
}`}>
{task.priority}
</span>
<br />
<button className="text-blue-600 hover:text-blue-800 text-sm">
</button>
</div>
</div>
</div>
))}
</div>
</div>
</div>
<div className="mt-6 bg-yellow-50 rounded-lg p-6">
<h3 className="text-lg font-semibold text-yellow-900 mb-4">
</h3>
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
<div className="bg-white rounded-lg p-4 text-center">
<div className="text-2xl font-bold text-blue-600 mb-2">8</div>
<div className="text-sm text-gray-600"></div>
</div>
<div className="bg-white rounded-lg p-4 text-center">
<div className="text-2xl font-bold text-green-600 mb-2">15</div>
<div className="text-sm text-gray-600"></div>
</div>
<div className="bg-white rounded-lg p-4 text-center">
<div className="text-2xl font-bold text-purple-600 mb-2">23</div>
<div className="text-sm text-gray-600"></div>
</div>
</div>
</div>
</div>
</div>
)
}