gasInspectNonfc.data.ts 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. import { BasicColumn } from '/@/components/Table';
  2. export const columns: BasicColumn[] = [
  3. {
  4. title: '序号',
  5. width: 60,
  6. align: 'center',
  7. customRender: ({ index }: { index: number }) => `${index + 1}`
  8. },
  9. {
  10. title: '巡检卡ID',
  11. dataIndex: 'id',
  12. key: 'id',
  13. align: 'center',
  14. },
  15. {
  16. title: '地点',
  17. dataIndex: 'strInstallPos',
  18. key: 'strInstallPos',
  19. align: 'center',
  20. },
  21. {
  22. title: '巡检人',
  23. children: [
  24. {
  25. title: '早班',
  26. dataIndex: 'nameEarly',
  27. key: 'nameEarly',
  28. align: 'center',
  29. },
  30. {
  31. title: '中班',
  32. dataIndex: 'nameNoon',
  33. key: 'nameNoon',
  34. align: 'center',
  35. },
  36. {
  37. title: '晚班',
  38. dataIndex: 'nameNight',
  39. key: 'nameNight',
  40. align: 'center',
  41. },
  42. ],
  43. },
  44. {
  45. title: '是否巡检',
  46. children: [
  47. {
  48. title: '',
  49. dataIndex: 'insType',
  50. key: 'insType',
  51. align: 'center',
  52. },
  53. {
  54. title: '早班',
  55. dataIndex: 'morning',
  56. key: 'morning',
  57. align: 'center',
  58. },
  59. {
  60. title: '中班',
  61. dataIndex: 'afterNoon',
  62. key: 'afterNoon',
  63. align: 'center',
  64. },
  65. {
  66. title: '晚班',
  67. dataIndex: 'evening',
  68. key: 'eevening',
  69. align: 'center',
  70. },
  71. ],
  72. },
  73. {
  74. title: '操作',
  75. dataIndex: 'action',
  76. width: 250,
  77. align: 'center',
  78. slots: { customRender: 'action' },
  79. },
  80. ];
  81. export const columnsTask: BasicColumn[] = ([
  82. {
  83. title: '序号',
  84. width: 60,
  85. align: 'center',
  86. customRender: ({ index }: { index: number }) => `${index + 1}`
  87. },
  88. {
  89. title: '所属队别',
  90. dataIndex: 'name',
  91. key: 'name',
  92. align: 'center',
  93. },
  94. {
  95. title: '早班巡检',
  96. dataIndex: 'accountEarly',
  97. key: 'accountEarly',
  98. align: 'center',
  99. },
  100. {
  101. title: '中班巡检',
  102. dataIndex: 'accountNoon',
  103. key: 'accountNoon',
  104. align: 'center',
  105. },
  106. {
  107. title: '晚班巡检',
  108. dataIndex: 'accountNight',
  109. key: 'accountNight',
  110. align: 'center',
  111. },
  112. {
  113. title: '操作',
  114. dataIndex: 'action',
  115. width: 120,
  116. align: 'center',
  117. slots: { customRender: 'action' },
  118. },
  119. ])
  120. //分页参数
  121. export const pagination = {
  122. current: 1, // 当前页码
  123. pageSize: 10, // 每页显示条数
  124. total: 0, // 总条目数,后端返回
  125. // showTotal: (total, range) => `${range[0]}-${range[1]} 条,总共 ${total} 条`, // 分页右下角显示信息
  126. showSizeChanger: true, // 是否可改变每页显示条数
  127. pageSizeOptions: ['10', '20', '50'], // 可选的每页显示条数
  128. };