/**
 * @desc 角色管理
 * @date 2023-03-14
 */
// 表头
const tableColumnData = [
  {
    label: '登录名称',
    prop: 'loginName',
    tooltip: true,
  },
  {
    label: '用户名称',
    prop: 'viewName',
    tooltip: true,
  },
  {
    label: '启用状态',
    prop: 'state',
    tooltip: true,
  },
]
const formRow = [
  {
    elCol:[{
      label:'登录名称',
      prop:'login_name',
      tag:'elInput',
    },{
      label:'登录密码',
      prop:'password',
      tag:'elInput',
    }]
  },
  {
    elCol:[{
      label:'用户姓名',
      prop:'view_name',
      tag:'elInput',
    }]
  },
]
const formRow1 = [
  {
    elCol:[{
      label:'登录名称',
      prop:'login_name',
      tag:'elInput',
    },{
      label:'登录密码',
      prop:'password',
      tag:'elInput',
    }]
  },
  {
    elCol:[{
      label:'用户姓名',
      prop:'view_name',
      tag:'elInput',
    },{
      label:'是否启用',
      prop:'state',
      tag:'elSwitch',
      activeText: '是',
      inactiveText: '否',
      activeValue: 'Y',
      inactiveValue: 'N',
    }]
  },
]
const basicsRules ={
  login_name:[{
    required: true,
    message: '请输入登录名称',
    trigger: 'blur'
  }],
  password:[{
    required: true,
    message: '请输入登录密码',
    trigger: 'blur'
  }],
  view_name:[{
    required: true,
    message: '请输入用户姓名',
    trigger: 'blur'
  }],
  // nc_warehouse_name:[{
  //   required: true,
  //   message: '请输入NC仓库名称',
  //   trigger: 'blur'
  // }],
  // remark:[{
  //   required: true,
  //   message: '请输入备注',
  //   trigger: 'blur'
  // }],
}
const formRowRoles = [
  {
    elCol:[{
      label:'角色名称',
      prop:'roleName',
      tag:'elInput',
      span:24,
    }]
  },
  {
    elCol:[{
      label:'角色编码',
      prop:'roleCode',
      tag:'elInput',
      span:24,
    }]
  },
  {
    elCol: [{
      label: '显示序号',
      prop: 'sorts',
      tag: 'elInputNumber',
    }]
  },
]
const rolesRules = {
  roleName:[{
    required: true,
    message: '请输入角色名称',
    trigger: 'blur'
  }],
  roleCode:[{
    required: true,
    message: '请输入角色编码',
    trigger: 'blur'
  }],
}
const menuList = [
  {
    label: '菜单名称',
    prop: 'label',
    tooltip: true,
    align:"left"
  },
  {
    label: '是否显示',
    prop: 'hidden',
    tooltip: true,
  },
  {
    label: '是否分配',
    prop: 'ifCheck',
    tooltip: true,
  },
]
const dataPermissionsList = [
  {
    label: '定时器名称',
    prop: 'happen_name',
    tooltip: true,
  },
  {
    label: '备注',
    prop: 'remark',
    tooltip: true,
  },
]
export default {
  tableColumnData,
  formRow,
  basicsRules,
  formRow1,
  formRowRoles,
  rolesRules,
  menuList,
  dataPermissionsList
}