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