You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
2.2 KiB

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: 'annal_dictText'
},
{
title: '年度比赛',
align: "center",
dataIndex: 'annalComp_dictText'
},
{
title: '年度比赛项目',
align: "center",
dataIndex: 'annCompP_dictText'
},
{
title: '小组名称',
align: "center",
dataIndex: 'name'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
{
label: "年度",
field: 'annal',
component: 'JDictSelectTag',
componentProps:{
dictCode: "annual,annual_name,id"
},
colProps: {span: 6},
},
{
label: "小组名称",
field: 'name',
component: 'Input',
colProps: {span: 6},
},
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '年度',
field: 'annal',
component: 'JDictSelectTag',
componentProps:{
dictCode: "annual,annual_name,id"
},
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入年度!'},
];
},
},
{
label: '年度比赛',
field: 'annalComp',
component: 'JSearchSelect',
componentProps:{
dict: "annual_comp,name,id"
},
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入年度比赛!'},
];
},
},
{
label: '年度比赛项目',
field: 'annCompP',
component: 'JSearchSelect',
componentProps:{
dict: "annual_comp_point,obj_name,id"
},
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入年度比赛项目!'},
];
},
},
{
label: '小组名称',
field: 'name',
component: 'Input',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入小组名称!'},
];
},
},
// TODO 主键隐藏字段,目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
];