|
|
@ -155,13 +155,7 @@ const Control = ({ dispatch, actions, user, history, loading, socket, pepProject |
|
|
|
}) |
|
|
|
} else { |
|
|
|
if (ProblemAlarm?.length > 0) { |
|
|
|
ProblemAlarm.sort((a, b) => { |
|
|
|
if (moment(a.StartTime).isBefore(b.StartTime)) { |
|
|
|
return 1 |
|
|
|
} else { |
|
|
|
return -1 |
|
|
|
} |
|
|
|
}) |
|
|
|
ProblemAlarm.sort((a, b) => (moment(a.StartTime).isBefore(b.StartTime) ? 1 : -1)) |
|
|
|
setProblemsList([...ProblemAlarm, ...problemsList]) |
|
|
|
} |
|
|
|
} |
|
|
@ -187,19 +181,12 @@ const Control = ({ dispatch, actions, user, history, loading, socket, pepProject |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
newest.sort((a, b) => { |
|
|
|
if (moment(a.time).isBefore(b.time)) { |
|
|
|
return 1 |
|
|
|
} else { |
|
|
|
return -1 |
|
|
|
} |
|
|
|
}) |
|
|
|
newest.sort((a, b) => (moment(a.time).isBefore(b.time) ? 1 : -1)) |
|
|
|
querydata.current = [...newest, ...querydata.current] |
|
|
|
setQueryData1([...querydata.current]) |
|
|
|
|
|
|
|
} |
|
|
|
}, [socketData]) |
|
|
|
console.log(querydata.current); |
|
|
|
useEffect(() => { |
|
|
|
consoleToollink() |
|
|
|
|
|
|
@ -423,13 +410,7 @@ const Control = ({ dispatch, actions, user, history, loading, socket, pepProject |
|
|
|
id: v.id, |
|
|
|
})) |
|
|
|
} |
|
|
|
data.sort((a, b) => { |
|
|
|
if (moment(a.time).isBefore(b.time)) { |
|
|
|
return 1 |
|
|
|
} else { |
|
|
|
return -1 |
|
|
|
} |
|
|
|
}) |
|
|
|
data.sort((a, b) => (moment(a.time).isBefore(b.time) ? 1 : -1)) |
|
|
|
// console.log(data) |
|
|
|
querydata.current = data |
|
|
|
setQueryData1(data) |
|
|
@ -505,13 +486,7 @@ const Control = ({ dispatch, actions, user, history, loading, socket, pepProject |
|
|
|
id: v.id, |
|
|
|
})) |
|
|
|
} |
|
|
|
data.sort((a, b) => { |
|
|
|
if (moment(a.time).isBefore(b.time)) { |
|
|
|
return 1 |
|
|
|
} else { |
|
|
|
return -1 |
|
|
|
} |
|
|
|
}) |
|
|
|
data.sort((a, b) => (moment(a.time).isBefore(b.time) ? 1 : -1)) |
|
|
|
querydata.current = data |
|
|
|
setQueryData1(data) |
|
|
|
} |
|
|
|