Files
xj-admin/src/views/consult/notice/conNotice.data.ts
T
weixin 91f2c612e8 update
1.更新im
2.修改bug
2025-07-09 17:31:51 +08:00

107 lines
2.4 KiB
TypeScript

import { BasicColumn, FormSchema } from '/@/components/Table';
//列表数据
export const columns: BasicColumn[] = [
{
title: '序号',
align: 'center',
width: 80,
customRender: ({ index }) => {
return index + 1;
},
},
{
title: '标题',
align: 'center',
dataIndex: 'title',
},
{
title: '咨询类型',
align: 'center',
dataIndex: 'noticeType_dictText',
},
{
title: '创建时间',
align: 'center',
dataIndex: 'createTime',
customRender: ({ text }): string => {
return !text ? '' : text.length > 10 ? text.substring(0, 10) : text;
},
},
{
title: '状态',
align: 'center',
dataIndex: 'status',
customRender: ({ text }) => {
return text && text == '1' ? '启用' : '禁用';
},
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
{
label: '标题',
field: 'title',
component: 'Input',
},
{
label: '状态',
field: 'status',
component: 'JDictSelectTag',
componentProps: {
//@ts-ignore
options: [
{ label: '启用', value: '1' },
{ label: '禁用', value: '2' },
],
},
},
{
label: '咨询类型',
field: 'noticeType',
component: 'JDictSelectTag',
componentProps: {
//@ts-ignore
dictCode: 'notice_type',
},
},
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
{
label: '标题',
field: 'title',
component: 'Input',
required: true,
},
{
label: '咨询类型',
field: 'noticeType',
component: 'JDictSelectTag',
componentProps: {
//@ts-ignore
dictCode: 'notice_type',
},
required: true,
},
{
label: '咨询须知',
field: 'content',
component: 'JEditor',
required: true,
},
];
/**
* 流程表单调用这个方法获取formSchema
*/
export function getBpmFormSchema(): FormSchema[] {
// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
return formSchema;
}