提交1 bmad搭建与项目启动 - ok
This commit is contained in:
1
crop-x/src/pages/NotFound.css
Normal file
1
crop-x/src/pages/NotFound.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 404页面样式 */
|
||||
14
crop-x/src/pages/NotFound.tsx
Normal file
14
crop-x/src/pages/NotFound.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const NotFound = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现404页面逻辑
|
||||
console.log('404页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>页面未找到</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/ServerError.css
Normal file
1
crop-x/src/pages/ServerError.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 服务器错误页面样式 */
|
||||
14
crop-x/src/pages/ServerError.tsx
Normal file
14
crop-x/src/pages/ServerError.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const ServerError = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现服务器错误页面逻辑
|
||||
console.log('服务器错误页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>服务器错误</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/ai-model/AIModelEntry.css
Normal file
1
crop-x/src/pages/ai-model/AIModelEntry.css
Normal file
@@ -0,0 +1 @@
|
||||
/* AI模型入口样式 */
|
||||
14
crop-x/src/pages/ai-model/AIModelEntry.tsx
Normal file
14
crop-x/src/pages/ai-model/AIModelEntry.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const AIModelEntry = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现AI模型入口逻辑
|
||||
console.log('AI模型入口页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>AI模型入口</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/ai-model/ModelTraining.css
Normal file
1
crop-x/src/pages/ai-model/ModelTraining.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 模型训练样式 */
|
||||
14
crop-x/src/pages/ai-model/ModelTraining.tsx
Normal file
14
crop-x/src/pages/ai-model/ModelTraining.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const ModelTraining = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现模型训练逻辑
|
||||
console.log('模型训练页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>模型训练</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/ai-model/PredictionAnalysis.css
Normal file
1
crop-x/src/pages/ai-model/PredictionAnalysis.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 预测分析样式 */
|
||||
14
crop-x/src/pages/ai-model/PredictionAnalysis.tsx
Normal file
14
crop-x/src/pages/ai-model/PredictionAnalysis.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const PredictionAnalysis = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现预测分析逻辑
|
||||
console.log('预测分析页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>预测分析</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/ai-model/RecommendationSystem.css
Normal file
1
crop-x/src/pages/ai-model/RecommendationSystem.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 推荐系统样式 */
|
||||
14
crop-x/src/pages/ai-model/RecommendationSystem.tsx
Normal file
14
crop-x/src/pages/ai-model/RecommendationSystem.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const RecommendationSystem = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现推荐系统逻辑
|
||||
console.log('推荐系统页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>推荐系统</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/asset/AssetDepreciation.css
Normal file
1
crop-x/src/pages/asset/AssetDepreciation.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 资产折旧样式 */
|
||||
14
crop-x/src/pages/asset/AssetDepreciation.tsx
Normal file
14
crop-x/src/pages/asset/AssetDepreciation.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const AssetDepreciation = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现资产折旧逻辑
|
||||
console.log('资产折旧页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>资产折旧</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/asset/AssetEntry.css
Normal file
1
crop-x/src/pages/asset/AssetEntry.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 资产管理入口样式 */
|
||||
14
crop-x/src/pages/asset/AssetEntry.tsx
Normal file
14
crop-x/src/pages/asset/AssetEntry.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const AssetEntry = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现资产管理入口逻辑
|
||||
console.log('资产管理入口页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>资产管理入口</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/asset/InventoryManagement.css
Normal file
1
crop-x/src/pages/asset/InventoryManagement.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 库存管理样式 */
|
||||
14
crop-x/src/pages/asset/InventoryManagement.tsx
Normal file
14
crop-x/src/pages/asset/InventoryManagement.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const InventoryManagement = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现库存管理逻辑
|
||||
console.log('库存管理页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>库存管理</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/asset/MaintenanceRecords.css
Normal file
1
crop-x/src/pages/asset/MaintenanceRecords.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 维护记录样式 */
|
||||
14
crop-x/src/pages/asset/MaintenanceRecords.tsx
Normal file
14
crop-x/src/pages/asset/MaintenanceRecords.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const MaintenanceRecords = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现维护记录逻辑
|
||||
console.log('维护记录页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>维护记录</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/auth/Login.css
Normal file
1
crop-x/src/pages/auth/Login.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 登录页面样式 */
|
||||
14
crop-x/src/pages/auth/Login.tsx
Normal file
14
crop-x/src/pages/auth/Login.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const Login = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现登录逻辑
|
||||
console.log('登录页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center">
|
||||
<h1>用户登录</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/config/CentralConfigEntry.css
Normal file
1
crop-x/src/pages/config/CentralConfigEntry.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 中心配置入口样式 */
|
||||
14
crop-x/src/pages/config/CentralConfigEntry.tsx
Normal file
14
crop-x/src/pages/config/CentralConfigEntry.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const CentralConfigEntry = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现中心配置入口逻辑
|
||||
console.log('中心配置入口页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>中心配置入口</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/config/MessageCenter.css
Normal file
1
crop-x/src/pages/config/MessageCenter.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 消息中心样式 */
|
||||
14
crop-x/src/pages/config/MessageCenter.tsx
Normal file
14
crop-x/src/pages/config/MessageCenter.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const MessageCenter = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现消息中心逻辑
|
||||
console.log('消息中心页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>消息中心</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/config/SystemMonitoring.css
Normal file
1
crop-x/src/pages/config/SystemMonitoring.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 系统监控样式 */
|
||||
14
crop-x/src/pages/config/SystemMonitoring.tsx
Normal file
14
crop-x/src/pages/config/SystemMonitoring.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const SystemMonitoring = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现系统监控逻辑
|
||||
console.log('系统监控页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>系统监控</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/config/SystemParameters.css
Normal file
1
crop-x/src/pages/config/SystemParameters.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 系统参数样式 */
|
||||
14
crop-x/src/pages/config/SystemParameters.tsx
Normal file
14
crop-x/src/pages/config/SystemParameters.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const SystemParameters = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现系统参数逻辑
|
||||
console.log('系统参数页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>系统参数</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/config/TenantManagement.css
Normal file
1
crop-x/src/pages/config/TenantManagement.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 租户管理样式 */
|
||||
14
crop-x/src/pages/config/TenantManagement.tsx
Normal file
14
crop-x/src/pages/config/TenantManagement.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const TenantManagement = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现租户管理逻辑
|
||||
console.log('租户管理页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>租户管理</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/config/UserManagement.css
Normal file
1
crop-x/src/pages/config/UserManagement.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 用户管理样式 */
|
||||
14
crop-x/src/pages/config/UserManagement.tsx
Normal file
14
crop-x/src/pages/config/UserManagement.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const UserManagement = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现用户管理逻辑
|
||||
console.log('用户管理页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>用户管理</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/dashboard/Dashboard.css
Normal file
1
crop-x/src/pages/dashboard/Dashboard.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 仪表板页面样式 */
|
||||
14
crop-x/src/pages/dashboard/Dashboard.tsx
Normal file
14
crop-x/src/pages/dashboard/Dashboard.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const Dashboard = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现仪表板逻辑
|
||||
console.log('仪表板页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>系统仪表板</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/irrigation/IrrigationEntry.css
Normal file
1
crop-x/src/pages/irrigation/IrrigationEntry.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 灌溉控制入口样式 */
|
||||
14
crop-x/src/pages/irrigation/IrrigationEntry.tsx
Normal file
14
crop-x/src/pages/irrigation/IrrigationEntry.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const IrrigationEntry = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现灌溉控制入口逻辑
|
||||
console.log('灌溉控制入口页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>灌溉控制入口</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/irrigation/MonitoringSystem.css
Normal file
1
crop-x/src/pages/irrigation/MonitoringSystem.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 监控系统样式 */
|
||||
14
crop-x/src/pages/irrigation/MonitoringSystem.tsx
Normal file
14
crop-x/src/pages/irrigation/MonitoringSystem.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const MonitoringSystem = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现监控系统逻辑
|
||||
console.log('监控系统页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>监控系统</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/irrigation/SchedulingSystem.css
Normal file
1
crop-x/src/pages/irrigation/SchedulingSystem.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 调度系统样式 */
|
||||
14
crop-x/src/pages/irrigation/SchedulingSystem.tsx
Normal file
14
crop-x/src/pages/irrigation/SchedulingSystem.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const SchedulingSystem = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现调度系统逻辑
|
||||
console.log('调度系统页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>调度系统</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/irrigation/SystemControl.css
Normal file
1
crop-x/src/pages/irrigation/SystemControl.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 系统控制样式 */
|
||||
14
crop-x/src/pages/irrigation/SystemControl.tsx
Normal file
14
crop-x/src/pages/irrigation/SystemControl.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const SystemControl = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现系统控制逻辑
|
||||
console.log('系统控制页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>系统控制</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/land/ComparativeAnalysis.css
Normal file
1
crop-x/src/pages/land/ComparativeAnalysis.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 对比分析样式 */
|
||||
14
crop-x/src/pages/land/ComparativeAnalysis.tsx
Normal file
14
crop-x/src/pages/land/ComparativeAnalysis.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const ComparativeAnalysis = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现对比分析逻辑
|
||||
console.log('对比分析页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>对比分析</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/land/LandArchiveManagement.css
Normal file
1
crop-x/src/pages/land/LandArchiveManagement.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 地块档案管理样式 */
|
||||
14
crop-x/src/pages/land/LandArchiveManagement.tsx
Normal file
14
crop-x/src/pages/land/LandArchiveManagement.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const LandArchiveManagement = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现地块档案管理逻辑
|
||||
console.log('地块档案管理页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>地块档案管理</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/land/LandClassification.css
Normal file
1
crop-x/src/pages/land/LandClassification.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 地块分类样式 */
|
||||
14
crop-x/src/pages/land/LandClassification.tsx
Normal file
14
crop-x/src/pages/land/LandClassification.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const LandClassification = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现地块分类逻辑
|
||||
console.log('地块分类页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>地块分类</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
14
crop-x/src/pages/land/LandEntry.tsx
Normal file
14
crop-x/src/pages/land/LandEntry.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const LandEntry = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现地块管理入口逻辑
|
||||
console.log('地块管理入口页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>地块管理</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/land/MapManagement.css
Normal file
1
crop-x/src/pages/land/MapManagement.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 地图管理样式 */
|
||||
14
crop-x/src/pages/land/MapManagement.tsx
Normal file
14
crop-x/src/pages/land/MapManagement.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const MapManagement = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现地图管理逻辑
|
||||
console.log('地图管理页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>地图管理</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/land/RiskWarning.css
Normal file
1
crop-x/src/pages/land/RiskWarning.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 风险预警样式 */
|
||||
14
crop-x/src/pages/land/RiskWarning.tsx
Normal file
14
crop-x/src/pages/land/RiskWarning.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const RiskWarning = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现风险预警逻辑
|
||||
console.log('风险预警页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>风险预警</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/land/SpatialAnalysis.css
Normal file
1
crop-x/src/pages/land/SpatialAnalysis.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 空间分析样式 */
|
||||
14
crop-x/src/pages/land/SpatialAnalysis.tsx
Normal file
14
crop-x/src/pages/land/SpatialAnalysis.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const SpatialAnalysis = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现空间分析逻辑
|
||||
console.log('空间分析页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>空间分析</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
crop-x/src/pages/land/SuitabilityEvaluation.css
Normal file
1
crop-x/src/pages/land/SuitabilityEvaluation.css
Normal file
@@ -0,0 +1 @@
|
||||
/* 适宜性评价样式 */
|
||||
14
crop-x/src/pages/land/SuitabilityEvaluation.tsx
Normal file
14
crop-x/src/pages/land/SuitabilityEvaluation.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export const SuitabilityEvaluation = () => {
|
||||
useEffect(() => {
|
||||
// TODO: 实现适宜性评价逻辑
|
||||
console.log('适宜性评价页面')
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1>适宜性评价</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
/* CategoryForm 样式文件 */
|
||||
@@ -0,0 +1,7 @@
|
||||
import React from 'react';
|
||||
import './index.css';
|
||||
|
||||
export function CategoryForm() {
|
||||
console.log('CategoryForm component rendered');
|
||||
return <div className="CategoryForm"><h4>CategoryForm</h4></div>;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export interface CategoryFormProps {
|
||||
// Props will be defined later
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
/* CategoryTree 样式文件 */
|
||||
@@ -0,0 +1,7 @@
|
||||
import React from 'react';
|
||||
import './index.css';
|
||||
|
||||
export function CategoryTree() {
|
||||
console.log('CategoryTree component rendered');
|
||||
return <div className="CategoryTree"><h4>CategoryTree</h4></div>;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export interface CategoryTreeProps {
|
||||
// Props will be defined later
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
/* TagForm 样式文件 */
|
||||
@@ -0,0 +1,7 @@
|
||||
import React from 'react';
|
||||
import './index.css';
|
||||
|
||||
export function TagForm() {
|
||||
console.log('TagForm component rendered');
|
||||
return <div className="TagForm"><h4>TagForm</h4></div>;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export interface TagFormProps {
|
||||
// Props will be defined later
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
/* TagManager 样式文件 */
|
||||
@@ -0,0 +1,7 @@
|
||||
import React from 'react';
|
||||
import './index.css';
|
||||
|
||||
export function TagManager() {
|
||||
console.log('TagManager component rendered');
|
||||
return <div className="TagManager"><h4>TagManager</h4></div>;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export interface TagManagerProps {
|
||||
// Props will be defined later
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
/* TagSelector 样式文件 */
|
||||
@@ -0,0 +1,7 @@
|
||||
import React from 'react';
|
||||
import './index.css';
|
||||
|
||||
export function TagSelector() {
|
||||
console.log('TagSelector component rendered');
|
||||
return <div className="TagSelector"><h4>TagSelector</h4></div>;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export interface TagSelectorProps {
|
||||
// Props will be defined later
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
export const CATEGORY_COLORS = [
|
||||
"#1890ff",
|
||||
"#52c41a",
|
||||
"#fa8c16",
|
||||
"#722ed1"
|
||||
];
|
||||
@@ -0,0 +1,21 @@
|
||||
import { useState, useCallback } from "react";
|
||||
import { Category, Tag } from "../index.types";
|
||||
|
||||
export function useClassification() {
|
||||
const [selectedCategory, setSelectedCategory] = useState<Category | null>(null);
|
||||
const [selectedTags, setSelectedTags] = useState<Tag[]>([]);
|
||||
|
||||
const handleCategorySelect = useCallback((category: Category) => {
|
||||
setSelectedCategory(category);
|
||||
}, []);
|
||||
|
||||
const handleTagToggle = useCallback((tag: Tag) => {
|
||||
setSelectedTags(prev =>
|
||||
prev.find(t => t.id === tag.id)
|
||||
? prev.filter(t => t.id \!== tag.id)
|
||||
: [...prev, tag]
|
||||
);
|
||||
}, []);
|
||||
|
||||
return { selectedCategory, selectedTags, handleCategorySelect, handleTagToggle };
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import { useCallback } from "react";
|
||||
import { Category, Tag } from "../index.types";
|
||||
|
||||
export function usePageActions(refreshData: () => void) {
|
||||
const handleCreateCategory = useCallback((category: Partial<Category>) => {
|
||||
console.log("Create category:", category);
|
||||
}, []);
|
||||
|
||||
const handleCreateTag = useCallback((tag: Partial<Tag>) => {
|
||||
console.log("Create tag:", tag);
|
||||
}, []);
|
||||
|
||||
return { handleCreateCategory, handleCreateTag };
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { useState, useEffect, useCallback } from "react";
|
||||
import { Category, Tag } from "../index.types";
|
||||
|
||||
export function usePageData() {
|
||||
const [categories, setCategories] = useState<Category[]>([]);
|
||||
const [tags, setTags] = useState<Tag[]>([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
|
||||
const fetchData = useCallback(async () => {
|
||||
setLoading(true);
|
||||
try {
|
||||
// 模拟API调用
|
||||
setCategories([]);
|
||||
setTags([]);
|
||||
} catch (err) {
|
||||
setError("Failed to fetch data");
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => { fetchData(); }, [fetchData]);
|
||||
|
||||
return { categories, tags, loading, error, refreshData: fetchData };
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
/* MachineryClassification 样式文件 */
|
||||
@@ -0,0 +1,6 @@
|
||||
import React from "react";
|
||||
|
||||
export function MachineryClassification() {
|
||||
console.log("MachineryClassification component rendered");
|
||||
return <div className="machinery-classification"><h1>农机分类与标签管理</h1></div>;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
export interface Category {
|
||||
id: string;
|
||||
name: string;
|
||||
parentId?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export interface Tag {
|
||||
id: string;
|
||||
name: string;
|
||||
color?: string;
|
||||
category?: string;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { Category } from "../index.types";
|
||||
|
||||
export function validateCategoryName(name: string): string | null {
|
||||
if (\!name || name.trim() === "") {
|
||||
return "分类名称不能为空";
|
||||
}
|
||||
if (name.length > 50) {
|
||||
return "分类名称不能超过50个字符";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
export function formatCategoryPath(category: Category, allCategories: Category[]): string {
|
||||
const path: string[] = [];
|
||||
let current = category;
|
||||
|
||||
while (current) {
|
||||
path.unshift(current.name);
|
||||
current = allCategories.find(c => c.id === current.parentId);
|
||||
}
|
||||
|
||||
return path.join(" / ");
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import { Category, Tag } from "../index.types";
|
||||
|
||||
export function buildCategoryTree(categories: Category[]): Category[] {
|
||||
const categoryMap = new Map();
|
||||
const roots: Category[] = [];
|
||||
|
||||
categories.forEach(category => {
|
||||
categoryMap.set(category.id, { ...category, children: [] });
|
||||
});
|
||||
|
||||
categories.forEach(category => {
|
||||
const node = categoryMap.get(category.id);
|
||||
if (category.parentId) {
|
||||
const parent = categoryMap.get(category.parentId);
|
||||
if (parent) parent.children.push(node);
|
||||
} else {
|
||||
roots.push(node);
|
||||
}
|
||||
});
|
||||
|
||||
return roots;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
/* MachineryDetails 样式文件 */
|
||||
.machinery-details {
|
||||
padding: 16px;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import React from 'react';
|
||||
import { MachineryRecord } from '../../index.types';
|
||||
import './index.css';
|
||||
|
||||
interface MachineryDetailsProps {
|
||||
machinery: MachineryRecord;
|
||||
onClose?: () => void;
|
||||
onEdit?: (machinery: MachineryRecord) => void;
|
||||
}
|
||||
|
||||
export function MachineryDetails({ machinery, onClose, onEdit }: MachineryDetailsProps) {
|
||||
console.log('MachineryDetails component rendered', { machineryId: machinery.id });
|
||||
|
||||
return (
|
||||
<div className="machinery-details">
|
||||
<h3>农机详情</h3>
|
||||
{/* 详情内容将在后续实现 */}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import { MachineryRecord } from "../../index.types";
|
||||
|
||||
export interface MachineryDetailsProps {
|
||||
machinery: MachineryRecord;
|
||||
onClose?: () => void;
|
||||
onEdit?: (machinery: MachineryRecord) => void;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
/* MachineryFilter 样式文件 */
|
||||
.machinery-filter {
|
||||
padding: 16px;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import React from 'react';
|
||||
import { MachineryFilters } from '../../index.types';
|
||||
import './index.css';
|
||||
|
||||
interface MachineryFilterProps {
|
||||
filters: MachineryFilters;
|
||||
onFilterChange: (filters: MachineryFilters) => void;
|
||||
}
|
||||
|
||||
export function MachineryFilter({ filters, onFilterChange }: MachineryFilterProps) {
|
||||
console.log('MachineryFilter component rendered', { filters });
|
||||
|
||||
return (
|
||||
<div className="machinery-filter">
|
||||
<h3>农机筛选</h3>
|
||||
{/* 筛选内容将在后续实现 */}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import { MachineryFilters } from '../../index.types';
|
||||
|
||||
export interface MachineryFilterProps {
|
||||
filters: MachineryFilters;
|
||||
onFilterChange: (filters: MachineryFilters) => void;
|
||||
onReset?: () => void;
|
||||
loading?: boolean;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
/* MachineryForm 样式文件 */
|
||||
.machinery-form {
|
||||
padding: 16px;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import React from 'react';
|
||||
import { MachineryRecord } from '../../index.types';
|
||||
import './index.css';
|
||||
|
||||
interface MachineryFormProps {
|
||||
machinery?: Partial<MachineryRecord>;
|
||||
onSubmit?: (data: Partial<MachineryRecord>) => void;
|
||||
onCancel?: () => void;
|
||||
}
|
||||
|
||||
export function MachineryForm({ machinery, onSubmit, onCancel }: MachineryFormProps) {
|
||||
console.log('MachineryForm component rendered', { machinery });
|
||||
|
||||
return (
|
||||
<div className="machinery-form">
|
||||
<h2>农机表单</h2>
|
||||
{/* 表单内容将在后续实现 */}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import { MachineryRecord } from '../../index.types';
|
||||
|
||||
export interface MachineryFormProps {
|
||||
machinery?: Partial<MachineryRecord>;
|
||||
mode?: 'create' | 'edit' | 'view';
|
||||
onSubmit?: (data: Partial<MachineryRecord>) => void;
|
||||
onCancel?: () => void;
|
||||
loading?: boolean;
|
||||
}
|
||||
|
||||
export interface FormFieldProps {
|
||||
label: string;
|
||||
name: keyof MachineryRecord;
|
||||
value: any;
|
||||
onChange: (value: any) => void;
|
||||
error?: string;
|
||||
disabled?: boolean;
|
||||
required?: boolean;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
/* MachineryList 样式文件 */
|
||||
.machinery-list {
|
||||
padding: 16px;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import React from 'react';
|
||||
import { MachineryRecord, PaginationState } from '../../index.types';
|
||||
import './index.css';
|
||||
|
||||
interface MachineryListProps {
|
||||
machinery: MachineryRecord[];
|
||||
loading?: boolean;
|
||||
error?: string | null;
|
||||
pagination?: PaginationState;
|
||||
onPageChange?: (page: number) => void;
|
||||
onEdit?: (machinery: MachineryRecord) => void;
|
||||
onDelete?: (id: string) => void;
|
||||
onBatchDelete?: (ids: string[]) => void;
|
||||
}
|
||||
|
||||
export function MachineryList({
|
||||
machinery,
|
||||
loading,
|
||||
error,
|
||||
pagination,
|
||||
onPageChange,
|
||||
onEdit,
|
||||
onDelete,
|
||||
onBatchDelete
|
||||
}: MachineryListProps) {
|
||||
console.log('MachineryList component rendered', { machineryCount: machinery.length });
|
||||
|
||||
return (
|
||||
<div className="machinery-list">
|
||||
<h3>农机列表</h3>
|
||||
{/* 列表内容将在后续实现 */}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { MachineryRecord, PaginationState } from '../../index.types';
|
||||
|
||||
export interface MachineryListProps {
|
||||
machinery: MachineryRecord[];
|
||||
loading?: boolean;
|
||||
error?: string | null;
|
||||
pagination?: PaginationState;
|
||||
onPageChange?: (page: number) => void;
|
||||
onEdit?: (machinery: MachineryRecord) => void;
|
||||
onDelete?: (id: string) => void;
|
||||
onBatchDelete?: (ids: string[]) => void;
|
||||
onExport?: () => void;
|
||||
selectable?: boolean;
|
||||
showActions?: boolean;
|
||||
}
|
||||
|
||||
export interface MachineryListItemProps {
|
||||
machinery: MachineryRecord;
|
||||
onEdit?: (machinery: MachineryRecord) => void;
|
||||
onDelete?: (id: string) => void;
|
||||
selected?: boolean;
|
||||
onSelect?: (id: string, selected: boolean) => void;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
/* MachineryTable 样式文件 */
|
||||
.machinery-table {
|
||||
padding: 16px;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import React from 'react';
|
||||
import { MachineryRecord } from '../../index.types';
|
||||
import './index.css';
|
||||
|
||||
interface MachineryTableProps {
|
||||
machinery: MachineryRecord[];
|
||||
loading?: boolean;
|
||||
onEdit?: (machinery: MachineryRecord) => void;
|
||||
onDelete?: (id: string) => void;
|
||||
}
|
||||
|
||||
export function MachineryTable({ machinery, loading, onEdit, onDelete }: MachineryTableProps) {
|
||||
console.log('MachineryTable component rendered', { machineryCount: machinery.length });
|
||||
|
||||
return (
|
||||
<div className="machinery-table">
|
||||
<h3>农机表格</h3>
|
||||
{/* 表格内容将在后续实现 */}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import { MachineryRecord } from '../../index.types';
|
||||
|
||||
export interface MachineryTableProps {
|
||||
machinery: MachineryRecord[];
|
||||
loading?: boolean;
|
||||
onEdit?: (machinery: MachineryRecord) => void;
|
||||
onDelete?: (id: string) => void;
|
||||
selectable?: boolean;
|
||||
onSelectionChange?: (selectedIds: string[]) => void;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
/* Pagination 样式文件 */
|
||||
@@ -0,0 +1,14 @@
|
||||
import React from "react";
|
||||
import "./index.css";
|
||||
|
||||
interface PaginationProps {
|
||||
current: number;
|
||||
total: number;
|
||||
pageSize: number;
|
||||
onChange?: (page: number) => void;
|
||||
}
|
||||
|
||||
export function Pagination({ current, total, pageSize, onChange }: PaginationProps) {
|
||||
console.log("Pagination component rendered");
|
||||
return <div className="pagination"><h4>分页组件</h4></div>;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user