syColumns.js 1002 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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: 'toolCode',
  16. key: 'toolCode'
  17. },
  18. {
  19. title: '工具名称',
  20. align: 'center',
  21. dataIndex: 'toolName',
  22. key: 'toolName'
  23. },
  24. {
  25. title: '车间',
  26. align: 'center',
  27. dataIndex: 'deptName',
  28. key: 'deptName'
  29. },
  30. {
  31. title: '存放处所',
  32. align: 'center',
  33. dataIndex: 'storePlace',
  34. key: 'storePlace'
  35. },
  36. {
  37. title: '上次检验日期',
  38. align: 'center',
  39. dataIndex: 'lastTestDate',
  40. key: 'lastTestDate'
  41. },
  42. {
  43. title: '结果',
  44. align: 'center',
  45. dataIndex: 'isok',
  46. scopedSlots: { customRender: 'isok' },
  47. key: 'isok'
  48. }
  49. ]
  50. return cols
  51. }
  52. export default columns