173 lines
4.0 KiB
Vue
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 { 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'
},
{
title: '是否允许补交',
align:"center",
dataIndex: 'allowMakeup'
},
{
title: '补交截止时间',
align:"center",
dataIndex: 'makeupTime'
},
{
title: '作业通知时间',
align:"center",
dataIndex: 'notifyTime'
},
];
//查询数据
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"
},
},
{
label: '是否允许补交',
field: 'allowMakeup',
component: 'InputNumber',
},
{
label: '补交截止时间',
field: 'makeupTime',
component: 'DatePicker',
componentProps: {
showTime: true,
valueFormat: 'YYYY-MM-DD HH:mm:ss'
},
},
{
label: '作业通知时间',
field: 'notifyTime',
component: 'InputNumber',
},
// 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',},
allowMakeup: {title: '是否允许补交',order: 8,view: 'number', type: 'number',},
makeupTime: {title: '补交截止时间',order: 9,view: 'datetime', type: 'string',},
notifyTime: {title: '作业通知时间',order: 10,view: 'number', type: 'number',},
};
/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
// 默认和原始表单保持一致 如果流程中配置了权限数据这里需要单独处理formSchema
return formSchema;
}