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.

109 lines
2.0 KiB

import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const InterfaceInfoRules = reactive({
concurrencyStamp: [required],
})
export const InterfaceInfo = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '序号',
field: 'number',
sort: 'custom',
isSearch: true,
},
{
label: '接口类型',
field: 'interfaceType',
sort: 'custom',
isSearch: true,
form: {
component: 'SelectV2'
},
},
{
label: '接口名称',
field: 'interfaceName',
sort: 'custom',
isSearch: true,
},
{
label: '状态',
field: 'interfaceStatus',
dictType: DICT_TYPE.INTERFACE_STATUS,
dictClass: 'string',
sort: 'custom',
form: {
component: 'Radio'
},
},
{
label: '请求地址',
field: 'url',
sort: 'custom',
isSearch: true,
},
{
label: '请求参数',
field: 'reqBody',
sort: 'custom',
},
{
label: '返回结果',
field: 'respBody',
sort: 'custom',
},
{
label: '错误信息',
field: 'errorMsg',
sort: 'custom',
},
{
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',
isTable:false,
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
isTable:false,
sort: 'custom',
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))