119 lines
2.9 KiB
Vue
119 lines
2.9 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: 'courseId'
|
||
},
|
||
{
|
||
title: '章节名',
|
||
align:"center",
|
||
dataIndex: 'name'
|
||
},
|
||
{
|
||
title: '章节类型',
|
||
align:"center",
|
||
dataIndex: 'type_dictText'
|
||
},
|
||
{
|
||
title: '排序号',
|
||
align:"center",
|
||
dataIndex: 'sortOrder'
|
||
},
|
||
{
|
||
title: '父章节id',
|
||
align:"center",
|
||
dataIndex: 'parentId'
|
||
},
|
||
{
|
||
title: '章节层级',
|
||
align:"center",
|
||
dataIndex: 'level_dictText'
|
||
},
|
||
];
|
||
//查询数据
|
||
export const searchFormSchema: FormSchema[] = [
|
||
];
|
||
//表单数据
|
||
export const formSchema: FormSchema[] = [
|
||
{
|
||
label: '课程id',
|
||
field: 'courseId',
|
||
component: 'JPopup',
|
||
componentProps: ({ formActionType }) => {
|
||
const {setFieldsValue} = formActionType;
|
||
return{
|
||
setFieldsValue:setFieldsValue,
|
||
code:"course_list",
|
||
fieldConfig: [
|
||
{ source: 'name', target: 'courseId' },
|
||
],
|
||
multi:false
|
||
}
|
||
},
|
||
|
||
},
|
||
{
|
||
label: '章节名',
|
||
field: 'name',
|
||
component: 'Input',
|
||
},
|
||
{
|
||
label: '章节类型',
|
||
field: 'type',
|
||
component: 'JDictSelectTag',
|
||
componentProps:{
|
||
dictCode:"course_section_type"
|
||
},
|
||
},
|
||
{
|
||
label: '排序号',
|
||
field: 'sortOrder',
|
||
component: 'InputNumber',
|
||
},
|
||
{
|
||
label: '父章节id',
|
||
field: 'parentId',
|
||
component: 'Input',
|
||
},
|
||
{
|
||
label: '章节层级',
|
||
field: 'level',
|
||
component: 'JDictSelectTag',
|
||
componentProps:{
|
||
dictCode:"course_section_level",
|
||
type: "radio"
|
||
},
|
||
},
|
||
// TODO 主键隐藏字段,目前写死为ID
|
||
{
|
||
label: '',
|
||
field: 'id',
|
||
component: 'Input',
|
||
show: false
|
||
},
|
||
];
|
||
|
||
// 高级查询数据
|
||
export const superQuerySchema = {
|
||
courseId: {title: '课程id',order: 0,view: 'popup', type: 'string',code: 'course_list', orgFields: 'name', destFields: 'courseId', popupMulti: false,},
|
||
name: {title: '章节名',order: 1,view: 'text', type: 'string',},
|
||
type: {title: '章节类型',order: 2,view: 'number', type: 'number',dictCode: 'course_section_type',},
|
||
sortOrder: {title: '排序号',order: 3,view: 'number', type: 'number',},
|
||
parentId: {title: '父章节id',order: 4,view: 'text', type: 'string',},
|
||
level: {title: '章节层级',order: 5,view: 'number', type: 'number',dictCode: 'course_section_level',},
|
||
};
|
||
|
||
/**
|
||
* 流程表单调用这个方法获取formSchema
|
||
* @param param
|
||
*/
|
||
export function getBpmFormSchema(_formData): FormSchema[]{
|
||
// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
|
||
return formSchema;
|
||
} |