()
| 63 | } |
| 64 | } |
| 65 | proxyAddCacheErrorB() { |
| 66 | let len = this.cacheErrorB.length |
| 67 | if (!len) return |
| 68 | const arr = groupArray(this.cacheErrorB, ...GROUPARRAYKEY) |
| 69 | |
| 70 | while (len--) { |
| 71 | this.cacheErrorB.shift() |
| 72 | } |
| 73 | |
| 74 | // 将区间报错合并 |
| 75 | const emitList: any[] = [] |
| 76 | arr.forEach((itemList: any[]) => { |
| 77 | const sumItem = itemList[0] |
| 78 | if (itemList.length > 1) { |
| 79 | sumItem.batchErrorLength = itemList.reduce( |
| 80 | (p, item) => (p += item.batchErrorLength), |
| 81 | 0 |
| 82 | ) |
| 83 | sumItem.batchErrorLastHappenTime = |
| 84 | itemList[itemList.length - 1].triggerTime |
| 85 | } |
| 86 | emitList.push(sumItem) |
| 87 | }) |
| 88 | sendData.emit(emitList) |
| 89 | } |
| 90 | /** |
| 91 | * 获取所有的错误 |
| 92 | * 用户突然关闭页面时调用此方法集成错误 |
no test coverage detected