From b7a38912dedc17cd2e2e021d2f9cbdcad6dfa55b Mon Sep 17 00:00:00 2001
From: zhaowei <1755871297@qq.com>
Date: Wed, 13 Apr 2022 18:02:16 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=8E=A5=E5=8F=A3=E8=B0=83?=
=?UTF-8?q?=E8=AF=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/Device.js | 9 ++
src/layout/components/Device/index.vue | 142 +++++++++++++++++---
src/layout/components/MusicManage/index.vue | 142 +++++++++++++++-----
src/layout/components/User/index.vue | 74 ++++++++++
src/layout/index.vue | 6 +-
vue.config.js | 2 +-
6 files changed, 315 insertions(+), 60 deletions(-)
create mode 100644 src/api/Device.js
create mode 100644 src/layout/components/User/index.vue
diff --git a/src/api/Device.js b/src/api/Device.js
new file mode 100644
index 0000000..0cbb775
--- /dev/null
+++ b/src/api/Device.js
@@ -0,0 +1,9 @@
+import request from '@/utils/request'
+// 查询设备数据
+export function listDevice(query) {
+ return request({
+ url: '/system/device/list',
+ method: 'get',
+ params: query
+ })
+}
\ No newline at end of file
diff --git a/src/layout/components/Device/index.vue b/src/layout/components/Device/index.vue
index cf2aaff..ec4b1af 100644
--- a/src/layout/components/Device/index.vue
+++ b/src/layout/components/Device/index.vue
@@ -7,17 +7,16 @@
新增
删除
-
-
-
+
+
位置
- 001
+ {{item.location}}
@@ -26,7 +25,7 @@
IP地址
- 192.168.88.88
+ {{item.deviceIp}}
@@ -35,7 +34,7 @@
音符
-
1
+
{{item.note}}
@@ -44,7 +43,7 @@
音量
- 50%
+ {{item.volume}}
@@ -53,7 +52,11 @@
设备状态
- 正常
+ {{item.status==0?'正常':'异常'}}
+
@@ -62,7 +65,7 @@
创建时间
- 2022.02.22
+ {{item.createTime}}
@@ -71,37 +74,121 @@
创建人
- 张大大
+ {{item.createBy}}
-
+
-
-
+
-
正常
-
{{i}}
+
{{item.status==0?'正常':'异常'}}
+
{{item.deviceId}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -139,7 +226,7 @@ export default {
display: inline-block;
width: 14px;
height: 14px;
-
+
margin-right: -15px;
}
.iconImg {
@@ -181,6 +268,7 @@ export default {
border-radius: 0;
background: none;
}
+/* 设备正常时的遮罩层 */
.shadows {
position: absolute;
top: 0px;
@@ -188,8 +276,19 @@ export default {
width: 79px;
height: 90px;
cursor: pointer;
- /* background:grey;
- opacity: 0.4; */
+ /* background:red;
+ opacity: 0.4; */
+}
+/* 设备异常时的遮罩层 */
+.active {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ width: 79px;
+ height: 90px;
+ cursor: pointer;
+ background: red;
+ opacity: 0.4;
}
.deviceStatus {
color: white;
@@ -215,6 +314,7 @@ export default {
}
.deleteIcon {
width: 8px;
+ height: 5px;
position: absolute;
top: 2px;
right: 5px;
diff --git a/src/layout/components/MusicManage/index.vue b/src/layout/components/MusicManage/index.vue
index 33aa521..2cdd0b7 100644
--- a/src/layout/components/MusicManage/index.vue
+++ b/src/layout/components/MusicManage/index.vue
@@ -2,12 +2,7 @@
-
+
-
+
@@ -57,13 +52,52 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-