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))