/*
 *    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.
 *
 */

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: 'deptCode',
      addDisplay:false,
      editDisplay:false,
      search:true,
      hide:true,
      type:"select",
      dicUrl: '/basic/basicdept/getDeptList?secondFlag=1',
      props: {
        label: 'deptName',
        value: 'deptCode'
      },
    },
    {
      label: '姓名',
      prop: 'realName',
      search:true,
      labelWidth:140,
      span:24,
      addDisplay:false,
      editDisabled:true
    },
    {
      label: '生日',
      prop: 'birthday',
      hide:true,
    },
    {
      label: '政治面貌',
      prop: 'politicsStatus',
      hide:true,
    },
    {
      label: '学号',
      prop: 'stuNo',
      labelWidth:140,
      span:24,
      addDisplay:false,
      editDisabled:true
    },
    {
      label: '身份证',
      prop: 'idCard',
      search:true,
      hide:true,
      labelWidth:140,
      span:24,
      addDisplay:false,
      editDisabled:true
    },
    {
      label: '性别',
      prop: 'gender',
      type:"select",
      hide:true,
      dicUrl: '/admin/dict/item/type/sexy',
      props:{
        label:'label',
        value:'value'
      },
    },
    {
      label: '专业名称',
      prop: 'majorName',
      labelWidth:140,
      span:24,
      addDisplay:false,
      editDisabled:true
    },
    {
      label: '班级名称',
      prop: 'classCode',
      searchFilterable:true,
      addDisplay:false,
      editDisplay:false,
      search:true,
      type:"select",
      //dicUrl:'/basic/basicclass/list',
      dicUrl:'basic/basicclass/queryUserClass',
      props:{
        label: 'className',
        value: 'classCode',
      },
    },
    {
      label: '文化程度',
      prop: 'education',
      addDisplay:false,
      editDisplay: false,
      type:"select",
      hide:true,
      dicUrl: '/admin/dict/item/type/pre_school_education',
      props:{
        label:'label',
        value:'value'
      },
    },
    {
      label: '学制',
      prop: 'majorYears',
      type:"select",
      hide:true,
      dicUrl: '/admin/dict/item/type/basic_major_years',
    },
    {
      label: '学籍状态',
      prop: 'enrollStatus',
      addDisplay:false,
      editDisplay: false,
      type:"select",
      dicUrl: '/admin/dict/item/type/enroll_status',
      props:{
        label:'label',
        value:'value'
      },
    },
    {
      label: '状态',
      prop: 'studentStatus',
      width: '60%',//表格宽度
      search:true,
      type:"select",
      dicUrl: '/admin/dict/item/type/student_status',
      editDisabled:true,
      editDisplay:false,
      props:{
        label:'label',
        value:'value'
      },
    },
    {
      label: '奖惩情况',
      prop: 'rewards',
      overHidden:true
    },
    {
      label: '自我评价',
      prop: 'evaluation',
      overHidden:true
    },
    {
      label: '毕业鉴定',
      prop: 'appraisal',
      overHidden:true
    },
  ]
}

//家庭成员
export const relationHomeOption={
  keyId:'id',
  addBtn:false,
  editBtn:false,
  addRowBtn:false,
  cellBtn:true,
  menu:false,
  column: [{
    label:'称谓',
    prop: 'appellation',
    cell: true,
    type:'select',
    dicUrl:`/admin/dict/item/type/family_member_type`,
    props:{
      label:'label',
      value:'value',
    },
    rules: [
      {
        required: true,
        message: '请输入称谓',
        trigger: 'blur'
      }
    ]
  },
    {
      label:'姓名',
      prop: 'realName',
      cell: true,
      rules: [
        {
          required: true,
          message: '请输入姓名',
          trigger: 'blur'
        }
      ]
    },
    {
      label:'电话',
      prop: 'tel',
      cell: true,
      rules: [
        {
          required: true,
          message: '请输入电话',
          trigger: 'blur'
        },
        { min:8 ,max: 12, message: '8-12位数字', trigger: 'blur' }
      ]
    },
    {
      label:'身份证号',
      prop: 'idCard',
      cell: true,
      rules: [
        {
          required: true,
          message: '请输入身份证号',
          trigger: 'blur'
        },
        { min:11 ,max:18 , message: '18位', trigger: 'blur' }
      ]
    },
    {
      label:'工作单位',
      prop: 'workAddress',
      cell: true,
      rules: [
        {
          required: true,
          message: '请输入工作单位',
          trigger: 'blur'
        }
      ]
    },
    {
      label:'政治面貌',
      prop: 'politicsStatus',
      type:'select',
      cell: true,
      dicUrl:`/admin/dict/item/type/political_family`,
      props:{
        label:'label',
        value:'value',
      }
    },
    {
      label:'身体状况',
      prop: 'health',
      type:'select',
      cell: true,
      dicUrl:`/admin/dict/item/type/health_status`,
      props:{
        label:'label',
        value:'value',
      }
    },
  ]
}
