table.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. const tableConfig = {
  2. // 表格列配置
  3. columns: [
  4. {
  5. label: "编号",
  6. prop: "id",
  7. align: "center",
  8. width: 80,
  9. },
  10. {
  11. label: "卡号段",
  12. prop: "cardRange",
  13. align: "center",
  14. minWidth: 180,
  15. type: "slot",
  16. slotName: "cardRange",
  17. },
  18. {
  19. label: "申请数量",
  20. prop: "quantity",
  21. align: "center",
  22. width: 100,
  23. type: "slot",
  24. slotName: "quantity",
  25. },
  26. {
  27. label: "申请人",
  28. prop: "applicant",
  29. align: "center",
  30. minWidth: 120,
  31. },
  32. {
  33. label: "学校",
  34. prop: "schoolName",
  35. align: "center",
  36. minWidth: 150,
  37. },
  38. {
  39. label: "申请时间",
  40. prop: "createTime",
  41. align: "center",
  42. width: 180,
  43. type: "time",
  44. format: "{y}-{m}-{d} {h}:{i}:{s}",
  45. },
  46. {
  47. label: "申请状态",
  48. prop: "status",
  49. align: "center",
  50. width: 100,
  51. type: "slot",
  52. slotName: "status",
  53. },
  54. {
  55. label: "原因",
  56. prop: "auditDesc",
  57. align: "center",
  58. minWidth: 120,
  59. type: "slot",
  60. slotName: "auditDesc",
  61. },
  62. ],
  63. // 操作按钮配置
  64. actions: [
  65. {
  66. key: "review",
  67. label: "审核",
  68. type: "primary",
  69. link: true,
  70. permission: ["dz:open:review"],
  71. condition: (row) => row.status === 1, // 只有待审核状态才显示审核按钮
  72. },
  73. ],
  74. // 表格属性配置
  75. tableProps: {
  76. stripe: true,
  77. border: false,
  78. showSelection: true,
  79. showIndex: false,
  80. showPagination: true,
  81. actionWidth: 150,
  82. selectionMode: "multiple",
  83. rowKey: "id",
  84. },
  85. };
  86. export default tableConfig;