update 能源数据对接
This commit is contained in:
commit
d4a4e82aa6
12354
package-lock.json
generated
12354
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -20,11 +20,11 @@ function attachStyle(data) {
|
||||
if (index == arr.length - 1) {
|
||||
return `<div style="display: flex; align-items: center">
|
||||
<span style="box-shadow: 0 0 4px 4px ${
|
||||
item == 1 ? "#2760ff55" : "#a81b2655"
|
||||
item == 1 ? "#2760ff55" : item == 0 ? "#a81b2655" : "#E6A23C55"
|
||||
}; margin-right: 8px; width: 8px; height: 8px; border-radius: 8px; background: ${
|
||||
item == 1 ? "#2760ff" : "#a81b26"
|
||||
}"></span><span style="color: ${item == 1 ? "#2760ff" : "#a81b26"}">${
|
||||
item == 1 ? "正常" : "故障"
|
||||
item == 1 ? "#2760ff" : item == 0 ? "#a81b26" : "#E6A23C"
|
||||
}"></span><span style="color: ${item == 1 ? "#2760ff" : item == 0 ? "#a81b26" : "#E6A23C"}">${
|
||||
item == 1 ? "运行" : item == 0 ? "故障" : "未运行"
|
||||
}</span></div>`;
|
||||
}
|
||||
return `<span style='color: #fffa'>${item}</span>`;
|
||||
@ -36,8 +36,9 @@ function FanInfo(props) {
|
||||
const rowNum = props.rows || 8;
|
||||
// let data = getRandomRows(100);
|
||||
const fanInfo = useSelector((state) => state.fanInfo.fanInfo);
|
||||
|
||||
const data = Object.keys(fanInfo).map((key, index) => {
|
||||
return [index+1, key, fanInfo[key] == "正常" ? 1 : 0];
|
||||
return [index+1, key, fanInfo[key] == "运行" ? 1 : fanInfo[key] == "故障" ? 0 : 2];
|
||||
});
|
||||
|
||||
let config = {
|
||||
|
@ -29,7 +29,7 @@ function FeederStatus(props) {
|
||||
color: "#fff",
|
||||
border: "1px solid #fff",
|
||||
padding: "12px",
|
||||
background: leftFeeder == "运行" ? "#0f03" : "#f003",
|
||||
background: leftFeeder == "运行" ? "#0f03" : leftFeeder == "故障" ? "#f003" : "#da33",
|
||||
}}
|
||||
>
|
||||
投料机1 : {leftFeeder}
|
||||
@ -39,7 +39,7 @@ function FeederStatus(props) {
|
||||
color: "#fff",
|
||||
border: "1px solid #fff",
|
||||
padding: "12px",
|
||||
background: rightFeeder == "运行" ? "#0f03" : "#f003",
|
||||
background: rightFeeder == "运行" ? "#0f03" : rightFeeder == "故障" ? "#f003" : "#da33",
|
||||
}}
|
||||
>
|
||||
投料机2 : {rightFeeder}
|
||||
|
Loading…
Reference in New Issue
Block a user