diff --git a/src/assets/leftBottomBack.png b/src/assets/leftBottomBack.png deleted file mode 100644 index 3fedfde..0000000 Binary files a/src/assets/leftBottomBack.png and /dev/null differ diff --git a/src/components/Common/BottomItemBackgroundForecastBottom/index.module.css b/src/components/Common/BottomItemBackgroundForecastBottom/index.module.css index 20408e8..ba05ac1 100644 --- a/src/components/Common/BottomItemBackgroundForecastBottom/index.module.css +++ b/src/components/Common/BottomItemBackgroundForecastBottom/index.module.css @@ -1,5 +1,6 @@ .bottomBarItem { - background: url(../../../assets/forecastBack.png) no-repeat; + background: url(../../../assets/forecastBack.png) no-repeat; background-size: 100% 100%; width: 506px; + height: 422px; } diff --git a/src/components/Common/Company/index.jsx b/src/components/Common/Company/index.jsx index 0a70816..6726626 100644 --- a/src/components/Common/Company/index.jsx +++ b/src/components/Common/Company/index.jsx @@ -36,7 +36,7 @@ export default function CompanyName() {

- 许昌安彩新能科技  4800万方光伏轻质基板生产线{' '} + 许昌安彩新能科技  许昌安彩窑炉生产指挥调度中心{' '}

图片加载错误
diff --git a/src/components/Common/forecastRect/index.jsx b/src/components/Common/forecastRect/index.jsx index 42f0417..a8f4b7f 100644 --- a/src/components/Common/forecastRect/index.jsx +++ b/src/components/Common/forecastRect/index.jsx @@ -1,7 +1,7 @@ /* * @Author: zhp * @Date: 2024-08-29 09:46:11 - * @LastEditTime: 2024-09-14 09:20:36 + * @LastEditTime: 2024-09-18 09:10:19 * @LastEditors: zhp * @Description: */ @@ -9,8 +9,9 @@ import cls from "./index.module.css"; import React, { useState,useEffect,useRef } from 'react'; import Points from "../../Modules/KilnOptimize/components/KilnTopForecast/Points"; function generateRandomNearNumber(number) { - const randomOffset = Math.floor(Math.random() * 11) - 5; - return number + randomOffset; + const minRandom = -0.5; + const maxRandom = 0.5; + return (number + Math.random() * (maxRandom - minRandom) + minRandom).toFixed(1); } function BlueRect(props) { const title = props.title || "DEFAULT"; @@ -22,6 +23,7 @@ function BlueRect(props) { setIsVisible(!newVisibilityState); // 在这里可以根据isVisible的变化执行其他逻辑 }; + const [randomValue, setRandomValue] = useState(generateRandomNearNumber(parseInt(value))); // const parentRef = useRef(null); // const pointsRef = useRef(null); const [mousePosition, setMousePosition] = useState({ x: 0, y: 0 }); @@ -70,15 +72,23 @@ function BlueRect(props) { }} > {title} - - + + {props.blue || ( + + {randomValue + '℃'} + + )} + {props.blue? ( + {value} - {props.blue || ( - - {generateRandomNearNumber(parseInt(value)) + '℃'} - + ): ( + + {value} + + )} + {isVisible && !props.blue && -
+