indexColumns.js 1.4 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: 'xingbie',
  34. key: 'xingbie'
  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: 'kgbh',
  52. key: 'kgbh'
  53. },
  54. {
  55. title: '开关型号',
  56. align: 'center',
  57. dataIndex: 'kgxh',
  58. key: 'kgxh'
  59. },
  60. {
  61. title: '生产厂家',
  62. align: 'center',
  63. dataIndex: 'sccj',
  64. key: 'sccj'
  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