'update'
This commit is contained in:
parent
49ac95fbbd
commit
9814c2b6e9
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) {
|
if (index == arr.length - 1) {
|
||||||
return `<div style="display: flex; align-items: center">
|
return `<div style="display: flex; align-items: center">
|
||||||
<span style="box-shadow: 0 0 4px 4px ${
|
<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: ${
|
}; margin-right: 8px; width: 8px; height: 8px; border-radius: 8px; background: ${
|
||||||
item == 1 ? "#2760ff" : "#a81b26"
|
item == 1 ? "#2760ff" : item == 0 ? "#a81b26" : "#E6A23C"
|
||||||
}"></span><span style="color: ${item == 1 ? "#2760ff" : "#a81b26"}">${
|
}"></span><span style="color: ${item == 1 ? "#2760ff" : item == 0 ? "#a81b26" : "#E6A23C"}">${
|
||||||
item == 1 ? "正常" : "故障"
|
item == 1 ? "运行" : item == 0 ? "故障" : "未运行"
|
||||||
}</span></div>`;
|
}</span></div>`;
|
||||||
}
|
}
|
||||||
return `<span style='color: #fffa'>${item}</span>`;
|
return `<span style='color: #fffa'>${item}</span>`;
|
||||||
@ -36,10 +36,16 @@ function FanInfo(props) {
|
|||||||
const rowNum = props.rows || 8;
|
const rowNum = props.rows || 8;
|
||||||
// let data = getRandomRows(100);
|
// let data = getRandomRows(100);
|
||||||
const fanInfo = useSelector((state) => state.fanInfo.fanInfo);
|
const fanInfo = useSelector((state) => state.fanInfo.fanInfo);
|
||||||
|
|
||||||
|
console.log(fanInfo)
|
||||||
|
console.log('-------------------------------')
|
||||||
|
|
||||||
const data = Object.keys(fanInfo).map((key, index) => {
|
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];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log(data)
|
||||||
|
|
||||||
let config = {
|
let config = {
|
||||||
headerBGC: "rgba(4, 44, 76, 0.3)",
|
headerBGC: "rgba(4, 44, 76, 0.3)",
|
||||||
header: [
|
header: [
|
||||||
|
@ -29,7 +29,7 @@ function FeederStatus(props) {
|
|||||||
color: "#fff",
|
color: "#fff",
|
||||||
border: "1px solid #fff",
|
border: "1px solid #fff",
|
||||||
padding: "12px",
|
padding: "12px",
|
||||||
background: leftFeeder == "运行" ? "#0f03" : "#f003",
|
background: leftFeeder == "运行" ? "#0f03" : leftFeeder == "故障" ? "#f003" : "#da33",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
投料机1 : {leftFeeder}
|
投料机1 : {leftFeeder}
|
||||||
@ -39,7 +39,7 @@ function FeederStatus(props) {
|
|||||||
color: "#fff",
|
color: "#fff",
|
||||||
border: "1px solid #fff",
|
border: "1px solid #fff",
|
||||||
padding: "12px",
|
padding: "12px",
|
||||||
background: rightFeeder == "运行" ? "#0f03" : "#f003",
|
background: rightFeeder == "运行" ? "#0f03" : rightFeeder == "故障" ? "#f003" : "#da33",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
投料机2 : {rightFeeder}
|
投料机2 : {rightFeeder}
|
||||||
|
@ -10,7 +10,8 @@ export function randomInt(min, max, includeMax = false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class WsClient {
|
export class WsClient {
|
||||||
static wsServer = "ws://192.168.1.12:8081/xc-screen/websocket/xc001";
|
// static wsServer = "ws://172.16.1.55:8081/xc-screen/websocket/1";
|
||||||
|
static wsServer = "ws://10.70.180.10:8081/xc-screen/websocket/1";
|
||||||
static socket = null;
|
static socket = null;
|
||||||
static tryCount = 0;
|
static tryCount = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user