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

53 lines
1.1 KiB

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 useEchartsStore = defineStore({
  3. id: 'echarts', // id必填,且需要唯一
  4. // state
  5. state: () => {
  6. return {
  7. binCharts: {},
  8. }
  9. },
  10. // actions
  11. actions: {
  12. updateBinCharts(binCharts) {
  13. this.binCharts = binCharts
  14. },
  15. },
  16. getters: {
  17. abscissaFormater(state) {
  18. let arr = []
  19. Object.keys(state.binCharts).map((item, index) => {
  20. arr.push(`${item}`)
  21. })
  22. return arr
  23. },
  24. binTemp(state) {
  25. let arr = []
  26. Object.values(state.binCharts).map(item => {
  27. arr.push(item[0])
  28. })
  29. return arr
  30. },
  31. binHumidity(state) {
  32. let arr = []
  33. Object.values(state.binCharts).map(item => {
  34. arr.push(item[1])
  35. })
  36. return arr
  37. },
  38. binHP(state) {
  39. let arr = []
  40. Object.values(state.binCharts).map(item => {
  41. arr.push(item[2])
  42. })
  43. return arr
  44. },
  45. binSaturation(state) {
  46. let arr = []
  47. Object.values(state.binCharts).map(item => {
  48. arr.push(item[3])
  49. })
  50. return arr
  51. },
  52. },
  53. })