indexColumns.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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: 'substationName',
  16. key: 'substationName'
  17. },
  18. {
  19. title: '线别',
  20. align: 'center',
  21. dataIndex: 'lineName',
  22. key: 'lineName'
  23. },
  24. {
  25. title: '工区',
  26. align: 'center',
  27. dataIndex: 'workArea',
  28. key: 'workArea'
  29. },
  30. {
  31. title: '经度',
  32. align: 'center',
  33. dataIndex: 'longitude',
  34. key: 'longitude'
  35. },
  36. {
  37. title: '纬度',
  38. align: 'center',
  39. dataIndex: 'latitude',
  40. key: 'latitude'
  41. },
  42. {
  43. title: '公里标',
  44. align: 'center',
  45. dataIndex: 'marker',
  46. key: 'marker'
  47. },
  48. {
  49. title: '操作',
  50. dataIndex: 'action',
  51. width: 200,
  52. align: 'center',
  53. slots: { title: 'actionName' },
  54. scopedSlots: { customRender: 'action' }
  55. }
  56. ]
  57. return cols
  58. }
  59. export default columns