From b6446eabee952bdf231e775ead590e6e94ed66d4 Mon Sep 17 00:00:00 2001
From: shj <1790240199@qq.com>
Date: 星期四, 18 八月 2022 15:27:25 +0800
Subject: [PATCH] 对接
---
src/views/facilityManagement/EquipmentStatistics/index.vue | 22 ++++++++++++++++------
1 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/src/views/facilityManagement/EquipmentStatistics/index.vue b/src/views/facilityManagement/EquipmentStatistics/index.vue
index 07a359f..136eea1 100644
--- a/src/views/facilityManagement/EquipmentStatistics/index.vue
+++ b/src/views/facilityManagement/EquipmentStatistics/index.vue
@@ -16,11 +16,21 @@
.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 {
@@ -36,7 +46,7 @@
listApi();
});
const main = ref();
- const init = (data:any) => {
+ const init = (data: any) => {
var myChart = echarts.init(main.value);
var option = {
tooltip: {},
@@ -48,7 +58,7 @@
},
xAxis: {
type: 'category',
- data: ['在用数', '报废数', '维修数', '停用数'],
+ data: ['停用 ', '在用', '维修 ', '报废', '超时未保养'],
},
yAxis: {
type: 'value',
--
Gitblit v1.9.2