/*
 *    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,
  menu:true,
  selection: true,
  reserveSelection:true,
  dic: [],
  column: [
	  {
      label: '主键',
      prop: 'id',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      visdiplay:false
    },
    {
      label: '创建人',
      prop: 'createBy',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      visdiplay:false
    },
    {
      label: '创建时间',
      prop: 'createTime',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      visdiplay:false
    },
    {
      label: '更新人',
      prop: 'updateBy',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      visdiplay:false
    },
    {
      label: '更新时间',
      prop: 'updateTime',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      visdiplay:false
    },
    {
      label: '删除标记',
      prop: 'delFlag',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      visdiplay:false
    },
    {
      label: '学年',
      prop: 'schoolYear',
      type:'select',
      search:true,
      hide: true,
      dicUrl:'/basic/basicyear/queryAllSchoolYear',
      props:{
        label:'year',
        value:'year'
      },
      rules: [
        {
          required: true,
          trigger: 'blur',
          message:"选择学年"
        }
      ]
    },
    {
      label: '学期',
      prop: 'schoolTerm',
      type: 'select',
      search: true,
      hide: true,
      dicData: global.LEARN_TERM,
      props: {
        label: 'label',
        value: 'value'
      }
    },
    {
      label: '部门名称',
      prop: 'deptCode',
      span: 12,
      labelWidth: 80,
      width: 120,
      search:true,
      type:'select',
      dicUrl: '/basic/basicdept/getDeptList?teachFlag=1',
      props: {
        label: 'deptName',
        value: 'deptCode'
      },
      rules: [{
        required: true,
        message: "请填写部门名称",
        trigger: "blur"
      }]
    },
	  {
      label: '专业代码',
      prop: 'majorCode',
      span: 12,
      labelWidth: 60,
      width: 80,
      search:true,
      rules: [{
        required: true,
        message: "请填写专业代码",
        trigger: "blur"
      }]
    },
	  {
      label: '专业名称',
      prop: 'majorProName',
      span: 12,
      slot:true,
      labelWidth: 120,
      search:true,
      rules: [{
        required: true,
        message: "请填写专业名称",
        trigger: "blur"
      }]
    },
	  // {
    //   label: '部门编码',
    //   prop: 'deptCode',
    //   span: 12,
    //   labelWidth: 120,
    //   hide: true,
    //   rules: [{
    //     required: true,
    //     message: "请填写部门编码",
    //     trigger: "blur"
    //   }]
    // },

	  {
      label: '学制',
      prop: 'majorYears',
      span: 12,
      labelWidth: 40,
      width: 80,
      search:true,
      type:"select",
      dicUrl: '/admin/dict/item/type/basic_major_years',
      rules: [{
        required: true,
        message: "请填写学制",
        trigger: "blur"
      }]
    },
	  // {
    //   label: '专业名称',
    //   prop: 'majorProName',
    //   span: 12,
    //   labelWidth: 120,
    //   hide:true,
    //   rules: [{
    //     required: true,
    //     message: "请填写专业规范名称",
    //     trigger: "blur"
    //   }]
    // },
	  {
      label: '专业培养层次',
      // 1:中专 2:中级 3:大专 4:技师 5:高级
      prop: 'majorLevel',
      span: 12,
      labelWidth: 120,
      hide:true,
      type:"select",
      dicUrl: '/admin/dict/item/type/basic_major_level',
      rules: [{
        required: true,
        message: "请填写专业培养层次",
        trigger: "blur"
      }]
    },
	  {
      label: '年级',
      prop: 'grade',
      span: 12,
      labelWidth: 40,
      width: 60,
      search:true,
      type:"select",
      dicUrl: '/basic/basicclass/getClassGrade',
      props:{
        label: 'grade',
        value: 'grade',
      },
      rules: [{
        required: true,
        message: "请填写年级",
        trigger: "blur"
      }]
    },
	  {
      label: '班号',
      prop: 'classNo',
      span: 12,
      labelWidth: 120,
      width: 140,
      search: true,
      rules: [{
        required: true,
        message: "请填写对应班号",
        trigger: "blur"
      }]
    },
	  {
      label: '对应班级数量',
      prop: 'classNum',
      span: 12,
      labelWidth: 120,
      hide:true,
      rules: [{
        required: true,
        message: "请填写对应班级数量",
        trigger: "blur"
      }]
    },
	  {
      label: '必修学分',
      prop: 'mustCredit',
      hide:true,
      span: 12,
      labelWidth: 120,
      rules: [{
        required: true,
        message: "请填写必修学分",
        trigger: "blur"
      }]
    },
	  {
      label: '限选学分',
      prop: 'limitCredit',
      hide:true,
      span: 12,
      labelWidth: 120,
      rules: [{
        required: true,
        message: "请填写限选学分",
        trigger: "blur"
      }]
    },
	  {
      label: '任选学分',
      prop: 'openCredit',
      hide:true,
      span: 12,
      labelWidth: 120,
      rules: [{
        required: true,
        message: "请填写任选学分",
        trigger: "blur"
      }]
    },
	  {
      label: '跨选学分',
      prop: 'crossCredit',
      hide:true,
      span: 12,
      labelWidth: 120,
      rules: [{
        required: true,
        message: "请填写跨选学分",
        trigger: "blur"
      }]
    },
	  {
      label: '公选学分',
      prop: 'publicCredit',
      hide:true,
      span: 12,
      labelWidth: 120,
      rules: [{
        required: true,
        message: "请填写公选学分",
        trigger: "blur"
      }]
    },
	  {
      label: '素质学分',
      prop: 'qualityCredit',
      hide:true,
      span: 12,
      labelWidth: 120,
      rules: [{
        required: true,
        message: "请填写素质学分",
        trigger: "blur"
      }]
    },
	  {
      label: '奖励学分',
      prop: 'rewardCredit',
      hide:true,
      span: 12,
      labelWidth: 120,
      rules: [{
        required: true,
        message: "请填写奖励学分",
        trigger: "blur"
      }]
    },
	  {
      label: '核心学分',
      prop: 'coreCredit',
      hide:true,
      span: 12,
      labelWidth: 120,
      rules: [{
        required: true,
        message: "请填写核心学分",
        trigger: "blur"
      }]
    },
    {
      label: '备注',
      prop: 'remarks',
      hide:true,
      type:"textarea",
      span: 24,
      labelWidth: 120
    },
    {
      label: '是否安排',
      prop: 'isAssign',
      slot:true,
      width: 120,
      span: 24,
      labelWidth: 80,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      visdiplay:false,
      search:true,
      type: 'select',
      dicUrl: '/admin/dict/item/type/yes_no',

    },
  ]
}
