indexColumns.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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: 'lineType',
  16. key: 'lineType'
  17. },
  18. {
  19. title: '线路名称',
  20. align: 'center',
  21. dataIndex: 'lineName',
  22. key: 'lineName'
  23. },
  24. {
  25. title: '所属车间',
  26. align: 'center',
  27. dataIndex: 'deptName',
  28. key: 'deptName'
  29. },
  30. {
  31. title: '行别',
  32. align: 'center',
  33. dataIndex: 'hb',
  34. key: 'hb'
  35. },
  36. {
  37. title: '开始公里标',
  38. align: 'center',
  39. dataIndex: 'lineStartMarker',
  40. key: 'lineStartMarker'
  41. },
  42. {
  43. title: '结束公里标',
  44. align: 'center',
  45. dataIndex: 'lineEndMarker',
  46. key: 'lineEndMarker'
  47. },
  48. {
  49. title: '操作',
  50. dataIndex: 'action',
  51. align: 'center',
  52. slots: { title: 'actionName' },
  53. scopedSlots: { customRender: 'action' }
  54. }
  55. ]
  56. return cols
  57. }
  58. export default columns