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.

138 lines
2.8 KiB

import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const ApiMqErrorRules = reactive({
number: [required],
type: [required],
times: [required]
})
export const ApiMqError = useCrudSchemas(reactive<CrudSchema[]>([
{
9 months ago
label: '业务编号',
field: 'number',
sort: 'custom',
isSearch: true
},
{
label: '类型',
field: 'type',
sort: 'custom',
isSearch: true,
form: {
component: 'SelectV2'
}
},
{
label: '数据',
field: 'content',
sort: 'custom',
isSearch: true,
form: {
component: 'Editor',
componentProps: {
valueHtml: '',
height: 200
}
}
},
{
label: '执行次数',
field: 'times',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 1
},
search: {
component: 'InputNumber',
value: 1
}
},
9 months ago
{
label: '错误信息',
field: 'errorMsg',
sort: 'custom',
isSearch: true,
form: {
component: 'Editor',
componentProps: {
valueHtml: '',
height: 200
}
}
},
// {
// label: '是否可用',
// field: 'available',
// sort: 'custom',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string', // 默认都是字符串类型其他暂不考虑
// isSearch: true,
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// }
// },
// {
// label: '部门',
// field: 'departmentCode',
// sort: 'custom',
// isSearch: true
// },
{
label: '创建时间',
field: 'createTime',
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')]
}
},
isForm: false
},
// // {
// // label: '扩展属性',
// // field: 'extraProperties',
// // sort: 'custom',
// // isSearch: true
// // },
// // {
// // label: '地点ID',
// // field: 'siteId',
// // sort: 'custom',
// // isSearch: true
// // },
// {
// label: '乐观锁',
// field: 'concurrencyStamp',
// sort: 'custom',
// isSearch: true,
// form: {
// component: 'InputNumber',
// value: 0
// }
// },
9 months ago
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))