| | |
| | | } |
| | | // 计算平均值,在线率,有效率,超标率 |
| | | sumAvg = sumAvg + item.dayAvg |
| | | sumOnline = sumOnline + Number(item.dayOnline.slice(0, -1)) |
| | | sumValid = sumValid + Number(item.dayValid.slice(0, -1)) |
| | | sumExceeding = sumExceeding + Number(item.dayExceeding.slice(0, -1)) |
| | | |
| | | sumOnline = sumOnline + Number(item.dayOnline) |
| | | sumValid = sumValid + Number(item.dayValid) |
| | | sumExceeding = sumExceeding + Number(item.dayExceeding) |
| | | }) |
| | | // 计算均值 |
| | | avg = sumAvg / dayDiff |
| | |
| | | if (exception.length == 0) { |
| | | exception.push(item.exceptionType) |
| | | } |
| | | // 保存新的异常类型 |
| | | else if (exception.indexOf(item.exceptionType) == -1) { |
| | | // 保存新的异常类型 数据超低、长时间无波动等两类异常暂不纳入分析 |
| | | else if ( item.exceptionType!='1' && item.exceptionType!='3' && exception.indexOf(item.exceptionType) == -1) { |
| | | exception.push(item.exceptionType) |
| | | } |
| | | }) |
| | |
| | | default: |
| | | return 'error' |
| | | } |
| | | |
| | | exceptionTypeAggregation = (exception.length / 8).toFixed(2) |
| | | |
| | | // 数据超低、长时间无波动等两类异常暂不纳入分析 |
| | | exceptionTypeAggregation = (exception.length / 6).toFixed(2) |
| | | |
| | | let obj = {} |
| | | obj['exceptionRecurrence'] = exceptionTyprRecurRate |
| | | obj['exceptionTypeAggregation'] = exceptionTypeAggregation |
| | | |
| | | |
| | | if(exception.length>0){ |
| | | // 保存该时段出现的异常 |
| | | obj['exception'] = exception.length |
| | | }else{ |
| | | obj['exception'] = 0 |
| | | } |
| | | |
| | | |
| | | // 三类异常出现的次数 |
| | | obj['mutationCount'] = mutationCount |
| | | obj['exceedingNearCount'] = exceedingNearCount |
| | | obj['exceedingCriticalDegree'] = exceedingCriticalDegree |
| | | |
| | | |
| | | return obj |
| | | }, |
| | | |
| | | |
| | | // 参数:对象数组(该对象中的属性不能是引用类型,否则拷贝的值还是会相互影响) |
| | | // 功能:拷贝该对象数组。 |
| | | shallowCopyList(val) { |