| | |
| | | |
| | | <div class="hashRate"> |
| | | <div class="left"> |
| | | <div class="title">预警数据占比:</div> |
| | | <div class="title">整改数据详情</div> |
| | | <div class="info"> |
| | | <div class="equipmentInfo" style="margin-top: 25px"> |
| | | <div class="equipmentCard"> |
| | |
| | | //key 1=误报数据,2=已整改,3=未整改,4=已排查 doc_count=数量 total=总量 |
| | | decodeWarningRate(b64data) { |
| | | if (b64data) { |
| | | this.warningTotal = 0 |
| | | this.warningSolved = 0 |
| | | this.warningChecked = 0 |
| | | this.warningTotal = 0 // 总量 |
| | | this.warningSolved = 0 // 已整改 |
| | | this.warningChecked = 0 //已排查 |
| | | let falseAlarm = 0 // 误报 |
| | | |
| | | let decodeString = Base64.decode(b64data) |
| | | if (decodeString != "") { |
| | | let decodeResult = JSON.parse(decodeString) |
| | | if (decodeResult && decodeResult.total > 0) { |
| | | this.warningTotal = decodeResult.total |
| | | decodeResult.buckets.forEach((element) => { |
| | | switch (element.key) { |
| | | case 1: |
| | | falseAlarm += element.doc_count |
| | | break |
| | | case 2: |
| | | this.warningSolved += element.doc_count |
| | | break |
| | |
| | | break |
| | | } |
| | | }) |
| | | |
| | | // 2023/4/12 修改, 预警总量不统计误报 |
| | | // this.warningTotal = decodeResult.total - falseAlarm |
| | | this.warningTotal = decodeResult.total |
| | | } |
| | | // console.log("WarningRate:", decodeResult) |
| | | } |