feat: 时间段选择器拓展
This commit is contained in:
@@ -5,6 +5,7 @@ import type { SystemNotifyTemplateApi } from '#/api/system/notify/template';
|
||||
import { z } from '#/adapter/form';
|
||||
import { CommonStatusEnum } from '#/utils/constants';
|
||||
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
||||
import { rangePickerExtend } from '#/utils/TimeUtils';
|
||||
|
||||
/** 新增/修改的表单 */
|
||||
export function useFormSchema(): VbenFormSchema[] {
|
||||
@@ -139,6 +140,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
component: 'RangePicker',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
...rangePickerExtend(),
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -3,8 +3,9 @@ import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
import type { SystemRoleApi } from '#/api/system/role';
|
||||
|
||||
import { z } from '#/adapter/form';
|
||||
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
||||
import { CommonStatusEnum, SystemDataScopeEnum } from '#/utils/constants';
|
||||
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
||||
import { rangePickerExtend } from '#/utils/TimeUtils';
|
||||
|
||||
/** 新增/修改的表单 */
|
||||
export function useFormSchema(): VbenFormSchema[] {
|
||||
@@ -173,6 +174,10 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
fieldName: 'createTime',
|
||||
label: '创建时间',
|
||||
component: 'RangePicker',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
...rangePickerExtend(),
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
@@ -254,9 +259,9 @@ export function useGridColumns<T = SystemRoleApi.SystemRole>(
|
||||
{
|
||||
code: 'assign-menu',
|
||||
text: '菜单权限',
|
||||
}
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import type { SystemSmsChannelApi } from '#/api/system/sms/channel';
|
||||
import { z } from '#/adapter/form';
|
||||
import { CommonStatusEnum } from '#/utils/constants';
|
||||
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
||||
import { rangePickerExtend } from '#/utils/TimeUtils';
|
||||
|
||||
/** 新增/修改的表单 */
|
||||
export function useFormSchema(): VbenFormSchema[] {
|
||||
@@ -54,7 +55,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
component: 'Textarea',
|
||||
componentProps: {
|
||||
placeholder: '请输入备注',
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'apiKey',
|
||||
@@ -71,7 +72,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
placeholder: '请输入短信 API 的密钥',
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'callbackUrl',
|
||||
@@ -79,7 +80,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
placeholder: '请输入短信发送回调 URL',
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
@@ -94,7 +95,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
placeholder: '请输入短信签名',
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'code',
|
||||
@@ -116,12 +117,12 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
},
|
||||
},
|
||||
{
|
||||
// TODO @芋艿:怎么解决范围检索
|
||||
fieldName: 'createTime',
|
||||
label: '创建时间',
|
||||
component: 'RangePicker',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
...rangePickerExtend(),
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -4,6 +4,7 @@ import type { SystemSmsLogApi } from '#/api/system/sms/log';
|
||||
|
||||
import { getSimpleSmsChannelList } from '#/api/system/sms/channel';
|
||||
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
||||
import { rangePickerExtend } from '#/utils/TimeUtils';
|
||||
|
||||
/** 列表的搜索表单 */
|
||||
export function useGridFormSchema(): VbenFormSchema[] {
|
||||
@@ -49,12 +50,12 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
},
|
||||
},
|
||||
{
|
||||
// TODO @芋艿:怎么解决范围检索
|
||||
fieldName: 'sendTime',
|
||||
label: '发送时间',
|
||||
component: 'RangePicker',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
...rangePickerExtend(),
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -68,12 +69,12 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
},
|
||||
},
|
||||
{
|
||||
// TODO @芋艿:怎么解决范围检索
|
||||
fieldName: 'receiveTime',
|
||||
label: '接收时间',
|
||||
component: 'RangePicker',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
...rangePickerExtend(),
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user