/*
 *    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 {ROLE_CODE} from "../../../config/global";

export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dic: [],
  dialogWidth:"70%",
  labelWidth: 150,
  dialogClickModal:false,
  searchSize:'mini',
  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: 'repairGroupName',
      span: 24,
      rules: [{
        required: true,
        message: '请填写维修组名称',
        trigger: 'blur'
      },
        {
          min: 1,
          max: 100,
          message: '维修组名称长度在 1 到 100 个字符',
          trigger: 'blur'
        }
      ]
    },
    {
      span: 24,
      label: '维修组区域',
      prop: 'area',
      slot: true,
      overHidden: true,
      type: 'select',
      multiple:true,
      remote: false,
      props: {
        label: 'areaName',
        value: 'id'
      },
      dicUrl: '/support/repairarea/list?parentId=-1',
      rules: [{
        required: true,
        message: '请设置维修组区域',
        trigger: 'blur'
      }],
    },
    {
      span: 24,
      label: '维修组类型',
      prop: 'type',
      slot: true,
      overHidden: true,
      type: 'select',
      multiple:true,
      remote: false,
      props: {
        label: 'name',
        value: 'id'
      },
      dicUrl: '/support/repairtype/list?parentId=-1',
      rules: [{
        required: true,
        message: '请设置维修组类型',
        trigger: 'blur'
      }],
    },
    {
      span: 24,
      label: '维修组组长',
      prop: 'leader',
      slot: true,
      overHidden: true,
      type: 'select',
      multiple:false,
      remote: false,
      props: {
        label: 'realName',
        value: 'username'
      },
      dicUrl: '/admin/user/info/roleuser/'+ROLE_CODE.ROLE_SUPPORT_MEMBER,
      rules: [{
        required: true,
        message: '请设置维修组组长',
        trigger: 'blur'
      }],
    },
    {
      span: 24,
      label: '维修组组员',
      prop: 'user',
      slot: true,
      overHidden: true,
      type: 'select',
      multiple:true,
      filterable:true,
      remote: false,
      props: {
        label: 'realName',
        value: 'username'
      },
      dicUrl: '/admin/user/info/roleuser/'+ROLE_CODE.ROLE_SUPPORT_MEMBER,
      rules: [{
        required: true,
        message: '请设置维修组组员',
        trigger: 'blur'
      }],
    },
	  {
      label: '备注',
      prop: 'remarks',
      span: 24,
      overHidden: true,
      type: 'textarea',
      minRows: 6,
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      visdiplay:false
    },

  ]
}
