dbsd_kczx/src/views/kc/ktgl/KcKetangbiao.data.ts

184 lines
3.4 KiB
TypeScript
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';
//列表数据
export const columns: BasicColumn[] = [
{
title: '课程名称',
align: "center",
dataIndex: 'kcmc'
},
{
title: '授课教师',
align: "center",
dataIndex: 'skjs'
},
{
title: '上课日期',
align: "center",
dataIndex: 'skrq'
},
{
title: '上课时间',
align: "center",
dataIndex: 'sksj'
},
{
title: '节次',
align: "center",
dataIndex: 'hh_dictText'
},
{
title: '周几',
align: "center",
dataIndex: 'week_dictText'
},
{
title: '直播方式',
align: "center",
dataIndex: 'zbfs_dictText'
},
{
title: '会议号',
align: "center",
dataIndex: 'hyh'
},
{
title: '会议密码',
align: "center",
dataIndex: 'hymm'
},
{
title: '课程链接',
align: "center",
dataIndex: 'kclj',
slots: { customRender: 'toUrl' },
},
// {
// title: '开课周次',
// align: "center",
// dataIndex: 'kkzc_dictText'
// },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
{
label: "节次",
field: 'hh',
component: 'JDictSelectTag',
componentProps:{
dictCode: "skjc"
},
colProps: {span: 6},
},
{
label: "周几",
field: 'week',
component: 'JDictSelectTag',
componentProps:{
dictCode: "week"
},
colProps: {span: 6},
},
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '课程名称',
field: 'kcmc',
component: 'Input',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入课程名称!'},
];
},
},
{
label: '授课教师',
field: 'skjs',
component: 'Input',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入授课教师!'},
];
},
},
{
label: '上课时间',
field: 'sksj',
component: 'Input',
},
{
label: '节次',
field: 'hh',
component: 'JDictSelectTag',
componentProps:{
dictCode: "skjc"
},
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入节次!'},
];
},
},
{
label: '周几',
field: 'week',
component: 'JDictSelectTag',
componentProps:{
dictCode: "week"
},
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入周几!'},
];
},
},
{
label: '直播方式',
field: 'zbfs',
component: 'JDictSelectTag',
componentProps:{
dictCode: "skpt"
},
},
{
label: '会议号',
field: 'hyh',
component: 'Input',
},
{
label: '会议密码',
field: 'hymm',
component: 'Input',
},
{
label: '课程链接',
field: 'kclj',
component: 'Input',
},
{
label: '开课周次',
field: 'kkzc',
component: 'JSelectMultiple',
componentProps:{
dictCode: "skzc"
},
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入开课周次!'},
];
},
},
// TODO 主键隐藏字段目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
];