From d1a8800a9bf4128813cdb854d8a839baa1968e63 Mon Sep 17 00:00:00 2001 From: aixianling Date: Wed, 8 Jan 2025 10:14:51 +0800 Subject: [PATCH] =?UTF-8?q?feat(AppBreedArchive):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E6=9F=A5=E8=AF=A2=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增免疫记录、治疗记录、淘汰记录、死亡记录、设备检测、贷款信息、保险信息等模块 -优化列表展示方式,使用 tabs进行分类展示 -调整列表列宽和对齐 --- .../xumu/AppBreedArchive/AppBreedArchive.vue | 2 +- project/xumu/AppBreedArchive/add.vue | 92 +++++++++++++++++-- project/xumu/AppBreedArchive/list.vue | 12 +-- 3 files changed, 93 insertions(+), 13 deletions(-) diff --git a/project/xumu/AppBreedArchive/AppBreedArchive.vue b/project/xumu/AppBreedArchive/AppBreedArchive.vue index e0a4781d..75edf900 100644 --- a/project/xumu/AppBreedArchive/AppBreedArchive.vue +++ b/project/xumu/AppBreedArchive/AppBreedArchive.vue @@ -17,7 +17,7 @@ export default { } }, created() { - this.dict.load("archiveStatus", "category", "variety") + this.dict.load("archiveStatus", "category", "variety", "insuranceType", "deathReason", "dataSources", "yesOrNo") } } diff --git a/project/xumu/AppBreedArchive/add.vue b/project/xumu/AppBreedArchive/add.vue index 9b0e2405..1a30090a 100644 --- a/project/xumu/AppBreedArchive/add.vue +++ b/project/xumu/AppBreedArchive/add.vue @@ -8,10 +8,78 @@ const columns = { {label: "称重时间", prop: "createTime"}, {label: "数据来源", prop: "source", dict: "dataSources"}, {label: "是否变更过", prop: "isUpdate", dict: "yesOrNo"}, + ], + immunityList: [ + {label: "序号", type: "index"}, + {label: "疫苗名称", prop: "vaccineName"}, + {label: "用药方式", prop: "method"}, + {label: "药量", prop: "dosage"}, + {label: "生产厂家", prop: "factory"}, + {label: "厂家批号", prop: "batchNumber"}, + {label: "免疫时间", prop: "immunityTime"}, + {label: "登记时间", prop: "createTime"}, + {label: "防疫员", prop: "userName"}, + ], + treatmentList: [ + {label: "序号", type: "index"}, + {label: "药品名称", prop: "drugName"}, + {label: "药量", prop: "dosage"}, + {label: "生产厂家", prop: "factory"}, + {label: "厂家批号", prop: "batchNumber"}, + {label: "疾病名称", prop: "diseaseName"}, + {label: "症状", prop: "symptom"}, + {label: "兽医", prop: "userName"}, + {label: "治疗时间", prop: "immunityTime"}, + {label: "登记时间", prop: "createTime"}, + ], + outList: [ + {label: "序号", type: "index"}, + {label: "养殖场", prop: "userName", format: (v, row) => `${[row.farmName, row.houseName, row.penName].join("-")}`}, + {label: "生物芯片耳标号", prop: "biochipEarNumber"}, + {label: "类别", prop: "category", dict: "category", width: 120}, + {label: "品种", prop: "variety", dict: "variety", width: 120}, + {label: "日龄(天)", prop: "age", width: 80}, + {label: "淘汰时间", prop: "outTime"}, + {label: "淘汰原因", prop: "reason"} + ], + deathList: [ + {label: "序号", type: "index"}, + {label: "养殖场", prop: "userName", format: (v, row) => `${[row.farmName, row.houseName, row.penName].join("-")}`}, + {label: "生物芯片耳标号", prop: "biochipEarNumber"}, + {label: "类别", prop: "category", dict: "category", width: 120}, + {label: "品种", prop: "variety", dict: "variety", width: 120}, + {label: "日龄(天)", prop: "age", width: 80}, + {label: "死亡时间", prop: "deathTime"}, + {label: "死亡原因", prop: "reason", dict: "deathReason", width: 80}, + {label: "登记时间", prop: "createTime"}, + {label: "操作人", prop: "userName", width: 100}, + ], + insuranceList: [ + {label: "序号", type: "index"}, + {label: "保险类型", prop: "insuranceType", dict: "insuranceType"}, + {label: "保单编号", prop: "orderNo"}, + ] +} +const forms = { + device: [ + {label: "当前温度", prop: "temperature"}, + {label: "温度状态", prop: "temperatureStatus", dict: "temperatureStatus"}, + {label: "运动状态", prop: "sportsSituation", dict: "sportsSituation"}, + {label: "在栏状态", prop: "status", dict: "archiveStatus"}, + ], + loan: [ + {label: "贷款合同编号", prop: "contractNo"}, ] } const navs = [ - {label: "体重记录", value: "weightList"} + {label: "体重记录", value: "weightList"}, + {label: "免疫记录", value: "immunityList"}, + {label: "治疗记录", value: "treatmentList"}, + {label: "淘汰记录", value: "outList"}, + {label: "死亡记录", value: "deathList"}, + {label: "设备检测", value: "device"}, + {label: "贷款信息", value: "loan"}, + {label: "保险信息", value: "insuranceList"}, ] export default { name: "baAdd", @@ -24,7 +92,7 @@ export default { return { detail: {detailList: []}, active: "weightList", - columns, navs + columns, navs, forms } }, computed: { @@ -46,7 +114,10 @@ export default { return id && this.instance.post("/api/report/getInfo", null, {params: {biochipEarNumber: id}}).then(res => { if (res?.data) { const detail = res.data - return this.detail = {detailList: [], ...detail} + Object.keys(columns).forEach(key => { + detail[key] = detail[key] || [] + }) + return this.detail = {...detail} } }) }, @@ -86,9 +157,18 @@ export default { - - - + + + + +
返回 diff --git a/project/xumu/AppBreedArchive/list.vue b/project/xumu/AppBreedArchive/list.vue index 0baae5b3..ae7f3256 100644 --- a/project/xumu/AppBreedArchive/list.vue +++ b/project/xumu/AppBreedArchive/list.vue @@ -3,16 +3,16 @@ import {mapState} from "vuex" const columns = [ {label: "序号", type: "index"}, - {label: "养殖户", prop: "userName"}, - {label: "养殖场", format: (v, row) => `${[row.farmName, row.houseName, row.penName].join("-")}`}, + {label: "养殖户", prop: "userName", width: 100}, + {label: "养殖场", format: (v, row) => `${[row.farmName, row.houseName, row.penName].join("-")}`, minWidth: 200}, {label: "生物芯片耳标号", prop: "biochipEarNumber"}, {label: "电子耳标号", prop: "biochipEarNumber"}, {label: "原厂耳标号", prop: "biochipEarNumber"}, {label: "入栏日期", prop: "createTime", width: 160}, - {label: "饲养时长(天)", prop: "days", width: 120}, - {label: "最新体重(公斤)", prop: "weight", width: 120}, - {label: "当前体温", prop: "temperatureStatus", dict: 'temperatureStatus'}, - {label: "运动情况", prop: "sportsSituation", dict: "sportsSituation"}, + {label: "饲养时长(天)", prop: "days", width: 100, align: 'right', headerAlign: 'center'}, + {label: "最新体重(公斤)", prop: "weight", width: 120, align: 'right', headerAlign: 'center'}, + // {label: "当前体温", prop: "temperatureStatus", dict: 'temperatureStatus'}, + // {label: "运动情况", prop: "sportsSituation", dict: "sportsSituation"}, ] export default { name: "baList",