西藏巴青项目

草畜失衡预警前端技术方案.md 3.5KB

草畜失衡预警 — 前端技术方案

依据:同目录功能需求、技术方案;交互对齐牦牛疾病预警(只读列表 + 详情);字段 小驼峰


1. 页面与路由

说明
Vue 路径 ruoyi-ui/src/views/dataModel/grassLivestockImbalanceWarning/index.vue
组件名 GrassLivestockImbalanceWarning
菜单配置 组件路径:dataModel/grassLivestockImbalanceWarning/index
权限前缀 dataModel:grassLivestockImbalanceWarning:list\|query

本期 新增 / 修改 / 删除 / 同步;写入由家庭牧场、农牧户、养殖大户填报后端自动触发。


2. API 模块

说明
文件 ruoyi-ui/src/api/dataModel/grassLivestockImbalanceWarning.js
Base /dataModel/grassLivestockImbalanceWarning
方法 路径 说明
listGrassLivestockImbalanceWarning GET /list 分页;筛选见下
getGrassLivestockImbalanceWarning GET /{id} 详情

列表 Query

参数 说明
startDate / endDate 预警日期(yyyy-MM-dd
dataSource family_ranch / farmer_household / large_livestock_farmer
subjectName 主体名称模糊
pageNum / pageSize 分页(默认 20)

3. 页面结构

  1. 筛选:预警日期范围、数据来源、主体名称;搜索、重置。
  2. 列表:预警时间、数据来源、年、月、乡镇、村、主体、核定载畜量、年底存栏、预警信息、操作(查看)。
  3. 详情:只读分区;含业务键 sourceKey;载畜量/存栏带「绵羊单位」。

详情分区

分区 内容
基本信息 预警时间、数据来源、业务键、年月、乡镇村、主体名称
草畜失衡情况 核定载畜量、年底存栏、预警信息

4. 业务规则

规则 实现
只读 无增删改入口
日期筛选 startDate/endDate;开始晚于结束前端提示并阻断
来源文案 枚举映射中文/藏文标签,未知码原样展示
空值 展示「—」(dataModel.status.dash
排序 后端 alert_time DESC, id DESC

数据来源映射

dataSource 界面
family_ranch 家庭牧场
farmer_household 农牧户
large_livestock_farmer 养殖大户

5. 国际化

dataModel.grassLivestockImbalanceWarninglang/zh|bo/dataModel.js);页面 dmNs = 'grassLivestockImbalanceWarning',复用 dataModelLocaleMixindmT / dmCommon / formatWithUnit)。查看表单使用 dm-view-form


6. 联调说明

  1. 执行 sql/biz_grass_livestock_imbalance_warning.sql
  2. 菜单组件 dataModel/grassLivestockImbalanceWarning/index,权限见 §1。
  3. 验证:三处填报失衡后列表可见;按来源/主体/日期筛选;详情只读;恢复平衡或删除源记录后预警消失。

7. 文件清单

类型 路径
页面 ruoyi-ui/src/views/dataModel/grassLivestockImbalanceWarning/index.vue
API ruoyi-ui/src/api/dataModel/grassLivestockImbalanceWarning.js
i18n lang/zh/dataModel.jslang/bo/dataModel.jsgrassLivestockImbalanceWarning
前端技术方案 本文档

8. 修订记录

版本 说明
1.0 初版:只读列表 + 详情;来源三枚举;无手工写入