Browse Source

告警数据

dev
wenlele 2 years ago
parent
commit
167b4c1705
  1. 14
      web/client/src/sections/problem/components/sideSheet.jsx

14
web/client/src/sections/problem/components/sideSheet.jsx

@ -30,21 +30,23 @@ function SideSheets ({ dispatch, actions, close }) {
});
dispatch(problem.getAlarmDataDetailAgg({ alarmId: "fa7fd145-f251-3657-8176-8f8f04a92a96" })).then((res) => {
if (res?.success) {
console.log(res.payload.data);
let dataSort = res.payload.data || []
console.log(dataSort);
// moment.duration(videoAfter?.diff(videoFront))._data.milliseconds;
dataSort.sort((a, b) => moment(a.hours).diff(b.hours))
let data = {
xAxis: {
type: 'category',
name:"时间",
show :true,
data: res.payload.data.map(v=>v.hours)
name: "时间",
data: dataSort.map(v => v.hour)
},
yAxis: {
type: 'value',
name:"次数",
name: "次数",
},
series: [
{
data:res.payload.data.map(v=>v.count) ,
data: dataSort.map(v => v.count),
type: 'line'
}
]

Loading…
Cancel
Save