|
|
@ -257,7 +257,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket, iotVcmpWeb |
|
|
|
{ |
|
|
|
name: '持续时间', sort: 19.5, value: 'sustainTime', render: (_, r, index) => { |
|
|
|
// console.log(r.updateTime); |
|
|
|
let time = moment(r.updateTime).diff(moment(r.createTime), 'seconds') |
|
|
|
let time = moment(r.confirmTime || r.updateTime || moment().format("YYYY-MM-DD HH:mm:ss")).diff(moment(r.createTime), 'seconds') |
|
|
|
// console.log(time); |
|
|
|
return time < 60 ? '< 1分钟' : time > 3600 ? Math.floor(time / 3600) + '小时' + Math.floor((time - Math.floor(time / 3600) * 3600) / 60) + '分钟' : Math.floor((time - Math.floor(time / 3600) * 3600) / 60) + '分钟' |
|
|
|
} |
|
|
|