dbsd_kczx/src/views/zy/zyInfo/ZyInfo.data.ts

306 lines
6.2 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: 'title'
},
// {
// title: '类型',
// align: "center",
// dataIndex: 'zyType_dictText'
// },
{
title: '开始时间',
align: "center",
dataIndex: 'startTime',
customRender:({text}) =>{
return !text?"":(text.length>10?text.substr(0,10):text);
},
},
{
title: '结束时间',
align: "center",
dataIndex: 'endTime',
customRender:({text}) =>{
return !text?"":(text.length>10?text.substr(0,10):text);
},
},
{
title: '状态',
align: "center",
dataIndex: 'zyStatus_dictText'
},
{
title: '学年学期',
align: "center",
dataIndex: 'xnxq'
},
{
title: '选课人数',
align: "center",
dataIndex: 'xkxs'
},
{
title: '未提交人数',
align: "center",
dataIndex: 'wtjnum',
customRender:({text}) =>{
return text?text:"0";
},
},
{
title: '已提交人数',
align: "center",
dataIndex: 'ytjnum',
customRender:({text}) =>{
return text?text:"0";
},
},
];
//列表数据
export const columns2: BasicColumn[] = [
{
title: '作业名称',
align: "center",
dataIndex: 'title'
},
{
title: '开始时间',
align: "center",
dataIndex: 'startTime',
customRender:({text}) =>{
return !text?"":(text.length>10?text.substr(0,10):text);
},
},
{
title: '结束时间',
align: "center",
dataIndex: 'endTime',
customRender:({text}) =>{
return !text?"":(text.length>10?text.substr(0,10):text);
},
},
{
title: '状态',
align: "center",
dataIndex: 'zyStatus_dictText'
},
{
title: '学年学期',
align: "center",
dataIndex: 'xnxq'
},
{
title: '分享教师',
align: "center",
dataIndex: 'yuanTeacherName'
},
];
//列表数据
export const columns3: BasicColumn[] = [
{
title: '作业名称',
align: "center",
dataIndex: 'title'
},
{
title: '开始时间',
align: "center",
dataIndex: 'startTime',
customRender:({text}) =>{
return !text?"":(text.length>10?text.substr(0,10):text);
},
},
{
title: '结束时间',
align: "center",
dataIndex: 'endTime',
customRender:({text}) =>{
return !text?"":(text.length>10?text.substr(0,10):text);
},
},
{
title: '状态',
align: "center",
dataIndex: 'zyStatus_dictText'
},
{
title: '学年学期',
align: "center",
dataIndex: 'xnxq'
},
{
title: '分享教师',
align: "center",
dataIndex: 'yuanTeacherName'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
{
label: "作业名称",
field: 'title',
component: 'Input',
colProps: {span: 6},
},
{
label: "类型",
field: 'zyType',
component: 'JDictSelectTag',
componentProps:{
dictCode: "zy_type"
},
colProps: {span: 6},
},
{
label: "状态",
field: 'zyStatus',
component: 'Input',
colProps: {span: 6},
},
{
label: "学年学期",
field: 'xnxq',
component: 'Input',
colProps: {span: 6},
},
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '作业名称',
field: 'title',
component: 'Input',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入作业名称!'},
];
},
},
{
label: '类型',
field: 'zyType',
component: 'JDictSelectTag',
componentProps:{
dictCode: "zy_type"
},
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入类型!'},
];
},
},
{
label: '描述',
field: 'content',
component: 'Input',
},
{
label: '开始时间',
field: 'startTime',
component: 'DatePicker',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入开始时间!'},
];
},
},
{
label: '结束时间',
field: 'endTime',
component: 'DatePicker',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入结束时间!'},
];
},
},
{
label: '外网是否查重',
field: 'wwcc',
component: 'JDictSelectTag',
componentProps:{
dictCode: "yn"
},
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入外网是否查重!'},
];
},
},
{
label: '网络通过率',
field: 'wwtgl',
component: 'InputNumber',
dynamicRules: ({model,schema}) => {
return [
{ required: false},
{ pattern: /^-?\d+\.?\d*$/, message: '请输入数字!'},
];
},
},
{
label: '内网查重',
field: 'nwcc',
component: 'JDictSelectTag',
componentProps:{
dictCode: "yn"
},
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入内网查重!'},
];
},
},
{
label: '内网通过率',
field: 'nwtgl',
component: 'InputNumber',
dynamicRules: ({model,schema}) => {
return [
{ required: false},
{ pattern: /^-?\d+\.?\d*$/, message: '请输入数字!'},
];
},
},
{
label: 'aigc查重',
field: 'aigccc',
component: 'JDictSelectTag',
componentProps:{
dictCode: "yn"
},
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入aigc查重!'},
];
},
},
{
label: 'aigc通过率',
field: 'aigctgl',
component: 'InputNumber',
dynamicRules: ({model,schema}) => {
return [
{ required: false},
{ pattern: /^-?\d+\.?\d*$/, message: '请输入数字!'},
];
},
},
// TODO 主键隐藏字段目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
];