import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' // 表单校验 export const SpectrumRules = reactive({ }) export const Spectrum = useCrudSchemas(reactive([ // { // label: '主键、自增', // field: 'id', // sort: 'custom', // isForm: false, // }, // { // label: '批次号', // field: 'batchNo', // sort: 'custom', // isSearch: true, // table: { // width: 150 // } // }, { label: '炉批号(批号)', field: 'lpNo', sort: 'custom', isSearch: true, table: { width: 150 } }, { label: '送样单位', field: 'syCompany', sort: 'custom', isSearch: false, table: { width: 150 } }, { label: '标准', field: 'standard', sort: 'custom', isSearch: false, table: { width: 150 } }, { label: '材质', field: 'cz', sort: 'custom', isSearch: false, table: { width: 150 } }, { label: '规格', field: 'specsNo', sort: 'custom', isSearch: false, table: { width: 150 } }, { label: '实验人', field: 'testUser', sort: 'custom', isSearch: true, table: { width: 150 }, dictType: DICT_TYPE.LAB_USER_TEST_TYPE, dictClass: 'number' }, { label: '实验日期', field: 'oprDate', sort: 'custom', formatter: dateFormatter, isSearch: false, search: { component: 'DatePicker', componentProps: { valueFormat: 'YYYY-MM-DD HH:mm:ss', type: 'daterange', defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] } }, form: { component: 'DatePicker', componentProps: { type: 'datetime', valueFormat: 'x' } }, table: { width: 200 } }, { label: '原材料厂家', field: 'yclSupplier', sort: 'custom', isSearch: false, table: { width: 180 } }, // { // label: '炉号', // field: 'deviceNo', // sort: 'custom', // isSearch: false, // }, { label: '任务', field: 'task', sort: 'custom', isSearch: false, table: { width: 150 } }, { label: '任务类型', field: 'taskType', sort: 'custom', isSearch: false, table: { width: 150 } }, // { // label: '预留', // field: 'sid1', // sort: 'custom', // isSearch: false, // }, { label: '类型', field: 'type', sort: 'custom', isSearch: false, }, { label: 'C', field: 'cfC', sort: 'custom', isSearch: false, }, { label: 'Si', field: 'cfSi', sort: 'custom', isSearch: false, }, { label: 'Mn', field: 'cfMn', sort: 'custom', isSearch: false, }, { label: 'P', field: 'cfP', sort: 'custom', isSearch: false, }, { label: 'S', field: 'cfS', sort: 'custom', isSearch: false, }, { label: 'Cr', field: 'cfCr', sort: 'custom', isSearch: false, }, { label: 'Mo', field: 'cfMo', sort: 'custom', isSearch: false, }, { label: 'Ni', field: 'cfNi', sort: 'custom', isSearch: false, }, { label: 'V', field: 'cfV', sort: 'custom', isSearch: false, }, { label: 'Al', field: 'cfAl', sort: 'custom', isSearch: false, }, { label: 'Cu', field: 'cfCu', sort: 'custom', isSearch: false, }, { label: 'Ti', field: 'cfTi', sort: 'custom', isSearch: false, }, { label: 'W', field: 'cfW', sort: 'custom', isSearch: false, }, { label: 'B', field: 'cfB', sort: 'custom', isSearch: false, }, { label: 'Fe', field: 'cfFe', sort: 'custom', isSearch: false, table: { width: 150 } }, { label: 'Nb', field: 'cfNb', sort: 'custom', isSearch: false, }, { label: '审核状态', field: 'auditStatus', sort: 'custom', isSearch: true, table: { width: 120, fixed: 'right' }, dictType: DICT_TYPE.LAB_AUDIT_STATUS, dictClass: 'number' }, { label: '数据采集时间', field: 'createTime', sort: 'custom', formatter: dateFormatter, isSearch: false, search: { component: 'DatePicker', componentProps: { valueFormat: 'YYYY-MM-DD HH:mm:ss', type: 'daterange', defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] } }, isForm: false, table: { width: 200, fixed: 'right' } }, { label: '操作', field: 'action', isForm: false, table: { width: 150, fixed: 'right' } } ]))