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

158 lines
3.3 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[] = [
2024-05-25 12:50:41 +08:00
{
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;
},
},
2024-05-06 08:11:00 +08:00
{
title: '问题标题',
align:"center",
dataIndex: 'wjTitle'
},
{
2024-05-23 18:09:34 +08:00
title: '问题分值',
2024-05-06 08:11:00 +08:00
align:"center",
2024-05-23 18:09:34 +08:00
dataIndex: 'wjScore'
2024-05-06 08:11:00 +08:00
},
{
2024-05-23 18:09:34 +08:00
title: '是否公有',
2024-05-06 08:11:00 +08:00
align:"center",
2024-05-23 18:09:34 +08:00
dataIndex: 'wjSytype_dictText'
2024-05-06 08:11:00 +08:00
},
];
2024-05-23 21:56:08 +08:00
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'
},
2024-05-25 12:50:41 +08:00
{
title: '是否公有',
align:"center",
dataIndex: 'wjSytype_dictText'
},
2024-05-23 21:56:08 +08:00
];
2024-05-06 08:11:00 +08:00
//查询数据
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[] = [
2024-05-23 18:09:34 +08:00
// {
// title: '选项编号',
// key: 'itemIndex',
// type: JVxeTypes.inputNumber,
// width:"200px",
// placeholder: '请输入${title}',
// defaultValue:'',
// validateRules: [
// { required: true, message: '${title}不能为空' },
// ],
// },
2024-05-06 08:11:00 +08:00
{
2024-05-23 18:09:34 +08:00
title: '选项',
2024-05-06 08:11:00 +08:00
key: 'itemTitle',
2024-05-23 18:09:34 +08:00
type: JVxeTypes.text,
2024-05-06 08:11:00 +08:00
placeholder: '请输入${title}',
defaultValue:'',
validateRules: [
{ required: true, message: '${title}不能为空' },
],
},
2024-05-24 16:24:23 +08:00
2024-05-06 08:11:00 +08:00
{
title: '正确答案',
key: 'itemSelected',
2024-05-24 16:24:23 +08:00
type: JVxeTypes.select,
width:"100px",
2024-05-06 08:11:00 +08:00
placeholder: '请输入${title}',
defaultValue:'',
2024-05-24 16:24:23 +08:00
// 下拉选项
options: [
{ title: '正确', value: 'true' },
{ title: '错误', value: 'false' },
],
2024-05-06 08:11:00 +08:00
},
]
2024-05-27 15:03:29 +08:00
export const wjxWjdcColumns: JVxeColumn[] = [
{
title: '选项',
key: 'itemTitle',
type: JVxeTypes.text,
placeholder: '请输入${title}',
defaultValue:'',
validateRules: [
{ required: true, message: '${title}不能为空' },
],
},
]