This commit is contained in:
‘937886381’
2024-08-30 17:17:45 +08:00
parent d7cc3deeee
commit f702e950ac
104 changed files with 4010 additions and 20071 deletions

View File

@@ -0,0 +1,46 @@
/*
* @Author: zhp
* @Date: 2024-08-26 14:09:29
* @LastEditTime: 2024-08-26 14:10:10
* @LastEditors: zhp
* @Description:
*/
/*
* @Author: zhp
* @Date: 2024-08-26 09:20:25
* @LastEditTime: 2024-08-26 09:33:23
* @LastEditors: zhp
* @Description:
*/
import { createSlice } from "@reduxjs/toolkit";
export const initialState = {
kilnPressure: "0Pa",
waterTemp: "0℃",
waterFlow: "0m³/h",
waterPressure: "0Pa",
area: "0Pa",
};
export const stateNameMap = {
kilnPressure: "区域1",
waterTemp: "区域2",
waterFlow: "区域3",
waterPressure: "区域4",
area: "区域1",
};
const kilnSlice = createSlice({
name: "kiln",
initialState,
reducers: {
setKilnInfo: (state, action) => {
Object.keys(action.payload).forEach((key) => {
state[key] = action.payload[key];
});
},
},
});
export default kilnSlice.reducer;
export const { setKilnInfo } = kilnSlice.actions;

View File

@@ -0,0 +1,37 @@
/*
* @Author: zhp
* @Date: 2024-08-26 09:20:25
* @LastEditTime: 2024-08-26 09:33:23
* @LastEditors: zhp
* @Description:
*/
import { createSlice } from "@reduxjs/toolkit";
export const initialState = {
kilnPressure: "0Pa",
waterTemp: "0℃",
waterFlow: "0m³/h",
waterPressure: "0Pa",
};
export const stateNameMap = {
kilnPressure: "区域1",
waterTemp: "区域2",
waterFlow: "区域3",
waterPressure: "区域4",
};
const kilnSlice = createSlice({
name: "kiln",
initialState,
reducers: {
setKilnInfo: (state, action) => {
Object.keys(action.payload).forEach((key) => {
state[key] = action.payload[key];
});
},
},
});
export default kilnSlice.reducer;
export const { setKilnInfo } = kilnSlice.actions;

View File

@@ -1,3 +1,10 @@
/*
* @Author: zhp
* @Date: 2024-08-20 14:08:32
* @LastEditTime: 2024-08-28 11:17:38
* @LastEditors: zhp
* @Description:
*/
import { createSlice } from "@reduxjs/toolkit";
export const initialState = {
@@ -10,6 +17,8 @@ export const initialState = {
month: [],
day: [],
},
forecastDayChart:[],
forecastWeeklyChart:[],
};
const cuttingSlice = createSlice({
@@ -30,12 +39,15 @@ const cuttingSlice = createSlice({
break;
case "weekly":
state.chart.week = action.payload.detData;
state.forecastWeeklyChart = action.payload.detData;
break;
case "month":
state.chart.month = action.payload.detData;
break;
case "day":
state.chart.day = action.payload.detData;
if ("prediction" in action.payload)
state.forecastDayChart = action.payload.prediction;
break;
}
},
@@ -43,4 +55,4 @@ const cuttingSlice = createSlice({
});
export default cuttingSlice.reducer;
export const { setCuttingTable, setCuttingChart } = cuttingSlice.actions;
export const { setCuttingTable, setCuttingChart,setForecastDayChart } = cuttingSlice.actions;

View File

@@ -91,7 +91,9 @@ export const initialState = {
pressureAvg:{},
liquidAvg:{},
bottomTempAvg:{},
topTempAvg:{}
topTempAvg: {},
topTempAvgFor1h: {},
bottomTempAvgFor1h:{},
};
const kilnOptimizeSlice = createSlice({
@@ -151,9 +153,15 @@ const kilnOptimizeSlice = createSlice({
},
setTopTempAvg: (state, action) => {
state.topTempAvg = action.payload;
},
topTempAvgFor1h: (state, action) => {
state.topTempAvgFor1h = action.payload;
},
bottomTempAvgFor1h: (state, action) => {
state.bottomTempAvgFor1h = action.payload;
}
},
});
export default kilnOptimizeSlice.reducer;
export const { setPressureAvg, setLiquidAvg,setBottomTempAvg,setTopTempAvg} = kilnOptimizeSlice.actions;
export const { setPressureAvg, setLiquidAvg,setBottomTempAvg,setTopTempAvg,topTempAvgFor1h,bottomTempAvgFor1h} = kilnOptimizeSlice.actions;

View File

@@ -1,3 +1,10 @@
/*
* @Author: zhp
* @Date: 2024-08-20 14:08:32
* @LastEditTime: 2024-08-30 09:50:00
* @LastEditors: zhp
* @Description:
*/
import { createSlice } from "@reduxjs/toolkit";
export const initialState = {
@@ -9,6 +16,7 @@ export const initialState = {
topTemp: "0℃",
compressedAirPressure: "0Pa",
meltTemp: "0℃",
liquidLevel:"0",
};
export const stateNameMap = {
@@ -20,6 +28,7 @@ export const stateNameMap = {
topTemp: "碹顶加权温度",
compressedAirPressure: "压缩气压力",
meltTemp: "熔化加权温度",
liquidLevel:"液位",
};
const kilnSlice = createSlice({

View File

@@ -1,3 +1,10 @@
/*
* @Author: zhp
* @Date: 2024-08-20 14:09:17
* @LastEditTime: 2024-08-26 14:10:47
* @LastEditors: zhp
* @Description:
*/
import { configureStore } from "@reduxjs/toolkit";
import kilnReducer from "./features/kilnSlice";
import feederReducer from "./features/feederSlice";
@@ -16,6 +23,9 @@ import cuttingReducer from "./features/cuttingSlice";
import smokeReducer from "./features/smokeSlice";
import alarmSlice from "./features/alarmSlice";
import kilnOptimizeSlice from "./features/kilnOptimizeSlice";
import crownTe from "./features/crownTe";
import bottomTe from "./features/bottomTe";
export const store = configureStore({
reducer: {
@@ -52,6 +62,8 @@ export const store = configureStore({
// 烟气
smoke: smokeReducer,
// 窑炉优化
kilnOptimize: kilnOptimizeSlice
kilnOptimize: kilnOptimizeSlice,
crownTe: crownTe,
bottomTe:bottomTe
},
});