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

158 lines
3.3 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';
import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
//列表数据
export const columns: BasicColumn[] = [
{
title: '题目类型',
align:"center",
dataIndex: 'wjType',
customRender:({text}) =>{
var rt = "";
if(text == '3'){
rt = "单选";
}else if(text == '4'){
rt = "多选";
}else if(text == '5'){
rt = "填空";
}
return rt;
},
},
{
title: '问题标题',
align:"center",
dataIndex: 'wjTitle'
},
{
title: '问题分值',
align:"center",
dataIndex: 'wjScore'
},
{
title: '是否公有',
align:"center",
dataIndex: 'wjSytype_dictText'
},
];
export const columnsYytk: BasicColumn[] = [
{
title: '题目类型',
align:"center",
dataIndex: 'wjType',
customRender:({text}) =>{
var rt = "";
if(text == '3'){
rt = "单选";
}else if(text == '4'){
rt = "多选";
}else if(text == '5'){
rt = "填空";
}
return rt;
},
},
{
title: '题干名称',
align:"center",
dataIndex: 'wjTitle'
},
{
title: '题目分值',
align:"center",
dataIndex: 'wjScore'
},
{
title: '是否公有',
align:"center",
dataIndex: 'wjSytype_dictText'
},
];
//查询数据
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.text,
placeholder: '请输入${title}',
defaultValue:'',
validateRules: [
{ required: true, message: '${title}不能为空' },
],
},
{
title: '正确答案',
key: 'itemSelected',
type: JVxeTypes.select,
width:"100px",
placeholder: '请输入${title}',
defaultValue:'',
// 下拉选项
options: [
{ title: '正确', value: 'true' },
{ title: '错误', value: 'false' },
],
},
]
export const wjxWjdcColumns: JVxeColumn[] = [
{
title: '选项',
key: 'itemTitle',
type: JVxeTypes.text,
placeholder: '请输入${title}',
defaultValue:'',
validateRules: [
{ required: true, message: '${title}不能为空' },
],
},
]