From 27ffbd84a52631e0c85f82e4d5e88599fc243a7b Mon Sep 17 00:00:00 2001 From: wyt <414651037@qq.com> Date: Fri, 30 Jan 2026 16:12:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BE=8A=E5=8F=AA=E6=A1=A3?= =?UTF-8?q?=E6=A1=88=E6=98=BE=E7=A4=BA=E5=88=97=E5=8F=8A=E9=87=8D=E7=BD=AE?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E8=B0=83=E6=95=B4=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=88=97=E7=9A=84=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/fileManagement/sheep_file/index.vue | 134 +++++++++++++----- 1 file changed, 95 insertions(+), 39 deletions(-) diff --git a/src/views/fileManagement/sheep_file/index.vue b/src/views/fileManagement/sheep_file/index.vue index 86b3f10..70d9f2f 100644 --- a/src/views/fileManagement/sheep_file/index.vue +++ b/src/views/fileManagement/sheep_file/index.vue @@ -334,21 +334,6 @@ {{ parseTime(scope.row.weaningDate, '{y}-{m}-{d}') }} - - - - 受体id --> - - - + + + 母亲耳号 - 受体耳号 祖父耳号 @@ -1016,6 +1014,7 @@ 外祖父耳号 外祖母耳号 + 受体耳号 配种日期 配种类型 孕检日期 @@ -1038,10 +1037,11 @@ 入群日期 来源牧场 - 修改人 + + 羊只状态
@@ -1085,8 +1085,36 @@ const multiple = ref(true) const total = ref(0) const title = ref("") const columnDialogVisible = ref(false) +// const selectedColumns = ref([ +// 'id', 'bsManageTags', 'ranchId', 'drRanch', 'sheepfoldId', 'sheepfoldName', 'electronicTags', 'varietyId', 'variety', 'family', 'name', 'gender', 'birthday', 'dayAge', 'monthAge', 'parity', 'birthWeight', 'weaningDate', 'statusId', 'weaningWeight', 'currentWeight','weaningDayAge', 'weaningDailyGain','breedStatusId', 'breed', 'bsFatherId', 'fatherManageTags', 'bsMotherId', 'motherManageTags', 'receptorId', 'receptorManageTags', 'fatherFatherId', 'grandfatherManageTags', 'fatherMotherId', 'grandmotherManageTags', 'fatherId', 'maternalGrandfatherManageTags', 'motherId', 'maternalGrandmotherManageTags', 'matingDate', 'matingTypeId', 'pregDate', 'lambingDate', 'lambingDay', 'matingDay', 'gestationDay', 'expectedDate', 'postLambingDay', 'lactationDay', 'anestrousDay', 'matingCounts', 'matingTotal', 'miscarriageCounts', 'comment', 'controlled', 'body', 'breast', 'source', 'sourceDate', 'sourceRanchId', 'sourceRanch', 'updateBy', 'updateTime', 'createBy', 'createTime' +// ]) + +// 在 setup 中修改 selectedColumns 的默认值 const selectedColumns = ref([ - 'id', 'bsManageTags', 'ranchId', 'drRanch', 'sheepfoldId', 'sheepfoldName', 'electronicTags', 'varietyId', 'variety', 'family', 'name', 'gender', 'birthday', 'dayAge', 'monthAge', 'parity', 'birthWeight', 'weaningDate', 'statusId', 'weaningWeight', 'currentWeight','weaningDayAge', 'weaningDailyGain','breedStatusId', 'breed', 'bsFatherId', 'fatherManageTags', 'bsMotherId', 'motherManageTags', 'receptorId', 'receptorManageTags', 'fatherFatherId', 'grandfatherManageTags', 'fatherMotherId', 'grandmotherManageTags', 'fatherId', 'maternalGrandfatherManageTags', 'motherId', 'maternalGrandmotherManageTags', 'matingDate', 'matingTypeId', 'pregDate', 'lambingDate', 'lambingDay', 'matingDay', 'gestationDay', 'expectedDate', 'postLambingDay', 'lactationDay', 'anestrousDay', 'matingCounts', 'matingTotal', 'miscarriageCounts', 'comment', 'controlled', 'body', 'breast', 'source', 'sourceDate', 'sourceRanchId', 'sourceRanch', 'updateBy', 'updateTime', 'createBy', 'createTime' + 'bsManageTags', // 耳号 + 'drRanch', // 牧场名称 + 'sheepfoldName', // 羊舍名称 + 'electronicTags', // 电子耳号 + 'variety', // 品种 + 'family', //家系 + 'name', // 羊只类型 + 'gender', // 性别 + 'birthday', // 出生日期 + 'dayAge', // 日龄 + 'monthAge', //月龄 + 'parity', //胎次 + 'birthWeight', //出生体重 + 'weaningDate', //断奶日期 + 'weaningWeight',//断奶体重 + 'currentWeight', // 当前体重 + 'breed', // 繁殖状态 + 'fatherManageTags', // 父亲耳号 + 'motherManageTags', // 母亲耳号 + 'grandfatherManageTags',//祖父 + 'grandmotherManageTags',//祖母 + 'maternalGrandfatherManageTags',//外祖父 + 'maternalGrandmotherManageTags',//外祖母 + 'comment'//备注 ]) const isAllSelected = ref(false) const columns = reactive({ @@ -1380,10 +1408,38 @@ function confirmColumnSettings() { columnDialogVisible.value = false } -// 重置列设置 +// 修改重置函数 function resetColumnSettings() { + // 只重置为默认的核心字段 selectedColumns.value = [ - 'id', 'bsManageTags', 'ranchId', 'drRanch', 'sheepfoldId', 'sheepfoldName', 'electronicTags', 'varietyId', 'variety', 'family', 'name', 'gender', 'birthday', 'dayAge', 'monthAge', 'parity', 'birthWeight', 'weaningDate', 'statusId', 'weaningWeight', 'currentWeight','weaningDayAge', 'weaningDailyGain','breedStatusId', 'breed', 'bsFatherId', 'fatherManageTags', 'bsMotherId', 'motherManageTags', 'receptorId', 'receptorManageTags', 'fatherFatherId', 'grandfatherManageTags', 'fatherMotherId', 'grandmotherManageTags', 'fatherId', 'maternalGrandfatherManageTags', 'motherId', 'maternalGrandmotherManageTags', 'matingDate', 'matingTypeId', 'pregDate', 'lambingDate', 'lambingDay', 'matingDay', 'gestationDay', 'expectedDate', 'postLambingDay', 'lactationDay', 'anestrousDay', 'matingCounts', 'matingTotal', 'miscarriageCounts', 'comment', 'controlled', 'body', 'breast', 'source', 'sourceDate', 'sourceRanchId', 'sourceRanch', 'updateBy', 'updateTime', 'createBy', 'createTime' + 'bsManageTags', // 耳号 + 'drRanch', // 牧场名称 + 'sheepfoldName', // 羊舍名称 + 'electronicTags', // 电子耳号 + 'variety', // 品种 + 'family', //家系 + 'name', // 羊只类型 + 'gender', // 性别 + 'birthday', // 出生日期 + 'dayAge', // 日龄 + 'monthAge', //月龄 + 'parity', //胎次 + 'birthWeight', //出生体重 + 'weaningDate', //断奶日期 + 'weaningWeight',//断奶体重 + 'currentWeight', // 当前体重 + 'breed', // 繁殖状态 + 'fatherManageTags', // 父亲耳号 + 'motherManageTags', // 母亲耳号 + 'grandfatherManageTags',//祖父 + 'grandmotherManageTags',//祖母 + 'maternalGrandfatherManageTags',//外祖父 + 'maternalGrandmotherManageTags',//外祖母 + 'comment'//备注 + + + + ] updateColumnVisibility() localStorage.setItem('selectedColumns', JSON.stringify(selectedColumns.value))