dbsd_kczx/src/views/zy/zyZyxx/ZyZyxx.data.ts

108 lines
2.0 KiB
TypeScript
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 {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '标题',
align: "center",
dataIndex: 'title'
},
{
title: '内容',
align: "center",
dataIndex: 'content'
},
{
title: '资源',
align: "center",
dataIndex: 'filePath',
slots: { customRender: 'fileSlot' },
},
{
title: '是否发布',
align: "center",
dataIndex: 'sffb_dictText'
},
];
//列表数据
export const columns2: BasicColumn[] = [
{
title: '标题',
align: "center",
dataIndex: 'title'
},
{
title: '内容',
align: "center",
dataIndex: 'content'
},
{
title: '资源',
align: "center",
dataIndex: 'filePath',
slots: { customRender: 'fileSlot' },
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
{
label: "标题",
field: 'title',
component: 'Input',
colProps: {span: 6},
},
{
label: "是否发布",
field: 'sffb',
component: 'JDictSelectTag',
componentProps:{
dictCode: "yn"
},
colProps: {span: 6},
},
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '标题',
field: 'title',
component: 'Input',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入标题!'},
];
},
},
{
label: '内容',
field: 'content',
component: 'InputTextArea',
},
{
label: '附件',
field: 'filePath',
component: 'JUpload',
componentProps:{
},
},
{
label: '是否发布',
field: 'sffb',
component: 'JDictSelectTag',
componentProps:{
dictCode: "yn"
},
},
// TODO 主键隐藏字段目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
];