update 退火-风机信息
This commit is contained in:
23
src/store/features/annealFanInfoSlice.js
Normal file
23
src/store/features/annealFanInfoSlice.js
Normal file
@@ -0,0 +1,23 @@
|
||||
// 风机信息
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
|
||||
export const initialState = {
|
||||
data: {
|
||||
正常数据: "运行",
|
||||
故障数据: "故障",
|
||||
其他数据: "其他",
|
||||
},
|
||||
};
|
||||
|
||||
const annealFanInfoSlice = createSlice({
|
||||
name: "annealFanInfo",
|
||||
initialState,
|
||||
reducers: {
|
||||
setInfo: (state, action) => {
|
||||
state.data = action.payload;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export default annealFanInfoSlice.reducer;
|
||||
export const { setInfo } = annealFanInfoSlice.actions;
|
||||
@@ -2,8 +2,8 @@
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
|
||||
export const initialState = {
|
||||
fanInfo: {
|
||||
测试001: "正常",
|
||||
data: {
|
||||
测试001: "运行",
|
||||
},
|
||||
};
|
||||
|
||||
@@ -12,7 +12,7 @@ const fanInfoSlice = createSlice({
|
||||
initialState,
|
||||
reducers: {
|
||||
setInfo: (state, action) => {
|
||||
state.fanInfo = action.payload.fanInfo;
|
||||
state.data = action.payload;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user