This commit is contained in:
‘937886381’
2024-08-30 17:17:45 +08:00
parent d7cc3deeee
commit f702e950ac
104 changed files with 4010 additions and 20071 deletions

View File

@@ -2,4 +2,4 @@
background: url(../../../assets/bg-bottom-item.png) no-repeat;
background-size: 100% 100%;
width: 600px;
}
}

View File

@@ -0,0 +1,18 @@
import cls from './index.module.css';
import Container from '../../Container';
function BottomBarItem(props) {
return (
<Container
icon={props.icon}
title={props.title}
desc={props.desc}
className={`${cls.bottomBarItem} ${props.className}`}
style={props.style}
>
{props.children}
</Container>
);
}
export default BottomBarItem;

View File

@@ -0,0 +1,5 @@
.bottomBarItem {
background: url(../../../assets/forecastChartBack.png) no-repeat;
background-size: 100% 100%;
width: 506px;
}

View File

@@ -0,0 +1,18 @@
import cls from './index.module.css';
import Container from '../../Container';
function BottomBarItem(props) {
return (
<Container
icon={props.icon}
title={props.title}
desc={props.desc}
className={`${cls.bottomBarItem} ${props.className}`}
style={props.style}
>
{props.children}
</Container>
);
}
export default BottomBarItem;

View File

@@ -0,0 +1,5 @@
.bottomBarItem {
background: url(../../../assets/leftBottomBack.png) no-repeat;
background-size: 100% 100%;
width: 506px;
}

View File

@@ -0,0 +1,18 @@
import cls from './index.module.css';
import Container from '../../Container';
function BottomBarItem(props) {
return (
<Container
icon={props.icon}
title={props.title}
desc={props.desc}
className={`${cls.bottomBarItem} ${props.className}`}
style={props.style}
>
{props.children}
</Container>
);
}
export default BottomBarItem;

View File

@@ -0,0 +1,5 @@
.bottomBarItem {
background: url(../../../assets/leftMiddleBack.png) no-repeat;
background-size: 100% 100%;
width: 506px;
}

View File

@@ -0,0 +1,18 @@
import cls from './index.module.css';
import Container from '../../Container';
function BottomBarItem(props) {
return (
<Container
icon={props.icon}
title={props.title}
desc={props.desc}
className={`${cls.bottomBarItem} ${props.className}`}
style={props.style}
>
{props.children}
</Container>
);
}
export default BottomBarItem;

View File

@@ -0,0 +1,6 @@
.bottomBarItem {
background: url(../../../assets/lefTopBack.png) no-repeat;
background-size: 100% 100%;
width: 506px;
height: 100%;
}

View File

