You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.2 KiB

5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
  1. import { defineStore } from 'pinia'
  2. export const useSystemStore = defineStore('system', {
  3. state: () => ({
  4. systemStatus: {
  5. spraying: false, // 设备是否正在进行的喷涂任务
  6. paused: false, // 喷涂任务暂停状态
  7. suspendable: false, // 当前状态是否可以暂停
  8. cleaningSyringePipeline: false, // 是否正在清洗注射器管路
  9. cleaningNozzlePipeline: false, // 是否正在清洗喷嘴管路
  10. prefilling: false, // 是否正在预充
  11. dehumidifierRunning: false, // 是否正在除湿
  12. selfTestCompleted: false, // 是否完成自检
  13. stopPressed: false, // 是否按下急停
  14. },
  15. systemSensor: {
  16. humidity: 0,
  17. },
  18. isDebug: true,
  19. streamVisible: false,
  20. systemList: [{ cmdCode: '' }],
  21. }),
  22. actions: {
  23. updateSystemStatus(status: any) {
  24. this.systemStatus = status
  25. },
  26. updateSystemSensor(info: any) {
  27. this.systemSensor = info
  28. },
  29. updateDebug() {
  30. this.isDebug = !this.isDebug
  31. },
  32. updateStreamVisible(bool: boolean) {
  33. this.streamVisible = bool
  34. },
  35. pushSystemList(text: any) {
  36. this.systemList.push(text)
  37. },
  38. },
  39. })