import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' // 表单校验 export const RepairExperienceRules = reactive({ name: [required], repairNumber: [required], }) export const RepairExperience = useCrudSchemas(reactive([ { label: '经验标题', field: 'name', sort: 'custom', isSearch: true, }, { label: '维修工单编号', field: 'repairNumber', sort: 'custom', isSearch: true, isForm: false, }, { label: '经验内容', field: 'content', sort: 'custom', isTable:false, isSearch:false, form: { component: 'Input', componentProps: { type:'textarea', valueHtml: '', height: 200 } }, }, { label: '维修工单来源', field: 'repairNumber', sort: 'custom', isSearch:false, isForm:false }, { label: '报修类型', field: 'repairNumber', sort: 'custom', isSearch:false, isForm:false }, { label: '设备/工装编号', field: 'repairNumber', sort: 'custom', isSearch:false, isForm:false }, { label: '设备/工装名称', field: 'repairNumber', sort: 'custom', isSearch:false, isForm:false }, { label: '故障时间', field: 'repairNumber', sort: 'custom', isSearch:false, isForm:false }, { label: '故障类型', field: 'repairNumber', sort: 'custom', isSearch:false, isForm:false }, { label: '创建人', field: 'createTime', sort: 'custom', isSearch:false, isForm:false }, { label: '创建时间', field: 'createTime', sort: 'custom', formatter: dateFormatter, isForm: false, isSearch:false, }, { label: '操作', field: 'action', isForm: false, table: { width: 150, fixed: 'right' } } ]))