diff --git a/src/views/Equipment/equipmentDetailList.vue b/src/views/Equipment/equipmentDetailList.vue
index b0efcc7..0f90ca7 100644
--- a/src/views/Equipment/equipmentDetailList.vue
+++ b/src/views/Equipment/equipmentDetailList.vue
@@ -122,7 +122,7 @@
在线设备数
@@ -171,7 +171,7 @@
在线设备平均占比
@@ -197,7 +197,7 @@
活跃设备数
@@ -221,7 +221,7 @@
活跃设备平均占比
@@ -247,7 +247,7 @@
完整录音次数
@@ -297,7 +297,7 @@
完整录音占比
@@ -323,7 +323,7 @@
正常关机次数
@@ -403,7 +403,7 @@
低电关机次数
@@ -431,7 +431,7 @@
异常关机次数
@@ -459,6 +459,13 @@
+
+
+
@@ -476,12 +483,6 @@
-
@@ -760,7 +761,7 @@ export default {
lowElectricityQuantity: "",
abnormalShutdownQuantity: "",
},
- pageSize: 6,
+ pageSize: 10,
pageNum: 1,
total: 10,
allCompare: {},
@@ -856,10 +857,10 @@ export default {
},
});
},
- compareChange(idx) {
+ compareChange(idx,str) {
// if (!this.selectTime1) return;
this.compareFlag = idx;
- this.tabChange(idx);
+ this.tabChange(idx,str);
},
timeChange(e) {
this.selectTime = "";
@@ -1037,7 +1038,7 @@ export default {
this.compareFlag = 0;
let obj = {
current: this.pageNum,
- pageSize: this.pageNum,
+ pageSize: this.pageSize,
startDate: this.page.openTime,
endDate: this.page.closeTime,
houseId: this.houseId,
@@ -1085,15 +1086,16 @@ export default {
});
this.compareList = arr;
// console.log(this.compareList,'123')
- this.tabChange(0);
+ this.tabChange(0,'设备总数');
})
.catch((err) => {
// console.log(err)
this.compareList = [];
+ this.tabChange(0,'设备总数');
});
},
//处理数据
- tabChange(idx) {
+ tabChange(idx,str1) {
//首先获取到给定的标志,对数据进行操作和赋值
//判断情况
// console.log(idx)
@@ -1236,7 +1238,87 @@ export default {
myChart.resize();
});
} else {
- console.log("第一种");
+ // console.log(this.allCompare,"第一种");
+ let timeDate = [];
+ let arr1 = [];
+ this.allCompare.data.first.records.map(item=>{
+ timeDate.push(item.createTime.substring(5))
+ arr1.push(item[str])
+ })
+ // console.log(timeDate,arr1);
+ var chartDom = document.getElementById("compare");
+ echarts.init(chartDom).dispose();
+ var myChart = echarts.init(chartDom);
+ var option;
+ option = {
+ tooltip: {
+ trigger: "axis",
+ },
+ legend: {
+ data: [str1],
+ bottom: "10",
+ },
+ grid: {
+ left: 10,
+ right: 10,
+ containLabel: true,
+ },
+ xAxis: {
+ type: "category",
+ data: timeDate,
+ axisLabel: {
+ //重点在这一块,其余可以忽略
+ textStyle: {
+ color: "#212121", //更改坐标轴文字颜色
+ },
+ },
+ axisLine: {
+ lineStyle: {
+ type: "solid",
+ color: "#DDE1EE", //x线的颜色
+ width: "1", //坐标线的宽度
+ },
+ },
+ },
+ yAxis: {
+ type: "value",
+ splitNumber: 4,
+ axisLabel: {
+ //重点在这一块,其余可以忽略
+ textStyle: {
+ color: "#212121", //更改坐标轴文字颜色
+ },
+ },
+ axisLine: {
+ lineStyle: {
+ ype: "solid",
+ color: "#DDE1EE", //x线的颜色
+ width: "1", //坐标线的宽度
+ },
+ },
+ splitLine: {
+ lineStyle: {
+ type: "dashed", // y轴分割线类型
+ },
+ },
+ axisTick: {
+ //y轴刻度线
+ show: false,
+ },
+ },
+ series: [
+ {
+ name: str1,
+ data: arr1,
+ type: "line",
+ smooth: true,
+ },
+ ],
+ };
+ option && myChart.setOption(option);
+ window.addEventListener("resize", () => {
+ myChart.resize();
+ });
}
},
//获取统计数据
diff --git a/src/views/Equipment/index.vue b/src/views/Equipment/index.vue
index 70e2a4f..614b65a 100644
--- a/src/views/Equipment/index.vue
+++ b/src/views/Equipment/index.vue
@@ -1353,7 +1353,7 @@ export default {
})
.then(() => {
this.$api.api
- .equipmentUnbind({
+ .zkequipmentEquipmentBack({
imeis: row.imei,
})
.then((res) => {