diff --git a/src/api/worn/socket.js b/src/api/worn/socket.js
new file mode 100644
index 0000000..4dd043f
--- /dev/null
+++ b/src/api/worn/socket.js
@@ -0,0 +1,17 @@
+import request from '@/utils/request'
+
+// 智能排风远程开关
+export function controlSocket(data) {
+ const payload = {
+ devEui: data.devEui,
+ deviceId: data.deviceId,
+ status: data.status
+ }
+
+ return request({
+ url: '/worn/socket/control',
+ method: 'post',
+ params: payload,
+ data: payload
+ })
+}
diff --git a/src/views/index.vue b/src/views/index.vue
index b5245ff..4fba2bb 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -51,8 +51,25 @@
{{ exceptionStats.total }}
+ 累计告警数
累计告警
+
+
+
+
+ 红色:告警
+
+
+
+ 橙色:预警
+
+
+
+ 绿色:正常
+
+
+
@@ -1032,13 +1049,36 @@ onBeforeUnmount(() => {
}
.donut-card {
- display: grid;
- place-items: center;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: center;
min-height: 184px;
+ padding: 20px 18px;
+ gap: 18px;
+}
+
+.donut-head {
+ display: flex;
+ flex-direction: column;
+ gap: 4px;
+ text-align: left;
+
+ strong {
+ font-size: 14px;
+ color: #0f172a;
+ }
+
+ span {
+ font-size: 12px;
+ color: #64748b;
+ }
}
.donut {
+ position: relative;
display: grid;
+ flex: 0 0 110px;
width: 110px;
height: 110px;
place-items: center;
@@ -1062,17 +1102,90 @@ onBeforeUnmount(() => {
}
strong {
- font-size: 24px;
+ font-size: 28px;
+ font-weight: 900;
color: #0f172a;
}
+ .donut-total-tag {
+ position: relative;
+ z-index: 1;
+ margin-top: 2px;
+ font-size: 10px;
+ font-style: normal;
+ font-weight: 700;
+ color: #94a3b8;
+ }
+
span {
- margin-top: 24px;
+ margin-top: 4px;
font-size: 11px;
+ font-weight: 700;
color: #64748b;
}
}
+.donut-info {
+ display: flex;
+ flex: 1;
+ flex-direction: column;
+ justify-content: center;
+ gap: 12px;
+ min-width: 0;
+}
+
+.donut-legend {
+ display: grid;
+ gap: 10px;
+}
+
+.legend-item {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ min-height: 34px;
+ padding: 8px 10px;
+ font-size: 12px;
+ color: #334155;
+ background: rgba(255, 255, 255, 0.72);
+ border: 1px solid rgba(226, 232, 240, 0.82);
+ border-radius: 12px;
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
+
+ i {
+ width: 10px;
+ height: 10px;
+ border-radius: 50%;
+ }
+
+ &.danger i {
+ background: #ef4444;
+ }
+
+ &.warning i {
+ background: #f59e0b;
+ }
+
+ &.normal i {
+ background: #22c55e;
+ }
+}
+
+@media (max-width: 1200px) {
+ .donut-card {
+ flex-direction: column;
+ align-items: center;
+ }
+
+ .donut-head {
+ text-align: center;
+ }
+
+ .donut-info {
+ width: 100%;
+ }
+}
+
.alarm-list {
flex: 1;
min-height: 118px;
diff --git a/src/views/worn/warehouseDashboard/index.vue b/src/views/worn/warehouseDashboard/index.vue
index 872f120..e6d8e2a 100644
--- a/src/views/worn/warehouseDashboard/index.vue
+++ b/src/views/worn/warehouseDashboard/index.vue
@@ -57,6 +57,24 @@
{{ item.locationName }}
{{ item.typeName }}
{{ item.summary }}
+
+
+
+
@@ -87,8 +105,11 @@