dbsd_kczx/src/views/kc/kcXqxnHistory/KcXqxnHistory.data.ts

77 lines
1.5 KiB
TypeScript
Raw Normal View History

2023-06-13 17:09:05 +08:00
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: 'startTime',
customRender:({text}) =>{
return !text?"":(text.length>10?text.substr(0,10):text);
},
},
{
title: '结束时间',
align: "center",
dataIndex: 'endTime',
customRender:({text}) =>{
return !text?"":(text.length>10?text.substr(0,10):text);
},
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
{
label: "学期学年",
field: 'title',
component: 'Input',
colProps: {span: 6},
},
{
label: "开始时间",
field: "startTime",
component: 'RangePicker',
colProps: {span: 6},
},
{
label: "结束时间",
field: "endTime",
component: 'RangePicker',
colProps: {span: 6},
},
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '学期学年',
field: 'title',
component: 'Input',
},
{
label: '开始时间',
field: 'startTime',
component: 'DatePicker',
},
{
label: '结束时间',
field: 'endTime',
component: 'DatePicker',
},
// TODO 主键隐藏字段目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
];