26 KiB
26 KiB
FarmingOperation 模块页面结构示例
基于 navigation.ts 中的 operationMenus,为 FarmingOperation 模块创建完整的页面目录结构。
1. 农事计划 (OperationPlanning) 模块
1.1 计划制定 (PlanCreation)
pages/FarmingOperation/Planning/PlanCreation/
├── 📄 index.jsx # 主组件
├── 📄 index.css # 主样式文件
├── 📄 index.types.ts # 类型定义
├── 📂 hooks/ # 页面专用Hooks
│ ├── 📄 usePageData.js # 数据管理Hook
│ ├── 📄 usePageActions.js # 操作Hook
│ ├── 📄 usePlanCreation.js # 计划创建Hook
│ └── 📄 usePlanTemplate.js # 计划模板Hook
├── 📂 utils/ # 工具函数
│ ├── 📄 pageHelpers.js # 页面工具函数
│ ├── 📄 planUtils.js # 计划工具函数
│ ├── 📄 dateUtils.js # 日期工具函数
│ └── 📄 validators.js # 验证函数
├── 📂 constants.js # 常量定义
└── 📂 components/ # 子组件目录
├── 📂 PlanForm/ # 计划表单组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 PlanList/ # 计划列表组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 PlanWizard/ # 计划向导组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 CropSelection/ # 作物选择组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 FieldSelection/ # 地块选择组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 TimelinePlanner/ # 时间线规划组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 ResourceAllocation/ # 资源分配组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 PlanPreview/ # 计划预览组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
└── 📂 PlanTemplate/ # 计划模板组件
├── 📄 index.jsx
├── 📄 index.css
└── 📄 types.ts
1.2 资源分配规划 (ResourceAllocation)
pages/FarmingOperation/Planning/ResourceAllocation/
├── 📄 index.jsx
├── 📄 index.css
├── 📄 index.types.ts
├── 📂 hooks/
│ ├── 📄 usePageData.js
│ ├── 📄 usePageActions.js
│ ├── 📄 useResourceAllocation.js
│ └── 📄 useResourceOptimizer.js
├── 📂 utils/
│ ├── 📄 pageHelpers.js
│ ├── 📄 resourceUtils.js
│ ├── 📄 allocationUtils.js
│ └── 📄 optimizationUtils.js
├── 📂 constants.js
└── 📂 components/
├── 📂 ResourceDashboard/ # 资源仪表板组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 MachineryAllocation/ # 农机分配组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 PersonnelAllocation/ # 人员分配组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 MaterialAllocation/ # 农资分配组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 AllocationMatrix/ # 分配矩阵组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 ConflictDetector/ # 冲突检测组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 OptimizationSuggestion/ # 优化建议组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
└── 📂 AllocationReport/ # 分配报告组件
├── 📄 index.jsx
├── 📄 index.css
└── 📄 types.ts
1.3 计划进度跟踪 (ProgressTracking)
pages/FarmingOperation/Planning/ProgressTracking/
├── 📄 index.jsx
├── 📄 index.css
├── 📄 index.types.ts
├── 📂 hooks/
│ ├── 📄 usePageData.js
│ ├── 📄 usePageActions.js
│ ├── 📄 useProgressTracking.js
│ └── 📄 useProgressAnalytics.js
├── 📂 utils/
│ ├── 📄 pageHelpers.js
│ ├── 📄 progressUtils.js
│ ├── 📄 analyticsUtils.js
│ └── 📄 calculationUtils.js
├── 📂 constants.js
└── 📂 components/
├── 📂 ProgressDashboard/ # 进度仪表板组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 GanttChart/ # 甘特图组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 ProgressCard/ # 进度卡片组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 MilestoneTracker/ # 里程碑跟踪组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 DelayWarning/ # 延误预警组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 ProgressAnalysis/ # 进度分析组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 ComparisonChart/ # 对比图表组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
└── 📄 ProgressReport/ # 进度报告组件
├── 📄 index.jsx
├── 📄 index.css
└── 📄 types.ts
2. 农事任务 (OperationTask) 模块
2.1 任务管理 (TaskManagement)
pages/FarmingOperation/Task/TaskManagement/
├── 📄 index.jsx
├── 📄 index.css
├── 📄 index.types.ts
├── 📂 hooks/
│ ├── 📄 usePageData.js
│ ├── 📄 usePageActions.js
│ ├── 📄 useTaskManagement.js
│ └── 📄 useTaskFilters.js
├── 📂 utils/
│ ├── 📄 pageHelpers.js
│ ├── 📄 taskUtils.js
│ ├── 📄 filterUtils.js
│ └── 📄 statusUtils.js
├── 📂 constants.js
└── 📂 components/
├── 📂 TaskList/ # 任务列表组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 TaskForm/ # 任务表单组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 TaskTable/ # 任务表格组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 TaskCard/ # 任务卡片组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 TaskFilter/ # 任务筛选组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 TaskStatus/ # 任务状态组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 TaskPriority/ # 任务优先级组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 TaskSearch/ # 任务搜索组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
└── 📂 BatchActions/ # 批量操作组件
├── 📄 index.jsx
├── 📄 index.css
└── 📄 types.ts
2.2 任务分配与派发 (TaskAssignment)
pages/FarmingOperation/Task/TaskAssignment/
├── 📄 index.jsx
├── 📄 index.css
├── 📄 index.types.ts
├── 📂 hooks/
│ ├── 📄 usePageData.js
│ ├── 📄 usePageActions.js
│ ├── 📄 useTaskAssignment.js
│ └── 📄 useAutoAssignment.js
├── 📂 utils/
│ ├── 📄 pageHelpers.js
│ ├── 📄 assignmentUtils.js
│ ├── 📄 matchingUtils.js
│ └── 📄 notificationUtils.js
├── 📂 constants.js
└── 📂 components/
├── 📂 AssignmentBoard/ # 分配看板组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 TaskAssignmentForm/ # 任务分配表单
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 PersonnelSelector/ # 人员选择器组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 MachinerySelector/ # 农机选择器组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 AvailabilityChecker/ # 可用性检查组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 SkillMatcher/ # 技能匹配组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 AssignmentCalendar/ # 分配日历组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 ConflictResolver/ # 冲突解决组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
└── 📄 AssignmentNotification/ # 分配通知组件
├── 📄 index.jsx
├── 📄 index.css
└── 📄 types.ts
2.3 任务状态监控 (TaskMonitoring)
pages/FarmingOperation/Task/TaskMonitoring/
├── 📄 index.jsx
├── 📄 index.css
├── 📄 index.types.ts
├── 📂 hooks/
│ ├── 📄 usePageData.js
│ ├── 📄 usePageActions.js
│ ├── 📄 useTaskMonitoring.js
│ ├── 📄 useRealtimeUpdate.js
│ └── 📄 useWebSocket.js
├── 📂 utils/
│ ├── 📄 pageHelpers.js
│ ├── 📄 monitoringUtils.js
│ ├── 📄 statusUtils.js
│ └── 📄 alertUtils.js
├── 📂 constants.js
└── 📂 components/
├── 📂 MonitoringDashboard/ # 监控仪表板组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 TaskMap/ # 任务地图组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 StatusOverview/ # 状态概览组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 LiveTracking/ # 实时跟踪组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 ProgressIndicator/ # 进度指示器组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 AlertCenter/ # 告警中心组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 PerformanceMetrics/ # 性能指标组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 ResourceUtilization/ # 资源利用率组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
└── 📄 MonitoringReport/ # 监控报告组件
├── 📄 index.jsx
├── 📄 index.css
└── 📄 types.ts
2.4 历史与统计 (TaskStatistics)
pages/FarmingOperation/Task/TaskStatistics/
├── 📄 index.jsx
├── 📄 index.css
├── 📄 index.types.ts
├── 📂 hooks/
│ ├── 📄 usePageData.js
│ ├── 📄 usePageActions.js
│ ├── 📄 useTaskStatistics.js
│ └── 📄 useHistoricalData.js
├── 📂 utils/
│ ├── 📄 pageHelpers.js
│ ├── 📄 statisticsUtils.js
│ ├── 📄 chartUtils.js
│ └── 📄 reportUtils.js
├── 📂 constants.js
└── 📂 components/
├── 📂 StatisticsDashboard/ # 统计仪表板组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 TaskHistory/ # 任务历史组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 PerformanceChart/ # 性能图表组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 TrendAnalysis/ # 趋势分析组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 ComparisonAnalysis/ # 对比分析组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 EfficiencyMetrics/ # 效率指标组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 QualityMetrics/ # 质量指标组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 CostAnalysis/ # 成本分析组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
└── 📂 StatisticalReport/ # 统计报告组件
├── 📄 index.jsx
├── 📄 index.css
└── 📄 types.ts
3. 农事执行 (OperationExecution) 模块
3.1 农事类型 (OperationType)
pages/FarmingOperation/Execution/OperationType/
├── 📄 index.jsx
├── 📄 index.css
├── 📄 index.types.ts
├── 📂 hooks/
│ ├── 📄 usePageData.js
│ ├── 📄 usePageActions.js
│ ├── 📄 useOperationTypes.js
│ └── 📄 useTypeManagement.js
├── 📂 utils/
│ ├── 📄 pageHelpers.js
│ ├── 📄 typeUtils.js
│ ├── 📄 categoryUtils.js
│ └── 📄 validationUtils.js
├── 📂 constants.js
└── 📂 components/
├── 📂 TypeList/ # 类型列表组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 TypeForm/ # 类型表单组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 TypeCategory/ # 类型分类组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 TypeTemplate/ # 类型模板组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 StandardProcedure/ # 标准流程组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 QualityStandard/ # 质量标准组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 SafetyGuidelines/ # 安全指南组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
└── 📄 TypeHierarchy/ # 类型层级组件
├── 📄 index.jsx
├── 📄 index.css
└── 📄 types.ts
3.2 操作录入 (OperationRecord)
pages/FarmingOperation/Execution/OperationRecord/
├── 📄 index.jsx
├── 📄 index.css
├── 📄 index.types.ts
├── 📂 hooks/
│ ├── 📄 usePageData.js
│ ├── 📄 usePageActions.js
│ ├── 📄 useOperationRecord.js
│ └── 📄 useFieldData.js
├── 📂 utils/
│ ├── 📄 pageHelpers.js
│ ├── 📄 recordUtils.js
│ ├── 📄 dataUtils.js
│ └── 📄 validationUtils.js
├── 📂 constants.js
└── 📂 components/
├── 📂 RecordForm/ # 录入表单组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 FieldSelector/ # 地块选择器组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 OperationSelector/ # 操作选择器组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 DataInput/ # 数据输入组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 PhotoUpload/ # 照片上传组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 WeatherInfo/ # 天气信息组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 MaterialUsage/ # 农资使用组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 QualityCheck/ # 质量检查组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
└── 📄 RecordHistory/ # 录入历史组件
├── 📄 index.jsx
├── 📄 index.css
└── 📄 types.ts
3.3 日志多维查询 (OperationLog)
pages/FarmingOperation/Execution/OperationLog/
├── 📄 index.jsx
├── 📄 index.css
├── 📄 index.types.ts
├── 📂 hooks/
│ ├── 📄 usePageData.js
│ ├── 📄 usePageActions.js
│ ├── 📄 useOperationLog.js
│ └── ├── 📄 useLogFilters.js
├── 📂 utils/
│ ├── 📄 pageHelpers.js
│ ├── 📄 logUtils.js
│ ├── 📄 filterUtils.js
│ └── 📄 exportUtils.js
├── 📂 constants.js
└── 📂 components/
├── 📂 LogList/ # 日志列表组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 LogFilter/ # 日志筛选组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📂 LogDetails/ # 日志详情组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 MultiDimensionFilter/ # 多维筛选组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 LogExport/ # 日志导出组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 LogStatistics/ # 日志统计组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 LogTimeline/ # 日志时间线组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
├── 📄 LogVisualization/ # 日志可视化组件
│ ├── 📄 index.jsx
│ ├── 📄 index.css
│ └── 📄 types.ts
└── 📄 LogAudit/ # 日志审计组件
├── 📄 index.jsx
├── 📄 index.css
└── 📄 types.ts
4. 主要类型定义示例
4.1 农事计划类型 (PlanCreation/index.types.ts)
export interface FarmingPlan {
id: string;
name: string;
description?: string;
planType: PlanType;
status: PlanStatus;
priority: Priority;
startDate: string;
endDate: string;
crops: Crop[];
fields: Field[];
tasks: PlanTask[];
resources: ResourceAllocation[];
budget?: Budget;
createdBy: string;
createdAt: string;
updatedAt: string;
}
export type PlanType = 'annual' | 'seasonal' | 'monthly' | 'custom';
export type PlanStatus = 'draft' | 'approved' | 'active' | 'completed' | 'cancelled';
export type Priority = 'low' | 'medium' | 'high' | 'urgent';
export interface Crop {
id: string;
name: string;
variety: string;
plantingDate: string;
expectedHarvestDate: string;
expectedYield: number;
area: number;
}
export interface Field {
id: string;
name: string;
area: number;
soilType: string;
location: {
latitude: number;
longitude: number;
};
}
export interface PlanTask {
id: string;
name: string;
type: TaskType;
description?: string;
plannedStartDate: string;
plannedEndDate: string;
actualStartDate?: string;
actualEndDate?: string;
status: TaskStatus;
assignedTo?: string[];
requiredResources: ResourceRequirement[];
dependencies: string[];
estimatedCost?: number;
actualCost?: number;
}
export type TaskType =
| 'land_preparation'
| 'planting'
| 'fertilizing'
| 'irrigation'
| 'pest_control'
| 'weeding'
| 'harvesting'
| 'post_harvest';
export type TaskStatus =
| 'pending'
| 'in_progress'
| 'completed'
| 'cancelled'
| 'delayed';
export interface ResourceAllocation {
id: string;
type: ResourceType;
resourceId: string;
resourceName: string;
quantity: number;
unit: string;
allocationPeriod: {
start: string;
end: string;
};
cost?: number;
}
export type ResourceType = 'machinery' | 'personnel' | 'material' | 'equipment';
export interface ResourceRequirement {
type: ResourceType;
quantity: number;
unit: string;
specifications?: Record<string, any>;
}
export interface Budget {
totalAmount: number;
currency: string;
breakdown: BudgetBreakdown[];
actualSpent?: number;
}
export interface BudgetBreakdown {
category: string;
plannedAmount: number;
actualAmount?: number;
percentage: number;
}
export interface PlanFilters {
name?: string;
status?: PlanStatus;
priority?: Priority;
dateRange?: [string, string];
createdBy?: string;
cropType?: string;
}
4.2 任务执行类型 (TaskMonitoring/index.types.ts)
export interface TaskExecution {
id: string;
taskId: string;
taskName: string;
status: ExecutionStatus;
progress: number;
startTime?: string;
endTime?: string;
estimatedEndTime?: string;
assignedPersonnel: Personnel[];
assignedMachinery: Machinery[];
location: Location;
actualResources: ResourceUsage[];
qualityMetrics?: QualityMetric[];
issues: TaskIssue[];
photos: TaskPhoto[];
notes?: string;
}
export type ExecutionStatus =
| 'not_started'
| 'in_progress'
| 'paused'
| 'completed'
| 'failed'
| 'cancelled';
export interface Personnel {
id: string;
name: string;
role: string;
skills: string[];
status: PersonnelStatus;
currentLocation?: Location;
workingHours?: WorkingHours;
}
export type PersonnelStatus = 'available' | 'busy' | 'off_duty' | 'unavailable';
export interface WorkingHours {
start: string;
end: string;
breakDuration?: number;
}
export interface Machinery {
id: string;
name: string;
type: string;
model: string;
status: MachineryStatus;
currentLocation?: Location;
fuelLevel?: number;
operatingHours?: number;
maintenanceStatus?: MaintenanceStatus;
}
export type MachineryStatus =
| 'available'
| 'in_use'
| 'maintenance'
| 'broken'
| 'offline';
export type MaintenanceStatus = 'good' | 'due' | 'overdue' | 'unknown';
export interface Location {
latitude: number;
longitude: number;
accuracy?: number;
timestamp?: string;
}
export interface ResourceUsage {
id: string;
type: ResourceType;
name: string;
plannedQuantity: number;
actualQuantity: number;
unit: string;
cost?: number;
}
export interface QualityMetric {
id: string;
name: string;
value: number;
unit: string;
standard?: number;
tolerance?: number;
status: QualityStatus;
measuredAt: string;
measuredBy: string;
}
export type QualityStatus = 'excellent' | 'good' | 'acceptable' | 'poor' | 'failed';
export interface TaskIssue {
id: string;
type: IssueType;
severity: Severity;
description: string;
reportedAt: string;
reportedBy: string;
status: IssueStatus;
resolvedAt?: string;
resolvedBy?: string;
resolution?: string;
}
export type IssueType =
| 'equipment_failure'
| 'weather'
| 'resource_shortage'
| 'quality_issue'
| 'safety_incident'
| 'other';
export type Severity = 'low' | 'medium' | 'high' | 'critical';
export type IssueStatus = 'open' | 'in_progress' | 'resolved' | 'closed';
export interface TaskPhoto {
id: string;
url: string;
thumbnail?: string;
description?: string;
takenAt: string;
takenBy: string;
location?: Location;
tags?: string[];
}
export interface TaskAlert {
id: string;
taskId: string;
type: AlertType;
severity: Severity;
message: string;
triggeredAt: string;
acknowledgedAt?: string;
acknowledgedBy?: string;
resolvedAt?: string;
resolvedBy?: string;
}
export type AlertType =
| 'delay'
| 'resource_shortage'
| 'quality_issue'
| 'safety_alert'
| 'equipment_issue'
| 'weather_warning';
这个结构为 FarmingOperation 模块提供了完整的页面组织架构,涵盖了农事计划、任务管理、执行监控等核心功能,每个页面都包含完整的组件拆分和类型定义。