indexColumns.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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: 'deptName',
  16. key: 'deptName'
  17. },
  18. {
  19. title: '线路',
  20. align: 'center',
  21. dataIndex: 'lineName',
  22. key: 'lineName'
  23. },
  24. {
  25. title: '站场区间',
  26. align: 'center',
  27. dataIndex: 'stationName',
  28. key: 'stationName'
  29. },
  30. {
  31. title: '行别',
  32. align: 'center',
  33. dataIndex: 'xingbieText',
  34. key: 'xingbieText'
  35. },
  36. {
  37. title: '开始公里标',
  38. align: 'center',
  39. dataIndex: 'startMarker',
  40. key: 'startMarker'
  41. },
  42. {
  43. title: '结束公里标',
  44. align: 'center',
  45. dataIndex: 'endMarker',
  46. key: 'endMarker'
  47. },
  48. {
  49. title: '支柱号',
  50. align: 'center',
  51. dataIndex: 'pillarCode',
  52. key: 'pillarCode'
  53. },
  54. {
  55. title: '风险源',
  56. align: 'center',
  57. dataIndex: 'riskSource',
  58. key: 'riskSource'
  59. },
  60. {
  61. title: '采取措施',
  62. align: 'center',
  63. dataIndex: 'measures',
  64. key: 'measures'
  65. },
  66. {
  67. title: '操作',
  68. dataIndex: 'action',
  69. width: 200,
  70. align: 'center',
  71. slots: { title: 'actionName' },
  72. scopedSlots: { customRender: 'action' }
  73. }
  74. ]
  75. return cols
  76. }
  77. export default columns