| | |
| | | .getequipmentInfoStatistics() |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | let arr=[] |
| | | arr=res.data.data |
| | | let date=[] |
| | | let arr = []; |
| | | arr = res.data.data; |
| | | let date = []; |
| | | for (let i = 0; i < arr.length; i++) { |
| | | date.push(arr[i].count) |
| | | if (arr[i].stopStatus == 1) { |
| | | date[0] = arr[i].count; |
| | | } else if (arr[i].stopStatus == 2) { |
| | | date[1] = arr[i].count; |
| | | }else if (arr[i].stopStatus == 3) { |
| | | date[2] = arr[i].count; |
| | | }else if (arr[i].stopStatus == 4) { |
| | | date[3] = arr[i].count; |
| | | }else if (arr[i].stopStatus == -1) { |
| | | date[4] = arr[i].count; |
| | | } |
| | | } |
| | | init(date); |
| | | } else { |
| | |
| | | listApi(); |
| | | }); |
| | | const main = ref(); |
| | | const init = (data:any) => { |
| | | const init = (data: any) => { |
| | | var myChart = echarts.init(main.value); |
| | | var option = { |
| | | tooltip: {}, |
| | |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | data: ['在用数', '报废数', '维修数', '停用数'], |
| | | data: ['停用 ', '在用', '维修 ', '报废', '超时未保养'], |
| | | }, |
| | | yAxis: { |
| | | type: 'value', |