修改了列表跳转方式
This commit is contained in:
@ -143,7 +143,7 @@
|
||||
url: "/pages/6170/deviceControl/index",
|
||||
success: (res) => {
|
||||
// 页面跳转成功后的回调函数
|
||||
res.eventChannel.emit('deviceControl', {
|
||||
res.eventChannel.emit('detailData', {
|
||||
data: item,
|
||||
apiType: 'listB' // 自定义标识 // 自定义标识,详情哪里根据这个参数不同信息
|
||||
});
|
||||
|
@ -352,13 +352,13 @@ export default {
|
||||
* @param {number} [interval=800] - 轮询间隔(毫秒)
|
||||
* @param {number} [maxRetries=10] - 最大重试次数
|
||||
*/
|
||||
async getdeviceSTatus(val, batchId, interval = 800, maxRetries = 10) {
|
||||
let retries = 0;
|
||||
async getdeviceSTatus(val, batchId, interval = 800) {
|
||||
//let retries = 0;
|
||||
const checkStatus = async () => {
|
||||
if (retries >= maxRetries) {
|
||||
throw new Error('超过最大重试次数');
|
||||
}
|
||||
retries++;
|
||||
// if (retries >= maxRetries) {
|
||||
// throw new Error('超过最大重试次数');
|
||||
// }
|
||||
// retries++;
|
||||
|
||||
try {
|
||||
const data = {
|
||||
@ -916,7 +916,7 @@ export default {
|
||||
title: statusRes.msg,
|
||||
icon: 'none'
|
||||
});
|
||||
// 刷新详情接口
|
||||
// 刷新详情接口
|
||||
this.fetchDeviceDetail(this.computedDeviceId, true);
|
||||
uni.$emit('deviceStatusUpdate', {});
|
||||
this.showPopupFlag = false
|
||||
@ -991,6 +991,7 @@ export default {
|
||||
// 最后关闭加载状态
|
||||
this.pageLoading = false
|
||||
this.deviceInfo = res.data
|
||||
|
||||
if (!isUpdate) {
|
||||
this.personnelInfo = {
|
||||
unitName: res.data.personnelInfo.unitName || '',
|
||||
@ -999,6 +1000,30 @@ export default {
|
||||
position: res.data.personnelInfo.position || '',
|
||||
};
|
||||
this.messageToSend = res.data.sendMsg || '';
|
||||
this.sliderValue = res.data.lightBrightness || '25'
|
||||
let mainLightMode = parseInt(res.data.mainLightMode);
|
||||
switch (mainLightMode) {
|
||||
case 0:
|
||||
this.currentMainMode = '关闭';
|
||||
break;
|
||||
case 1:
|
||||
this.currentMainMode = '强光';
|
||||
break;
|
||||
case 2:
|
||||
this.currentMainMode = '弱光';
|
||||
break;
|
||||
case 3:
|
||||
this.currentMainMode = '爆闪';
|
||||
break;
|
||||
case 4:
|
||||
this.currentMainMode = '泛光';
|
||||
break;
|
||||
default:
|
||||
console.log('未知的灯光模式:', mainLightMode);
|
||||
}
|
||||
const laserMode = res.data.LaserLightMode;
|
||||
this.isLaserOn = laserMode === 1;
|
||||
this.currentlaserMode = this.isLaserOn ? "开启" : "关闭";
|
||||
}
|
||||
// 将权限字符串转换为数组 ["1", "2"]
|
||||
if (isFromShared) {
|
||||
@ -1007,8 +1032,8 @@ export default {
|
||||
} else {
|
||||
this.isSharedDevice = false;
|
||||
this.activePermissions = []; // 非分享设备清空权限
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 关闭加载中
|
||||
uni.hideLoading()
|
||||
}
|
||||
@ -1086,7 +1111,7 @@ export default {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
eventChannel.on('deviceControl', (data) => {
|
||||
eventChannel.on('detailData', (data) => {
|
||||
console.log(data, 'data');
|
||||
this.itemInfo = data.data;
|
||||
this.deviceID = data.data.id;
|
||||
|
@ -175,7 +175,7 @@
|
||||
url: "/pages/6170/deviceControl/index",
|
||||
success: (res) => {
|
||||
// 页面跳转成功后的回调函数
|
||||
res.eventChannel.emit('deviceControl', {
|
||||
res.eventChannel.emit('detailData', {
|
||||
data: item,
|
||||
apiType: 'listB' // 自定义标识 // 自定义标识,详情哪里根据这个参数不同信息
|
||||
});
|
||||
|
Reference in New Issue
Block a user