indexColumns.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. scopedSlots: { customRender: 'xb' },
  17. key: 'xb',
  18. width: 300
  19. },
  20. {
  21. title: '区间/站场',
  22. align: 'center',
  23. dataIndex: 'qj',
  24. key: 'qj'
  25. },
  26. {
  27. title: '车间/工区',
  28. align: 'center',
  29. dataIndex: 'bm',
  30. key: 'bm'
  31. },
  32. {
  33. title: '行别',
  34. align: 'center',
  35. dataIndex: 'hb',
  36. key: 'hb'
  37. },
  38. {
  39. title: '支柱号',
  40. align: 'center',
  41. dataIndex: 'zzh',
  42. key: 'zzh'
  43. },
  44. {
  45. title: '公里标',
  46. align: 'center',
  47. dataIndex: 'glb',
  48. key: 'glb'
  49. },
  50. {
  51. title: '规格型号',
  52. align: 'center',
  53. dataIndex: 'zzxh',
  54. key: 'zzxh'
  55. },
  56. {
  57. title: '支柱类型',
  58. align: 'center',
  59. dataIndex: 'zzlx',
  60. key: 'zzlx'
  61. },
  62. {
  63. title: '安装时间',
  64. align: 'center',
  65. dataIndex: 'createTime',
  66. key: 'createTime'
  67. },
  68. {
  69. title: '操作',
  70. dataIndex: 'action',
  71. align: 'center',
  72. slots: { title: 'actionName' },
  73. scopedSlots: { customRender: 'action' }
  74. }
  75. ]
  76. return cols
  77. }
  78. export default columns