columns.ts 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. import { h } from 'vue';
  2. import { ElTag } from 'element-plus';
  3. import { BasicColumn } from '@/components/Table';
  4. // export const columns: BasicColumn[] = [
  5. // // {
  6. // // type: 'selection',
  7. // // },
  8. // {
  9. // label: '账号',
  10. // prop: 'username',
  11. // },
  12. // {
  13. // label: '用户名',
  14. // prop: 'nickname',
  15. // },
  16. // {
  17. // label: '手机',
  18. // prop: 'mobile',
  19. // },
  20. // {
  21. // label: '状态',
  22. // prop: 'isEnable',
  23. // render(record) {
  24. // return h(
  25. // ElTag,
  26. // {
  27. // type: record.row.isEnable ? 'success' : 'danger',
  28. // },
  29. // {
  30. // default: () => (record.row.isEnable ? '启用' : '禁用'),
  31. // },
  32. // );
  33. // },
  34. // },
  35. // {
  36. // label: '角色',
  37. // prop: 'roleName',
  38. // },
  39. // {
  40. // label: '租户',
  41. // prop: 'tenantName',
  42. // },
  43. // {
  44. // label: '部门',
  45. // prop: 'deptName',
  46. // },
  47. // {
  48. // label: '岗位',
  49. // prop: 'postName',
  50. // },
  51. // // {
  52. // // label: '描述',
  53. // // prop: 'remark',
  54. // // },
  55. // {
  56. // label: '创建时间',
  57. // prop: 'createTime',
  58. // },
  59. // ];
  60. export const columns: BasicColumn[] = [
  61. {
  62. type: 'selection',
  63. },
  64. // {
  65. // label: '账号',
  66. // prop: 'username',
  67. // },
  68. {
  69. label: '工号',
  70. prop: 'username',
  71. },
  72. // {
  73. // label: '用户名',
  74. // prop: 'nickname',
  75. // },
  76. {
  77. label: '姓名',
  78. prop: 'nickname',
  79. },
  80. {
  81. label: '手机',
  82. prop: 'mobile',
  83. },
  84. {
  85. label: '状态',
  86. prop: 'isEnable',
  87. render(record) {
  88. return h(
  89. ElTag,
  90. {
  91. type: record.row.isEnable ? 'success' : 'danger',
  92. },
  93. {
  94. default: () => (record.row.isEnable ? '正常' : '锁定'),
  95. },
  96. );
  97. },
  98. },
  99. {
  100. label: '角色',
  101. prop: 'roleName',
  102. },
  103. // {
  104. // label: '租户',
  105. // prop: 'tenantName',
  106. // },
  107. // {
  108. // label: '部门',
  109. // prop: 'deptName',
  110. // },
  111. {
  112. label: '组织',
  113. prop: 'postName',
  114. },
  115. // {
  116. // label: '岗位',
  117. // prop: 'postName',
  118. // },
  119. // {
  120. // label: '描述',
  121. // prop: 'remark',
  122. // },
  123. {
  124. label: '创建时间',
  125. prop: 'createTime',
  126. minWidth: 100,
  127. },
  128. ];