// 用户列表配置信息
import Vue from 'vue'
import i18n from "../../../../lang";
let _vm = new Vue({
  i18n
})
export const columns = [
  { type: 'index' },
  {
    prop: 'UserCode',
    label: _vm.$t('S/N'),
    width: 100,
    sortable: 'custom',
    showOverflowTooltip: true
  },
  {
    prop: 'UserName',
    label: _vm.$t('admin:UserName'),
    minWidth: 100,
    sortable: 'custom',
    showOverflowTooltip: true
  },
  {
    prop: 'RealName',
    label: _vm.$t('admin:RealName'),
    minWidth: 120,
    sortable: 'custom',
    showOverflowTooltip: true
  },
  {
    prop: 'Sex',
    label: _vm.$t('admin:Sex'),
    hidden: true,
    slot: 'genderSlot',
    minWidth: 100,
    sortable: 'custom',
    showOverflowTooltip: true
  },
  {
    prop: 'Phone',
    label: _vm.$t('admin:Phone'),
    minWidth: 120,
    sortable: 'custom',
    showOverflowTooltip: true
  },
  {
    prop: 'EMail',
    label: _vm.$t('admin:EMail'),
    minWidth: 150,
    sortable: 'custom',
    showOverflowTooltip: true
  },
  {
    prop: 'OrganizationName',
    label: _vm.$t('admin:OrganizationName'),
    minWidth: 130,
    showOverflowTooltip: true
  },
  {
    prop: 'UserType',
    label: _vm.$t('admin:UserType'),
    minWidth: 100,
    sortable: 'custom',
    showOverflowTooltip: true
  },
  // {
  //   prop: 'RoleNameList',
  //   label: 'Roles',
  //   hidden: true,
  //   slot: 'roleSlot',
  //   minWidth: 250,
  //   showOverflowTooltip: true
  // },
  {
    prop: 'IsZhiZhun',
    label: _vm.$t('admin:IsZhiZhun'),
    hidden: true,
    slot: 'isZhiZhunSlot',
    minWidth: 140,
    sortable: 'custom',
    showOverflowTooltip: true },
  {
    prop: 'IsTestUser',
    label: _vm.$t('admin:IsTestUser'),
    hidden: true,
    slot: 'isTestUserSlot',
    minWidth: 120,
    sortable: 'custom',
    showOverflowTooltip: true },
  {
    prop: 'Status',
    label: _vm.$t('admin:Status'),
    hidden: true,
    slot: 'statusSlot',
    minWidth: 100,
    sortable: 'custom',
    showOverflowTooltip: true },
  { type: 'operate',
    label: _vm.$t('common:action:action'),
    minWidth: 200,
    operates: [
      { name: _vm.$t('common:button:edit'), type: 'primary', emitKey: 'editCb' },
      { name: _vm.$t('common:button:delete'), type: 'danger', emitKey: 'deleteCb' }
    ] }
]

// 用户列表查询表单配置信息
export const searchForm = [
  {
    type: 'Input',
    label: _vm.$t('admin:UserName'),
    prop: 'UserName',
    width: '120px',
    placeholder: ''
  },
  {
    type: 'Input',
    label: _vm.$t('admin:RealName'),
    prop: 'RealName',
    width: '120px',
    placeholder: ''
  },
  {
    type: 'Input',
    label: _vm.$t('admin:Phone'),
    prop: 'Phone',
    width: '120px',
    placeholder: ''
  },
  {
    type: 'Input',
    label: _vm.$t('admin:OrganizationName'),
    prop: 'OrganizationName',
    width: '120px',
    placeholder: ''
  },
  {
    type: 'Select',
    label: _vm.$t('admin:IsZhiZhun'),
    prop: 'IsZhiZhun',
    width: '100px',
    options: _vm.$d.IsZhiZhun,
    props: { label: 'label', value: 'value' },
    change: scope => '',
    placeholder: ''
  },
  {
    type: 'Select',
    label: _vm.$t('admin:IsTestUser'),
    prop: 'IsTestUser',
    width: '100px',
    options: _vm.$d.YesOrNo,
    props: { label: 'label', value: 'value' },
    change: scope => '',
    placeholder: ''
  },
  {
    type: 'Select',
    label: _vm.$t('admin:Status'),
    prop: 'UserState',
    width: '100px',
    options: _vm.$d.IsEnableByInt,
    props: { label: 'label', value: 'value' },
    change: scope => '',
    placeholder: ''
  },
  {
    type: 'Select',
    label: _vm.$t('admin:UserType'),
    prop: 'UserType',
    width: '100px',
    options: [], // 下拉选项
    props: { label: 'UserType', value: 'Id' }, // 下拉选项配置信息，必填
    placeholder: ''
  }
]
// 用户列表查询表单事件配置信息
export const searchHandle = [
  { label: _vm.$t('common:button:reset'), type: 'primary', emitKey: 'reset' },
  { label: _vm.$t('common:button:search'), type: 'primary', emitKey: 'search' }
]