@@ -0,0 +1,143 @@
import cls from "./leftbox.module.scss";
import React, { useState, useContext, useEffect } from "react";
import { useSelector, useDispatch } from "react-redux";
import icon1 from "../../../assets/CenterChart1icon1.svg";
import icon2 from "../../../assets/CenterChart1icon2.svg";
import icon3 from "../../../assets/CenterChart1icon3.svg";
import icon4 from "../../../assets/CenterChart1icon4.svg";
// import icon4 from "../../../assets/CenterChart2icon4.svg";
import useTimeCounter from "../../../hooks/useTimeCounter";
const FireInfo = () => {
// const dispatch = useDispatch();
const KilnInfo = useSelector((state) => state.kiln);
// const time = KilnInfo.lastFireChangeTime || "0分0秒";
// const minsec = useTimeCounter(time);
// let [min, sec] = [0, 0];
// if (minsec) {
// min = minsec[0];
// sec = minsec[1];
// }
// useEffect(() => {
// const restTime = ctx?.runState?.lastFireChangeTime;
// if (restTime == null) return;
// let timer = null;
// if (/分/.test(restTime) && /秒/.test(restTime)) {
// let [min, sec] = restTime.replace(/分/, ":").replace(/秒/, "").split(":");
// timer = setInterval(() => {
// if (Number(sec) === 0 && Number(min) === 0) {
// clearInterval(timer);
// return;
// }
// if (Number(sec) === 0) {
// sec = 59;
// min--;
// } else {
// sec--;
// }
// setTime([min, sec]);
// }, 1000);
// } else if (/分/.test(restTime)) {
// let sec,
// min = restTime.replace(/分/, ":");
// sec = 0;
// timer = setInterval(() => {
// if (Number(sec) === 0 && Number(min) === 0) {
// clearInterval(timer);
// return;
// }
// if (Number(sec) === 0) {
// sec = 59;
// min--;
// } else {
// sec--;
// }
// setTime([min, sec]);
// }, 1000);
// } else if (/秒/.test(restTime)) {
// let min,
// sec = restTime.replace(/秒/, "");
// min = 0;
// timer = setInterval(() => {
// if (Number(sec) === 0 && Number(min) === 0) {
// clearInterval(timer);
// return;
// }
// if (Number(sec) === 0) {
// sec = 59;
// min--;
// } else {
// sec--;
// }
// setTime([min, sec]);
// }, 1000);
// }
// return () => {
// clearInterval(timer);
// };
// }, [ctx?.runState?.lastFireChangeTime]);
// useEffect(() => {
// setInterval(() => {
// dispatch({
// type: "fireInfo/setFireInfo",
// payload: {
// fireChangeTime: `${Math.ceil(Math.random() * 10)}:${Math.ceil(
// Math.random() * 10
// )}`,
// fireDirection: Math.random * 10 < 5 ? "东火" : "西火",
// lastFireChangeTime: `${Math.ceil(Math.random() * 60)}分${Math.ceil(
// Math.random() * 50
// )}秒`,
// },
// });
// }, 10000);
// }, []);
const data = [
{
icon: icon1,
label: "泡界线",
// value: ctx?.runState?.fireChangeTime || "00:00",
// value: KilnInfo.fireChangeTime || "00:00",
},
{
icon: icon2,
label: "磴顶加权温度",
// value: `${time[0]}分${time[1]}秒`,
value: KilnInfo.topTemp|| "℃",
},
{
icon: icon3,
label: "液位",
// value: ctx?.runState?.fireDirection || "东火",
value: KilnInfo.liquidLevel || "0",
},
{
icon: icon4,
label: "池底加权温度",
// value: ctx?.runState?.fireDirection || "东火",
value: KilnInfo.meltTemp || "℃",
},
];
return (
<div className={`${cls.leftbox}`}>
{data.map((item) => (
<div className={cls.box} key={item.label}>
<img src={item.icon} alt="Error" className="box__logo" />
<div className={cls.box__inner}>
<h2 className={cls.box__label}>{item.label}</h2>
<h2 className={cls.box__value}> {item.value}</h2>
</div>
</div>
))}
</div>
);
};
export default FireInfo;

View File

@@ -0,0 +1,38 @@
.leftbox {
// height: 128px;
height: 230px;
display: flex;
width: 640px;
flex-wrap: wrap;
.box {
margin-right: 16px;
width: 300px;
height: 110px;
padding: 12px 8px;
background: url(../../../assets/CenterChart2ItemBg.png);
background-repeat: no-repeat;
background-size: 100% 100%;
display: flex;
letter-spacing: 2px;
align-items: flex-start;
// flex-wrap: wrap;
user-select: none;
.box__inner {
padding-top: 12px;
.box__label {
color: #fffa;
font-size: 18px;
line-height: 1;
}
.box__value {
color: #fff;
font-weight: 400;
font-size: 34px;
line-height: 54px;
}
}
}
}

View File

