import {
  orderStatus
} from '@/assets/js/blockSort'
export const employee = () => {
  return [{
    field: 'index',
    label: '序号',
    align: 'center',
  }, {
    field: 'nickName',
    label: '姓名',
    align: 'center',
  }, {
    field: 'username',
    label: '用户名',
    align: 'center',
  }, {
    field: 'phone',
    label: '手机号',
    align: 'center',
  }, {
    field: 'action',
    label: '操作',
    colWidth: '260px',
    align: 'center',
    labelButton: [{
      type: 'edit',
      label: '编辑',
      icon: 'el-icon-edit',
      style: 'primary',
    }, {
      type: 'reset',
      label: '重置密码',
      icon: 'el-icon-refresh-left',
      style: 'warning',
    }, {
      type: 'del',
      label: '删除',
      icon: 'el-icon-delete',
      style: 'danger',
    }]
  }]
}

export const formRules = () => {
  return [{
    field: 'name',
    label: '姓名',
    placeholder: '请输入姓名',
    type: 'input',
    colWidth: 24,
    rules: [{
      required: true,
      message: '请输入姓名',
      trigger: 'blur'
    }]
  }, {
    field: 'username',
    label: '用户名',
    placeholder: '请输入用户名',
    type: 'input',
    colWidth: 24,
    rules: [{
      required: true,
      message: '请输入用户名',
      trigger: 'blur'
    }]
  }, {
    field: 'phone',
    label: '手机号',
    placeholder: '请输入手机号',
    type: 'input',
    colWidth: 24,
    rules: [{
      required: true,
      message: '请输入手机号',
      trigger: 'blur'
    }]
  }, {
    field: 'newPassword',
    label: '密码',
    placeholder: '请输入密码',
    type: 'input',
    colWidth: 24,
    rules: [{
      required: true,
      message: '请输入密码',
      trigger: 'blur'
    }, {
      min: 6,
      message: '长度不能小于6个字符',
      trigger: 'blur'
    }]
  }, {
    field: 'password',
    label: '确定密码',
    placeholder: '请再次输入密码',
    type: 'input',
    colWidth: 24,
    rules: [{
      required: true,
      message: '请再次输入密码',
      trigger: 'blur'
    }, {
      min: 6,
      message: '长度不能小于6个字符',
      trigger: 'blur'
    }]
  }]
}

export const formRulesil = () => {
  return [{
    field: 'name',
    label: '姓名',
    placeholder: '请输入姓名',
    type: 'input',
    colWidth: 24,
    rules: [{
      required: true,
      message: '请输入姓名',
      trigger: 'blur'
    }]
  }, {
    field: 'phone',
    label: '手机号',
    placeholder: '请输入手机号',
    type: 'input',
    colWidth: 24,
    rules: [{
      required: true,
      message: '请输入手机号',
      trigger: 'blur'
    }]
  }, ]
}
