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.
59 lines
1.1 KiB
59 lines
1.1 KiB
1 year ago
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
|
||
1 year ago
|
import * as DictTypeApi from '@/api/system/dict/dict.type'
|
||
|
|
||
1 year ago
|
|
||
|
// 表单校验
|
||
|
export const SelectedSetRules = reactive({
|
||
1 year ago
|
description: [required],
|
||
1 year ago
|
code: [required],
|
||
|
available: [required],
|
||
|
concurrencyStamp: [required]
|
||
|
})
|
||
|
|
||
|
export const SelectedSet = useCrudSchemas(reactive<CrudSchema[]>([
|
||
1 year ago
|
|
||
1 year ago
|
{
|
||
|
label: '编码',
|
||
|
field: 'code',
|
||
|
sort: 'custom',
|
||
1 year ago
|
isForm: false,
|
||
1 year ago
|
isSearch: true,
|
||
|
fixed: 'left'
|
||
1 year ago
|
},
|
||
|
{
|
||
|
label: '描述',
|
||
1 year ago
|
field: 'description',
|
||
1 year ago
|
sort: 'custom',
|
||
|
isSearch: true
|
||
|
},
|
||
1 year ago
|
{
|
||
|
label: '是否可用',
|
||
|
field: 'available',
|
||
|
sort: 'custom',
|
||
|
dictType: DICT_TYPE.TRUE_FALSE,
|
||
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
||
|
form: {
|
||
|
component: 'Switch',
|
||
|
value: 'TRUE',
|
||
|
componentProps: {
|
||
|
inactiveValue: 'FALSE',
|
||
|
activeValue: 'TRUE'
|
||
|
}
|
||
|
},
|
||
|
table: {
|
||
|
width: 110
|
||
|
}
|
||
|
},
|
||
1 year ago
|
{
|
||
|
label: '操作',
|
||
|
field: 'action',
|
||
|
isForm: false,
|
||
|
table: {
|
||
|
width: 150,
|
||
|
fixed: 'right'
|
||
1 year ago
|
},
|
||
|
isTableForm: false,
|
||
|
isDetail: false
|
||
1 year ago
|
}
|
||
|
]))
|