From 766c72941e859a848ef1ff420f636a98debb7788 Mon Sep 17 00:00:00 2001
From: fengerli <528575642@qq.com>
Date: Thu, 31 Jul 2025 19:02:09 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E210=E7=AE=A1=E6=8E=A7?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=EF=BC=8C6170=E8=AE=BE=E5=A4=87=E6=8E=A7?=
=?UTF-8?q?=E5=88=B6=EF=BC=8C=E8=AE=A2=E9=98=85=E8=AE=BE=E5=A4=87=E6=B6=88?=
=?UTF-8?q?=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages.json | 6 +
pages/210/deviceControl/index.vue | 1222 ++++++++++++++++++++++++++++
pages/6170/deviceControl/index.vue | 23 +-
pages/common/index/index.vue | 39 +-
pages/common/login/index.vue | 2 +-
pages/common/send/index.vue | 17 +-
6 files changed, 1285 insertions(+), 24 deletions(-)
create mode 100644 pages/210/deviceControl/index.vue
diff --git a/pages.json b/pages.json
index 16a4efc..b79a3a0 100644
--- a/pages.json
+++ b/pages.json
@@ -65,6 +65,12 @@
"navigationStyle": "custom"
}
},
+ {
+ "path": "pages/210/deviceControl/index",
+ "style": {
+ "navigationStyle": "custom"
+ }
+ },
{
"path": "pages/common/operationVideo/index",
"style": {
diff --git a/pages/210/deviceControl/index.vue b/pages/210/deviceControl/index.vue
new file mode 100644
index 0000000..c212ba5
--- /dev/null
+++ b/pages/210/deviceControl/index.vue
@@ -0,0 +1,1222 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{deviceInfo.batteryPercentage}}%
+ 电量
+
+
+
+
+
+ 1小时
+ 续航时间
+
+
+
+
+
+
+
+
+
+
+ 设备状态
+ 运行中
+
+
+ 联机状态
+ 联机
+
+
+ 定位信息
+
+ 114.72 30.28
+
+
+ 深圳市龙华区富源晟
+
+
+
+
+
+
+
+
+
+
+
+ 灯光模式
+ {{ currentMainMode }}
+
+
+
+
+
+
+
+ 激光模式
+
+
+
+
+
+
+
+ 开机画面
+ 上传
+
+
+
+
+
+
+
+
+
+ 人员信息登记
+
+
+
+
+
+
+
+ 单位:
+
+
+
+ 姓名:
+
+
+
+ 职位:
+
+
+
+ ID:
+
+
+
+
+
+
+
+ 发送信息
+
+
+
+
+
+
+
+
+
+ 产品信息
+
+
+
+ 产品参数
+
+
+
+ 操作说明
+
+
+
+ 操作视频
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/6170/deviceControl/index.vue b/pages/6170/deviceControl/index.vue
index 7517bc3..8b1f1ba 100644
--- a/pages/6170/deviceControl/index.vue
+++ b/pages/6170/deviceControl/index.vue
@@ -18,14 +18,14 @@
- 90%
+ {{deviceInfo.batteryPercentage}}%
电量
- 1小时
+ {{deviceInfo.batteryRemainingTime || '0分钟'}}
续航时间
@@ -42,7 +42,7 @@
设备状态
- 运行中
+ {{deviceInfo.onlineStatus===0?'离线':'在线'}}
定位信息
@@ -316,7 +316,7 @@
console.log('这是我滑动的吗');
this.sliderValue = e.detail.value;
let data = {
- deviceld: this.deviceID,
+ deviceId: this.deviceID,
instructValue: this.sliderValue + '.00'
}
lightBrightnessSettings(data).then((res) => {
@@ -392,7 +392,7 @@
// 修正这里的赋值错误,应该保存索引而不是文本
this.selectedItemIndex = this.selectedItemIndex;
let data = {
- deviceld: this.deviceID,
+ deviceId: this.deviceID,
instructValue: selectedItem.instructValue
}
lightModeSettings(data).then((res) => {
@@ -417,7 +417,7 @@
// 激光确认框提交
handleBtn() {
let data = {
- deviceld: this.deviceID,
+ deviceId: this.deviceID,
instructValue: 1
}
laserModeSettings(data).then((res) => {
@@ -465,7 +465,7 @@
}
this.selectedImage = res.tempFilePaths[0];
console.log('选择的图片:', res);
- this.file = res.tempFiles[0].file
+ //this.file = res.tempFiles[0].file
},
fail: (err) => {
console.error('选择图片失败:', err);
@@ -485,10 +485,16 @@
});
return;
}
+ // 显示上传中加载提示
+ uni.showLoading({
+ title: '上传中...',
+ mask: true
+ });
+
uni.uploadFile({
url: baseURL + '/app/device/uploadLogo',
filePath: this.selectedImage,
- name: this.file,
+ name: 'file',
formData: {
deviceId: this.deviceID,
},
@@ -524,7 +530,6 @@
}
}
})
-
},
// 分享
shareUp() {
diff --git a/pages/common/index/index.vue b/pages/common/index/index.vue
index 75ec93c..b33a3bd 100644
--- a/pages/common/index/index.vue
+++ b/pages/common/index/index.vue
@@ -41,8 +41,13 @@
ID:{{item.deviceImei}}
ID:{{item.deviceMac}}
- 在线
- 电量:90%
+
+ 在线
+
+ 离线
+ 电量:{{item.battery || '0'}}%
@@ -423,7 +428,7 @@
handleFile(item) {
//console.log('item' + JSON.stringify(item));
// communicationMode 0是4G 1是蓝牙
- if (item.communicationMode == 0) {
+ if (item.typeName == 'BJQ6170') {
uni.navigateTo({
url: "/pages/6170/deviceControl/index",
events: {
@@ -437,6 +442,19 @@
});
}
})
+ } else if (item.typeName == 'HBY210') {
+ uni.navigateTo({
+ url: "/pages/210/deviceControl/index",
+ events: {
+ ack: function(data) {}
+ },
+ success: (res) => {
+ // 页面跳转成功后的回调函数
+ res.eventChannel.emit('deviceControl', {
+ data: item,
+ });
+ }
+ })
}
if (item.typeName == '6155') {
uni.navigateTo({
@@ -460,7 +478,7 @@
updateDeviceStatus(data) {
// 只更新 communicationMode == 0 的设备
this.deviceList = this.deviceList.map(item => {
- console.log(item,'item2222');
+ console.log(item, 'item2222');
if (item.communicationMode === 0) {
// 这里根据消息内容更新设备状态
// 示例:如果消息包含特定字段,则更新设备状态
@@ -703,6 +721,19 @@
top: 20rpx;
left: -20rpx
}
+ .offlines{
+ position: relative;
+ }
+ .offlines::before {
+ content: '';
+ position: absolute;
+ width: 15rpx;
+ height: 15rpx;
+ background: rgba(255, 255, 255, 0.4);
+ border-radius: 50%;
+ top: 20rpx;
+ left: -20rpx
+ }
.line {
width: 2rpx;
diff --git a/pages/common/login/index.vue b/pages/common/login/index.vue
index e13a2f0..828101e 100644
--- a/pages/common/login/index.vue
+++ b/pages/common/login/index.vue
@@ -61,7 +61,7 @@
data() {
return {
showView: false,
- phone: '13800138001', //手机号码
+ phone: '13800138002', //手机号码
code: "", //验证码
agreed: false,
isCounting: false,
diff --git a/pages/common/send/index.vue b/pages/common/send/index.vue
index 3e85cb9..67e10cc 100644
--- a/pages/common/send/index.vue
+++ b/pages/common/send/index.vue
@@ -16,19 +16,16 @@
设备:{{item.deviceName}}
- ID:{{item.deviceImei}}
-
- ID:{{item.deviceMac}}
-
- 离线
- 电量:90%
+ ID:{{item.deviceImei}}
+ 在线
+
+ 离线
+ 电量:{{item.battery || '0'}}%
-
- 已连接
- 未连接
-