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.
76 lines
1.3 KiB
76 lines
1.3 KiB
12 months ago
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
|
||
|
import { dateFormatter } from '@/utils/formatTime'
|
||
|
|
||
|
// 表单校验
|
||
|
export const InspectionMethodRules = reactive({
|
||
|
code: [required],
|
||
|
status: [required],
|
||
|
available: [required],
|
||
|
})
|
||
|
|
||
|
export const InspectionMethod = useCrudSchemas(reactive<CrudSchema[]>([
|
||
|
{
|
||
|
label: 'id',
|
||
|
field: 'id',
|
||
|
sort: 'custom',
|
||
|
isTable: false,
|
||
|
isForm: false,
|
||
|
},
|
||
|
{
|
||
|
label: '编码',
|
||
|
field: 'code',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '描述',
|
||
|
field: 'describe',
|
||
|
sort: 'custom',
|
||
|
},
|
||
|
{
|
||
|
label: '版本',
|
||
|
field: 'version',
|
||
|
sort: 'custom',
|
||
|
},
|
||
|
{
|
||
|
label: '状态',
|
||
|
field: 'status',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
form: {
|
||
|
component: 'Radio'
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
label: '操作指导',
|
||
|
field: 'operationGuidance',
|
||
|
sort: 'custom',
|
||
|
},
|
||
|
{
|
||
|
label: '视频地址',
|
||
|
field: 'videoAddress',
|
||
|
sort: 'custom',
|
||
|
},
|
||
|
{
|
||
|
label: '是否可用',
|
||
|
field: 'available',
|
||
|
sort: 'custom',
|
||
|
},
|
||
|
{
|
||
|
label: '创建时间',
|
||
|
field: 'createTime',
|
||
|
sort: 'custom',
|
||
|
formatter: dateFormatter,
|
||
|
isForm: false,
|
||
|
},
|
||
|
{
|
||
|
label: '操作',
|
||
|
field: 'action',
|
||
|
isForm: false,
|
||
|
table: {
|
||
|
width: 150,
|
||
|
fixed: 'right'
|
||
|
}
|
||
|
}
|
||
|
]))
|