22 changed files with 177 additions and 105 deletions
@ -0,0 +1,132 @@
@@ -0,0 +1,132 @@
|
||||
import { BasicColumn } from '/@/components/Table'; |
||||
import { FormSchema } from '/@/components/Table'; |
||||
|
||||
/** 表格列配置 */ |
||||
export const columns: BasicColumn[] = [ |
||||
{ |
||||
title: '名称', |
||||
dataIndex: 'userName' |
||||
}, |
||||
{ |
||||
title: '是否播放声音', |
||||
dataIndex: 'playSound', |
||||
customRender: ({record}) => { |
||||
return ~~record?.playSound === 0 ? '是' : '否'; |
||||
} |
||||
}, |
||||
{ |
||||
title: '是否震动', |
||||
dataIndex: 'playVibrate', |
||||
customRender: ({record}) => { |
||||
return ~~record?.playVibrate === 0 ? '是' : '否'; |
||||
} |
||||
}, |
||||
{ |
||||
title: '是否闪光', |
||||
dataIndex: 'playLights', |
||||
customRender: ({record}) => { |
||||
return ~~record?.playLights === 0 ? '是' : '否'; |
||||
} |
||||
}, |
||||
{ |
||||
title: '创建人', |
||||
dataIndex: 'createByName' |
||||
}, |
||||
{ |
||||
title: '创建时间', |
||||
dataIndex: 'createTime', |
||||
width: 200 |
||||
} |
||||
]; |
||||
|
||||
/** 搜索表单配置 */ |
||||
export const searchFormSchema: FormSchema[] = [ |
||||
{ |
||||
field: 'userName', |
||||
label: '名称', |
||||
component: 'Input', |
||||
componentProps: { |
||||
placeholder: '请输入名称', |
||||
}, |
||||
colProps: { span: 6 } |
||||
} |
||||
]; |
||||
|
||||
/** 表单配置 */ |
||||
export const formSchema: FormSchema[] = [ |
||||
{ |
||||
field: 'id', |
||||
label: 'ID', |
||||
component: 'Input', |
||||
show: false |
||||
}, |
||||
{ |
||||
field: 'toUserId', |
||||
label: '对方用户id', |
||||
component: 'Input', |
||||
show: false |
||||
}, |
||||
{ |
||||
field: 'fromUserId', |
||||
label: '发送方用户id', |
||||
component: 'Input', |
||||
show: false |
||||
}, |
||||
{ |
||||
field: 'userName', |
||||
label: '名称', |
||||
component: 'Input', |
||||
required: true, |
||||
componentProps: { |
||||
disabled: true |
||||
}, |
||||
}, |
||||
{ |
||||
field: 'playSound', |
||||
label: '是否播放声音', |
||||
component: 'RadioGroup', |
||||
required: true, |
||||
defaultValue: '0', |
||||
componentProps: { |
||||
options: [ |
||||
{ label: '是', value: '0' }, |
||||
{ label: '否', value: '1' } |
||||
] |
||||
}, |
||||
colProps: { |
||||
span: 12 |
||||
} |
||||
}, |
||||
{ |
||||
field: 'playVibrate', |
||||
label: '是否震动', |
||||
component: 'RadioGroup', |
||||
required: true, |
||||
defaultValue: '0', |
||||
componentProps: { |
||||
options: [ |
||||
{ label: '是', value: '0' }, |
||||
{ label: '否', value: '1' } |
||||
] |
||||
}, |
||||
colProps: { |
||||
span: 12 |
||||
} |
||||
}, |
||||
{ |
||||
field: 'playLights', |
||||
label: '是否闪光', |
||||
component: 'RadioGroup', |
||||
required: true, |
||||
defaultValue: '0', |
||||
componentProps: { |
||||
options: [ |
||||
{ label: '是', value: '0' }, |
||||
{ label: '否', value: '1' } |
||||
] |
||||
}, |
||||
colProps: { |
||||
span: 12 |
||||
} |
||||
}, |
||||
]; |
@ -1,71 +0,0 @@
@@ -1,71 +0,0 @@
|
||||
import { BasicColumn } from '/@/components/Table'; |
||||
import { FormSchema } from '/@/components/Table'; |
||||
|
||||
/** 表格列配置 */ |
||||
export const columns: BasicColumn[] = [ |
||||
{ |
||||
title: '发送方用户id', |
||||
dataIndex: 'fromPushId' |
||||
}, |
||||
{ |
||||
title: '对方用户id', |
||||
dataIndex: 'toPushId' |
||||
}, |
||||
{ |
||||
title: '创建人', |
||||
dataIndex: 'createByName' |
||||
}, |
||||
{ |
||||
title: '创建时间', |
||||
dataIndex: 'createTime', |
||||
width: 200 |
||||
} |
||||
]; |
||||
|
||||
/** 搜索表单配置 */ |
||||
export const searchFormSchema: FormSchema[] = [ |
||||
{ |
||||
field: 'fromPushId', |
||||
label: '发送方用户id', |
||||
component: 'Input', |
||||
componentProps: { |
||||
placeholder: '请输入发送方用户id', |
||||
}, |
||||
colProps: { span: 6 } |
||||
} |
||||
]; |
||||
|
||||
/** 表单配置 */ |
||||
export const formSchema: FormSchema[] = [ |
||||
{ |
||||
field: 'id', |
||||
label: 'ID', |
||||
component: 'Input', |
||||
show: false |
||||
}, |
||||
{ |
||||
field: 'type', |
||||
label: '白名单类型', |
||||
component: 'Input', |
||||
defaultValue: '1', |
||||
show: false |
||||
}, |
||||
{ |
||||
field: 'fromPushId', |
||||
label: '发送方用户id', |
||||
component: 'Input', |
||||
required: true, |
||||
colProps: { |
||||
span: 24 |
||||
} |
||||
}, |
||||
{ |
||||
field: 'toPushId', |
||||
label: '对方用户id', |
||||
component: 'Input', |
||||
required: true, |
||||
colProps: { |
||||
span: 24 |
||||
} |
||||
}, |
||||
]; |
Loading…
Reference in new issue