From 4ce851bff7d96335c7f6bb31355401520e9fabe6 Mon Sep 17 00:00:00 2001
From: fhysy <1149505133@qq.com>
Date: Thu, 8 May 2025 16:48:10 +0800
Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=B7=20UI(=E6=8A=A5=E8=AD=A6=E3=80=81?=
=?UTF-8?q?=E9=A2=84=E8=AD=A6):=20=E6=8A=A5=E8=AD=A6=E3=80=81=E9=A2=84?=
=?UTF-8?q?=E8=AD=A6=E8=AE=B0=E5=BD=95=EF=BC=88=E8=BF=90=E8=90=A5=E3=80=81?=
=?UTF-8?q?=E4=BC=81=E4=B8=9A=E7=AB=AF=EF=BC=89=E6=B7=BB=E5=8A=A0=E5=8D=A1?=
=?UTF-8?q?=E7=89=87=E5=BC=8F=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/assets/styles/alarm-card.scss | 138 +++++++++++++++
src/views/iot/alarm/record/index.vue | 147 ++++++++++++++--
src/views/iot/alarm/waringRecord/index.vue | 185 ++++++++++++++++-----
src/views/tenant/alarm/record.vue | 138 +++++++++++++--
src/views/tenant/alarm/warning.vue | 134 +++++++++++++--
5 files changed, 651 insertions(+), 91 deletions(-)
create mode 100644 src/assets/styles/alarm-card.scss
diff --git a/src/assets/styles/alarm-card.scss b/src/assets/styles/alarm-card.scss
new file mode 100644
index 00000000..df50ae15
--- /dev/null
+++ b/src/assets/styles/alarm-card.scss
@@ -0,0 +1,138 @@
+// 卡片视图样式
+.card-list-box {
+ .card-item-col {
+ margin-top: 15px;
+ }
+
+ .card-item {
+ height: 100%;
+ border-radius: 10px;
+ border: 1px solid #ebeef5;
+ background-color: #fff;
+ overflow: hidden;
+ color: #303133;
+ transition: 0.3s;
+ cursor: pointer;
+ &:hover {
+ box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.2);
+ //border: 1px solid #409EFF;
+ }
+
+ .card-header {
+ padding: 10px 20px 0px 20px;
+ position: relative;
+ .card-header-top{
+ display: flex;
+ align-items: center;
+ .device-img-box{
+ width: 60px;
+ height: 60px;
+ img{
+ width: 100%;
+ height: 100%;
+ }
+ }
+ .card-item-name {
+ margin-left: 10px;
+ font-size: 18px;
+ line-height: 18px;
+ font-weight: bold;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ max-width: calc(100% - 110px);
+ }
+ }
+
+ .card-status{
+ position: absolute;
+ top: 30px;
+ line-height: 24px;
+ right: -12px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ width: 100px;
+ padding: 2px 0;
+ background-color: rgba(89, 149, 245, 0.15);
+ border-radius: 15px 0 0 15px;
+ box-sizing: border-box;
+ &::before{
+ content: '';
+ border-radius: 50%;
+ display: inline-block;
+ height: 6px;
+ top: -1px;
+ vertical-align: middle;
+ width: 6px;
+ background: rgba(102, 102, 102, 0.1);
+ margin-right: 5px;
+ }
+ &.card-status0{
+ background-color: rgba(229, 0, 18, 0.1);
+ &::before{
+ background: rgb(229, 0, 18);
+ }
+ }
+ &.card-status1{
+ background-color: rgba(24,144,255, 0.1);
+ &::before{
+ background: rgb(24,144,255);
+ }
+ }
+ &.card-status2{
+ background-color: rgba(255, 144, 0, 0.1);
+ &::before{
+ background: rgb(255, 144, 0);
+ }
+ }
+
+ }
+ }
+ .card-content {
+ padding: 10px 20px;
+ display: flex;
+ flex-wrap: wrap;
+ .info-item {
+ display: flex;
+ align-items: center;
+ margin-bottom: 5px;
+ font-size: 11px;
+ width: 50%;
+ .label {
+ color: #909399;
+ width: 70px;
+ }
+ .value {
+ width: calc(100% - 70px);
+ color: #606266;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ //&:nth-child(2n){
+ // width: 50%;
+ // .label {
+ // width: 70px;
+ // }
+ //}
+ }
+ }
+
+ .card-footer {
+ display: flex;
+ justify-content: space-around;
+ align-items: center;
+ padding: 10px 15px;
+ border-top: 1px solid #ebeef5;
+
+ .el-button {
+ padding: 5px 8px;
+
+ &:hover {
+ color: #409EFF;
+ }
+ }
+ }
+ }
+}
diff --git a/src/views/iot/alarm/record/index.vue b/src/views/iot/alarm/record/index.vue
index 5c9252db..28798d87 100644
--- a/src/views/iot/alarm/record/index.vue
+++ b/src/views/iot/alarm/record/index.vue
@@ -51,18 +51,38 @@