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

import { defineStore } from 'pinia'
export const useEchartsStore = defineStore({
id: 'echarts', // id必填,且需要唯一
// state
state: () => {
return {
binCharts: {},
}
},
// actions
actions: {
updateBinCharts(binCharts) {
this.binCharts = binCharts
},
},
getters: {
abscissaFormater(state) {
let arr = []
Object.keys(state.binCharts).map((item, index) => {
arr.push(`${item}`)
})
return arr
},
binTemp(state) {
let arr = []
Object.values(state.binCharts).map(item => {
arr.push(item[0])
})
return arr
},
binHumidity(state) {
let arr = []
Object.values(state.binCharts).map(item => {
arr.push(item[1])
})
return arr
},
binHP(state) {
let arr = []
Object.values(state.binCharts).map(item => {
arr.push(item[2])
})
return arr
},
binSaturation(state) {
let arr = []
Object.values(state.binCharts).map(item => {
arr.push(item[3])
})
return arr
},
},
})