indexColumns.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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: 'xb',
  16. key: 'xb'
  17. },
  18. {
  19. title: '区间/站场',
  20. align: 'center',
  21. dataIndex: 'qj',
  22. key: 'qj'
  23. },
  24. {
  25. title: '车间/工区',
  26. align: 'center',
  27. dataIndex: 'bm',
  28. key: 'bm'
  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: 'zzxh',
  52. key: 'zzxh'
  53. },
  54. {
  55. title: '支柱类型',
  56. align: 'center',
  57. dataIndex: 'zzlx',
  58. key: 'zzlx'
  59. },
  60. {
  61. title: '安装时间',
  62. align: 'center',
  63. dataIndex: 'ccrq',
  64. key: 'ccrq'
  65. },
  66. {
  67. title: '操作',
  68. dataIndex: 'action',
  69. align: 'center',
  70. slots: { title: 'actionName' },
  71. scopedSlots: { customRender: 'action' }
  72. }
  73. ]
  74. return cols
  75. }
  76. export default columns