- {(data.length > 0) &&
}
- {(data.length <= 0) && (
+ {data.length > 0 && (
+
+ )}
+ {data.length <= 0 && (
state.kilnOptimize);
- console.log(kilnOptimize)
- console.log('+++++++++++++==================')
const dataSource = {
- color:'#12FFF5',
- yName:'Pa',
- areaColor0:'rgba(18, 255, 245, 0.4)',
- areaColor1:'rgba(18, 255, 245, 0)',
- msg:kilnOptimize.pressureAvg,
- data: kilnOptimize.pressureAvg ? kilnOptimize.pressureAvg.pressureAvgFor7Day : [],
- range:[-4,4]
- }
+ color: "#12FFF5",
+ yName: "Pa",
+ areaColor0: "rgba(18, 255, 245, 0.4)",
+ areaColor1: "rgba(18, 255, 245, 0)",
+ msg: kilnOptimize.pressureAvg,
+ data: kilnOptimize.pressureAvg
+ ? kilnOptimize.pressureAvg.pressureAvgFor7Day
+ : [],
+ range: [-4, 4],
+ };
return (
-
+
{/* legend */}
- 标准值外
+
+ 标准值外
- 标准值内
+
+ 标准值内
-
+
- )
+ );
}
-export default KilnPress;
\ No newline at end of file
+export default KilnPress;
diff --git a/src/components/Modules/KilnOptimize/components/LiquidSpeedColor/index.jsx b/src/components/Modules/KilnOptimize/components/LiquidSpeedColor/index.jsx
new file mode 100644
index 0000000..a10c8f9
--- /dev/null
+++ b/src/components/Modules/KilnOptimize/components/LiquidSpeedColor/index.jsx
@@ -0,0 +1,45 @@
+import { motion } from "framer-motion";
+import { useEffect, useState } from "react";
+import image from "./../../../../../assets/kilnSpeed.png";
+function LiquidSpeedColor(props) {
+ const speed = props.speed;
+ const floor = props.floor;
+ const [speedAn, setSpeedAn] = useState({});
+ useEffect(() => {
+ // 2,3互切不用展示动画
+ if (speed === "f") {
+ setSpeedAn({});
+ } else {
+ if (floor === 3) {
+ setSpeedAn({
+ opacity: [0, 0, 0, 0.6, 1],
+ transition: { duration: 0.3, delay: 1.5 },
+ });
+ } else {
+ setSpeedAn({});
+ }
+ }
+ }, [floor]);
+ console.log(speedAn);
+ console.log("speedAnspeedAnspeedAnspeedAnspeedAnspeedAnspeedAn");
+ return (
+
+
+
+ );
+}
+export default LiquidSpeedColor;
diff --git a/src/components/Modules/KilnOptimize/components/TopColorBlock/index.jsx b/src/components/Modules/KilnOptimize/components/TopColorBlock/index.jsx
index 32aa223..74b3d84 100644
--- a/src/components/Modules/KilnOptimize/components/TopColorBlock/index.jsx
+++ b/src/components/Modules/KilnOptimize/components/TopColorBlock/index.jsx
@@ -1,131 +1,362 @@
-
import { useSelector } from "react-redux";
-import React from 'react';
+import React from "react";
import { motion, AnimatePresence } from "framer-motion";
-import { ReactComponent as B1 } from './pic/b1.svg'
-import { ReactComponent as B2 } from './pic/b2.svg'
-import { ReactComponent as B3 } from './pic/b3.svg'
-import { ReactComponent as B4 } from './pic/b4.svg'
-import { ReactComponent as B5 } from './pic/b5.svg'
-import { ReactComponent as B6 } from './pic/b6.svg'
-import { ReactComponent as B7 } from './pic/b7.svg'
-import { ReactComponent as B8 } from './pic/b8.svg'
-import { ReactComponent as T1 } from './pic/t1.svg'
-import { ReactComponent as T2 } from './pic/t2.svg'
-import { ReactComponent as T3 } from './pic/t3.svg'
-import { ReactComponent as T4 } from './pic/t4.svg'
-import { ReactComponent as T5 } from './pic/t5.svg'
-import { ReactComponent as T6 } from './pic/t6.svg'
-import { ReactComponent as T7 } from './pic/t7.svg'
-import { ReactComponent as T8 } from './pic/t8.svg'
-
+import { ReactComponent as B1 } from "./pic/b1.svg";
+import { ReactComponent as B2 } from "./pic/b2.svg";
+import { ReactComponent as B3 } from "./pic/b3.svg";
+import { ReactComponent as B4 } from "./pic/b4.svg";
+import { ReactComponent as B5 } from "./pic/b5.svg";
+import { ReactComponent as B6 } from "./pic/b6.svg";
+import { ReactComponent as B7 } from "./pic/b7.svg";
+import { ReactComponent as B8 } from "./pic/b8.svg";
+import { ReactComponent as T1 } from "./pic/t1.svg";
+import { ReactComponent as T2 } from "./pic/t2.svg";
+import { ReactComponent as T3 } from "./pic/t3.svg";
+import { ReactComponent as T4 } from "./pic/t4.svg";
+import { ReactComponent as T5 } from "./pic/t5.svg";
+import { ReactComponent as T6 } from "./pic/t6.svg";
+import { ReactComponent as T7 } from "./pic/t7.svg";
+import { ReactComponent as T8 } from "./pic/t8.svg";
+
const TopColorBlock = ({ condition }) => {
const tempTop = useSelector((state) => state.temperature.top);
function returnColor(n) {
- let num = Number(tempTop[n].slice(0,tempTop[n].length - 1))
- if (num <= 200) {
- return 'rgba(42, 229, 93, 0.7)';
- } else if (num >200 && num <=400) {
- return 'rgba(133, 203, 50, 0.7)';
- } else if (num >400 && num <=600) {
- return 'rgba(255, 182, 3, 0.7)';
- } else if (num >600 && num <=800) {
- return 'rgba(255, 135, 16, 0.7)';
- } else if (num >800 && num <=1000) {
- return 'rgba(249, 89, 7, 0.7)';
- } else if (num >1000 && num <=1200) {
- return 'rgba(255, 40, 40, 0.7)';
- } else if (num >1200 && num <=1400) {
- return 'rgba(255, 38, 112, 0.7)';
- } else if (num >1400 && num <=1600) {
- return 'rgba(163, 23, 187, 0.7)';
- } else if (num >1600 && num <=1800) {
- return 'rgba(119, 14, 234, 0.7)';
- } else if (num >1800) {
- return 'rgba(77, 11, 255, 0.7)';
+ let num = Number(tempTop[n].slice(0, tempTop[n].length - 1));
+ if (num <= 100) {
+ return "rgba(96, 0, 189, 0.7)";
+ } else if (num > 100 && num <= 200) {
+ return "rgba(102, 7, 255, 0.7)";
+ } else if (num > 200 && num <= 300) {
+ return "rgba(10, 20, 255, 0.7)";
+ } else if (num > 300 && num <= 400) {
+ return "rgba(7, 89, 255, 0.7)";
+ } else if (num > 400 && num <= 500) {
+ return "rgba(7, 139, 255, 0.7)";
+ } else if (num > 500 && num <= 600) {
+ return "rgba(7, 194, 255, 0.7)";
+ } else if (num > 600 && num <= 700) {
+ return "rgba(7, 255, 253, 0.7)";
+ } else if (num > 700 && num <= 800) {
+ return "rgba(7, 255, 205, 0.7)";
+ } else if (num > 800 && num <= 900) {
+ return "rgba(20, 237, 127, 0.7)";
+ } else if (num > 900 && num <= 1000) {
+ return "rgba(0, 193, 39, 0.7)";
+ } else if (num > 1000 && num <= 1100) {
+ return "rgba(147, 210, 1, 0.7)";
+ } else if (num > 1100 && num <= 1200) {
+ return "rgba(206, 206, 0, 0.7)";
+ } else if (num > 1200 && num <= 1300) {
+ return "rgba(255, 226, 13, 0.7)";
+ } else if (num > 1300 && num <= 1400) {
+ return "rgba(249, 240, 146, 0.7)";
+ } else if (num > 1400 && num <= 1500) {
+ return "rgba(250, 204, 93, 0.7)";
+ } else if (num > 1500 && num <= 1600) {
+ return "rgba(240, 139, 32, 0.7)";
+ } else if (num > 1600 && num <= 1700) {
+ return "rgba(241, 88, 26, 0.7)";
+ } else if (num > 1700 && num <= 1800) {
+ return "rgba(255, 0, 0, 0.7)";
+ } else if (num > 1800 && num <= 1900) {
+ return "rgba(182, 0, 0, 0.7)";
+ } else if (num > 1900) {
+ return "rgba(140, 0, 33, 0.7)";
}
}
function returnColor2(n) {
- let num = Number(tempTop[n].slice(0,tempTop[n].length - 1))
- if (num <= 200) {
- return 'rgba(42, 229, 93, 0.9)';
- } else if (num >200 && num <=400) {
- return 'rgba(133, 203, 50, 0.9)';
- } else if (num >400 && num <=600) {
- return 'rgba(255, 182, 3, 0.9)';
- } else if (num >600 && num <=800) {
- return 'rgba(255, 135, 16, 0.9)';
- } else if (num >800 && num <=1000) {
- return 'rgba(249, 89, 7, 0.9)';
- } else if (num >1000 && num <=1200) {
- return 'rgba(255, 40, 40, 0.9)';
- } else if (num >1200 && num <=1400) {
- return 'rgba(255, 38, 112, 0.9)';
- } else if (num >1400 && num <=1600) {
- return 'rgba(163, 23, 187, 0.9)';
- } else if (num >1600 && num <=1800) {
- return 'rgba(119, 14, 234, 0.9)';
- } else if (num >1800) {
- return 'rgba(77, 11, 255, 0.9)';
+ let num = Number(tempTop[n].slice(0, tempTop[n].length - 1));
+ if (num <= 100) {
+ return "rgba(96, 0, 189, 0.9)";
+ } else if (num > 100 && num <= 200) {
+ return "rgba(102, 7, 255, 0.9)";
+ } else if (num > 200 && num <= 300) {
+ return "rgba(10, 20, 255, 0.9)";
+ } else if (num > 300 && num <= 400) {
+ return "rgba(7, 89, 255, 0.9)";
+ } else if (num > 400 && num <= 500) {
+ return "rgba(7, 139, 255, 0.9)";
+ } else if (num > 500 && num <= 600) {
+ return "rgba(7, 194, 255, 0.9)";
+ } else if (num > 600 && num <= 700) {
+ return "rgba(7, 255, 253, 0.9)";
+ } else if (num > 700 && num <= 800) {
+ return "rgba(7, 255, 205, 0.9)";
+ } else if (num > 800 && num <= 900) {
+ return "rgba(20, 237, 127, 0.9)";
+ } else if (num > 900 && num <= 1000) {
+ return "rgba(0, 193, 39, 0.9)";
+ } else if (num > 1000 && num <= 1100) {
+ return "rgba(147, 210, 1, 0.9)";
+ } else if (num > 1100 && num <= 1200) {
+ return "rgba(206, 206, 0, 0.9)";
+ } else if (num > 1200 && num <= 1300) {
+ return "rgba(255, 226, 13, 0.9)";
+ } else if (num > 1300 && num <= 1400) {
+ return "rgba(249, 240, 146, 0.9)";
+ } else if (num > 1400 && num <= 1500) {
+ return "rgba(250, 204, 93, 0.9)";
+ } else if (num > 1500 && num <= 1600) {
+ return "rgba(240, 139, 32, 0.9)";
+ } else if (num > 1600 && num <= 1700) {
+ return "rgba(241, 88, 26, 0.9)";
+ } else if (num > 1700 && num <= 1800) {
+ return "rgba(255, 0, 0, 0.9)";
+ } else if (num > 1800 && num <= 1900) {
+ return "rgba(182, 0, 0, 0.9)";
+ } else if (num > 1900) {
+ return "rgba(140, 0, 33, 0.9))";
}
}
// 窑炉内部svg变色
function BigSvg() {
return (
-
+ );
}
-
+
return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
);
};
-
-export default TopColorBlock;
\ No newline at end of file
+
+export default TopColorBlock;
diff --git a/src/components/Modules/KilnOptimize/components/TopColorBlockEnter/index.jsx b/src/components/Modules/KilnOptimize/components/TopColorBlockEnter/index.jsx
index 723b598..e24435d 100644
--- a/src/components/Modules/KilnOptimize/components/TopColorBlockEnter/index.jsx
+++ b/src/components/Modules/KilnOptimize/components/TopColorBlockEnter/index.jsx
@@ -1,131 +1,362 @@
-
import { useSelector } from "react-redux";
-import React from 'react';
+import React from "react";
import { motion, AnimatePresence } from "framer-motion";
-import { ReactComponent as B1 } from './pic/b1.svg'
-import { ReactComponent as B2 } from './pic/b2.svg'
-import { ReactComponent as B3 } from './pic/b3.svg'
-import { ReactComponent as B4 } from './pic/b4.svg'
-import { ReactComponent as B5 } from './pic/b5.svg'
-import { ReactComponent as B6 } from './pic/b6.svg'
-import { ReactComponent as B7 } from './pic/b7.svg'
-import { ReactComponent as B8 } from './pic/b8.svg'
-import { ReactComponent as T1 } from './pic/t1.svg'
-import { ReactComponent as T2 } from './pic/t2.svg'
-import { ReactComponent as T3 } from './pic/t3.svg'
-import { ReactComponent as T4 } from './pic/t4.svg'
-import { ReactComponent as T5 } from './pic/t5.svg'
-import { ReactComponent as T6 } from './pic/t6.svg'
-import { ReactComponent as T7 } from './pic/t7.svg'
-import { ReactComponent as T8 } from './pic/t8.svg'
-
-const TopColorBlockEnter = ({ condition }) => {
+import { ReactComponent as B1 } from "./pic/b1.svg";
+import { ReactComponent as B2 } from "./pic/b2.svg";
+import { ReactComponent as B3 } from "./pic/b3.svg";
+import { ReactComponent as B4 } from "./pic/b4.svg";
+import { ReactComponent as B5 } from "./pic/b5.svg";
+import { ReactComponent as B6 } from "./pic/b6.svg";
+import { ReactComponent as B7 } from "./pic/b7.svg";
+import { ReactComponent as B8 } from "./pic/b8.svg";
+import { ReactComponent as T1 } from "./pic/t1.svg";
+import { ReactComponent as T2 } from "./pic/t2.svg";
+import { ReactComponent as T3 } from "./pic/t3.svg";
+import { ReactComponent as T4 } from "./pic/t4.svg";
+import { ReactComponent as T5 } from "./pic/t5.svg";
+import { ReactComponent as T6 } from "./pic/t6.svg";
+import { ReactComponent as T7 } from "./pic/t7.svg";
+import { ReactComponent as T8 } from "./pic/t8.svg";
+
+const TopColorBlockEnter = () => {
const tempTop = useSelector((state) => state.temperature.top);
function returnColor(n) {
- let num = Number(tempTop[n].slice(0,tempTop[n].length - 1))
- if (num <= 200) {
- return 'rgba(42, 229, 93, 0.7)';
- } else if (num >200 && num <=400) {
- return 'rgba(133, 203, 50, 0.7)';
- } else if (num >400 && num <=600) {
- return 'rgba(255, 182, 3, 0.7)';
- } else if (num >600 && num <=800) {
- return 'rgba(255, 135, 16, 0.7)';
- } else if (num >800 && num <=1000) {
- return 'rgba(249, 89, 7, 0.7)';
- } else if (num >1000 && num <=1200) {
- return 'rgba(255, 40, 40, 0.7)';
- } else if (num >1200 && num <=1400) {
- return 'rgba(255, 38, 112, 0.7)';
- } else if (num >1400 && num <=1600) {
- return 'rgba(163, 23, 187, 0.7)';
- } else if (num >1600 && num <=1800) {
- return 'rgba(119, 14, 234, 0.7)';
- } else if (num >1800) {
- return 'rgba(77, 11, 255, 0.7)';
+ let num = Number(tempTop[n].slice(0, tempTop[n].length - 1));
+ if (num <= 100) {
+ return "rgba(96, 0, 189, 0.7)";
+ } else if (num > 100 && num <= 200) {
+ return "rgba(102, 7, 255, 0.7)";
+ } else if (num > 200 && num <= 300) {
+ return "rgba(10, 20, 255, 0.7)";
+ } else if (num > 300 && num <= 400) {
+ return "rgba(7, 89, 255, 0.7)";
+ } else if (num > 400 && num <= 500) {
+ return "rgba(7, 139, 255, 0.7)";
+ } else if (num > 500 && num <= 600) {
+ return "rgba(7, 194, 255, 0.7)";
+ } else if (num > 600 && num <= 700) {
+ return "rgba(7, 255, 253, 0.7)";
+ } else if (num > 700 && num <= 800) {
+ return "rgba(7, 255, 205, 0.7)";
+ } else if (num > 800 && num <= 900) {
+ return "rgba(20, 237, 127, 0.7)";
+ } else if (num > 900 && num <= 1000) {
+ return "rgba(0, 193, 39, 0.7)";
+ } else if (num > 1000 && num <= 1100) {
+ return "rgba(147, 210, 1, 0.7)";
+ } else if (num > 1100 && num <= 1200) {
+ return "rgba(206, 206, 0, 0.7)";
+ } else if (num > 1200 && num <= 1300) {
+ return "rgba(255, 226, 13, 0.7)";
+ } else if (num > 1300 && num <= 1400) {
+ return "rgba(249, 240, 146, 0.7)";
+ } else if (num > 1400 && num <= 1500) {
+ return "rgba(250, 204, 93, 0.7)";
+ } else if (num > 1500 && num <= 1600) {
+ return "rgba(240, 139, 32, 0.7)";
+ } else if (num > 1600 && num <= 1700) {
+ return "rgba(241, 88, 26, 0.7)";
+ } else if (num > 1700 && num <= 1800) {
+ return "rgba(255, 0, 0, 0.7)";
+ } else if (num > 1800 && num <= 1900) {
+ return "rgba(182, 0, 0, 0.7)";
+ } else if (num > 1900) {
+ return "rgba(140, 0, 33, 0.7)";
}
}
function returnColor2(n) {
- let num = Number(tempTop[n].slice(0,tempTop[n].length - 1))
- if (num <= 200) {
- return 'rgba(42, 229, 93, 0.9)';
- } else if (num >200 && num <=400) {
- return 'rgba(133, 203, 50, 0.9)';
- } else if (num >400 && num <=600) {
- return 'rgba(255, 182, 3, 0.9)';
- } else if (num >600 && num <=800) {
- return 'rgba(255, 135, 16, 0.9)';
- } else if (num >800 && num <=1000) {
- return 'rgba(249, 89, 7, 0.9)';
- } else if (num >1000 && num <=1200) {
- return 'rgba(255, 40, 40, 0.9)';
- } else if (num >1200 && num <=1400) {
- return 'rgba(255, 38, 112, 0.9)';
- } else if (num >1400 && num <=1600) {
- return 'rgba(163, 23, 187, 0.9)';
- } else if (num >1600 && num <=1800) {
- return 'rgba(119, 14, 234, 0.9)';
- } else if (num >1800) {
- return 'rgba(77, 11, 255, 0.9)';
+ let num = Number(tempTop[n].slice(0, tempTop[n].length - 1));
+ if (num <= 100) {
+ return "rgba(96, 0, 189, 0.9)";
+ } else if (num > 100 && num <= 200) {
+ return "rgba(102, 7, 255, 0.9)";
+ } else if (num > 200 && num <= 300) {
+ return "rgba(10, 20, 255, 0.9)";
+ } else if (num > 300 && num <= 400) {
+ return "rgba(7, 89, 255, 0.9)";
+ } else if (num > 400 && num <= 500) {
+ return "rgba(7, 139, 255, 0.9)";
+ } else if (num > 500 && num <= 600) {
+ return "rgba(7, 194, 255, 0.9)";
+ } else if (num > 600 && num <= 700) {
+ return "rgba(7, 255, 253, 0.9)";
+ } else if (num > 700 && num <= 800) {
+ return "rgba(7, 255, 205, 0.9)";
+ } else if (num > 800 && num <= 900) {
+ return "rgba(20, 237, 127, 0.9)";
+ } else if (num > 900 && num <= 1000) {
+ return "rgba(0, 193, 39, 0.9)";
+ } else if (num > 1000 && num <= 1100) {
+ return "rgba(147, 210, 1, 0.9)";
+ } else if (num > 1100 && num <= 1200) {
+ return "rgba(206, 206, 0, 0.9)";
+ } else if (num > 1200 && num <= 1300) {
+ return "rgba(255, 226, 13, 0.9)";
+ } else if (num > 1300 && num <= 1400) {
+ return "rgba(249, 240, 146, 0.9)";
+ } else if (num > 1400 && num <= 1500) {
+ return "rgba(250, 204, 93, 0.9)";
+ } else if (num > 1500 && num <= 1600) {
+ return "rgba(240, 139, 32, 0.9)";
+ } else if (num > 1600 && num <= 1700) {
+ return "rgba(241, 88, 26, 0.9)";
+ } else if (num > 1700 && num <= 1800) {
+ return "rgba(255, 0, 0, 0.9)";
+ } else if (num > 1800 && num <= 1900) {
+ return "rgba(182, 0, 0, 0.9)";
+ } else if (num > 1900) {
+ return "rgba(140, 0, 33, 0.9)";
}
}
// 窑炉内部svg变色
function BigSvg() {
return (
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
- )
+
+
+
+ );
}
-
+
return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
);
};
-
-export default TopColorBlockEnter;
\ No newline at end of file
+
+export default TopColorBlockEnter;