import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' // 表单校验 export const SamplingSchemeRules = reactive({ // available: [required], description: [required], }) export const SamplingScheme = useCrudSchemas(reactive([ { label: 'id', field: 'id', sort: 'custom', isTable: false, isForm: false, }, { label: '编码', field: 'code', sort: 'custom', isSearch: true, isForm: false, table: { fixed: 'left' } }, { label: '描述', field: 'description', sort: 'custom', isSearch: true, }, // { // label: '是否可用', // field: 'available', // sort: 'custom', // dictType: DICT_TYPE.TRUE_FALSE, // dictClass: 'string', // 默认都是字符串类型其他暂不考虑 // isSearch: true, // form: { // component: 'SelectV2' // }, // }, { label: '创建时间', field: 'createTime', sort: 'custom', formatter: dateFormatter, isForm: false, }, { label: '操作', field: 'action', isForm: false, table: { width: 150, fixed: 'right' } } ]))