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.
|
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
|
|
|
|
import { dateFormatter } from '@/utils/formatTime'
|
|
|
|
|
|
|
|
// 表单校验
|
|
|
|
export const TableActionRelRules = reactive({
|
|
|
|
tableName: [required],
|
|
|
|
available: [required],
|
|
|
|
concurrencyStamp: [required]
|
|
|
|
})
|
|
|
|
|
|
|
|
export const TableActionRel = useCrudSchemas(reactive<CrudSchema[]>([
|
|
|
|
// {
|
|
|
|
// label: 'id',
|
|
|
|
// field: 'id',
|
|
|
|
// sort: 'custom',
|
|
|
|
// isForm: false,
|
|
|
|
// isSearch: false,
|
|
|
|
// isDetail: false,
|
|
|
|
// isTable: false,
|
|
|
|
// isTableForm: false,
|
|
|
|
// fixed: 'left'
|
|
|
|
// },
|
|
|
|
{
|
|
|
|
label: '表名',
|
|
|
|
field: 'tableName',
|
|
|
|
sort: 'custom',
|
|
|
|
dictType: DICT_TYPE.MESSAGE_NOTICE_TABLE,
|
|
|
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
|
|
isSearch: true,
|
|
|
|
form: {
|
|
|
|
component: 'SelectV2',
|
|
|
|
componentProps: {
|
|
|
|
filterable: true,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
search: {
|
|
|
|
component: 'SelectV2',
|
|
|
|
componentProps: {
|
|
|
|
filterable: true,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '动作',
|
|
|
|
field: 'act',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
isDetail: false,
|
|
|
|
dictType: DICT_TYPE.NOTICE_ACTION_TYPE,
|
|
|
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
|
|
form: {
|
|
|
|
component: 'SelectV2',
|
|
|
|
componentProps: {
|
|
|
|
filterable: true,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
search: {
|
|
|
|
component: 'SelectV2',
|
|
|
|
componentProps: {
|
|
|
|
filterable: true,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '动作',
|
|
|
|
field: 'name',
|
|
|
|
sort: 'custom',
|
|
|
|
isForm: false,
|
|
|
|
isSearch: false,
|
|
|
|
isDetail: true,
|
|
|
|
isTable: false,
|
|
|
|
isTableForm: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '是否可用',
|
|
|
|
field: 'available',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
dictType: DICT_TYPE.TRUE_FALSE,
|
|
|
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
|
|
form: {
|
|
|
|
component: 'SelectV2',
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '生效时间',
|
|
|
|
field: 'activeTime',
|
|
|
|
sort: 'custom',
|
|
|
|
formatter: dateFormatter,
|
|
|
|
isSearch: true,
|
|
|
|
search: {
|
|
|
|
component: 'DatePicker',
|
|
|
|
componentProps: {
|
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
|
|
type: 'daterange',
|
|
|
|
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
form: {
|
|
|
|
component: 'DatePicker',
|
|
|
|
componentProps: {
|
|
|
|
type: 'datetime',
|
|
|
|
valueFormat: 'x'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '失效时间',
|
|
|
|
field: 'expireTime',
|
|
|
|
sort: 'custom',
|
|
|
|
formatter: dateFormatter,
|
|
|
|
isSearch: true,
|
|
|
|
search: {
|
|
|
|
component: 'DatePicker',
|
|
|
|
componentProps: {
|
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
|
|
type: 'daterange',
|
|
|
|
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
form: {
|
|
|
|
component: 'DatePicker',
|
|
|
|
componentProps: {
|
|
|
|
type: 'datetime',
|
|
|
|
valueFormat: 'x'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '备注',
|
|
|
|
field: 'remark',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '操作',
|
|
|
|
field: 'action',
|
|
|
|
isForm: false,
|
|
|
|
table: {
|
|
|
|
width: 150,
|
|
|
|
fixed: 'right'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]))
|