106 lines
2.5 KiB
Vue
106 lines
2.5 KiB
Vue
import {BasicColumn} from '/@/components/Table';
|
||
import {FormSchema} from '/@/components/Table';
|
||
import { rules} from '/@/utils/helper/validator';
|
||
import { render } from '/@/utils/common/renderUtils';
|
||
import { getWeekMonthQuarterYear } from '/@/utils';
|
||
//列表数据
|
||
export const columns: BasicColumn[] = [
|
||
{
|
||
title: '父题目id',
|
||
align:"center",
|
||
dataIndex: 'parentId'
|
||
},
|
||
{
|
||
title: '题目类型',
|
||
align:"center",
|
||
dataIndex: 'type_dictText'
|
||
},
|
||
{
|
||
title: '题干',
|
||
align:"center",
|
||
dataIndex: 'content',
|
||
},
|
||
{
|
||
title: '题目解析',
|
||
align:"center",
|
||
dataIndex: 'analysis',
|
||
},
|
||
{
|
||
title: '难度',
|
||
align:"center",
|
||
dataIndex: 'difficulty_dictText'
|
||
},
|
||
{
|
||
title: '分值',
|
||
align:"center",
|
||
dataIndex: 'score'
|
||
},
|
||
];
|
||
//查询数据
|
||
export const searchFormSchema: FormSchema[] = [
|
||
];
|
||
//表单数据
|
||
export const formSchema: FormSchema[] = [
|
||
{
|
||
label: '父题目id',
|
||
field: 'parentId',
|
||
component: 'Input',
|
||
},
|
||
{
|
||
label: '题目类型',
|
||
field: 'type',
|
||
component: 'JDictSelectTag',
|
||
componentProps:{
|
||
dictCode:"question_type"
|
||
},
|
||
},
|
||
{
|
||
label: '题干',
|
||
field: 'content',
|
||
component: 'JEditor',
|
||
},
|
||
{
|
||
label: '题目解析',
|
||
field: 'analysis',
|
||
component: 'JEditor',
|
||
},
|
||
{
|
||
label: '难度',
|
||
field: 'difficulty',
|
||
component: 'JDictSelectTag',
|
||
componentProps:{
|
||
dictCode:"question_difficulty"
|
||
},
|
||
},
|
||
{
|
||
label: '分值',
|
||
field: 'score',
|
||
component: 'InputNumber',
|
||
},
|
||
// TODO 主键隐藏字段,目前写死为ID
|
||
{
|
||
label: '',
|
||
field: 'id',
|
||
component: 'Input',
|
||
show: false
|
||
},
|
||
];
|
||
|
||
// 高级查询数据
|
||
export const superQuerySchema = {
|
||
parentId: {title: '父题目id',order: 0,view: 'text', type: 'string',},
|
||
type: {title: '题目类型',order: 1,view: 'number', type: 'number',dictCode: 'question_type',},
|
||
content: {title: '题干',order: 2,view: 'umeditor', type: 'string',},
|
||
analysis: {title: '题目解析',order: 3,view: 'umeditor', type: 'string',},
|
||
difficulty: {title: '难度',order: 4,view: 'number', type: 'number',dictCode: 'question_difficulty',},
|
||
score: {title: '分值',order: 5,view: 'number', type: 'number',},
|
||
};
|
||
|
||
/**
|
||
* 流程表单调用这个方法获取formSchema
|
||
* @param param
|
||
*/
|
||
export function getBpmFormSchema(_formData): FormSchema[]{
|
||
// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
|
||
return formSchema;
|
||
} |