yudao-dev/src/store/modules/websocket.js
2023-12-29 09:26:07 +08:00

53 lines
1.1 KiB
JavaScript

const state = {
fanFrequencyInfo:{},// 分机运行频率
kilnInfo:{},// 窑炉信息
gasInfo:{},// 天然气
israKiln:[],// ISRA缺陷检测
material:[]// 原料
};
const mutations = {
SET_FANFREQUENCYINFO: (state, fanFrequencyInfo) => {
state.fanFrequencyInfo = fanFrequencyInfo
},
SET_KILNINFO: (state, kilnInfo) => {
state.kilnInfo = kilnInfo
},
SET_GASINFO: (state, gasInfo) => {
state.gasInfo = gasInfo
},
SET_ISRAKILN: (state, israKiln) => {
state.israKiln = israKiln
},
SET_MATERIAL: (state, material) => {
state.material = material
}
};
const actions = {
setFanFrequencyInfo({ commit }, fanFrequencyInfo) {
commit('SET_FANFREQUENCYINFO', fanFrequencyInfo.payload)
},
setKilnInfo({ commit }, kilnInfo) {
commit('SET_KILNINFO', kilnInfo.payload)
},
setGasInfo({ commit }, gasInfo) {
commit('SET_GASINFO', gasInfo.payload)
},
setIsraKiln({ commit }, israKiln) {
commit('SET_ISRAKILN', israKiln.payload)
},
setMaterial({ commit }, material) {
commit('SET_MATERIAL', material.payload)
},
};
export default {
namespaced: true,
state,
mutations,
actions,
}