新增210管控页面,6170设备控制,订阅设备消息

This commit is contained in:
fengerli
2025-07-31 19:02:09 +08:00
parent c7d7149d2f
commit 766c72941e
6 changed files with 1285 additions and 24 deletions

View File

@ -18,14 +18,14 @@
<view class="battery-v1">
<image src="/static/images/dl.png" class="dlIMG"></image>
<view>
<view class="battery-v2">90%</view>
<view class="battery-v2">{{deviceInfo.batteryPercentage}}%</view>
<view class="battery-v3">电量</view>
</view>
</view>
<view class="battery-v1">
<image src="/static/images/nz.png" class="dlIMG" mode="aspectFit"></image>
<view>
<view class="battery-v2">1小时</view>
<view class="battery-v2">{{deviceInfo.batteryRemainingTime || '0分钟'}}</view>
<view class="battery-v3">续航时间</view>
</view>
</view>
@ -42,7 +42,7 @@
</view>
<view class="info-row">
<text class="info-label">设备状态</text>
<text class="info-value status-running">运行中</text>
<text class="info-value status-running">{{deviceInfo.onlineStatus===0?'离线':'在线'}}</text>
</view>
<view class="info-row">
<text class="info-label">定位信息</text>
@ -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() {