From ddbbc949655b55880fa1e7160834bdcf3ccc4b5a Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 19 Apr 2021 14:22:19 +0800
Subject: [PATCH] 卡片样式修改
---
src/views/supervisoryConsole/card.vue | 37 ++++++++++++++++++++++++++++---------
1 files changed, 28 insertions(+), 9 deletions(-)
diff --git a/src/views/supervisoryConsole/card.vue b/src/views/supervisoryConsole/card.vue
index 36ac9ac..f4c0410 100644
--- a/src/views/supervisoryConsole/card.vue
+++ b/src/views/supervisoryConsole/card.vue
@@ -26,7 +26,13 @@
<el-row
v-infinite-scroll="load"
:infinite-scroll-disabled="disabled"
- style="margin-top: 10px"
+ style="
+ margin-top: 10px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-wrap: wrap;
+ "
>
<el-col
class="card-container"
@@ -37,7 +43,9 @@
<a href="javascript:void(0);" @click.stop="goToDetails(item)">
<el-card
:style="
- item.state == ''
+ item.jtype == 1
+ ? 'background: #F34A4Ae6'
+ : item.state == ''
? item.onlineStatus == 1
? 'background: #1DBB99e6'
: 'background: #C9C9C9e6'
@@ -49,7 +57,9 @@
<div class="cet">
{{
- item.state == ""
+ item.jtype == 1
+ ? "设备预警"
+ : item.state == ""
? item.onlineStatus == 1
? "设备在线"
: "设备掉线"
@@ -136,12 +146,17 @@
getList({ deviceName: this.inputSearchValue }).then((res) => {
var a = [],
b = [],
- c = [];
+ c = [],
+ f = [];
if (this.radio == "全部") {
res.data.data.forEach((item) => {
- if (item.state != "") a.push(item);
- if (item.state == "" && item.onlineStatus == 1) c.push(item);
- if (item.state == "" && item.onlineStatus != 1) b.push(item);
+ if (item.jtype == 1) {
+ f.push(item);
+ } else {
+ if (item.state != "") a.push(item);
+ if (item.state == "" && item.onlineStatus == 1) c.push(item);
+ if (item.state == "" && item.onlineStatus != 1) b.push(item);
+ }
});
} else if (this.radio == "仅显示预警设备") {
res.data.data.forEach((item) => {
@@ -149,7 +164,11 @@
});
} else if (this.radio == "仅显示设备掉线") {
res.data.data.forEach((item) => {
- if (item.onlineStatus != 1) b.push(item);
+ if (item.jtype == 1 && item.onlineStatus != 1) {
+ f.push(item);
+ } else {
+ if (item.onlineStatus != 1) b.push(item);
+ }
});
} else if (this.radio == "仅显示设备故障") {
res.data.data.forEach((item) => {
@@ -157,7 +176,7 @@
});
}
- var d = a.concat(c.concat(b));
+ var d = f.concat(a.concat(c.concat(b)));
d.forEach((item) => {
this.count.push(item);
--
Gitblit v1.9.3