update 天然气流量
This commit is contained in:
@@ -4,17 +4,17 @@ import { createSlice } from "@reduxjs/toolkit";
|
||||
export const initialState = {
|
||||
history: {
|
||||
// 历史数据
|
||||
"1#天然气流量": [
|
||||
"1#助燃风流量": [
|
||||
// ...Array.from({ length: 7 }, () => Math.floor(Math.random() * 100)),
|
||||
...Array.from({ length: 7 }, () => 0),
|
||||
],
|
||||
"2#天然气流量": [...Array.from({ length: 7 }, () => 0)],
|
||||
"3#天然气流量": [...Array.from({ length: 7 }, () => 0)],
|
||||
"4#天然气流量": [...Array.from({ length: 7 }, () => 0)],
|
||||
"5#天然气流量": [...Array.from({ length: 7 }, () => 0)],
|
||||
"6#天然气流量": [...Array.from({ length: 7 }, () => 0)],
|
||||
"7#天然气流量": [...Array.from({ length: 7 }, () => 0)],
|
||||
"8#天然气流量": [...Array.from({ length: 7 }, () => 0)],
|
||||
"2#助燃风流量": [...Array.from({ length: 7 }, () => 0)],
|
||||
"3#助燃风流量": [...Array.from({ length: 7 }, () => 0)],
|
||||
"4#助燃风流量": [...Array.from({ length: 7 }, () => 0)],
|
||||
"5#助燃风流量": [...Array.from({ length: 7 }, () => 0)],
|
||||
"6#助燃风流量": [...Array.from({ length: 7 }, () => 0)],
|
||||
"7#助燃风流量": [...Array.from({ length: 7 }, () => 0)],
|
||||
"8#助燃风流量": [...Array.from({ length: 7 }, () => 0)],
|
||||
},
|
||||
|
||||
runtime: [
|
||||
|
||||
@@ -2,38 +2,41 @@
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
|
||||
export const initialState = {
|
||||
gasIHistory: {
|
||||
// 历史数据
|
||||
// GAS1: [...Array.from({ length: 7 }, () => Math.floor(Math.random() * 100))],
|
||||
GAS1: [...Array.from({ length: 7 }, () => 0)],
|
||||
GAS2: [...Array.from({ length: 7 }, () => 0)],
|
||||
GAS3: [...Array.from({ length: 7 }, () => 0)],
|
||||
GAS4: [...Array.from({ length: 7 }, () => 0)],
|
||||
GAS5: [...Array.from({ length: 7 }, () => 0)],
|
||||
GAS6: [...Array.from({ length: 7 }, () => 0)],
|
||||
GAS7: [...Array.from({ length: 7 }, () => 0)],
|
||||
GAS8: [...Array.from({ length: 7 }, () => 0)],
|
||||
history: {
|
||||
gasIHistory: {
|
||||
// 历史数据
|
||||
// GAS1: [...Array.from({ length: 7 }, () => Math.floor(Math.random() * 100))],
|
||||
GAS1: [...Array.from({ length: 7 }, () => 0)],
|
||||
GAS2: [...Array.from({ length: 7 }, () => 0)],
|
||||
GAS3: [...Array.from({ length: 7 }, () => 0)],
|
||||
GAS4: [...Array.from({ length: 7 }, () => 0)],
|
||||
GAS5: [...Array.from({ length: 7 }, () => 0)],
|
||||
GAS6: [...Array.from({ length: 7 }, () => 0)],
|
||||
GAS7: [...Array.from({ length: 7 }, () => 0)],
|
||||
GAS8: [...Array.from({ length: 7 }, () => 0)],
|
||||
},
|
||||
gasIIHistory: {
|
||||
GAS1: [...Array.from({ length: 7 }, () => 0)],
|
||||
GAS2: [...Array.from({ length: 7 }, () => 0)],
|
||||
GAS3: [...Array.from({ length: 7 }, () => 0)],
|
||||
GAS4: [...Array.from({ length: 7 }, () => 0)],
|
||||
},
|
||||
},
|
||||
gasIIHistory: {
|
||||
GAS1: [...Array.from({ length: 7 }, () => 0)],
|
||||
GAS2: [...Array.from({ length: 7 }, () => 0)],
|
||||
GAS3: [...Array.from({ length: 7 }, () => 0)],
|
||||
GAS4: [...Array.from({ length: 7 }, () => 0)],
|
||||
runtime: {
|
||||
gasIRuntime: [
|
||||
// 实时数据
|
||||
...Array.from(
|
||||
{ length: 8 },
|
||||
// () => Math.floor(Math.random() * 100) + "m³/h"
|
||||
() => "0m³/h"
|
||||
),
|
||||
],
|
||||
|
||||
gasIIRuntime: [
|
||||
// 实时数据
|
||||
...Array.from({ length: 8 }, () => "0m³/h"),
|
||||
],
|
||||
},
|
||||
|
||||
gasIRuntime: [
|
||||
// 实时数据
|
||||
...Array.from(
|
||||
{ length: 8 },
|
||||
// () => Math.floor(Math.random() * 100) + "m³/h"
|
||||
() => "0m³/h"
|
||||
),
|
||||
],
|
||||
|
||||
gasIIRuntime: [
|
||||
// 实时数据
|
||||
...Array.from({ length: 8 }, () => "0m³/h"),
|
||||
],
|
||||
};
|
||||
|
||||
const gasSlice = createSlice({
|
||||
@@ -41,16 +44,16 @@ const gasSlice = createSlice({
|
||||
initialState,
|
||||
reducers: {
|
||||
setGasIHistory: (state, action) => {
|
||||
state.gasIHistory = action.payload;
|
||||
state.history.gasIHistory = action.payload;
|
||||
},
|
||||
setGasIIHistory: (state, action) => {
|
||||
state.gasIIHistory = action.payload;
|
||||
},
|
||||
setGasIIRuntime: (state, action) => {
|
||||
state.gasIRuntime = action.payload;
|
||||
state.history.gasIIHistory = action.payload;
|
||||
},
|
||||
setGasIRuntime: (state, action) => {
|
||||
state.gasIIRuntime = action.payload;
|
||||
state.runtime.gasIRuntime = action.payload;
|
||||
},
|
||||
setGasIIRuntime: (state, action) => {
|
||||
state.runtime.gasIIRuntime = action.payload;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -14,7 +14,7 @@ export const store = configureStore({
|
||||
// 风机运行频率
|
||||
fanFrequence: fanFrequenceReducer,
|
||||
// 天然气流量
|
||||
wind: gasReducer,
|
||||
natGas: gasReducer,
|
||||
// 助燃风流量
|
||||
combustionAir: combustionAirReducer,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user