const.ts 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import type { SelectProps } from 'ant-design-vue'
  2. // 设备列表表头
  3. export const columns = [
  4. {
  5. title: '设备ID',
  6. dataIndex: 'clientId',
  7. key: 'clientId',
  8. align: 'center',
  9. },
  10. {
  11. title: '设备名称',
  12. dataIndex: 'devName',
  13. key: 'devName',
  14. align: 'center',
  15. width: 300,
  16. },
  17. {
  18. title: '设备状态',
  19. key: 'online',
  20. dataIndex: 'online',
  21. align: 'center',
  22. },
  23. {
  24. title: '活动状态',
  25. key: 'activeState',
  26. dataIndex: 'activeState',
  27. align: 'center',
  28. width: 200,
  29. },
  30. {
  31. title: '归属租户',
  32. key: 'tenantName',
  33. dataIndex: 'tenantName',
  34. align: 'center',
  35. width: 300,
  36. },
  37. {
  38. title: '操作',
  39. key: 'action',
  40. dataIndex: 'action',
  41. align: 'center',
  42. // fixed: 'right',
  43. width: 150,
  44. },
  45. ]
  46. // 设备状态选项
  47. export const deviceStatusOptions: SelectProps['options'] = [
  48. {
  49. label: '全部',
  50. value: null,
  51. },
  52. {
  53. label: '在线',
  54. value: 1,
  55. },
  56. {
  57. label: '离线',
  58. value: 0,
  59. },
  60. ]