You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
2.2 KiB

1 year ago
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<CrudSchema[]>([
{
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
}
},
},
{
1 year ago
label: '来源字典',
field: 'sources',
1 year ago
sort: 'custom',
1 year ago
dictType: DICT_TYPE.EAM_MAINTENANCE_SOURCES,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: false,
1 year ago
isForm:false
},
{
label: '报修类型',
1 year ago
field: 'type',
1 year ago
sort: 'custom',
1 year ago
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: false,
1 year ago
isForm:false
},
{
label: '设备/工装编号',
1 year ago
field: 'equipmentCode',
1 year ago
sort: 'custom',
isSearch:false,
isForm:false
},
{
label: '设备/工装名称',
1 year ago
field: 'equipmentName',
1 year ago
sort: 'custom',
isSearch:false,
isForm:false
},
{
label: '故障时间',
1 year ago
field: 'faultTime',
formatter: dateFormatter,
1 year ago
sort: 'custom',
isSearch:false,
1 year ago
isForm:false,
detail:{
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}
1 year ago
},
{
label: '故障类型',
1 year ago
field: 'faultType',
1 year ago
sort: 'custom',
1 year ago
dictType: DICT_TYPE.FAILURE_REASON,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: false,
1 year ago
isForm:false
},
{
label: '创建人',
field: 'createTime',
sort: 'custom',
isSearch:false,
isForm:false
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
isSearch:false,
1 year ago
detail:{
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}
1 year ago
},
]))