Files
ss-crm-manage-web/src/views/Basic/WxRobot/index.data.js

63 lines
1.3 KiB
JavaScript
Raw Normal View History

2024-04-28 16:20:45 +08:00
// 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)