update烟气

This commit is contained in:
lb
2023-12-28 16:16:31 +08:00
parent 4e73410495
commit 049a0804ac
6 changed files with 340 additions and 192 deletions

View File

@@ -0,0 +1,87 @@
// 风机信息
import { createSlice } from "@reduxjs/toolkit";
export const initialState = {
info: {
SO2_float: 0,
NOX_float: 0,
O2_float: 0,
dust_float: 0,
},
dayTrend: {
SO2_float: [
{
time: "00:00",
value: 10,
},
{ time: "01:00", value: 20 },
],
NOX_float: [],
O2_float: [],
dust_float: [],
},
weekTrend: {
SO2_float: [],
NOX_float: [
{
time: "00:00",
value: 30,
},
{ time: "01:00", value: 10 },
],
O2_float: [],
dust_float: [],
},
monthTrend: {
SO2_float: [],
NOX_float: [],
O2_float: [],
dust_float: [],
},
yearTrend: {
SO2_float: [],
NOX_float: [],
O2_float: [],
dust_float: [
{
time: "00:00",
value: 33,
},
{ time: "01:00", value: 13 },
],
},
};
const smokeSlice = createSlice({
name: "smoke",
initialState,
reducers: {
setInfo: (state, action) => {
state.info = {
...state.info,
...action.payload,
};
},
setTrend: (state, action) => {
state.dayTrend = {
...state.dayTrend,
...action.payload.dayTrend,
};
state.weekTrend = {
...state.weekTrend,
...action.payload.weekTrend,
};
state.monthTrend = {
...state.monthTrend,
...action.payload.monthTrend,
};
state.yearTrend = {
...state.yearTrend,
...action.payload.yearTrend,
};
},
},
});
export default smokeSlice.reducer;
export const { setInfo, setTrend } = smokeSlice.actions;

View File

@@ -13,6 +13,7 @@ import israReducer from "./features/QualityIsraSlice";
import annealFanFrequenceReducer from "./features/annealFanFrequenceSlice";
import annealFanInfoReducer from "./features/annealFanInfoSlice";
import cuttingReducer from "./features/cuttingSlice";
import smokeReducer from "./features/smokeSlice";
export const store = configureStore({
reducer: {
@@ -43,6 +44,8 @@ export const store = configureStore({
// 能耗
isra: israReducer,
// 切割
cutting: cuttingReducer
cutting: cuttingReducer,
// 烟气
smoke: smokeReducer
},
});