update elec
This commit is contained in:
parent
871efd2eb2
commit
4b043214ca
@ -11,8 +11,8 @@ function Chart1(props) {
|
||||
headerBGC: "#044A8460",
|
||||
header: [
|
||||
'<span style="color:#fff; padding-left: 8px;">产线名<span/>',
|
||||
'<span style="color:#fff; padding-left: 8px;">原板宽度<span/>',
|
||||
'<span style="color:#fff; padding-left: 8px;">净板宽<span/>',
|
||||
'<span style="color:#fff; padding-left: 8px;">玻璃长度<span/>',
|
||||
'<span style="color:#fff; padding-left: 8px;">玻璃宽度<span/>',
|
||||
'<span style="color:#fff; padding-left: 8px;">玻璃厚度<span/>',
|
||||
],
|
||||
// oddRowBGC: "#042444",
|
||||
|
@ -9,8 +9,8 @@ function CurrentSpec(props) {
|
||||
headerBGC: "#044A8460",
|
||||
header: [
|
||||
'<span style="color:#fff; padding-left: 8px;">产线名<span/>',
|
||||
'<span style="color:#fff; padding-left: 8px;">原板宽度<span/>',
|
||||
'<span style="color:#fff; padding-left: 8px;">净板宽<span/>',
|
||||
'<span style="color:#fff; padding-left: 8px;">玻璃长度<span/>',
|
||||
'<span style="color:#fff; padding-left: 8px;">玻璃宽度<span/>',
|
||||
'<span style="color:#fff; padding-left: 8px;">玻璃厚度<span/>',
|
||||
],
|
||||
// oddRowBGC: "#042444",
|
||||
|
@ -93,7 +93,15 @@ const energySlice = createSlice({
|
||||
state.info = { ...state.info, ...action.payload };
|
||||
},
|
||||
setElecTrend: (state, action) => {
|
||||
state.trend.elec = action.payload;
|
||||
if (action.payload.week?.length) {
|
||||
state.trend.elec.week = action.payload.week;
|
||||
}
|
||||
if (action.payload.month?.length) {
|
||||
state.trend.elec.month = action.payload.month;
|
||||
}
|
||||
if (action.payload.year?.length) {
|
||||
state.trend.elec.year = action.payload.year;
|
||||
}
|
||||
},
|
||||
setSumGasData: (state, action) => {
|
||||
if ("sumGas1Now" in action.payload) {
|
||||
|
@ -18,7 +18,7 @@ export default function handler(msg: MessageEvent) {
|
||||
}
|
||||
case "EnergyTrend": {
|
||||
store.dispatch({
|
||||
type: "energy/setTrend",
|
||||
type: "energy/setElecTrend",
|
||||
payload: serializedData.data,
|
||||
});
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user