const.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. import type { SelectProps } from 'ant-design-vue'
  2. // 设备列表表头
  3. export const columns = [
  4. {
  5. title: '设备ID\n设备名称',
  6. dataIndex: 'info',
  7. key: 'info',
  8. align: 'center',
  9. customHeaderCell: () => {
  10. return {
  11. style: {
  12. whiteSpace: 'pre-line',
  13. },
  14. }
  15. },
  16. },
  17. {
  18. title: '固件版本',
  19. key: 'hardware',
  20. dataIndex: 'hardware',
  21. align: 'center',
  22. width: 200,
  23. },
  24. {
  25. title: '设备状态\n活动状态',
  26. dataIndex: 'online',
  27. key: 'online',
  28. align: 'center',
  29. customHeaderCell: () => {
  30. return {
  31. style: {
  32. whiteSpace: 'pre-line',
  33. },
  34. }
  35. },
  36. },
  37. {
  38. title: '归属租户',
  39. key: 'tenantName',
  40. dataIndex: 'tenantName',
  41. align: 'center',
  42. width: 300,
  43. },
  44. {
  45. title: '今日掉线次数\n今日进出次数',
  46. dataIndex: 'offlineCount',
  47. key: 'offlineCount',
  48. align: 'center',
  49. customHeaderCell: () => {
  50. return {
  51. style: {
  52. whiteSpace: 'pre-line',
  53. },
  54. }
  55. },
  56. width: 150,
  57. },
  58. {
  59. title: '操作',
  60. key: 'action',
  61. dataIndex: 'action',
  62. align: 'center',
  63. width: 150,
  64. },
  65. ]
  66. // 设备状态选项
  67. export const deviceStatusOptions: SelectProps['options'] = [
  68. {
  69. label: '全部',
  70. value: null,
  71. },
  72. {
  73. label: '在线',
  74. value: 1,
  75. },
  76. {
  77. label: '离线',
  78. value: 0,
  79. },
  80. {
  81. label: '未激活',
  82. value: 9,
  83. },
  84. ]