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.

118 lines
2.2 KiB

11 months 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: 'id',
field: 'id',
sort: 'custom',
},
11 months ago
{
label: '经验标题',
field: 'name',
sort: 'custom',
isSearch: true,
},
{
label: '维修工单编号',
field: 'repairNumber',
sort: 'custom',
isSearch: true,
isForm: false,
},
{
label: '经验内容',
field: 'content',
sort: 'custom',
isSearch:false,
form: {
component: 'Input',
componentProps: {
type:'textarea',
valueHtml: '',
height: 200
}
},
},
{
11 months ago
label: '来源字典',
field: 'sources',
11 months ago
sort: 'custom',
11 months ago
dictType: DICT_TYPE.EAM_MAINTENANCE_SOURCES,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: false,
11 months ago
isForm:false
},
{
label: '报修类型',
11 months ago
field: 'type',
11 months ago
sort: 'custom',
11 months ago
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: false,
11 months ago
isForm:false
},
{
label: '设备/工装编号',
11 months ago
field: 'equipmentCode',
11 months ago
sort: 'custom',
isSearch:false,
isForm:false
},
{
label: '设备/工装名称',
11 months ago
field: 'equipmentName',
11 months ago
sort: 'custom',
isSearch:false,
isForm:false
},
{
label: '故障时间',
11 months ago
field: 'faultTime',
formatter: dateFormatter,
11 months ago
sort: 'custom',
isSearch:false,
11 months ago
isForm:false,
detail:{
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}
11 months ago
},
{
label: '故障类型',
11 months ago
field: 'faultType',
11 months ago
sort: 'custom',
11 months ago
isSearch: false,
11 months ago
isForm:false
},
{
label: '创建人',
field: 'createTime',
sort: 'custom',
isSearch:false,
isForm:false,
isTable:false,
isDetail:false
11 months ago
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
isSearch:false,
11 months ago
detail:{
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}
11 months ago
},
]))