This commit is contained in:
lb
2024-01-03 17:00:31 +08:00
parent bee1aedda4
commit 0b1d3aa4b3
22 changed files with 256 additions and 136 deletions

View File

@@ -0,0 +1,16 @@
.feeder {
flex: 1;
}
.feeder-running {
background: url(../../../assets/online.png);
background-size: 100% 100%;
}
.feeder-stop {
background: url(../../../assets/offline.png);
background-size: 100% 100%;
}
.feeder-error {
background: url(../../../assets/offline.png);
background-size: 100% 100%;
}

View File

@@ -1,5 +1,6 @@
import { useSelector } from "react-redux";
import { motion } from "framer-motion";
import "./feeder.css";
function FeederStatus(props) {
const feeder = useSelector((state) => state.feeder);
@@ -10,13 +11,15 @@ function FeederStatus(props) {
className="feeder"
style={{
position: "absolute",
bottom: "128px",
bottom: "56px",
left: "740px",
width: "300px",
height: "80px",
width: "400px",
height: "128px",
zIndex: "-1",
display: "flex",
gap: "20px",
gap: "8px",
paddingTop: "12px",
justifyContent: "center",
...props.style,
}}
animate={{
@@ -26,34 +29,74 @@ function FeederStatus(props) {
>
<span
style={{
color: "#fff",
border: "1px solid #fff",
padding: "12px",
background:
leftFeeder == "运行"
? "#0f03"
: leftFeeder == "故障"
? "#f003"
: "#da33",
position: "absolute",
color: "#6be1e1",
top: "-32px",
left: "20px",
fontSize: "22px",
}}
>
投料机1 : {leftFeeder}
1#投料{" "}
<b
style={{
fontWeight: 400,
color:
leftFeeder == "故障"
? "#f83a35"
: leftFeeder == "运行"
? "#9af72b"
: "#ccc",
}}
>
{leftFeeder}
</b>
</span>
<span
style={{
color: "#fff",
border: "1px solid #fff",
padding: "12px",
background:
rightFeeder == "运行"
? "#0f03"
: rightFeeder == "故障"
? "#f003"
: "#da33",
position: "absolute",
color: "#6be1e1",
top: "-32px",
left: "230px",
fontSize: "22px",
}}
>
投料机2 : {rightFeeder}
2#投料{" "}
<b
style={{
fontWeight: 400,
color:
rightFeeder == "故障"
? "#f83a35"
: rightFeeder == "运行"
? "#9af72b"
: "#ccc",
}}
>
{rightFeeder}
</b>
</span>
<span
className={`
feeder ${
leftFeeder == "运行"
? "feeder-running"
: leftFeeder == "故障"
? "feeder-error"
: "feeder-stop"
}
`}
></span>
<span
className={`
feeder ${
rightFeeder == "运行"
? "feeder-running"
: rightFeeder == "故障"
? "feeder-error"
: "feeder-stop"
}
`}
></span>
</motion.div>
);
}

View File

@@ -113,7 +113,7 @@ function getOptions(showChart, hisState, runState) {
},
},
yAxis: {
name: "单位/m³",
name: "单位m³/h",
nameTextStyle: {
color: "#fff",
fontSize: 10,
@@ -144,6 +144,7 @@ function getOptions(showChart, hisState, runState) {
data: v,
type: "line",
symbol: "circle",
symbolSize: 6,
// label: {
// show: true,
// position: "top",

View File

@@ -83,6 +83,8 @@ export default function getOptions(seriesData, name) {
name: index + 1 + "#" + name,
data: arr,
type: "line",
symbol: 'circle',
symbolSize: 6,
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: colors[index] + "40" },

View File

@@ -186,6 +186,8 @@ function getOptions(dataList, showMore, dateType) {
{
data: list.map((item) => (item.sum * 100).toFixed(2)),
type: "line",
symbol: 'circle',
symbolSize: 6,
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: "#FFD16040" },