add AnnealFanFrequence
This commit is contained in:
87
src/store/features/annealFanFrequenceSlice.js
Normal file
87
src/store/features/annealFanFrequenceSlice.js
Normal file
@@ -0,0 +1,87 @@
|
||||
// 风机运行频率
|
||||
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)),
|
||||
],
|
||||
},
|
||||
|
||||
// runtime: [
|
||||
// // 实时数据
|
||||
// ...Array.from(
|
||||
// { length: 16 },
|
||||
// () => Math.floor(Math.random() * 100) + "m³/h"
|
||||
// ),
|
||||
// ],
|
||||
runtime: null,
|
||||
// runtime: {
|
||||
// "1#10处拐角冷却风机": "0",
|
||||
// "1#L型吊墙冷却风机": "0",
|
||||
// "1#助燃风机": "0",
|
||||
// "1#澄清带池壁风机": "0",
|
||||
// "1#融化带池壁风机": "0",
|
||||
// "1#钢碹碴小炉垛风机": "0",
|
||||
// "2#10处拐角冷却风机": "0",
|
||||
// "2#L型吊墙冷却风机": "0",
|
||||
// "2#助燃风机": "0",
|
||||
// "2#澄清带池壁风机": "0",
|
||||
// "2#融化带池壁风机": "0",
|
||||
// "2#钢碹碴小炉垛风机": "0",
|
||||
// "3#澄清带池壁风机": "0",
|
||||
// "3#融化带池壁风机": "0",
|
||||
// "4#澄清带池壁风机": "0",
|
||||
// "4#融化带池壁风机": "0",
|
||||
// },
|
||||
};
|
||||
|
||||
const annealFanFrequenceSlice = createSlice({
|
||||
name: "annealFanFrequence",
|
||||
initialState,
|
||||
reducers: {
|
||||
setHistory: (state, action) => {
|
||||
state.history = action.payload;
|
||||
},
|
||||
setRuntime: (state, action) => {
|
||||
state.runtime = action.payload;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export default annealFanFrequenceSlice.reducer;
|
||||
export const { setHistory, setRuntime } = annealFanFrequenceSlice.actions;
|
||||
@@ -8,6 +8,7 @@ import gasReducer from "./features/gasSlice";
|
||||
import temperatureReducer from "./features/temperatureSlice";
|
||||
import fanInfoReducer from "./features/fanInfo";
|
||||
import energySlice from "./features/EnergySlice";
|
||||
import annealFanFrequenceReducer from "./features/annealFanFrequenceSlice";
|
||||
|
||||
export const store = configureStore({
|
||||
reducer: {
|
||||
@@ -21,6 +22,8 @@ export const store = configureStore({
|
||||
fanInfo: fanInfoReducer,
|
||||
// 风机运行频率
|
||||
fanFrequence: fanFrequenceReducer,
|
||||
// 风机运行频率
|
||||
annealFanFrequence: annealFanFrequenceReducer,
|
||||
// 天然气流量
|
||||
natGas: gasReducer,
|
||||
// 助燃风流量
|
||||
|
||||
Reference in New Issue
Block a user