indexColumns.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. function columns(vm) {
  2. const cols = [
  3. {
  4. title: '序号',
  5. key: 'rowIndex',
  6. width: 60,
  7. align: 'center',
  8. customRender: function(t, r, index) {
  9. return parseInt(index) + 1
  10. }
  11. },
  12. {
  13. title: '姓名',
  14. align: 'center',
  15. dataIndex: 'realName',
  16. key: 'realName'
  17. },
  18. {
  19. title: '登录账号',
  20. align: 'center',
  21. dataIndex: 'userName',
  22. key: 'userName'
  23. },
  24. {
  25. title: '部门',
  26. align: 'center',
  27. dataIndex: 'dept',
  28. scopedSlots: { customRender: 'dept' },
  29. key: 'dept'
  30. }, {
  31. title: '岗位类型',
  32. align: 'center',
  33. dataIndex: 'postText',
  34. key: 'postText'
  35. },
  36. {
  37. title: '职务',
  38. align: 'center',
  39. dataIndex: 'roleName',
  40. key: 'roleName'
  41. },
  42. {
  43. title: '手机号',
  44. align: 'center',
  45. dataIndex: 'phone',
  46. key: 'phone'
  47. },
  48. {
  49. title: '状态',
  50. align: 'center',
  51. dataIndex: 'status',
  52. scopedSlots: { customRender: 'status' },
  53. key: 'status'
  54. },
  55. {
  56. title: '操作',
  57. dataIndex: 'action',
  58. width: 350,
  59. align: 'center',
  60. slots: { title: 'actionName' },
  61. scopedSlots: { customRender: 'action' }
  62. }
  63. ]
  64. return cols
  65. }
  66. export default columns