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.
110 lines
1.9 KiB
110 lines
1.9 KiB
1 year ago
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
|
||
|
import { dateFormatter } from '@/utils/formatTime'
|
||
|
|
||
|
// 表单校验
|
||
|
export const HolidayRules = reactive({
|
||
|
})
|
||
|
|
||
|
export const Holiday = useCrudSchemas(reactive<CrudSchema[]>([
|
||
|
{
|
||
|
label: '主键',
|
||
|
field: 'id',
|
||
|
sort: 'custom',
|
||
|
isForm: false,
|
||
|
},
|
||
|
|
||
|
|
||
|
{
|
||
|
label: 'KEY',
|
||
|
field: 'keyDate',
|
||
|
sort: 'custom',
|
||
|
isSearch: false,
|
||
|
isTable:false,
|
||
|
isForm:false
|
||
|
},
|
||
|
{
|
||
|
label: '节日名称',
|
||
|
field: 'holidayName',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '节日类型;',
|
||
|
field: 'holidayType',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
dictType: DICT_TYPE.HOLIDAY_TYPE,
|
||
|
dictClass: 'string',
|
||
|
form: {
|
||
|
component: 'Select',
|
||
|
value: '1',
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
label: '节日年份',
|
||
|
field: 'holidayYear',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
isForm:false,
|
||
|
isTable:true,
|
||
|
form: {
|
||
|
component: 'InputNumber',
|
||
|
value: '2023',
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
label: '节日日期',
|
||
|
field: 'holidayDate',
|
||
|
sort: 'custom',
|
||
|
formatter: dateFormatter,
|
||
|
isSearch: true,
|
||
|
search: {
|
||
|
component: 'DatePicker',
|
||
|
componentProps: {
|
||
|
type: 'date',
|
||
|
valueFormat: 'YYYY-MM-DD',
|
||
|
}
|
||
|
},
|
||
|
form: {
|
||
|
component: 'DatePicker',
|
||
|
componentProps: {
|
||
|
type: 'date',
|
||
|
valueFormat: 'x'
|
||
|
}
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
label: '状态',
|
||
|
field: 'status',
|
||
|
sort: 'custom',
|
||
|
dictType: DICT_TYPE.QUALIFY_STATUS,
|
||
|
dictClass: 'string',
|
||
|
isForm: true,
|
||
|
isSearch: false,
|
||
|
isTable: true,
|
||
|
form: {
|
||
|
component: 'Switch',
|
||
|
value: '1',
|
||
|
componentProps: {
|
||
|
inactiveValue: '2',
|
||
|
activeValue: '1'
|
||
|
}
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
label: '备注',
|
||
|
field: 'remark',
|
||
|
sort: 'custom',
|
||
|
isSearch: false,
|
||
|
},
|
||
|
{
|
||
|
label: '操作',
|
||
|
field: 'action',
|
||
|
isForm: false,
|
||
|
table: {
|
||
|
width: 150,
|
||
|
fixed: 'right'
|
||
|
}
|
||
|
}
|
||
|
]))
|