窑炉优化

This commit is contained in:
2024-07-12 14:12:10 +08:00
parent 214e9fe892
commit 4d7af62305
21 changed files with 1510 additions and 628 deletions

View File

@@ -1,20 +1,30 @@
import BlueRect from "../BlueRect";
import { useSelector } from "react-redux";
import { motion, AnimatePresence } from "framer-motion";
import { useEffect, useState } from "react";
const blueTe = [
"TE401",
"TE402",
"TE403",
"PE401",
"PE402",
"PE403",
];
const blueTe = ["TE401", "TE402", "TE403", "PE401", "PE402", "PE403"];
function TemperatureBottom(props) {
const tempBottom = useSelector((state) => state.temperature.bottom);
console.log(tempBottom)
console.log('==================+++++++++++++')
const speed = props.speed;
const floor = props.floor;
const [speedAn, setSpeedAn] = useState({});
useEffect(() => {
// 23互切不用展示动画
if (speed === "f") {
setSpeedAn({});
} else {
if (floor === 2) {
setSpeedAn({
opacity: [0, 0, 0, 0.6, 1],
transition: { duration: 0.3, delay: 1.8 },
});
} else {
setSpeedAn({});
}
}
}, [floor]);
return (
<motion.div
@@ -26,15 +36,17 @@ function TemperatureBottom(props) {
width: "100%",
height: "80vh",
zIndex: "-1",
...props.style
}}
animate={{
opacity: [0, 0, 0, 0.6, 1],
transition: { duration: 0.3, delay: 2 },
...props.style,
}}
animate={speedAn}
>
{Object.keys(tempBottom).map((d) => (
<BlueRect title={d} key={d + Math.random()} value={tempBottom[d]} blue={blueTe.includes(d)} />
<BlueRect
title={d}
key={d + Math.random()}
value={tempBottom[d]}
blue={blueTe.includes(d)}
/>
))}
</motion.div>
);

View File

@@ -28,15 +28,20 @@ function TemperatureTop(props) {
width: "100%",
height: "80vh",
zIndex: "-1",
...props.style
...props.style,
}}
animate={{
opacity: [0, 0, 0, 0.6, 1],
transition: { duration: 0.3, delay: 2 },
transition: { duration: 0.3, delay: 1.5 },
}}
>
{Object.keys(tempTop).map((d) => (
<BlueRect title={d} key={d + Math.random()} value={tempTop[d]} blue={blueTe.includes(d)} />
<BlueRect
title={d}
key={d + Math.random()}
value={tempTop[d]}
blue={blueTe.includes(d)}
/>
))}
</motion.div>
);