Compare commits

..

No commits in common. "aa86600a1ae7a50a628df6bb24c8fabe9adf132a" and "9589fba7c2c21b545dcf9075a46f1fc88067906f" have entirely different histories.

7 changed files with 15 additions and 25 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

View File

@ -2,5 +2,4 @@
background: url(../../../assets/forecastBack.png) no-repeat; background: url(../../../assets/forecastBack.png) no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
width: 506px; width: 506px;
height: 422px;
} }

View File

@ -36,7 +36,7 @@ export default function CompanyName() {
</div> </div>
<div> <div>
<h2 className={cls.TopTitleText}> <h2 className={cls.TopTitleText}>
许昌安彩新能科技&ensp;&ensp;许昌安彩窑炉生产指挥调度中心{' '} 许昌安彩新能科技&ensp;&ensp;4800万方光伏轻质基板生产线{' '}
</h2> </h2>
<img src={ButtonLine} alt="图片加载错误" className={cls.TopButtonLine}/> <img src={ButtonLine} alt="图片加载错误" className={cls.TopButtonLine}/>
</div> </div>

View File

@ -1,7 +1,7 @@
/* /*
* @Author: zhp * @Author: zhp
* @Date: 2024-08-29 09:46:11 * @Date: 2024-08-29 09:46:11
* @LastEditTime: 2024-09-18 09:10:19 * @LastEditTime: 2024-09-14 09:20:36
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
*/ */
@ -9,9 +9,8 @@ import cls from "./index.module.css";
import React, { useState,useEffect,useRef } from 'react'; import React, { useState,useEffect,useRef } from 'react';
import Points from "../../Modules/KilnOptimize/components/KilnTopForecast/Points"; import Points from "../../Modules/KilnOptimize/components/KilnTopForecast/Points";
function generateRandomNearNumber(number) { function generateRandomNearNumber(number) {
const minRandom = -0.5; const randomOffset = Math.floor(Math.random() * 11) - 5;
const maxRandom = 0.5; return number + randomOffset;
return (number + Math.random() * (maxRandom - minRandom) + minRandom).toFixed(1);
} }
function BlueRect(props) { function BlueRect(props) {
const title = props.title || "DEFAULT"; const title = props.title || "DEFAULT";
@ -23,7 +22,6 @@ function BlueRect(props) {
setIsVisible(!newVisibilityState); setIsVisible(!newVisibilityState);
// isVisible // isVisible
}; };
const [randomValue, setRandomValue] = useState(generateRandomNearNumber(parseInt(value)));
// const parentRef = useRef(null); // const parentRef = useRef(null);
// const pointsRef = useRef(null); // const pointsRef = useRef(null);
const [mousePosition, setMousePosition] = useState({ x: 0, y: 0 }); const [mousePosition, setMousePosition] = useState({ x: 0, y: 0 });
@ -73,22 +71,14 @@ function BlueRect(props) {
> >
{title} {title}
</span> </span>
<span className="value" style={{ userSelect: "none", fontSize: "22px" }}>
{value}
</span>
{props.blue || ( {props.blue || (
<span onClick={handleToggleVisibility} className="value" style={{ userSelect: "none", fontWeight: 600,fontSize: "22px", cursor: 'pointer', }}> <span onClick={handleToggleVisibility} className={`${cls.forecastValue}`} style={{ userSelect: "none", fontWeight: 600,fontSize: "22px" }}>
{randomValue + '℃'} {generateRandomNearNumber(parseInt(value)) + '℃'}
</span> </span>
)} )}
{props.blue? (
<span className='value' style={{ userSelect: "none", fontSize: "22px" }}>
{value}
</span>
): (
<span className={`${cls.forecastValue}`} style={{ userSelect: "none", fontSize: "22px" }}>
{value}
</span>
)}
</div> </div>
{isVisible && !props.blue && <Points dataSource={chartData} {isVisible && !props.blue && <Points dataSource={chartData}
updateVisibilityState={updateVisibilityState} // updateVisibilityState={updateVisibilityState} //

View File

@ -551,5 +551,6 @@
background: linear-gradient( 270deg, rgba(0,255,251,0.67) 0%, rgba(0,255,245,0.64) 100%); background: linear-gradient( 270deg, rgba(0,255,251,0.67) 0%, rgba(0,255,245,0.64) 100%);
box-shadow: 0px 1px 7px 0px rgba(58,0,0,0.5); box-shadow: 0px 1px 7px 0px rgba(58,0,0,0.5);
opacity: 0.7; opacity: 0.7;
cursor: pointer;
backdrop-filter: blur(3px); backdrop-filter: blur(3px);
} }

View File

@ -7,7 +7,7 @@
display: grid; display: grid;
grid-template-rows: auto 1fr 1fr; grid-template-rows: auto 1fr 1fr;
/* gap: 4px; */ /* gap: 4px; */
padding-top: 4px; padding-top: 6px;
.info__item { .info__item {
/* width: 100%; */ /* width: 100%; */
background: url('../../../../../assets/blueBack.png') no-repeat; background: url('../../../../../assets/blueBack.png') no-repeat;

View File

@ -1,7 +1,7 @@
/* /*
* @Author: zhp * @Author: zhp
* @Date: 2024-08-23 13:56:11 * @Date: 2024-08-23 13:56:11
* @LastEditTime: 2024-09-18 08:52:18 * @LastEditTime: 2024-08-30 16:30:35
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
*/ */
@ -32,7 +32,7 @@ export default function Index() {
<div style={{ height: '261px', marginTop: '24px' }}> <div style={{ height: '261px', marginTop: '24px' }}>
<LeftMiddleForecast /> <LeftMiddleForecast />
</div> </div>
<div style={{ height: '422px',marginTop: '24px' }}> <div style={{ flex: 1,marginTop: '24px' }}>
<LeftBottomForecast/> <LeftBottomForecast/>
</div> </div>
</motion.div> </motion.div>