西藏巴青项目

实验室检测前端技术方案.md 3.4KB

实验室检测 — 前端技术方案

依据:实验室检测功能需求.md实验室检测技术方案.md;布局参考 breedingStandards/breedingManage/index.vue(双 el-card);请求/响应字段 小驼峰
后端 v1.1(检疫点):新增必填 quarantineStationId;列表筛选 quarantineStationId;下拉 GET /diseaseDetection/labDetection/quarantineStationOptions(仅正常运营检疫站);列表/详情回显 quarantineStationName。前端实现待补。


1. 页面与路由

说明
Vue 路径 ruoyi-ui/src/views/diseaseDetection/labDetection/index.vue
组件名 LabDetection
菜单配置 若依「菜单管理」组件路径:diseaseDetection/labDetection/index
权限标识 diseaseDetection:labDetection:list\|query\|add\|edit\|remove

2. API 模块

说明
文件 ruoyi-ui/src/api/diseaseDetection/labDetection.js
Base /diseaseDetection/labDetection
方法 HTTP 路径 说明
listLabDetection GET /list 分页;Query:pageNumpageSizesampleSource
getLabDetection GET /{id} 详情
addLabDetection POST / 新增(不传 detectionRate
updateLabDetection PUT / 修改(含 id
delLabDetection DELETE /{ids} 批量删除,逗号分隔

3. 页面结构

  1. 筛选区el-card):样本来源;搜索、重置、新增、批量删除。
  2. 列表区el-card):表格 + 分页;列含检测日期、样本来源、检测量/阳性(带「份」)、检出率(%)、创建时间。
  3. 新增/编辑弹窗testDatesampleSourcetestQuantitypositiveCount;检出率为 disabledel-input,随数量实时计算。
  4. 查看弹窗:只读展示全部字段及审计信息。

行内操作:查看、编辑、删除(无状态分支,任意记录均可操作)。


4. 枚举与检出率

字段 编码 i18n 键
样本来源 1~4 diseaseDetection.labDetection.sampleSource{n}

检出率展示:优先使用接口 detectionRate(比值 0~1);否则前端按 positiveCount / testQuantity 计算;格式 (ratio * 100).toFixed(2) + '%'testQuantity=0 时为 0.00%

表单校验:非负整数;positiveCount ≤ testQuantitytestQuantity=0positiveCount 必须为 0。


5. 国际化

说明
语言包 diseaseDetection.labDetectionzh / bodiseaseDetection.js
Mixin diseaseDetectionLocaleMixindata.ddNs = 'labDetection'

6. 样式与组件

  • 检测量、阳性检出数使用 dd-input-with-unitel-input-number + 后缀「份」),与共同富裕成果页单位输入风格一致。
  • el-card 布局与 epidemicReport/index.vue 对齐。

7. 联调说明

  1. 后端实现 实验室检测技术方案.md §3 及 biz_lab_detection 表。
  2. 配置菜单与五项按钮权限。
  3. 验证:检出率与库一致、阳性超量前端拦截、样本来源筛选、批量删除。
  4. 仓库若尚无 Java 模块,需先对接或 Mock 后再联调列表。

8. 修订记录

版本 说明
1.0 初版:列表 CRUD;检出率只读实时计算;双卡片布局