dbsd_kczx/src/views/kc/wjxWjxxTmlb/WjxWjxxTmlb.data.ts

96 lines
2.0 KiB
TypeScript
Raw Normal View History

2024-05-06 08:11:00 +08:00
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
//列表数据
export const columns: BasicColumn[] = [
{
title: '题目编号',
align:"center",
dataIndex: 'wjIndex'
},
{
title: '问题标题',
align:"center",
dataIndex: 'wjTitle'
},
{
title: '是否必填',
align:"center",
dataIndex: 'isRequir'
},
{
title: '问题分值',
align:"center",
dataIndex: 'wjScore'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '题目编号',
field: 'wjIndex',
component: 'InputNumber',
},
{
label: '问题标题',
field: 'wjTitle',
component: 'Input',
},
{
label: '是否必填',
field: 'isRequir',
component: 'Input',
},
{
label: '问题分值',
field: 'wjScore',
component: 'InputNumber',
},
// TODO 主键隐藏字段目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false
},
];
//子表单数据
//子表表格配置
export const wjxWjxxTmxxColumns: JVxeColumn[] = [
{
title: '选项编号',
key: 'itemIndex',
type: JVxeTypes.inputNumber,
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
validateRules: [
{ required: true, message: '${title}不能为空' },
],
},
{
title: '选项标题',
key: 'itemTitle',
type: JVxeTypes.input,
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
validateRules: [
{ required: true, message: '${title}不能为空' },
],
},
{
title: '正确答案',
key: 'itemSelected',
type: JVxeTypes.input,
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
},
]