CommonConstants.ets 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. import {RobotInfo} from '../../viewmodel/wms/rgv/RobotsParam'
  2. import DictValue from '../../viewmodel/DictValue'
  3. import HashMap from '@ohos.util.HashMap'
  4. export default class CommonConstants {
  5. static readonly RDB_NAME: string = 'Presentation.db'
  6. static readonly PRE_NAME: string = 'MyPreferences'
  7. static AUTH_TOKEN: string = ''
  8. // 附件地址前缀
  9. static FILE_URL_PREFIX: string = 'http://192.168.1.3:9000'
  10. // 当前登录用户相关信息
  11. static USER_ID?: number = 1
  12. static USER_NAME: string = ''
  13. static USER_AVATAR: string = ''
  14. static STATION_NANE: string = ''
  15. static STATION_ID: number
  16. static STATION_CODE: string = 'GW0002'
  17. static STATION_IP: string = ''
  18. static stationDictValue: string = ''
  19. static MATERIAL_BOX_ID: string = ''
  20. // 是否是退出登陆
  21. static LOGIN_OUT: boolean = false
  22. static readonly STORAGE_TYPE: string[] = ['电子元器件', '电路板', '结构件', '辅助材料']
  23. //吊篮高度
  24. static readonly HANGING_HEIGHT :Array<SelectOption> =[
  25. {value:"原位"},
  26. {value:"第一层"},
  27. {value:"第二层"},
  28. {value:"第三层"},
  29. {value:"第四层"},
  30. {value:"第五层"},
  31. {value:"第六层"},
  32. {value:"工位料口层"},
  33. {value:"库位料口层"}
  34. ]
  35. static readonly PARK_TYPE: string[] = ['出入库位置', '充电位置', '工作台', '其他']
  36. static readonly RGV_STATUS: Record<string, string> = {
  37. '0': '空闲',
  38. '1': '移动中',
  39. '2': '等待路径',
  40. '3': '取箱中',
  41. '4': '放箱中',
  42. '5': '充电中',
  43. '6': '关机',
  44. };
  45. static readonly ROBOTS: RobotInfo[] = [
  46. {
  47. id: 1,
  48. robotCode: 'rgv1',
  49. robotNo:'RGV-001',
  50. storageId: 1,
  51. robotType: 2,
  52. robotToward: 2,
  53. x: 1,
  54. y: 1,
  55. lastSelfCheck: '2024/02/16 11:11:34'
  56. } as RobotInfo,
  57. {
  58. id: 2,
  59. robotCode: 'rgv2',
  60. robotNo:'RGV-002',
  61. storageId: 1,
  62. robotType: 2,
  63. robotToward: 2,
  64. x: 1,
  65. y: 1,
  66. lastSelfCheck: '2024/02/16 11:11:34'
  67. } as RobotInfo,
  68. ]
  69. static DICT_DATA: HashMap<string, DictValue[]> = new HashMap<string, DictValue[]>()
  70. }