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.
 
 
 

518 lines
7.6 KiB

import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import {getSamplingScheme} from "@/api/qms/aql";
// 表单校验
export const AqlRules = reactive({
code: [required],
inspectionQualification: [required],
sampleCharacterCode: [required],
sampleSize: [required],
// available: [required],
})
const samplingSchemeList = await getSamplingScheme()
export const Aql = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isTable: false,
isForm: false,
},
{
label: '采样方案编码',
field: 'code',
sort: 'custom',
isSearch: true,
form: {
component: 'Select',
componentProps: {
options: samplingSchemeList,
optionsAlias: {
labelField: 'description',
valueField: 'code'
},
}
},
table: {
width: 175,
fixed: 'left'
}
},
{
label: '检验严格性',
field: 'inspectionQualification',
sort: 'custom',
dictType: DICT_TYPE.INSPECTION_SEVERITY,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Select'
},
table: {
width: 130
}
},
{
label: '样本字码',
field: 'sampleCharacterCode',
sort: 'custom',
isSearch: true,
table: {
width: 110
}
},
{
label: '样本量',
field: 'sampleSize',
sort: 'custom',
table: {
width: 95
}
},
{
label: 'A0_010',
field: 'a0separator010',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R0_010',
field: 'r0separator010',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'A0_015',
field: 'a0separator015',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R0_015',
field: 'r0separator015',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'A0_025',
field: 'a0separator025',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R0_025',
field: 'r0separator025',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'A0_040',
field: 'a0separator040',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R0_040',
field: 'r0separator040',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'A0_065',
field: 'a0separator065',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R0_065',
field: 'r0separator065',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'A0_10',
field: 'a0separator10',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R0_10',
field: 'r0separator10',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'A0_15',
field: 'a0separator15',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R0_15',
field: 'r0separator15',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'A0_25',
field: 'a0separator25',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R0_25',
field: 'r0separator25',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'A0_40',
field: 'a0separator40',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R0_40',
field: 'r0separator40',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'A0_65',
field: 'a0separator65',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R0_65',
field: 'r0separator65',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'A1_0',
field: 'a1separator0',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R1_0',
field: 'r1separator0',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'A1_5',
field: 'a1separator5',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R1_5',
field: 'r1separator5',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'A2_5',
field: 'a2separator5',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R2_5',
field: 'r2separator5',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'A4_0',
field: 'a4separator0',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R4_0',
field: 'r4separator0',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'A6_5',
field: 'a6separator5',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R6_5',
field: 'r6separator5',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'A10',
field: 'a10',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R10',
field: 'r10',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'A15',
field: 'a15',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R15',
field: 'r15',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'A25',
field: 'a25',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R25',
field: 'r25',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'A40',
field: 'a40',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R40',
field: 'r40',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'A65',
field: 'a65',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R65',
field: 'r65',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'A100',
field: 'a100',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R100',
field: 'r100',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'A150',
field: 'a150',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R150',
field: 'r150',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'A250',
field: 'a250',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R250',
field: 'r250',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'A400',
field: 'a400',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R400',
field: 'r400',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'A650',
field: 'a650',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R650',
field: 'r650',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'A1000',
field: 'a1000',
sort: 'custom',
table: {
width: 105
}
},
{
label: 'R1000',
field: 'r1000',
sort: 'custom',
table: {
width: 105
}
},
// {
// label: '是否可用',
// field: 'available',
// sort: 'custom',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string', // 默认都是字符串类型其他暂不考虑
// form: {
// component: 'SelectV2'
// },
// },
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
table: {
width: 115
}
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))