/*
 *    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,
  size:"small",
  fit:true,
  menu:false,
  column: [

	  {
      label: '学年',
      prop: 'schoolYear',
      width:100,
      type:'select',
      dicUrl:'/basic/basicyear/queryAllSchoolYear',
      props:{
        label:'year',
        value:'year'
      },
      addDisplay:false,
      editDisabled:true,
      visdiplay:false
    },
	  {
      label: '学期',
      prop: 'schoolTerm',
      width:60,
      addDisplay:false,
      editDisabled:true,
      visdiplay:false
    },

    {
      label: '专业',
      prop: 'majorName',
      addDisplay:false,
      editDisabled:true,

      visdiplay:false
    },
    {
      label: '班级',
      prop: 'classNo',
      addDisplay:false,
      editDisabled:true,
      slot: true,
      visdiplay:false
    },
    {
      label: '任课教师',
      prop: 'teacherRealName',
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      visdiplay:false
    },
	  {
      label: '课程名称',
      prop: 'courseName',
      search:true,
      width:120,
      addDisplay:false,
      sortable:"custom",
      editDisabled:true,
      visdiplay:false
    },
    {
      label: '课程性质',
      prop: 'courseProperties',
      type:'select',
      dicUrl:'/ems/courseproperties/list',
      props:{
        label:'propertiesName',
        value:'id'
      },
      width:80,
      rules: [{
        required: true,
        message: "请选择课程性质",
        trigger: "blur"
      }],
    },
    {
      label: '课程类型',
      prop: 'courseType',
      type:'select',
      dicUrl: '/ems/coursetype/list',
      props: {
        label: 'courseTypeName',
        value: 'id'
      },
      width:80,
      rules: [{
        required: true,
        message: "请选择课程类型",
        trigger: "blur"
      }],
    },
    {
      label: '课程类别',
      prop: 'courseCategory',
      type:'select',
      dicUrl: '/ems/coursecategory/list',
      props: {
        label: 'courseCategoryName',
        value: 'id'
      },
      width:80,
      rules: [{
        required: true,
        message: "请选择课程类别",
        trigger: "blur"
      }],
    },

    {
      label: '考核方式',
      prop: 'courseEvaluationMode',
      type:'select',
      dicUrl: '/ems/courseevaluationmode/list',
      props: {
        label: 'courseEvaluationModeName',
        value: 'id'
      },
      width:80,
      rules: [{
        required: true,
        message: "请选择考核方式",
        trigger: "blur"
      }],
    },
	  {
      label: '学分',
      prop: 'courseScore',
      width:60,
      rules: [{
        required: true,
        message: "请输入学分",
        trigger: "blur"
      }],
    },
	  {
      label: '起止周',
      prop: 'teachWeekRange',
      width:60,
      formslot:true,
      rules: [{
        required: true,
        message: "请输入起止周",
        trigger: "blur"
      }],
    },

	  {
      label: '课时',
      prop: 'courseTeachUnit',
      width:60,
      rules: [{
        required: true,
        message: "请输入课时",
        trigger: "blur"
      }],
    },
    {
      label: '周课时',
      prop: 'weekUnit',
      width:60,
      rules: [{
        required: true,
        message: "请输入周课时",
        trigger: "blur"
      }],
      // span: 12,
      // labelWidth: 120,
    },
    {
      label: '开课部门',
      prop: 'departName',
      width:140,
      addDisplay:false,
      editDisabled:true,
      // editDisplay:false,
      visdiplay:false
    },
    {
      label: '过程化',
      prop: 'isProceduralStr',
      type: 'select',
      dicData: global.YES_OR_NO,
      props: {
        label: 'label',
        value: 'value'
      },
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      visdiplay:false
    },
    {
      label: '类型',
      prop: 'lockedStr',
      display:false
    }
  ]
}