@@ -1,3 +1,10 @@
/*
* @Author: zhp
* @Date: 2024-08-20 14:08:32
* @LastEditTime: 2024-08-30 09:50:51
* @LastEditors: zhp
* @Description:
*/
import cls from "./kiln.module.scss";
import Container from "../../Container";
import { useSelector } from "react-redux";
@@ -14,7 +21,7 @@ export default function Kiln() {
return (
<Container title="窑炉信息" icon="kiln" className={cls.leftBar__top}>
<div className={cls.leftBar__top__content}>
{infos.map((item) => (
{infos.slice(0,infos.length-1).map((item) => (
<div key={item.label} className={cls.info__item}>
<span className={cls.label}>{item.label}</span>
<span className={cls.value}>{item.value}</span>

View File

@@ -0,0 +1,58 @@
/*
* @Author: zhp
* @Date: 2024-08-27 09:22:58
* @LastEditTime: 2024-08-30 09:55:56
* @LastEditors: zhp
* @Description:
*/
import BlueRect from "../forecastRect";
import { useSelector } from "react-redux";
import { motion, AnimatePresence } from "framer-motion";
const blueTe = [
"TE271",
"TE272",
"TE273",
"TE274",
"TE275",
"TE276",
"TE277",
"TE278",
"TE279",
"TE280",
];
function TemperatureTop(props) {
const tempTop = useSelector((state) => state.temperature.top);
console.log('tempTop',tempTop);
return (
<motion.div
className="temperature-top"
style={{
position: "absolute",
top: "0",
left: "0",
width: "100%",
height: "80vh",
zIndex: "-1",
...props.style,
}}
animate={{
opacity: [0, 0, 0, 0.6, 1],
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)}
/>
))}
</motion.div>
);
}
export default TemperatureTop;

View File

@@ -0,0 +1,27 @@
import cls from "./kiln.module.scss";
import Container from "../../Container";
import { useSelector } from "react-redux";
import { stateNameMap } from "../../../store/features/kilnSlice";
export default function Kiln() {
const kilnInfo = useSelector((state) => state.kiln);
const infos = Object.keys(kilnInfo).map((key) => ({
label: stateNameMap[key],
value: kilnInfo[key],
}));
return (
<Container title="窑炉信息" icon="kiln" className={cls.leftBar__top}>
<div className={cls.leftBar__top__content}>
{infos.map((item) => (
<div key={item.label} className={cls.info__item}>
<span className={cls.label}>{item.label}</span>
<span className={cls.value}>{item.value}</span>
{/* {item.label}: {item.value} */}
</div>
))}
</div>
</Container>
);
}

View File

@@ -0,0 +1,42 @@
.leftBar__top {
width: 625px;
// height: 305px;
height: 300px;
background: url('../../../assets/ItemBg.png') no-repeat;
background-size: 100% 100%;
.leftBar__top__content {
flex: 1;
height: 1px;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
padding-top: 18px;
.info__item {
border-radius: 2px;
color: hsl(0, 0%, 100%, 0.9);
box-shadow: inset 0 0 17px 0px hsla(0, 0%, 100%, 0.15);
// width: 288px;
height: 43px;
font-size: 20px;
letter-spacing: 1.43px;
line-height: 40px;
text-align: center;
user-select: none;
display: flex;
align-items: center;
gap: 12px;
.label {
flex: 6;
text-align: right;
}
.value {
flex: 4;
text-align: left;
}
}
}
}

View File

@@ -0,0 +1,18 @@
import cls from './index.module.css';
import Container from '../../Container';
function BottomBarItem(props) {
return (
<Container
icon={props.icon}
title={props.title}
desc={props.desc}
className={`${cls.bottomBarItem} ${props.className}`}
style={props.style}
>
{props.children}
</Container>
);
}
export default BottomBarItem;

View File

@@ -0,0 +1,5 @@
.bottomBarItem {
background: url(../../../assets/large.png) no-repeat;
background-size: 100% 100%;
width: 600px;
}

View File

@@ -0,0 +1,41 @@
/*
* @Author: zhp
* @Date: 2024-08-29 09:46:11
* @LastEditTime: 2024-08-30 14:01:37
* @LastEditors: zhp
* @Description:
*/
import cls from "./index.module.css";
function BlueRect(props) {
const title = props.title || "DEFAULT";
const value = props.value || "0℃";
return (
<div
className={`${cls.blueRect} ${cls[title]}`}
style={{
background: props.blue ? "#0a4268ee" : "#0a426860",
height:"68px" ,
}}
>
<span
className="title"
style={{
fontSize: "18px",
lineHeight: "24px",
color: props.blue ? "#40afb8" : "#fff",
fontWeight: 600,
userSelect: "none",
}}
>
{title}
</span>
<span className="value" style={{ userSelect: "none", fontSize: "22px" }}>
{value}
</span>
</div>
);
}
export default BlueRect;

View File

@@ -0,0 +1,545 @@
.blueRect {
display: inline-block;
width: 106px;
height: 68px;
position: absolute;
top: 0;
left: 0;
padding: 6px 0;
display: flex;
flex-direction: column;
align-items: center;
color: #fff;
background: #0a426820;
border-radius: 4px;
}
.blueRect::before {
content: "";
display: inline-block;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 3px;
background: linear-gradient(
to right,
transparent 0%,
transparent 50%,
#24aebb 100%
);
border-radius: 3px;
}
.blueRect::after {
content: "";
display: inline-block;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 3px;
background: linear-gradient(
to right,
#24aebb 0%,
transparent 50%,
transparent 100%
);
border-radius: 3px;
}
/** left **/
.TE271 {
top: 160px;
left: 70px;
}
.TE272 {
top: 254px; /* +94px */
left: 70px;
}
.TE273 {
top: 348px; /* +94px */
left: 70px;
}
.TE274 {
top: 442px;
left: 70px;
}
.TE279 {
top: 536px;
left: 70px;
}
.TE275 {
top: 160px;
left: 206px;
}
.TE276 {
top: 254px;
left: 206px; /* +136px */
}
.TE277 {
top: 348px; /* +94px */
left: 206px; /* +136px */
}
.TE278 {
top: 442px; /* +94px */
left: 206px; /* +136px */
}
.TE280 {
top: 536px; /* +94px */
left: 206px; /* +136px */
}
/** center top **/
.TE227 {
top: 178px;
left: 470px;
}
.TE229 {
top: 178px;
left: 590px; /* +120px */
}
.TE231 {
top: 178px;
left: 700px;
}
.TE233 {
top: 178px;
left: 800px;
}
.TE235 {
top: 178px;
left: 900px;
}
.TE237 {
top: 178px;
left: 1000px;
}
.TE239 {
top: 178px;
left: 1100px;
}
.TE241 {
top: 178px;
left: 1200px;
}
/** center bottom **/
.TE228 {
top: 580px;
left: 460px;
}
.TE230 {
top: 580px;
left: 570px;
}
.TE232 {
top: 580px;
left: 680px;
}
.TE234 {
top: 580px;
left: 790px;
}
.TE236 {
top: 580px;
left: 900px;
}
.TE238 {
top: 580px;
left: 1000px;
}
.TE240 {
top: 580px;
left: 1100px;
}
.TE242 {
top: 580px;
left: 1200px;
}
/** center middle **/
.TE201 {
top: 380px;
/* transform: rotate(-1deg); */
left: 360px;
}
.TE202 {
top: 380px;
/* transform: rotate(-1deg); */
left: 480px;
}
.TE203 {
top: 380px;
/* transform: rotate(-1deg); */
left: 600px;
}
.TE204 {
top: 380px;
/* transform: rotate(-1deg); */
left: 720px;
}
.TE205 {
top: 380px;
/* transform: rotate(-1deg); */
left: 840px;
}
.TE206 {
top: 380px;
/* transform: rotate(-1deg); */
left: 960px;
}
.TE207 {
top: 270px;
/* transform: rotate(-1deg); */
left: 1080px;
}
.TE208 {
top: 380px;
/* transform: rotate(-1deg); */
left: 1080px;
}
.TE209 {
top: 470px;
/* transform: rotate(-1deg); */
left: 1080px;
}
.TE210 {
top: 380px;
/* transform: rotate(-1deg); */
left: 1200px;
}
.TE211 {
top: 380px;
/* transform: rotate(-1deg); */
left: 1320px;
}
.TE212 {
top: 380px;
/* transform: rotate(-1deg); */
left: 1440px;
}
.TE213 {
top: 380px;
/* transform: rotate(-1deg); */
left: 1560px;
}
/** right **/
.TE214 {
top: 128px;
left: 1720px;
}
.TE215 {
top: 245px;
left: 1740px;
}
.TE216 {
top: 380px;
left: 1740px;
}
.TE217 {
top: 500px;
left: 1760px;
}
.TE218 {
top: 600px;
left: 1780px;
}
.TE219 {
top: 128px;
left: 1840px;
}
.TE220 {
top: 245px;
left: 1860px;
}
.TE221 {
top: 380px;
left: 1860px;
}
.TE222 {
top: 500px;
left: 1880px;
}
.TE223 {
top: 600px;
left: 1900px;
}
.TE224 {
top: 245px;
left: 1980px;
}
.TE225 {
top: 380px;
left: 1980px;
}
.TE226 {
top: 500px;
left: 2000px;
}
/** 一层 --- 窑底 **/
.TE401 {
top: 420px;
left: 20px;
}
.TE402 {
top: 420px;
left: 140px;
}
.TE403 {
top: 420px;
left: 260px;
}
.PE401 {
top: 320px;
left: 20px;
}
.PE402 {
top: 320px;
left: 140px;
}
.PE403 {
top: 320px;
left: 260px;
}
/** center top **/
.TE333 {
top: 128px;
left: 660px;
}
.TE335 {
top: 128px;
left: 775px;
}
.TE337 {
top: 128px;
left: 880px;
}
.TE339 {
top: 128px;
left: 1000px;
}
.TE341 {
top: 128px;
left: 1110px;
}
.TE343 {
top: 128px;
left: 1225px;
}
.TE345 {
top: 128px;
left: 1335px;
}
.TE347 {
top: 128px;
left: 1440px;
}
/** center bottom **/
.TE334 {
top: 620px;
left: 610px;
}
.TE336 {
top: 620px;
left: 730px;
}
.TE338 {
top: 620px;
left: 860px;
}
.TE340 {
top: 620px;
left: 980px;
}
.TE342 {
top: 620px;
left: 1110px;
}
.TE344 {
top: 620px;
left: 1235px;
}
.TE346 {
top: 620px;
left: 1360px;
}
.TE348 {
top: 620px;
left: 1480px;
}
/** center middle **/
.TE301 {
top: 340px;
transform: scaleY(0.8);
left: 450px;
}
.TE302 {
top: 400px;
transform: scaleY(0.8);
left: 450px;
}
.TE303 {
top: 460px;
transform: scaleY(0.8);
left: 450px;
}
.TE304 {
top: 400px;
/* transform: scaleY(0.8) skewX(-2deg); */
transform: scaleY(0.8);
left: 580px;
}
.TE305 {
top: 340px;
/* transform: scaleY(0.8) skewX(-2deg); */
transform: scaleY(0.8);
left: 720px;
}
.TE306 {
top: 400px;
/* transform: scaleY(0.8) skewX(-2deg); */
/* transform: scaleY(0.8) rotate(-1deg); */
transform: scaleY(0.8);
left: 720px;
}
.TE307 {
top: 460px;
/* transform: scaleY(0.8) rotate(-1deg); */
transform: scaleY(0.8);
left: 720px;
}
.TE308 {
top: 400px;
transform: scaleY(0.8);
left: 860px;
}
.TE309 {
top: 400px;
transform: scaleY(0.8);
left: 1000px;
}
.TE310 {
top: 400px;
transform: scaleY(0.8);
left: 1140px;
}
.TE311 {
top: 340px;
transform: scaleY(0.8);
left: 1280px;
}
.TE312 {
top: 400px;
transform: scaleY(0.8);
left: 1280px;
}
.TE313 {
top: 460px;
transform: scaleY(0.8);
left: 1280px;
}
.TE314 {
top: 400px;
transform: scaleY(0.8);
left: 1420px;
}
.TE315 {
top: 400px;
transform: scaleY(0.8);
left: 1560px;
}
.TE316 {
top: 400px;
transform: scaleY(0.8);
left: 1700px;
}
.TE317 {
top: 340px;
transform: scaleY(0.8);
left: 1840px;
}
.TE318 {
top: 400px;
transform: scaleY(0.8);
left: 1840px;
}
.TE319 {
top: 460px;
transform: scaleY(0.8);
left: 1840px;
}
/** right **/
.TE327 {
top: 152px;
left: 2000px;
transform: scale(0.8) skewX(5deg);
}
.TE320 {
top: 252px;
left: 2020px;
transform: scale(0.8) skewX(7deg);
}
.TE321 {
top: 400px;
left: 2040px;
transform: scale(0.8) skewX(7deg);
}
.TE322 {
top: 532px;
left: 2060px;
transform: scale(0.8) skewX(7deg);
}
.TE330 {
top: 656px;
left: 2080px;
transform: scale(0.8) skewX(7deg);
}
.TE323 {
top: 152px;
left: 2100px;
transform: scale(0.8) skewX(7deg);
}
.TE328 {
top: 252px;
left: 2120px;
transform: scale(0.8) skewX(7deg);
}
.TE331 {
top: 400px;
left: 2140px;
transform: scale(0.8) skewX(7deg);
}
.TE329 {
top: 532px;
left: 2160px;
transform: scale(0.8) skewX(7deg);
}
.TE326 {
top: 656px;
left: 2180px;
transform: scale(0.8) skewX(7deg);
}
.TE324 {
top: 252px;
left: 2220px;
transform: scale(0.8) skewX(7deg);
}
.TE332 {
top: 400px;
left: 2260px;
transform: scale(0.8) skewX(7deg);
}
.TE325 {
top: 532px;
left: 2260px;
transform: scale(0.8) skewX(7deg);
}