indexColumns.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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: 'bm',
  16. key: 'bm'
  17. },
  18. {
  19. title: '线别',
  20. align: 'center',
  21. dataIndex: 'xb',
  22. key: 'xb'
  23. },
  24. {
  25. title: '区间站场',
  26. align: 'center',
  27. dataIndex: 'qj',
  28. key: 'qj'
  29. },
  30. {
  31. title: '行别',
  32. align: 'center',
  33. dataIndex: 'hb',
  34. key: 'hb'
  35. },
  36. {
  37. title: '支柱号',
  38. align: 'center',
  39. dataIndex: 'zzh',
  40. key: 'zzh'
  41. },
  42. {
  43. title: '公里标',
  44. align: 'center',
  45. dataIndex: 'glb',
  46. key: 'glb'
  47. },
  48. {
  49. title: '生产厂家',
  50. align: 'center',
  51. dataIndex: 'sccj',
  52. key: 'sccj'
  53. },
  54. {
  55. title: '型号',
  56. align: 'center',
  57. dataIndex: 'blqxh',
  58. key: 'blqxh'
  59. },
  60. {
  61. title: '操作',
  62. dataIndex: 'action',
  63. align: 'center',
  64. slots: { title: 'actionName' },
  65. scopedSlots: { customRender: 'action' }
  66. }
  67. ]
  68. return cols
  69. }
  70. export default columns