From b4a24a2950aa5a1b8bce200f2fd39a294cf911ac Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Fri, 07 May 2021 16:14:16 +0800
Subject: [PATCH] 设备管理图例样式修改,排序修改
---
src/views/clientManagement/clientManagement.vue | 65 ++++++++++++++++++++++++--------
1 files changed, 48 insertions(+), 17 deletions(-)
diff --git a/src/views/clientManagement/clientManagement.vue b/src/views/clientManagement/clientManagement.vue
index bc94ea0..832a1f0 100644
--- a/src/views/clientManagement/clientManagement.vue
+++ b/src/views/clientManagement/clientManagement.vue
@@ -216,14 +216,22 @@
//legend-liu数据
datalistLIU:[
{
- color: 'rgb(236, 83, 37)',
+ color: "#DFDFDF",
text: '掉线'
},
{
- color: 'rgb(49, 49, 49)',
- text: '在线'
+ color: "#29C093",
+ text: '正常'
+ },
+ {
+ color: "#F34A4A",
+ text: '预警'
+ },
+ {
+ color: "#F48F57",
+ text: '故障'
}
- ],
+ ],
form: {},
query: {},
showMap: false,
@@ -1016,28 +1024,51 @@
}
}
- data.records.sort((a, b) => {
- return a.dxzt - b.dxzt;
- });
+ // data.records.sort((a, b) => {
+ // return a.dxzt - b.dxzt;
+ // });
this.data = data.records;
this.loading = false;
this.selectionClear();
});
}, rowStyle({row, column, rowIndex}) {
- if (row.heartbeat != null && row.heartbeat != "") {
- var date = new Date(row.heartbeat).getTime();
- var Dqdate = new Date().getTime();
- if ((Dqdate - date) >= (60 * 60 * 24 * 1000)) {
+ // if (row.heartbeat != null && row.heartbeat != "") {
+ // var date = new Date(row.heartbeat).getTime();
+ // var Dqdate = new Date().getTime();
+ // if ((Dqdate - date) >= (60 * 60 * 24 * 1000)) {
+ // return {
+ // color: "#fe1515"
+ // };
+ // }
+
+ // } else if (row.heartbeat == "") {
+ // return {
+ // color: "#fe1515"
+ // };
+ // }
+
+ if(row.dtype!=null && row.dtype!=""){
+ if(row.dtype=='0'){
return {
- color: "#fe1515"
+ color: "#DFDFDF"
};
}
-
- } else if (row.heartbeat == "") {
- return {
- color: "#fe1515"
- };
+ if(row.dtype=='1'){
+ return {
+ color: "#29C093"
+ };
+ }
+ if(row.dtype=='2'){
+ return {
+ color: "#F34A4A"
+ };
+ }
+ if(row.dtype=='3'){
+ return {
+ color: "#F48F57"
+ };
+ }
}
},
handleManage(row) {
--
Gitblit v1.9.3