/*
 *    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'
import {number} from "echarts/src/export";

export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  selection:true,
  dic: [],
  column: [

    {
      label: '入学日期',
      prop: 'enterDate',
      labelWidth: 120,
      type:'date',
      formslot: true,
      format:'yyyy-MM-dd',
      valueFormat:'yyyy-MM-dd',
      rules: [{
        required: true,
        message: "请选择入学日期",
        trigger: "blur"
      }],
      hide:true
    },
    {
      label: '专业',
      prop: 'majorCode',
      labelWidth: 120,
      hide:true,
      formslot: true,
      type:'select',
      dicUrl: '/basic/major/getMajorNameList',
      props: {
        label: 'majorCodeAndName',
        value: 'majorCode'
      },
      rules: [{
        required: true,
        message: "请选择专业",
        trigger: "blur"
      }]
    },
    {
      label: '学院',
      prop: 'deptCode',
      labelWidth: 120,
      formslot: true,
      type:"select",
      dicUrl: '/basic/basicdept/getDeptList?secondFlag=1',
      props: {
        label: 'deptName',
        value: 'deptCode'
      },
    },
	  {
      label: '班级代码',
      prop: 'classCode',
      labelWidth: 120,
      hide:true,
      formslot: true,
      rules: [{
        required: true,
        message: "请填写班级代码",
        trigger: "blur"
      }]
    },
    {
      label: '班号',
      prop: 'classNo',
      labelWidth: 50,
      formslot: true,
    },
	  {
      label: '班级名称',
      prop: 'className',
      labelWidth: 120,
      hide:true,
      formslot: true,
      rules: [{
        required: true,
        message: "请填写班级名称",
        trigger: "blur"
      }]
    },
    {
      label: '班级规范名称',
      prop: 'classProName',
      labelWidth: 120,
      formslot: true,
    },
    // {
    //   label:'入学年份',
    //   prop:'grade',
    //   type:'select',
    //   dicUrl: '/basic/basicclass/list',
    //   props: {
    //     label: 'grade',
    //     value: 'grade'
    //   },
    //   search:true,
    //   addDisplay:false,
    //   editDisplay:false
    // },
    {
     label:'入学年份',
      prop:'grade',
      labelWidth: 120,
      search:true,
      hide:true,
      formslot: true,
      type:'select',
      dicUrl: '/basic/basicclass/getGradeList',
      props: {
        label: 'grade',
        value: 'grade'
      },
      // hide:true,
    },
    {
      label: '班主任',
      prop: 'teacherNos',
      labelWidth: 120,
      hide:true,
      type:'select',
      filterable:true,
      dicUrl:'/professional/teacherbase/TeacherBaseList',
      props:{
        label:'realName',
        value:'teacherNo'
      },
      rules: [{
        required: true,
        message: "请选择班主任",
        trigger: "blur"
      }],
    },
    {
      label:'班主任',
      prop:'teacherRealName',
      search:true,
      slot: true,
      addDisplay:false,
      editDisplay:false
    },
    {
      label: '班主任工号',
      prop: 'teacherNo',
      addDisplay:false,
      editDisplay:false,
      hide: true
    },
    {
      label: '班主任电话号码',
      prop: 'teacherPhone',
      addDisplay:false,
      editDisplay:false
    },
    {
      label:'预计招生人数',
      prop:'preStuNum',
      labelWidth: 120,
      hide:true,
      type:'number',
      rules: [{
        required: true,
        message: "请填写招生人数",
        trigger: "blur"
      }],
    },
    {
      label:'班级现有/原始人数',
      prop:'stuNum',
      slot: true,
      addDisplay:false,
      editDisplay:false
    },
    {
      label:'男',
      prop:'manStuNum',
      addDisplay:false,
      editDisplay:false,
      hide: true
    },
    {
      label:'女',
      prop:'girlStuNum',
      addDisplay:false,
      editDisplay:false,
      hide: true
    },
    {
      label:'班级qq',
      prop:'classQq',
      labelWidth: 120,
      addDisplay:false,
      hide:true,
      type:'number'
    },
    // {
    //   label:'是否毕业',
    //   prop:'isGraduate',
    //   labelWidth: 120,
    //   addDisplay:false,
    //   // search:true,
    //   type:'select',
    //   dicUrl:'/admin/dict/item/type/yes_no',
    //   props:{
    //     label:'label',
    //     value:'value'
    //   },
    //   rules: [{
    //     required: true,
    //     message: "请选择是否毕业",
    //     trigger: "blur"
    //   }],
    // },
    // {
    //   label:'是否顶岗',
    //   prop:'isPractice',
    //   labelWidth: 120,
    //   addDisplay:false,
    //   type:'select',
    //   // search:true,
    //   dicUrl:'/admin/dict/item/type/yes_no',
    //   props:{
    //     label:'label',
    //     value:'value'
    //   },
    //   rules: [{
    //     required: true,
    //     message: "请选择是否顶岗",
    //     trigger: "blur"
    //   }],
    // },
    // {
    //   label:'是否更岗',
    //   prop:'isUpdataPractice',
    //   labelWidth: 120,
    //   addDisplay:false,
    //   // search:true,
    //   type:'select',
    //   dicUrl:'/admin/dict/item/type/yes_no',
    //   props:{
    //     label:'label',
    //     value:'value'
    //   },
    //   rules: [{
    //     required: true,
    //     message: "请选择是否更岗",
    //     trigger: "blur"
    //   }],
    // },
    {
      label: '门禁规则',
      prop: 'gateRule',
      addDisplay:false,
      editDisplay:false,
      type: "select",
      dicUrl: "/stuwork/entrancerule/queryRuleNameList",
      props:{
        label:'ruleName',
        value:'id'
      },
    },
    {
      label: '班级状态',
      prop: 'classStatus',
      addDisplay:false,
      search:true,
      type: "select",
      dicData:global.CLASS_STATUS,
      props:{
        label:"label",
        value:"value"
      }

    },
    {
      label: '备注',
      prop: 'remarks',
      labelWidth: 120,
      type:'textarea',
      span:24,
      hide: true
    },
    {
      label: '流失率',
      prop: 'stuLoseRate',
      labelWidth: 100,
      addDisplay:false,
      editDisplay:false,
      slot:true
    },
  ]
}
