Files
xj-admin/src/views/system/messageRemind/SysMessageRemind.data.ts
T
2025-06-27 17:42:38 +08:00

109 lines
2.5 KiB
TypeScript

import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
//列表数据
export const columns: BasicColumn[] = [
{
title: '标题',
align: 'center',
dataIndex: 'title',
},
// {
// title: '内容',
// align: 'center',
// dataIndex: 'content',
// slots: 'htmlSlot',
// },
{
title: '类型',
align: 'center',
dataIndex: 'type_dictText',
},
{
title: '创建时间',
align: 'center',
dataIndex: 'createTime',
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
{
label: '标题',
field: 'title',
component: 'Input',
},
{
label: '类型',
field: 'type',
component: 'JDictSelectTag',
componentProps: {
dictCode: 'message_remind',
},
},
];
//表单数据
export const formSchema: FormSchema[] = [
// {
// label: '用户id',
// field: 'userId',
// component: 'Input',
// },
{
label: '类型',
field: 'type',
required: true,
component: 'JDictSelectTag',
componentProps: {
dictCode: 'message_remind',
},
},
{
label: '用户姓名',
field: 'userName',
component: 'Input',
required: ({ values }): boolean => values.type != '1',
// componentProps: ({ formModel, schema }) => {
// schema.required = formModel.type == '1';
// },
componentProps: {
placeholder: '请选择用户',
},
// ifShow: ({ values }): boolean => values.type == '1',
},
{
label: '标题',
field: 'title',
component: 'Input',
required: true,
},
{
label: '',
field: 'userId',
component: 'Input',
show: false,
},
{
label: '内容',
field: 'content',
component: 'JEditor',
componentProps: {
showImageUpload: true,
},
required: true,
},
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
];
/**
* 流程表单调用这个方法获取formSchema
* @param _formData
*/
export function getBpmFormSchema(_formData): FormSchema[] {
// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
return formSchema;
}