indexColumns.js 1.3 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: '',
  22. key: ''
  23. },
  24. {
  25. title: '区间站场',
  26. align: 'center',
  27. dataIndex: 'zhanqujian',
  28. key: 'zhanqujian'
  29. },
  30. {
  31. title: '行别',
  32. align: 'center',
  33. dataIndex: 'xingbie',
  34. key: 'xingbie'
  35. },
  36. {
  37. title: '分相名称',
  38. align: 'center',
  39. dataIndex: 'fenxiang',
  40. key: 'fenxiang'
  41. },
  42. {
  43. title: '支柱号范围',
  44. align: 'center',
  45. dataIndex: 'zzhfw',
  46. key: 'zzhfw'
  47. },
  48. {
  49. title: '磁枕里程',
  50. align: 'center',
  51. dataIndex: '',
  52. key: ''
  53. },
  54. {
  55. title: '设备编号',
  56. align: 'center',
  57. dataIndex: '',
  58. key: ''
  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