From fddd34e2c5dccc470e844ed0976cce74ea9ff5b1 Mon Sep 17 00:00:00 2001 From: huanglingchen Date: Wed, 2 Apr 2025 18:10:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B2=E7=9B=AE=E5=88=97=E8=A1=A8=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E8=AE=BE=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/quniao/deviceOption.js | 49 ++++++- src/views/quniao/device/index.vue | 200 ++++++++++++++++++++++++-- src/views/quniao/device/musicList.vue | 93 ++++++++++++ 3 files changed, 324 insertions(+), 18 deletions(-) create mode 100644 src/views/quniao/device/musicList.vue diff --git a/src/api/quniao/deviceOption.js b/src/api/quniao/deviceOption.js index 1546c37..ae7b0ed 100644 --- a/src/api/quniao/deviceOption.js +++ b/src/api/quniao/deviceOption.js @@ -26,11 +26,54 @@ export function deleteTaskReq(data){ }) } +//设备列表 +export function deviceListReq(){ + return request({ + url: '/api/brid/selectBridDeviceList', + method: 'post', + }) +} -export function deviceListReq(data){ +//调节音量大小 +export function deviceVolumeReq(data){ return request({ - url: '/api/brid/deleteTaskState', + url: '/api/brid/volumeControl', method: 'post', data:data }) -} \ No newline at end of file +} + +//控制设备播放 00:播放 01:暂停 02:终止 +export function playMusicReq(data){ + return request({ + url: '/api/brid/musicPlay', + method: 'post', + data:data + }) +} + +//上报声音的状态(暂停,开始,终止) +export function appearStatusReq(id){ + return request({ + url: `/api/brid/tellDeviceStatus?deviceId=${id}`, + method: 'post', + }) +} + +//设备播放模式 ,单曲循环 全部循环 +export function loopPlayReq(data){ + return request({ + url: `/api/brid/musicModel`, + method: 'post', + data:data + }) +} + +//获取曲目列表 +export function musicListReq(data){ + return request({ + url: `/api/brid/selectBridSongList`, + method: 'post', + data:data + }) +} diff --git a/src/views/quniao/device/index.vue b/src/views/quniao/device/index.vue index 375af98..d49f3e2 100644 --- a/src/views/quniao/device/index.vue +++ b/src/views/quniao/device/index.vue @@ -10,12 +10,31 @@
- - - - - - + + + + + + + + + + + +
@@ -115,7 +134,7 @@ {{ props.row.taskType==1?'日计划':props.row.taskType==2?'周计划':'月计划'}} - + @@ -130,12 +149,35 @@ + + + + {{volumeTitle}} + + 取 消 + 确 定 + + + @@ -318,8 +456,10 @@ export default{ .quniaoApp{ display: flex; - + position: relative; } + + .leftContent,.rightContent{ height: 100%; @@ -357,7 +497,7 @@ export default{ .tableList{ margin:2% 0; width: 98%; - height: 42%; + height: 34%; } .deviceStatus{ @@ -455,9 +595,39 @@ export default{ opacity: 0.5; } -.el-table .success{ - color: #35EB68 !important; - /* background-color: #35EB68; */ +.deviceOption{ + display: flex; + align-items: center; + justify-content: space-around; + width: 100%; + height: 100%; + position: relative; +} + +.deviceOption>img:hover{ + cursor: pointer; +} + +.dialogTitle{ + display: flex; + width: 100%; + justify-content: center; + font-size: 0.8vw; +} + +.musicName:hover{ + cursor: pointer; +} + + + + + + + + +::v-deep .el-table{ + font-size: 0.8vw; } diff --git a/src/views/quniao/device/musicList.vue b/src/views/quniao/device/musicList.vue new file mode 100644 index 0000000..a5de72d --- /dev/null +++ b/src/views/quniao/device/musicList.vue @@ -0,0 +1,93 @@ + + + + + + \ No newline at end of file