养殖产业数据 — 前端技术方案
与 doc/产业数据模型及服务/养殖产业数据/养殖产业数据前端技术方案.md 保持一致。字段 小驼峰,与接口一致。
1. 页面与路由
| 项 |
说明 |
| Vue 路径 |
ruoyi-ui/src/views/livestockIndustry/breedingIndustry/index.vue |
| 组件名 |
BreedingIndustry |
| 菜单配置 |
组件路径:livestockIndustry/breedingIndustry/index |
| 权限前缀 |
dataModel:breedingIndustry:query(查看与刷新共用) |
本期无表单增删改、无子路由。
2. API 模块
| 项 |
说明 |
| 文件 |
ruoyi-ui/src/api/livestockIndustry/breedingIndustry.js |
| Base |
/dataModel/breedingIndustry |
| 方法 |
HTTP |
说明 |
getBreedingDashboard |
GET |
/dashboard,Query:statYear(默认当前年)、可选 forceRefresh=true |
3. 页面结构(单页四块)
| 区块 |
组件建议 |
数据节点 |
| 工具栏 |
年份 el-select(默认当前年)+「刷新」 |
statYear |
| 产业总览 |
6 个指标卡片 |
data.overview |
| 牦牛存栏变动 |
公/母数字 + ECharts 折线 |
data.inventoryChange |
| 牦牛存栏结构 |
ECharts 双层饼图 |
data.yakInventoryStructure |
| 草场类型占比 |
可用/使用中数字 + 退化占比图 + 表格 |
data.grassland |
页眉展示 统计日 statDate、统计年 statYear。
4. 图表与展示规则
| 规则 |
实现 |
| 首次进入 |
mounted 调用 getBreedingDashboard({ statYear });默认当前年 |
| 刷新 |
forceRefresh=true;防重复点击 |
| 月趋势 |
所选年 1~填报最大月 |
| 存栏结构 |
yakInventoryStructure 双层饼(内环大类、外环细分) |
| 退化占比 |
degradationStats 固定 5 项 |
5. 国际化
| 项 |
说明 |
| 语言包 |
livestockIndustry.breedingIndustry |
| Mixin |
mixins/livestockIndustryLocaleMixin.js |
6. 权限与菜单
- 菜单进入需
dataModel:breedingIndustry:query。
- 无导出、同步、编辑按钮。