indexColumns.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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: 'pillarArea',
  40. key: 'pillarArea'
  41. },
  42. {
  43. title: '公里标范围',
  44. align: 'center',
  45. dataIndex: 'marker',
  46. key: 'marker'
  47. },
  48. {
  49. title: '线岔号',
  50. align: 'center',
  51. dataIndex: 'xch',
  52. key: 'xch'
  53. },
  54. {
  55. title: '操作',
  56. dataIndex: 'action',
  57. width: 200,
  58. align: 'center',
  59. slots: { title: 'actionName' },
  60. scopedSlots: { customRender: 'action' }
  61. }
  62. ]
  63. return cols
  64. }
  65. export default columns