|
|
@ -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' |
|
|
|
} |
|
|
|
] |
|
|
|