/*
 *    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,
  dic: [],
  column: [
    {
      label: '学院',
      prop: 'deptCode',
      addDisplay:false,
      editDisplay:false,
      type:"select",
      dicUrl: '/basic/basicdept/getDeptList?secondFlag=1',
      props: {
        label: 'deptName',
        value: 'deptCode'
      },
    },
    {
      label: '班号',
      prop: 'classCode',
      searchFilterable: true,
      addDisplay:false,
      editDisplay:false,
      filterable: true,
      type: 'select',
      dicUrl: '/basic/basicclass/listByRole',
      props: {
        label: 'classNo',
        value: 'classCode',
      },
      rules: [{
        required: true,
        message: '请填写班级代码',
        trigger: 'blur'
      }]
    },
	  {
      label: '姓名',
      prop: 'realName',
      addDisplay:false,
      editDisplay:false,
    },
	  {
      label: '学号',
      prop: 'userName',
      addDisplay:false,
      editDisplay:false,
    },
	  {
      label: '所在省',
      prop: 'province',
      type:'select',
      formslot:true,
      hide:true,
      props: {
        label: 'fullName',
        value: 'id',
      },
      rules: [{
        required: true,
        message: '请填写所在省',
        trigger: 'blur'
      }]
    },
    {
      label: '所在省',
      prop: 'provinceName',
      addDisplay:false,
      editDisplay:false,
    },
    {
      label: '所在市',
      prop: 'city',
      type:'select',
      hide:true,
      formslot:true,
      props: {
        label: 'fullName',
        value: 'id',
      },
      rules: [{
        required: true,
        message: '请填写所在市',
        trigger: 'blur'
      }]
    },
    {
      label: '所在市',
      prop: 'cityName',
      addDisplay:false,
      editDisplay:false,
    },
    {
      label: '所在区',
      prop: 'area',
      type:'select',
      hide:true,
      formslot:true,
      props: {
        label: 'fullName',
        value: 'id',
      },
      rules: [{
        required: true,
        message: '请填写所在区',
        trigger: 'blur'
      }]
    },
    {
      label: '所在区',
      prop: 'areaName',
      addDisplay:false,
      editDisplay:false,
    },
	  {
      label: '详细地址',
      prop: 'address',
      rules: [{
        required: true,
        message: '请填写详细地址',
        trigger: 'blur'
      },
        {
          min: 1,
          max: 100,
          message: '详细地址长度在 1 到 100 个字符',
          trigger: 'blur'
        }
      ]
    }
  ]
}
