1263 lines
40 KiB
Markdown
1263 lines
40 KiB
Markdown
# 其他业务模块页面结构示例
|
|
|
|
基于 navigation.ts 中的剩余菜单,为 AgriculturalAsset、AICropModel、WaterFertilizerControl 和 CentralConfig 模块创建完整的页面目录结构。
|
|
|
|
## 1. AgriculturalAsset (农资资产) 模块
|
|
|
|
### 1.1 基础信息管理 (AssetBasic)
|
|
|
|
#### 1.1.1 农资档案管理 (AssetMaterials)
|
|
|
|
```
|
|
pages/AgriculturalAsset/Basic/AssetMaterials/
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
├── 📄 index.types.ts
|
|
├── 📂 hooks/
|
|
│ ├── 📄 usePageData.js
|
|
│ ├── 📄 usePageActions.js
|
|
│ └── 📄 useMaterialManagement.js
|
|
├── 📂 utils/
|
|
│ ├── 📄 pageHelpers.js
|
|
│ ├── 📄 materialUtils.js
|
|
│ └── 📄 inventoryUtils.js
|
|
├── 📂 constants.js
|
|
└── 📂 components/
|
|
├── 📂 MaterialForm/ # 农资表单组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 MaterialList/ # 农资列表组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 MaterialTable/ # 农资表格组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 MaterialCategory/ # 农资分类组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 SpecificationForm/ # 规格表单组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 MaterialSearch/ # 农资搜索组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
└── 📂 MaterialDetails/ # 农资详情组件
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
└── 📄 types.ts
|
|
```
|
|
|
|
#### 1.1.2 库存管理 (AssetInventory)
|
|
|
|
##### 1.1.2.1 入库管理 (InventoryIn)
|
|
|
|
```
|
|
pages/AgriculturalAsset/Inventory/InventoryIn/
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
├── 📄 index.types.ts
|
|
├── 📂 hooks/
|
|
│ ├── 📄 usePageData.js
|
|
│ ├── 📄 usePageActions.js
|
|
│ ├── 📄 useInventoryIn.js
|
|
│ └── 📄 useStockUpdate.js
|
|
├── 📂 utils/
|
|
│ ├── 📄 pageHelpers.js
|
|
│ ├── 📄 inventoryUtils.js
|
|
│ ├── 📄 stockUtils.js
|
|
│ └── 📄 validationUtils.js
|
|
├── 📂 constants.js
|
|
└── 📂 components/
|
|
├── 📂 InboundForm/ # 入库表单组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 MaterialSelector/ # 物料选择器组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 QuantityInput/ # 数量输入组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 BatchSelector/ # 批次选择器组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 ExpirationDate/ # 过期日期组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 QualityCheck/ # 质量检查组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 StorageLocation/ # 存储位置组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 InboundHistory/ # 入库历史组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
└── 📂 BatchPrint/ # 批次打印组件
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
└── 📄 types.ts
|
|
```
|
|
|
|
##### 1.1.2.2 出库管理 (InventoryOut)
|
|
|
|
```
|
|
pages/AgriculturalAsset/Inventory/InventoryOut/
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
├── 📄 index.types.ts
|
|
├── 📂 hooks/
|
|
│ ├── 📄 usePageData.js
|
|
│ ├── 📄 usePageActions.js
|
|
│ ├── 📄 useInventoryOut.js
|
|
│ └── 📄 useStockValidation.js
|
|
├── 📂 utils/
|
|
│ ├── 📄 pageHelpers.js
|
|
│ ├── 📄 outboundUtils.js
|
|
│ ├── 📄 stockUtils.js
|
|
│ └── 📄 validationUtils.js
|
|
├── 📂 constants.js
|
|
└── 📂 components/
|
|
├── 📂 OutboundForm/ # 出库表单组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 RequestSelector/ # 申请单选择器组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 StockChecker/ # 库存检查组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 BatchPicker/ # 批次选择器组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 FIFOSelector/ # 先进先出选择器组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 RecipientInfo/ # 领用人信息组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 OutboundReason/ # 出库原因组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 OutboundHistory/ # 出库历史组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
└── 📂 ReturnTracking/ # 退回跟踪组件
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
└── 📄 types.ts
|
|
```
|
|
|
|
##### 1.1.2.3 库存预警 (InventoryWarning)
|
|
|
|
```
|
|
pages/AgriculturalAsset/Inventory/InventoryWarning/
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
├── 📄 index.types.ts
|
|
├── 📂 hooks/
|
|
│ ├── 📄 usePageData.js
|
|
│ ├── 📄 usePageActions.js
|
|
│ ├── 📄 useInventoryWarning.js
|
|
│ └── 📄 useAlertManagement.js
|
|
├── 📂 utils/
|
|
│ ├── 📄 pageHelpers.js
|
|
│ ├── 📄 warningUtils.js
|
|
│ ├── 📄 thresholdUtils.js
|
|
│ └── 📄 notificationUtils.js
|
|
├── 📂 constants.js
|
|
└── 📂 components/
|
|
├── 📂 WarningDashboard/ # 预警仪表板组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 WarningList/ # 预警列表组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 ThresholdConfig/ # 阈值配置组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 WarningRule/ # 预警规则组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 AlertNotification/ # 告警通知组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 StockAnalysis/ # 库存分析组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 ExpirationWarning/ # 过期预警组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 SlowMovingWarning/ # 滞销预警组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
└── 📂 SuggestionEngine/ # 建议引擎组件
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
└── 📄 types.ts
|
|
```
|
|
|
|
## 2. AICropModel (AI模型) 模块
|
|
|
|
### 2.1 全域数据感知中心 (AIDataCenter)
|
|
|
|
#### 2.1.1 多源数据接入 (DataExternal)
|
|
|
|
```
|
|
pages/AICropModel/DataCenter/DataExternal/
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
├── 📄 index.types.ts
|
|
├── 📂 hooks/
|
|
│ ├── 📄 usePageData.js
|
|
│ ├── 📄 usePageActions.js
|
|
│ ├── 📄 useDataExternal.js
|
|
│ └── 📄 useDataConnector.js
|
|
├── 📂 utils/
|
|
│ ├── 📄 pageHelpers.js
|
|
│ ├── 📄 dataUtils.js
|
|
│ ├── 📄 connectorUtils.js
|
|
│ └── 📄 transformUtils.js
|
|
├── 📂 constants.js
|
|
└── 📂 components/
|
|
├── 📂 DataSourceManager/ # 数据源管理组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 DataConnector/ # 数据连接器组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 DataMapping/ # 数据映射组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 DataValidation/ # 数据验证组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 DataTransform/ # 数据转换组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 ScheduleConfig/ # 调度配置组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 DataPreview/ # 数据预览组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 ConnectionTest/ # 连接测试组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
└── 📂 DataQuality/ # 数据质量组件
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
└── 📄 types.ts
|
|
```
|
|
|
|
#### 2.1.2 物联设备数据接入 (DataIoT)
|
|
|
|
```
|
|
pages/AICropModel/DataCenter/DataIoT/
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
├── 📄 index.types.ts
|
|
├── 📂 hooks/
|
|
│ ├── 📄 usePageData.js
|
|
│ ├── 📄 usePageActions.js
|
|
│ ├── 📄 useIoTData.js
|
|
│ └── 📄 useDeviceManager.js
|
|
├── 📂 utils/
|
|
│ ├── 📄 pageHelpers.js
|
|
│ ├── 📄 iotUtils.js
|
|
│ ├── 📄 deviceUtils.js
|
|
│ └── 📄 protocolUtils.js
|
|
├── 📂 constants.js
|
|
└── 📂 components/
|
|
├── 📂 DeviceManager/ # 设备管理器组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 DeviceRegistration/ # 设备注册组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 SensorDataView/ # 传感器数据视图组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 DataStream/ # 数据流组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 ProtocolConfig/ # 协议配置组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 DataCollector/ # 数据采集器组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 RealtimeMonitor/ # 实时监控组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 DeviceStatus/ # 设备状态组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 AlertConfig/ # 告警配置组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
└── 📂 DataStorage/ # 数据存储组件
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
└── 📄 types.ts
|
|
```
|
|
|
|
### 2.2 模型接入集成 (AIModelIntegration)
|
|
|
|
#### 2.2.1 模型服务接入 (ModelServiceAccess)
|
|
|
|
```
|
|
pages/AICropModel/ModelIntegration/ModelServiceAccess/
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
├── 📄 index.types.ts
|
|
├── 📂 hooks/
|
|
│ ├── 📄 usePageData.js
|
|
│ ├── 📄 usePageActions.js
|
|
│ ├── 📄 useModelAccess.js
|
|
│ └── 📄 useAPITester.js
|
|
├── 📂 utils/
|
|
│ ├── 📄 pageHelpers.js
|
|
│ ├── 📄 modelUtils.js
|
|
│ ├── 📄 apiUtils.js
|
|
│ └── 📄 validationUtils.js
|
|
├── 📂 constants.js
|
|
└── 📂 components/
|
|
├── 📂 ModelRegistration/ # 模型注册组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 APIConnector/ # API连接器组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 AuthConfig/ # 认证配置组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 ModelTester/ # 模型测试器组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 RequestBuilder/ # 请求构建器组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 ResponseViewer/ # 响应查看器组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 ParameterConfig/ # 参数配置组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 ModelDocumentation/ # 模型文档组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 UsageStatistics/ # 使用统计组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
└── 📂 HealthMonitor/ # 健康监控组件
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
└── 📄 types.ts
|
|
```
|
|
|
|
### 2.3 智能决策生成 (AIDecisionGeneration)
|
|
|
|
#### 2.3.1 业务融合 (DecisionFusion)
|
|
|
|
```
|
|
pages/AICropModel/Decision/DecisionFusion/
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
├── 📄 index.types.ts
|
|
├── 📂 hooks/
|
|
│ ├── 📄 usePageData.js
|
|
│ ├── 📄 usePageActions.js
|
|
│ ├── 📄 useDecisionFusion.js
|
|
│ └── 📄 useRuleEngine.js
|
|
├── 📂 utils/
|
|
│ ├── 📄 pageHelpers.js
|
|
│ ├── 📄 fusionUtils.js
|
|
│ ├── 📄 ruleUtils.js
|
|
│ └── 📄 decisionUtils.js
|
|
├── 📂 constants.js
|
|
└── 📂 components/
|
|
├── 📂 FusionRuleBuilder/ # 融合规则构建器组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 ModelWeightConfig/ # 模型权重配置组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 DecisionTree/ # 决策树组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 LogicFlow/ # 逻辑流组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 ScenarioConfig/ # 场景配置组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📄 ConflictResolver/ # 冲突解决器组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📄 FusionResult/ # 融合结果组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📄 ConfidenceScore/ # 置信度评分组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📄 ExplanationEngine/ # 解释引擎组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
└── 📄 ValidationTester/ # 验证测试器组件
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
└── 📄 types.ts
|
|
```
|
|
|
|
## 3. WaterFertilizerControl (水肥控制) 模块
|
|
|
|
### 3.1 水肥机管理 (WaterFertilizerManagement)
|
|
|
|
#### 3.1.1 水肥机设备 (WFDevice)
|
|
|
|
```
|
|
pages/WaterFertilizerControl/WFManagement/WFDevice/
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
├── 📄 index.types.ts
|
|
├── 📂 hooks/
|
|
│ ├── 📄 usePageData.js
|
|
│ ├── 📄 usePageActions.js
|
|
│ ├── 📄 useWFDevice.js
|
|
│ └── 📄 useDeviceControl.js
|
|
├── 📂 utils/
|
|
│ ├── 📄 pageHelpers.js
|
|
│ ├── 📄 deviceUtils.js
|
|
│ ├── 📄 controlUtils.js
|
|
│ └── 📄 protocolUtils.js
|
|
├── 📂 constants.js
|
|
└── 📂 components/
|
|
├── 📂 DeviceList/ # 设备列表组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 DeviceForm/ # 设备表单组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 DeviceStatus/ # 设备状态组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 ControlPanel/ # 控制面板组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 ParameterDisplay/ # 参数显示组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 RemoteControl/ # 远程控制组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 ScheduleControl/ # 调度控制组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 DeviceMaintenance/ # 设备维护组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 AlertSettings/ # 告警设置组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
└── 📂 DeviceHistory/ # 设备历史组件
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
└── 📄 types.ts
|
|
```
|
|
|
|
#### 3.1.2 智能灌溉 (SmartIrrigation)
|
|
|
|
##### 3.1.2.1 智能灌溉 (AutoIrrigation)
|
|
|
|
```
|
|
pages/WaterFertilizerControl/Smart/AutoIrrigation/
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
├── 📄 index.types.ts
|
|
├── 📂 hooks/
|
|
│ ├── 📄 usePageData.js
|
|
│ ├── 📄 usePageActions.js
|
|
│ ├── 📄 useAutoIrrigation.js
|
|
│ └── 📄 useIrrigationStrategy.js
|
|
├── 📂 utils/
|
|
│ ├── 📄 pageHelpers.js
|
|
│ ├── 📄 irrigationUtils.js
|
|
│ ├── 📄 strategyUtils.js
|
|
│ └── 📄 calculationUtils.js
|
|
├── 📂 constants.js
|
|
└── 📂 components/
|
|
├── 📂 IrrigationControl/ # 灌溉控制组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 StrategyConfig/ # 策略配置组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 WeatherIntegration/ # 天气集成组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 SoilMoisture/ # 土壤湿度组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 CropWaterDemand/ # 作物需水量组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 IrrigationSchedule/ # 灌溉计划组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 WaterUsageAnalysis/ # 用水分析组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 EfficiencyCalculator/ # 效率计算器组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 AlertSystem/ # 告警系统组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
└── 📂 HistoricalData/ # 历史数据组件
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
└── 📄 types.ts
|
|
```
|
|
|
|
### 3.2 实时监测与预警 (MonitoringAlert)
|
|
|
|
#### 3.2.1 预警逻辑管理 (AlertLogic)
|
|
|
|
```
|
|
pages/WaterFertilizerControl/Monitoring/AlertLogic/
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
├── 📄 index.types.ts
|
|
├── 📂 hooks/
|
|
│ ├── 📄 usePageData.js
|
|
│ ├── 📄 usePageActions.js
|
|
│ ├── 📄 useAlertLogic.js
|
|
│ └── 📄 useRuleEngine.js
|
|
├── 📂 utils/
|
|
│ ├── 📄 pageHelpers.js
|
|
│ ├── 📄 alertUtils.js
|
|
│ ├── 📄 ruleUtils.js
|
|
│ └── 📄 conditionUtils.js
|
|
├── 📂 constants.js
|
|
└── 📂 components/
|
|
├── 📂 RuleBuilder/ # 规则构建器组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 ConditionBuilder/ # 条件构建器组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 ActionBuilder/ # 动作构建器组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 LogicFlow/ # 逻辑流组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 RuleList/ # 规则列表组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 RuleTest/ # 规则测试组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 AlertTemplate/ # 告警模板组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 PriorityConfig/ # 优先级配置组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 EscalationRules/ # 升级规则组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
└── 📂 RuleStatistics/ # 规则统计组件
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
└── 📄 types.ts
|
|
```
|
|
|
|
## 4. CentralConfig (中心配置) 模块
|
|
|
|
### 4.1 租户管理 (TenantManagement)
|
|
|
|
#### 4.1.1 企业审核 (EnterpriseAudit)
|
|
|
|
```
|
|
pages/CentralConfig/Tenant/EnterpriseAudit/
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
├── 📄 index.types.ts
|
|
├── 📂 hooks/
|
|
│ ├── 📄 usePageData.js
|
|
│ ├── 📄 usePageActions.js
|
|
│ ├── 📄 useEnterpriseAudit.js
|
|
│ └── 📄 useApprovalWorkflow.js
|
|
├── 📂 utils/
|
|
│ ├── 📄 pageHelpers.js
|
|
│ ├── 📄 auditUtils.js
|
|
│ ├── 📄 workflowUtils.js
|
|
│ └── 📄 validationUtils.js
|
|
├── 📂 constants.js
|
|
└── 📂 components/
|
|
├── 📂 AuditList/ # 审核列表组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 EnterpriseForm/ # 企业表单组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 DocumentUpload/ # 文档上传组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📄 DocumentReview/ # 文档审核组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📄 ApprovalProcess/ # 审批流程组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📄 AuditHistory/ # 审核历史组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📄 CommentsSection/ # 评论组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📄 StatusBadge/ # 状态标签组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📄 BulkActions/ # 批量操作组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
└── 📄 AuditReport/ # 审核报告组件
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
└── 📄 types.ts
|
|
```
|
|
|
|
#### 4.1.2 用户管理 (UserManagement)
|
|
|
|
##### 4.1.2.1 员工管理 (EmployeeManagement)
|
|
|
|
```
|
|
pages/CentralConfig/User/EmployeeManagement/
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
├── 📄 index.types.ts
|
|
├── 📂 hooks/
|
|
│ ├── 📄 usePageData.js
|
|
│ ├── 📄 usePageActions.js
|
|
│ ├── 📄 useEmployeeManagement.js
|
|
│ └── 📄 useUserValidation.js
|
|
├── 📂 utils/
|
|
│ ├── 📄 pageHelpers.js
|
|
│ ├── 📄 employeeUtils.js
|
|
│ ├── 📄 validationUtils.js
|
|
│ └── 📄 permissionUtils.js
|
|
├── 📂 constants.js
|
|
└── 📂 components/
|
|
├── 📂 EmployeeList/ # 员工列表组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 EmployeeForm/ # 员工表单组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 EmployeeProfile/ # 员工档案组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 DepartmentSelector/ # 部门选择器组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 PositionSelector/ # 职位选择器组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 ContactInfo/ # 联系信息组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 EmergencyContact/ # 紧急联系人组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 SkillsManager/ # 技能管理组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 PerformanceRecord/ # 绩效记录组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 AttendanceRecord/ # 考勤记录组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 SalaryInfo/ # 薪资信息组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
└── 📂 EmployeeStatus/ # 员工状态组件
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
└── 📄 types.ts
|
|
```
|
|
|
|
### 4.2 系统监控 (SystemMonitor)
|
|
|
|
#### 4.2.1 登录日志 (LoginLog)
|
|
|
|
```
|
|
pages/CentralConfig/Monitor/LoginLog/
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
├── 📄 index.types.ts
|
|
├── 📂 hooks/
|
|
│ ├── 📄 usePageData.js
|
|
│ ├── 📄 usePageActions.js
|
|
│ ├── 📄 useLoginLog.js
|
|
│ └── 📄 useLogAnalysis.js
|
|
├── 📂 utils/
|
|
│ ├── 📄 pageHelpers.js
|
|
│ ├── 📄 logUtils.js
|
|
│ ├── 📄 analysisUtils.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
|
|
├── 📂 SecurityAnalysis/ # 安全分析组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 LocationMap/ # 位置地图组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 DeviceFingerprint/ # 设备指纹组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 SessionManager/ # 会话管理组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 AlertDetection/ # 告警检测组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 LogExport/ # 日志导出组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
└── 📂 StatisticsDashboard/ # 统计仪表板组件
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
└── 📄 types.ts
|
|
```
|
|
|
|
#### 4.2.2 性能监控 (PerformanceMonitor)
|
|
|
|
```
|
|
pages/CentralConfig/Monitor/PerformanceMonitor/
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
├── 📄 index.types.ts
|
|
├── 📂 hooks/
|
|
│ ├── 📄 usePageData.js
|
|
│ ├── 📄 usePageActions.js
|
|
│ ├── 📄 usePerformanceMonitor.js
|
|
│ └── 📄 useRealtimeMetrics.js
|
|
├── 📂 utils/
|
|
│ ├── 📄 pageHelpers.js
|
|
│ ├── 📄 performanceUtils.js
|
|
│ ├── 📄 metricsUtils.js
|
|
│ └── 📄 alertUtils.js
|
|
├── 📂 constants.js
|
|
└── 📂 components/
|
|
├── 📂 PerformanceDashboard/ # 性能仪表板组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 SystemMetrics/ # 系统指标组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 CPUUsage/ # CPU使用率组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 MemoryUsage/ # 内存使用率组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 DiskUsage/ # 磁盘使用率组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 NetworkTraffic/ # 网络流量组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 ResponseTime/ # 响应时间组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 ErrorRate/ # 错误率组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 AlertThreshold/ # 告警阈值组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
├── 📂 PerformanceReport/ # 性能报告组件
|
|
│ ├── 📄 index.jsx
|
|
│ ├── 📄 index.css
|
|
│ └── 📄 types.ts
|
|
└── 📂 TrendAnalysis/ # 趋势分析组件
|
|
├── 📄 index.jsx
|
|
├── 📄 index.css
|
|
└── 📄 types.ts
|
|
```
|
|
|
|
## 5. 主要类型定义示例
|
|
|
|
### 5.1 农资资产类型 (AssetMaterials/index.types.ts)
|
|
|
|
```typescript
|
|
export interface MaterialRecord {
|
|
id: string;
|
|
name: string;
|
|
code: string;
|
|
category: MaterialCategory;
|
|
type: MaterialType;
|
|
unit: string;
|
|
specifications: MaterialSpecification[];
|
|
supplier: SupplierInfo;
|
|
manufacturer?: string;
|
|
brand?: string;
|
|
model?: string;
|
|
description?: string;
|
|
hazardLevel?: HazardLevel;
|
|
storageCondition?: StorageCondition;
|
|
shelfLife?: number;
|
|
unitPrice: number;
|
|
status: MaterialStatus;
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
}
|
|
|
|
export type MaterialCategory =
|
|
| 'fertilizer'
|
|
| 'pesticide'
|
|
| 'seed'
|
|
| 'feed'
|
|
| 'equipment'
|
|
| 'tool'
|
|
| 'other';
|
|
|
|
export type MaterialType =
|
|
| 'organic'
|
|
| 'chemical'
|
|
| 'biological'
|
|
| 'mechanical'
|
|
| 'digital';
|
|
|
|
export interface MaterialSpecification {
|
|
name: string;
|
|
value: string;
|
|
unit?: string;
|
|
required: boolean;
|
|
}
|
|
|
|
export interface SupplierInfo {
|
|
id: string;
|
|
name: string;
|
|
contact: string;
|
|
phone: string;
|
|
email: string;
|
|
address: string;
|
|
licenseNumber?: string;
|
|
certifications: string[];
|
|
}
|
|
|
|
export type HazardLevel = 'none' | 'low' | 'medium' | 'high' | 'extreme';
|
|
|
|
export interface StorageCondition {
|
|
temperature: {
|
|
min: number;
|
|
max: number;
|
|
unit: 'celsius' | 'fahrenheit';
|
|
};
|
|
humidity: {
|
|
min: number;
|
|
max: number;
|
|
};
|
|
ventilation: boolean;
|
|
lightProtection: boolean;
|
|
moistureProtection: boolean;
|
|
}
|
|
|
|
export type MaterialStatus = 'active' | 'inactive' | 'discontinued' | 'out_of_stock';
|
|
|
|
export interface StockRecord {
|
|
id: string;
|
|
materialId: string;
|
|
batchNumber: string;
|
|
quantity: number;
|
|
availableQuantity: number;
|
|
reservedQuantity: number;
|
|
unit: string;
|
|
location: StorageLocation;
|
|
manufactureDate?: string;
|
|
expirationDate?: string;
|
|
purchaseDate: string;
|
|
purchasePrice: number;
|
|
supplierId: string;
|
|
qualityStatus: QualityStatus;
|
|
lastChecked?: string;
|
|
notes?: string;
|
|
}
|
|
|
|
export interface StorageLocation {
|
|
warehouseId: string;
|
|
warehouseName: string;
|
|
area: string;
|
|
shelf: string;
|
|
position: string;
|
|
zone?: string;
|
|
}
|
|
|
|
export type QualityStatus = 'excellent' | 'good' | 'acceptable' | 'poor' | 'expired';
|
|
|
|
export interface MaterialFilters {
|
|
name?: string;
|
|
code?: string;
|
|
category?: MaterialCategory;
|
|
type?: MaterialType;
|
|
supplier?: string;
|
|
hazardLevel?: HazardLevel;
|
|
status?: MaterialStatus;
|
|
priceRange?: [number, number];
|
|
stockRange?: [number, number];
|
|
}
|
|
```
|
|
|
|
### 5.2 AI模型类型 (ModelServiceAccess/index.types.ts)
|
|
|
|
```typescript
|
|
export interface AIModel {
|
|
id: string;
|
|
name: string;
|
|
version: string;
|
|
description: string;
|
|
type: ModelType;
|
|
category: ModelCategory;
|
|
provider: ModelProvider;
|
|
apiConfig: APIConfig;
|
|
inputSchema: JSONSchema;
|
|
outputSchema: JSONSchema;
|
|
parameters: ModelParameter[];
|
|
capabilities: ModelCapability[];
|
|
limitations?: string[];
|
|
performance: PerformanceMetrics;
|
|
status: ModelStatus;
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
lastTested?: string;
|
|
}
|
|
|
|
export type ModelType =
|
|
| 'classification'
|
|
| 'regression'
|
|
| 'clustering'
|
|
| 'forecasting'
|
|
| 'recommendation'
|
|
| 'generation'
|
|
| 'detection'
|
|
| 'segmentation';
|
|
|
|
export type ModelCategory =
|
|
| 'crop_health'
|
|
| 'yield_prediction'
|
|
| 'pest_detection'
|
|
| 'weather_forecast'
|
|
| 'soil_analysis'
|
|
| 'irrigation_optimization'
|
|
| 'resource_allocation'
|
|
| 'decision_support';
|
|
|
|
export interface ModelProvider {
|
|
id: string;
|
|
name: string;
|
|
type: ProviderType;
|
|
contact: ContactInfo;
|
|
documentation?: string;
|
|
supportInfo?: SupportInfo;
|
|
}
|
|
|
|
export type ProviderType = 'internal' | 'external' | 'third_party' | 'open_source';
|
|
|
|
export interface ContactInfo {
|
|
email?: string;
|
|
phone?: string;
|
|
website?: string;
|
|
apiDocs?: string;
|
|
}
|
|
|
|
export interface SupportInfo {
|
|
email?: string;
|
|
phone?: string;
|
|
responseTime?: string;
|
|
availableHours?: string;
|
|
}
|
|
|
|
export interface APIConfig {
|
|
endpoint: string;
|
|
method: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
headers?: Record<string, string>;
|
|
authentication: AuthConfig;
|
|
rateLimit?: RateLimit;
|
|
timeout?: number;
|
|
retryConfig?: RetryConfig;
|
|
}
|
|
|
|
export interface AuthConfig {
|
|
type: 'none' | 'api_key' | 'oauth' | 'bearer' | 'basic';
|
|
credentials?: Record<string, string>;
|
|
tokenUrl?: string;
|
|
scopes?: string[];
|
|
}
|
|
|
|
export interface RateLimit {
|
|
requestsPerSecond?: number;
|
|
requestsPerMinute?: number;
|
|
requestsPerHour?: number;
|
|
requestsPerDay?: number;
|
|
}
|
|
|
|
export interface RetryConfig {
|
|
maxAttempts: number;
|
|
backoffStrategy: 'fixed' | 'exponential' | 'linear';
|
|
initialDelay: number;
|
|
maxDelay: number;
|
|
}
|
|
|
|
export interface JSONSchema {
|
|
type: string;
|
|
properties?: Record<string, JSONSchema>;
|
|
required?: string[];
|
|
items?: JSONSchema;
|
|
enum?: any[];
|
|
format?: string;
|
|
minimum?: number;
|
|
maximum?: number;
|
|
minLength?: number;
|
|
maxLength?: number;
|
|
pattern?: string;
|
|
}
|
|
|
|
export interface ModelParameter {
|
|
name: string;
|
|
type: ParameterType;
|
|
description: string;
|
|
required: boolean;
|
|
defaultValue?: any;
|
|
constraints?: ParameterConstraints;
|
|
validation?: ValidationRule[];
|
|
}
|
|
|
|
export type ParameterType = 'string' | 'number' | 'boolean' | 'array' | 'object';
|
|
|
|
export interface ParameterConstraints {
|
|
minimum?: number;
|
|
maximum?: number;
|
|
minLength?: number;
|
|
maxLength?: number;
|
|
pattern?: string;
|
|
enum?: any[];
|
|
format?: string;
|
|
}
|
|
|
|
export interface ValidationRule {
|
|
type: 'required' | 'format' | 'range' | 'pattern' | 'custom';
|
|
rule: string | Function;
|
|
message?: string;
|
|
}
|
|
|
|
export interface ModelCapability {
|
|
name: string;
|
|
description: string;
|
|
supported: boolean;
|
|
confidence?: number;
|
|
performance?: CapabilityPerformance;
|
|
}
|
|
|
|
export interface CapabilityPerformance {
|
|
accuracy?: number;
|
|
precision?: number;
|
|
recall?: number;
|
|
f1Score?: number;
|
|
latency?: number;
|
|
throughput?: number;
|
|
}
|
|
|
|
export interface PerformanceMetrics {
|
|
accuracy: number;
|
|
precision: number;
|
|
recall: number;
|
|
f1Score: number;
|
|
latency: number;
|
|
throughput: number;
|
|
availability: number;
|
|
errorRate: number;
|
|
lastUpdated: string;
|
|
}
|
|
|
|
export type ModelStatus = 'active' | 'inactive' | 'testing' | 'deprecated' | 'error';
|
|
|
|
export interface ModelTest {
|
|
id: string;
|
|
modelId: string;
|
|
name: string;
|
|
description?: string;
|
|
input: any;
|
|
expectedOutput?: any;
|
|
actualOutput: any;
|
|
success: boolean;
|
|
executionTime: number;
|
|
timestamp: string;
|
|
error?: string;
|
|
metrics?: TestMetrics;
|
|
}
|
|
|
|
export interface TestMetrics {
|
|
accuracy?: number;
|
|
confidence?: number;
|
|
processingTime?: number;
|
|
memoryUsage?: number;
|
|
resourceUtilization?: number;
|
|
}
|
|
|
|
export interface ModelFilters {
|
|
name?: string;
|
|
type?: ModelType;
|
|
category?: ModelCategory;
|
|
provider?: string;
|
|
status?: ModelStatus;
|
|
capabilities?: string[];
|
|
minAccuracy?: number;
|
|
maxLatency?: number;
|
|
}
|
|
```
|
|
|
|
这个综合文档为其他业务模块提供了完整的页面组织架构,每个模块都包含了详细的组件结构、类型定义和功能说明,严格遵循了开发规范,确保代码的可维护性和可扩展性。 |