/*
 *    Copyright (c) 2018-2025, cyweb All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 */
import global from "@/components/tools/commondict"

export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dialogHeight:500,
  column: [
	  {
      label: '学年',
      prop: 'schoolYear',
      type:'select',
      search:true,
      dicUrl:'/basic/basicyear/queryAllSchoolYear',
      props:{
        label:'year',
        value:'year'
      },
      rules: [{
          required: true,
          trigger: 'blur',
          message:"选择学年"
        }]
    },
	  {
      label: '学期',
      prop: 'schoolTerm',
      type:'select',
      search:true,
      dicData:global.LEARN_TERM,
      props:{
        label:'label',
        value:'value'
      },
      rules: [{
          required: true,
          trigger: 'blur',
          message:"选择学期"
        }]
    },
    // {
    //   label: '学年学期',
    //   prop: 'yearStr',
    //   type:'cascader',
    //   filterable:true,
    //   hide:true,
    //   span:24,
    //   dicUrl:'/basic/basicholiday/getAllYearAndTerm',
    //   rules: [
    //     {
    //       required: true,
    //       trigger: 'blur',
    //       message:"选择学年学期"
    //     }
    //   ]
    // },
    {
      label: '开课部门',
      prop: 'openDeptCode',
      hide:true,
      formslot:true,
      rules: [
        {
          required: true,
          trigger: 'blur',
          message:"选择开课部门"
        }
      ]
    },
    {
      label: '开课部门',
      prop: 'deptName',
      display:false
    },
    {
      label: '课程编码',
      prop: 'courseCode',
      formslot:true,
      rules: [
        {
          required: true,
          trigger: 'blur',
          message:"选择课程"
        }
      ]
    },
    {
      label: '学分',
      prop: 'courseScore',
      type:'number',
      formslot:true,
      rules: [
        {
          required: true,
          trigger: 'blur',
          message:"请填写学分"
        }
      ]
    },
	  {
      label: '课程名',
      prop: 'courseName',
      display:false,
    },

    {
      label: '任课教师',
      prop: 'teacherNo',
      formslot: true,
      hide:true,
      rules: [
        {
          required: true,
          trigger: 'blur',
          message:"选择教师"
        }
      ]
    },
    {
      label: '任课教师',
      prop: 'realName',
      display:false,
      hide:true,
    },
	  {
      label: '报名人数',
      prop: 'signLimit',
      type:'number',
      rules: [
        {
          required: true,
          trigger: 'blur',
          message:"填写报名人数"
        }
      ]
    },
    {
      label: '已报人数',
      prop: 'totalNums',
      display:false
    },
    {
      label: '报名状态',
      prop: 'signableStr',
      valueDefault:'0',
      type:'radio',
      dicData:global.COURSE_SIGN_STATUS,
      props:{
        label:'label',
        value:'value'
      },
      search:true,
      rules: [
        {
          required: true,
          trigger: 'blur',
          message:"选择报名状态"
        }
      ]
    },
    {
      label: '开课状态',
      prop: 'openedStr',
      type:'radio',
      addDisplay:false,
      dicData:global.COURSE_OPEND_STATUS,
      props:{
        label:'label',
        value:'value'
      },
      search:true,
      rules: [
        {
          required: true,
          trigger: 'blur',
          message:"选择开课状态"
        }
      ]
    },
    {
      label: '创建时间',
      prop: 'createTime',
      type:'date',
      format:'yyyy-MM-dd',
      display:false
    },
    {
      label: '备注',
      prop: 'remarks',
      type:'textarea'
    },
  ]
}
