/*
 *    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,
  dic: [],
  column: [
	  // {
    //   label: '主键',
    //   prop: 'id'
    // },
	  // {
    //   label: '创建人',
    //   prop: 'createBy'
    // },
	  {
      label: '创建时间',
      prop: 'createTime',
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false,
      hide:true
    },
	  // {
    //   label: '更新人',
    //   prop: 'updateBy'
    // },
	  // {
    //   label: '更新时间',
    //   prop: 'updateTime'
    // },
	  // {
    //   label: '删除标记',
    //   prop: 'delFlag'
    // },
	  // {
    //   label: '租户ID',
    //   prop: 'tenantId'
    // },
	  // {
    //   label: '备注',
    //   prop: 'remarks'
    // },
	  {
      label: '学年',
      prop: 'schoolYear',
      labelWidth:120,
      addDisplay:false,
      editDisplay:false,
      type:'select',
      // search:true,
      dicUrl:'/basic/basicyear/queryAllSchoolYear',
      props:{
        label:'year',
        value:'year'
      },
      rules: [{
          required: true,
          trigger: 'blur',
          message:"请选择学年"
        }]
    },
    {
      label: '学期',
      prop: 'schoolTerm',
      labelWidth:120,
      addDisplay:false,
      editDisplay:false,
      type:'select',
      // search:true,
      dicUrl:'/admin/dict/item/type/school_term',
      props:{
        label:'label',
        value:'value'
      },
      rules: [{
          required: true,
          trigger: 'blur',
          message:"请选择学期"
        }]
    },
    {
      label:'学院',
      prop:'deptCode',
      search:true,
      type:'select',
      dicUrl: '/basic/basicdept/getDeptList?secondFlag=1',
      props: {
        label: 'deptName',
        value: 'deptCode'
      },
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false,
    },
    {
      label: '班级',
      prop: 'classCode',
      labelWidth:120,
      editDisplay:false,
      searchFilterable:true,
      search:true,
      // hide:true,
      formslot: true,
      type:'select',
      dicUrl:'/basic/basicclass/listByRole',
      props:{
        label: 'classNo',
        value: 'classCode',
      },
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请选择班级"
      }]
    },
    {
      label:'姓名',
      prop:'realName',
      search:true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false,
    },
    {
      label: '学号',
      prop: 'stuNo',
      labelWidth:120,
      search:true,
      formslot: true,
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请选择学生"
      }]
    },
    {
      label: '处分时间',
      prop: 'punlishStartDate',
      labelWidth:120,
      type:'date',
      format:'yyyy-MM-dd',
      valueFormat:'yyyy-MM-dd HH:mm:ss',
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请选择开始时间"
      }]
    },
    {
      label:'处分月份',
      prop:'punlishMonth',
      search:true,
      type:'month',
      format:'yyyy-MM',
      valueFormat:'yyyy-MM',
      addDisplay:false,
      editDisplay:false,
      hide:true
    },
	  {
      label: '到期日',
      prop: 'punlishEndDate',
      labelWidth:120,
      type:'date',
      format:'yyyy-MM-dd',
      valueFormat:'yyyy-MM-dd HH:mm:ss',
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请选择结束时间"
      }]
    },
	  {
      label: '处分级别',
      prop: 'punlishLevel',
      search:true,
      labelWidth:120,
      type:'select',
      dicUrl:'/admin/dict/item/type/punlish_level',
      props:{
        label:'label',
        value:'value'
      },
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请选择处分级别"
      }]
    },
	  {
      label: '处分内容',
      prop: 'punlishContent',
      labelWidth:120,
      span:24,
      overHidden:true,
      type:'textarea',
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请填写处分内容"
      }]
    },
	  {
      label: '处分状态',
      prop: 'publishStatus',
      // search:true,
      labelWidth:120,
      addDisplay:false,
      search:true,
      // editDisplay:false,
      type:"select",
      dicUrl:'/admin/dict/item/type/publish_status',
      props:{
        label:'label',
        value:'value'
      },
    },
	  {
      label: '附件地址',
      prop: 'attachment',
      labelWidth:120,
      addDisplay:false,
      editDisplay:false,
      hide:true
    },
  ]
}
