| | |
| | | <!-- |
| | | * @Date: 2024-04-09 22:11:21 |
| | | * @LastEditors: 李喆(开发组) lzhe@yxqiche.com |
| | | * @LastEditTime: 2025-04-16 12:05:31 |
| | | * @LastEditTime: 2025-05-22 15:38:20 |
| | | * @FilePath: /cps-web/src/views/mdc/realtime-status/index.vue |
| | | 实时看板 |
| | | --> |
| | |
| | | this.$HTTP.get(`/api/mdc/work-station-analysis/device-status-statistics`).then(res => { |
| | | if (res.code == 200) { |
| | | var deviceNumAll = 0; |
| | | var newResData = []; |
| | | res.data.forEach(item => { |
| | | item.active = false; |
| | | this.allwcs.forEach(item1 => { |
| | |
| | | item.active = true; |
| | | } |
| | | deviceNumAll += item.deviceNum; |
| | | if(item.statusName != '调试') { |
| | | newResData.push(item); |
| | | } |
| | | if(item.statusName == '报警') { |
| | | item.icon = "Position"; |
| | | }else if(item.statusName == '待机') { |
| | | item.icon = "Loading"; |
| | | }else if(item.statusName == '离线') { |
| | | item.icon = "Clock"; |
| | | }else { |
| | | item.icon = "Odometer"; |
| | | } |
| | | }) |
| | | res.data[0].icon = "Position"; |
| | | res.data[1].icon = "Loading"; |
| | | res.data[2].icon = "Clock"; |
| | | res.data[3].icon = "Warning"; |
| | | res.data[4].icon = "Odometer"; |
| | | res.data.push({ |
| | | newResData.push({ |
| | | active: false, |
| | | color: "#08f1f4", |
| | | deviceNum: deviceNumAll, |
| | |
| | | status: "10", |
| | | statusName: "全部", |
| | | }) |
| | | this.devicestatus = res.data; |
| | | this.devicestatus = newResData; |
| | | } |
| | | }) |
| | | } |