|
@ -1,5 +1,6 @@ |
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
|
|
|
import {getSamplingScheme} from "@/api/qms/aql"; |
|
|
|
|
|
|
|
|
// 表单校验
|
|
|
// 表单校验
|
|
|
export const AqlRules = reactive({ |
|
|
export const AqlRules = reactive({ |
|
@ -9,7 +10,7 @@ export const AqlRules = reactive({ |
|
|
sampleSize: [required], |
|
|
sampleSize: [required], |
|
|
// available: [required],
|
|
|
// available: [required],
|
|
|
}) |
|
|
}) |
|
|
|
|
|
const samplingSchemeList = await getSamplingScheme() |
|
|
export const Aql = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
export const Aql = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
{ |
|
|
{ |
|
|
label: 'id', |
|
|
label: 'id', |
|
@ -23,6 +24,16 @@ export const Aql = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
field: 'code', |
|
|
field: 'code', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
|
|
|
|
form: { |
|
|
|
|
|
component: 'Select', |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
options: samplingSchemeList, |
|
|
|
|
|
optionsAlias: { |
|
|
|
|
|
labelField: 'description', |
|
|
|
|
|
valueField: 'code' |
|
|
|
|
|
}, |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
table: { |
|
|
table: { |
|
|
width: 175, |
|
|
width: 175, |
|
|
fixed: 'left' |
|
|
fixed: 'left' |
|
@ -36,7 +47,7 @@ export const Aql = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
|
isSearch: true, |
|
|
isSearch: true, |
|
|
form: { |
|
|
form: { |
|
|
component: 'SelectV2' |
|
|
component: 'Select' |
|
|
}, |
|
|
}, |
|
|
table: { |
|
|
table: { |
|
|
width: 130 |
|
|
width: 130 |
|
|