update 风机信息
This commit is contained in:
@@ -2,69 +2,20 @@
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
|
||||
export const initialState = {
|
||||
history: {
|
||||
// 历史数据
|
||||
FLIIA1: [
|
||||
// 帮我生成7个随机整数
|
||||
...Array.from({ length: 7 }, () => Math.floor(Math.random() * 100)),
|
||||
],
|
||||
// 帮我重复上面的模式十次
|
||||
FLIIA2: [
|
||||
...Array.from({ length: 7 }, () => Math.floor(Math.random() * 100)),
|
||||
],
|
||||
FLIIA3: [
|
||||
...Array.from({ length: 7 }, () => Math.floor(Math.random() * 100)),
|
||||
],
|
||||
FLIIA4: [
|
||||
...Array.from({ length: 7 }, () => Math.floor(Math.random() * 100)),
|
||||
],
|
||||
FLIIA5: [
|
||||
...Array.from({ length: 7 }, () => Math.floor(Math.random() * 100)),
|
||||
],
|
||||
FLIIA6: [
|
||||
...Array.from({ length: 7 }, () => Math.floor(Math.random() * 100)),
|
||||
],
|
||||
FLIIA7: [
|
||||
...Array.from({ length: 7 }, () => Math.floor(Math.random() * 100)),
|
||||
],
|
||||
FLIIA8: [
|
||||
...Array.from({ length: 7 }, () => Math.floor(Math.random() * 100)),
|
||||
],
|
||||
FLIIB1: [
|
||||
...Array.from({ length: 7 }, () => Math.floor(Math.random() * 100)),
|
||||
],
|
||||
FLIIB2: [
|
||||
...Array.from({ length: 7 }, () => Math.floor(Math.random() * 100)),
|
||||
],
|
||||
fanInfo: {
|
||||
测试001: "正常",
|
||||
},
|
||||
|
||||
runtime: [
|
||||
// 实时数据
|
||||
...Array.from(
|
||||
{ length: 16 },
|
||||
() => Math.floor(Math.random() * 100) + "m³/h"
|
||||
),
|
||||
],
|
||||
};
|
||||
|
||||
// export const stateNameMap = {
|
||||
// lastFireChangeTime: "10分20秒",
|
||||
// fireChangeTime: "10:23",
|
||||
// fireDirection: "东火",
|
||||
// };
|
||||
|
||||
const fanFrequenceSlice = createSlice({
|
||||
name: "fanFrequence",
|
||||
const fanInfoSlice = createSlice({
|
||||
name: "fanInfo",
|
||||
initialState,
|
||||
reducers: {
|
||||
setHistory: (state, action) => {
|
||||
state.history = action.payload;
|
||||
},
|
||||
setRuntime: (state, action) => {
|
||||
state.runtime = action.payload;
|
||||
setInfo: (state, action) => {
|
||||
state.fanInfo = action.payload;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export default fanFrequenceSlice.reducer;
|
||||
export const { setHistory, setRuntime } = fanFrequenceSlice.actions;
|
||||
export default fanInfoSlice.reducer;
|
||||
export const { setInfo } = fanInfoSlice.actions;
|
||||
|
||||
@@ -6,6 +6,7 @@ import fanFrequenceReducer from "./features/fanFrequenceSlice";
|
||||
import combustionAirReducer from "./features/combustionAirSlice";
|
||||
import gasReducer from "./features/gasSlice";
|
||||
import temperatureReducer from "./features/temperatureSlice";
|
||||
import fanInfoReducer from "./features/fanInfo";
|
||||
|
||||
export const store = configureStore({
|
||||
reducer: {
|
||||
@@ -15,6 +16,8 @@ export const store = configureStore({
|
||||
feeder: feederReducer,
|
||||
// 火向信息
|
||||
fireInfo: fireReducer,
|
||||
// 火向信息
|
||||
fanInfo: fanInfoReducer,
|
||||
// 风机运行频率
|
||||
fanFrequence: fanFrequenceReducer,
|
||||
// 天然气流量
|
||||
|
||||
Reference in New Issue
Block a user