Files
ss-crm-manage-web/src/views/Basic/WxRobot/index.data.js
2024-04-28 16:20:45 +08:00

63 lines
1.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// import { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
const statusOptions = [
{ label: '发送成功', value: 1 },
{ label: '发送失败', value: 2 },
{ label: '排队中', value: 3 },
{ label: '微信端卡住', value: 4 }
]
// CrudSchemahttps://doc.iocoder.cn/vue3/crud-schema/
const crudSchemas = reactive([
{
label: '发送对象',
field: 'sendUser',
isSearch: true,
isTable: true
},
{
label: '发送内容',
field: 'content',
isSearch: false,
isTable: true
},
{
label: '发送状态',
field: 'status',
isSearch: true,
isTable: true,
search: {
component: 'Select',
api: () => statusOptions,
componentProps: {
optionsAlias: {
labelField: 'label',
valueField: 'value'
}
}
}
},
{
label: '发送时间',
field: 'createTime',
isSearch: true,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD'
},
search: {
component: 'DatePicker',
componentProps: {
type: 'daterange',
format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD',
startPlaceholder: '发送时间',
endPlaceholder: '发送时间'
}
}
}
])
export const { allSchemas } = useCrudSchemas(crudSchemas)