xuchang-new/src/store/features/kilnSlice.js
‘937886381’ f702e950ac 修改
2024-08-30 17:17:45 +08:00

48 lines
1.1 KiB
JavaScript

/*
* @Author: zhp
* @Date: 2024-08-20 14:08:32
* @LastEditTime: 2024-08-30 09:50:00
* @LastEditors: zhp
* @Description:
*/
import { createSlice } from "@reduxjs/toolkit";
export const initialState = {
kilnPressure: "0Pa",
waterTemp: "0℃",
waterFlow: "0m³/h",
waterPressure: "0Pa",
combustionAirPressure: "0Pa",
topTemp: "0℃",
compressedAirPressure: "0Pa",
meltTemp: "0℃",
liquidLevel:"0",
};
export const stateNameMap = {
kilnPressure: "窑炉压力",
waterTemp: "循环水温度",
waterFlow: "循环水流量",
waterPressure: "循环水压力",
combustionAirPressure: "助燃风压力",
topTemp: "碹顶加权温度",
compressedAirPressure: "压缩气压力",
meltTemp: "熔化加权温度",
liquidLevel:"液位",
};
const kilnSlice = createSlice({
name: "kiln",
initialState,
reducers: {
setKilnInfo: (state, action) => {
Object.keys(action.payload).forEach((key) => {
state[key] = action.payload[key];
});
},
},
});
export default kilnSlice.reducer;
export const { setKilnInfo } = kilnSlice.actions;