import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' import * as DictTypeApi from '@/api/system/dict/dict.type' // 表单校验 export const SelectedProjectRules = reactive({ code: [required], // dictionaryTypeAndCode: [required], estimateCode: [required], defectLevel: [required], dictionaryValue: [required] }) export const SelectedProject = useCrudSchemas(reactive([ { label: '编码', field: 'code', sort: 'custom', isTableForm: false, isSearch: true, fixed: 'left', form: { componentProps:{ disabled:true } } }, { label: '字典项', field: 'dictionaryValue', sort: 'custom', isSearch: true, isTableForm: true, isDetail: true, isTable: true, isForm: true, }, { label: '评估代码', field: 'estimateCode', sort: 'custom', isSearch: true, dictType: DICT_TYPE.EVALUATION_CODE, dictClass: 'string', tableForm: { type: 'Select', }, form: { component: 'Select', } }, // { // label: '缺陷级别', // field: 'defectLevel', // sort: 'custom', // isSearch: true, // dictType: DICT_TYPE.DEFECT_LEVEL, // dictClass: 'string', // tableForm: { // type: 'Select', // }, // form: { // component: 'Select', // } // }, { label: '操作', field: 'action', isForm: false, table: { width: 150, fixed: 'right' }, isTableForm: false, } ]))