136 lines
3.1 KiB
Vue
136 lines
3.1 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: '标题',
|
|||
|
align:"center",
|
|||
|
dataIndex: 'title'
|
|||
|
},
|
|||
|
{
|
|||
|
title: '说明',
|
|||
|
align:"center",
|
|||
|
dataIndex: 'description',
|
|||
|
},
|
|||
|
{
|
|||
|
title: '附件',
|
|||
|
align:"center",
|
|||
|
dataIndex: 'attachment',
|
|||
|
},
|
|||
|
{
|
|||
|
title: '满分',
|
|||
|
align:"center",
|
|||
|
dataIndex: 'maxScore'
|
|||
|
},
|
|||
|
{
|
|||
|
title: '及格分数',
|
|||
|
align:"center",
|
|||
|
dataIndex: 'passScore'
|
|||
|
},
|
|||
|
{
|
|||
|
title: '开始时间',
|
|||
|
align:"center",
|
|||
|
dataIndex: 'startTime'
|
|||
|
},
|
|||
|
{
|
|||
|
title: '结束时间',
|
|||
|
align:"center",
|
|||
|
dataIndex: 'endTime'
|
|||
|
},
|
|||
|
{
|
|||
|
title: '状态',
|
|||
|
align:"center",
|
|||
|
dataIndex: 'status_dictText'
|
|||
|
},
|
|||
|
];
|
|||
|
//查询数据
|
|||
|
export const searchFormSchema: FormSchema[] = [
|
|||
|
];
|
|||
|
//表单数据
|
|||
|
export const formSchema: FormSchema[] = [
|
|||
|
{
|
|||
|
label: '标题',
|
|||
|
field: 'title',
|
|||
|
component: 'Input',
|
|||
|
},
|
|||
|
{
|
|||
|
label: '说明',
|
|||
|
field: 'description',
|
|||
|
component: 'JEditor',
|
|||
|
},
|
|||
|
{
|
|||
|
label: '附件',
|
|||
|
field: 'attachment',
|
|||
|
component: 'JUpload',
|
|||
|
componentProps:{
|
|||
|
},
|
|||
|
},
|
|||
|
{
|
|||
|
label: '满分',
|
|||
|
field: 'maxScore',
|
|||
|
component: 'InputNumber',
|
|||
|
},
|
|||
|
{
|
|||
|
label: '及格分数',
|
|||
|
field: 'passScore',
|
|||
|
component: 'InputNumber',
|
|||
|
},
|
|||
|
{
|
|||
|
label: '开始时间',
|
|||
|
field: 'startTime',
|
|||
|
component: 'DatePicker',
|
|||
|
componentProps: {
|
|||
|
showTime: true,
|
|||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss'
|
|||
|
},
|
|||
|
},
|
|||
|
{
|
|||
|
label: '结束时间',
|
|||
|
field: 'endTime',
|
|||
|
component: 'DatePicker',
|
|||
|
componentProps: {
|
|||
|
showTime: true,
|
|||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss'
|
|||
|
},
|
|||
|
},
|
|||
|
{
|
|||
|
label: '状态',
|
|||
|
field: 'status',
|
|||
|
component: 'JDictSelectTag',
|
|||
|
componentProps:{
|
|||
|
dictCode:"course_status",
|
|||
|
type: "radio"
|
|||
|
},
|
|||
|
},
|
|||
|
// TODO 主键隐藏字段,目前写死为ID
|
|||
|
{
|
|||
|
label: '',
|
|||
|
field: 'id',
|
|||
|
component: 'Input',
|
|||
|
show: false
|
|||
|
},
|
|||
|
];
|
|||
|
|
|||
|
// 高级查询数据
|
|||
|
export const superQuerySchema = {
|
|||
|
title: {title: '标题',order: 0,view: 'text', type: 'string',},
|
|||
|
description: {title: '说明',order: 1,view: 'umeditor', type: 'string',},
|
|||
|
attachment: {title: '附件',order: 2,view: 'file', type: 'string',},
|
|||
|
maxScore: {title: '满分',order: 3,view: 'number', type: 'number',},
|
|||
|
passScore: {title: '及格分数',order: 4,view: 'number', type: 'number',},
|
|||
|
startTime: {title: '开始时间',order: 5,view: 'datetime', type: 'string',},
|
|||
|
endTime: {title: '结束时间',order: 6,view: 'datetime', type: 'string',},
|
|||
|
status: {title: '状态',order: 7,view: 'number', type: 'number',dictCode: 'course_status',},
|
|||
|
};
|
|||
|
|
|||
|
/**
|
|||
|
* 流程表单调用这个方法获取formSchema
|
|||
|
* @param param
|
|||
|
*/
|
|||
|
export function getBpmFormSchema(_formData): FormSchema[]{
|
|||
|
// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
|
|||
|
return formSchema;
|
|||
|
}
|