修改枚举
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
import GenericMonitorList from '../../components/GenericMonitorList.vue';
|
||||
import { getPigSickLogs } from '../../api/monitor.js';
|
||||
import { formatRFC3339 } from '../../utils/format.js';
|
||||
import { PigBatchSickPigReasonType, PigBatchSickPigTreatmentLocation } from '../../enums.js';
|
||||
|
||||
// 适配通用组件的 fetchData prop
|
||||
const fetchPigSickLogs = async (params) => {
|
||||
@@ -47,15 +48,7 @@ const pigSickLogColumns = [
|
||||
dataIndex: 'reason',
|
||||
key: 'reason',
|
||||
filterType: 'select',
|
||||
filterOptions: [
|
||||
{ text: '患病', value: '患病' },
|
||||
{ text: '康复', value: '康复' },
|
||||
{ text: '死亡', value: '死亡' },
|
||||
{ text: '淘汰', value: '淘汰' },
|
||||
{ text: '转入', value: '转入' },
|
||||
{ text: '转出', value: '转出' },
|
||||
{ text: '其他', value: '其他' },
|
||||
],
|
||||
filterOptions: Object.values(PigBatchSickPigReasonType).map(value => ({ text: value, value: value })),
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
@@ -63,10 +56,7 @@ const pigSickLogColumns = [
|
||||
dataIndex: 'treatment_location',
|
||||
key: 'treatment_location',
|
||||
filterType: 'select',
|
||||
filterOptions: [
|
||||
{ text: '原地治疗', value: '原地治疗' },
|
||||
{ text: '病猪栏治疗', value: '病猪栏治疗' },
|
||||
],
|
||||
filterOptions: Object.values(PigBatchSickPigTreatmentLocation).map(value => ({ text: value, value: value })),
|
||||
minWidth: 130,
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user