管道式消毒机
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.

75 lines
2.0 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. import { defineStore } from 'pinia'
  2. export const useTestStore = defineStore({
  3. id: 'test', // id必填,且需要唯一
  4. // state
  5. state: () => {
  6. return {
  7. // 加液蠕动泵开关
  8. feedingPeristalticPumpStatus: false,
  9. // 喷液蠕动泵开关
  10. sprayPeristalticPump: false,
  11. // 空压机开关
  12. airCompressor: false,
  13. // 风机开关
  14. draughtFan: false,
  15. // 加热
  16. heatingStrip: false,
  17. sprinklerPump: 0,
  18. chargingPump: 0,
  19. airCompressorObj: {},
  20. airBlowerObj: {},
  21. heatingStripObj: {},
  22. }
  23. },
  24. // actions
  25. actions: {
  26. updateAirCompressorObj(airCompressorObj) {
  27. const { io1, io2, currentVal } = airCompressorObj
  28. if (io1 == 1 && io2 == 1) {
  29. this.airCompressor = true
  30. } else {
  31. this.airCompressor = false
  32. }
  33. this.airCompressorObj = airCompressorObj
  34. },
  35. updateAirBlowerObj(airBlowerObj) {
  36. const { io1, io2, currentVal } = airBlowerObj
  37. if (io1 == 1 && io2 == 1) {
  38. this.draughtFan = true
  39. } else {
  40. this.draughtFan = false
  41. }
  42. this.airBlowerObj = airBlowerObj
  43. },
  44. updateHeatingStripObj(heatingStripObj) {
  45. const { io1, io2, currentVal } = heatingStripObj
  46. if (io1 == 1 && io2 == 1) {
  47. this.heatingStrip = true
  48. } else {
  49. this.heatingStrip = false
  50. }
  51. this.heatingStripObj = heatingStripObj
  52. },
  53. updateHeatingStrip(heatingStrip) {
  54. this.heatingStrip = heatingStrip
  55. },
  56. updateSprinklerPump(sprinklerPump) {
  57. this.sprinklerPump = sprinklerPump
  58. },
  59. updateChargingPump(chargingPump) {
  60. this.chargingPump = chargingPump
  61. },
  62. updateFeedingPeristalticPumpStatus(status) {
  63. this.feedingPeristalticPumpStatus = status
  64. },
  65. updateSprayPeristalticPump(status) {
  66. this.sprayPeristalticPump = status
  67. },
  68. updateAirCompressor(status) {
  69. this.airCompressor = status
  70. },
  71. updateDraughtFan(status) {
  72. this.draughtFan = status
  73. },
  74. },
  75. })