Compare commits
2 Commits
new-202508
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 569c7cf0b4 | |||
| 253733ad2b |
@ -231,6 +231,9 @@
|
|||||||
deviceUpdateVolume,
|
deviceUpdateVolume,
|
||||||
deviceVoiceBroadcast
|
deviceVoiceBroadcast
|
||||||
} from '@/api/100J/HBY100-J.js'
|
} from '@/api/100J/HBY100-J.js'
|
||||||
|
import {
|
||||||
|
deviceShareId
|
||||||
|
} from '@/api/6170/deviceControl.js'
|
||||||
var these = null;
|
var these = null;
|
||||||
import Common from '@/utils/Common.js'
|
import Common from '@/utils/Common.js'
|
||||||
const pagePath = "/pages/100/HBY100";
|
const pagePath = "/pages/100/HBY100";
|
||||||
@ -454,16 +457,6 @@
|
|||||||
these.Status.apiType = data.apiType;
|
these.Status.apiType = data.apiType;
|
||||||
these.Status.isRightIconVisible = these.Status.apiType === 'listA';
|
these.Status.isRightIconVisible = these.Status.apiType === 'listA';
|
||||||
|
|
||||||
if (data.apiType !== 'listA') {
|
|
||||||
Common.getdeviceShareId(data.data.id).then(res => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
if (res.data.permission) {
|
|
||||||
these.permissions = res.data.permission.split(',');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
this.mqttClient = new MqttClient();
|
this.mqttClient = new MqttClient();
|
||||||
|
|
||||||
this.mqttClient.connect(() => {
|
this.mqttClient.connect(() => {
|
||||||
@ -503,7 +496,7 @@
|
|||||||
.battery_remaining_time //续航时间
|
.battery_remaining_time //续航时间
|
||||||
// 设备按键, app同步
|
// 设备按键, app同步
|
||||||
} else if (funcType == '14') {
|
} else if (funcType == '14') {
|
||||||
// 调节相关字段
|
// 调节亮度,音量,频率相关字段
|
||||||
these.formData.strobeFrequency = led_strobe.frequency ||
|
these.formData.strobeFrequency = led_strobe.frequency ||
|
||||||
0.5; //频率
|
0.5; //频率
|
||||||
these.formData.volume = volume || 10; //音量
|
these.formData.volume = volume || 10; //音量
|
||||||
@ -587,7 +580,13 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
console.log(data, 'datatatatat');
|
console.log(data, 'datatatatat');
|
||||||
these.fetchDeviceDetail(data.data.id)
|
if (these.Status.apiType === 'listA') {
|
||||||
|
these.fetchDeviceDetail(data.data.id)
|
||||||
|
} else {
|
||||||
|
console.log('走到这里了没');
|
||||||
|
// 分享权限详情
|
||||||
|
these.fetchSharedDeviceDetail(data.data.id)
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.createThrottledFunctions();
|
this.createThrottledFunctions();
|
||||||
|
|
||||||
@ -639,6 +638,18 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 获取分享设备详情
|
||||||
|
async fetchSharedDeviceDetail(id) {
|
||||||
|
try {
|
||||||
|
const res = await deviceShareId(id)
|
||||||
|
if (res.code == 200) {
|
||||||
|
console.log(this.deviceInfo,'this.deviceInfo');
|
||||||
|
this.deviceInfo=res.data
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
handleRightClick(item, s) {
|
handleRightClick(item, s) {
|
||||||
if (item && item.callback) {
|
if (item && item.callback) {
|
||||||
item.callback(item, s);
|
item.callback(item, s);
|
||||||
|
|||||||
@ -216,7 +216,7 @@
|
|||||||
const res = await deviceShareAdd({
|
const res = await deviceShareAdd({
|
||||||
phonenumber: this.phone,
|
phonenumber: this.phone,
|
||||||
smsCode: this.code,
|
smsCode: this.code,
|
||||||
deviceId: this.itemInfo.id,
|
deviceId: this.itemInfo.id || this.itemInfo.deviceId,
|
||||||
permission: selectedPermissions.join(',')
|
permission: selectedPermissions.join(',')
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -250,8 +250,8 @@
|
|||||||
const eventChannel = this.getOpenerEventChannel();
|
const eventChannel = this.getOpenerEventChannel();
|
||||||
// 监听 'shareDevice' 事件,获取传过来的数据
|
// 监听 'shareDevice' 事件,获取传过来的数据
|
||||||
eventChannel.on('shareDevice', (data) => {
|
eventChannel.on('shareDevice', (data) => {
|
||||||
console.log(data, 'data1t111');
|
|
||||||
this.itemInfo = data.data;
|
this.itemInfo = data.data;
|
||||||
|
console.log(this.itemInfo,'this.itemInfo');
|
||||||
this.permissions=Common.getPermissions(this.itemInfo.persissonType);
|
this.permissions=Common.getPermissions(this.itemInfo.persissonType);
|
||||||
console.log(this.itemInfo.persissonType,'this.itemInfo.persissonType');
|
console.log(this.itemInfo.persissonType,'this.itemInfo.persissonType');
|
||||||
})
|
})
|
||||||
|
|||||||
@ -86,7 +86,9 @@
|
|||||||
},
|
},
|
||||||
getData(val) {
|
getData(val) {
|
||||||
let data = {
|
let data = {
|
||||||
deviceId: val
|
deviceId: val,
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 500
|
||||||
}
|
}
|
||||||
deviceShareList(data).then((res) => {
|
deviceShareList(data).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
@ -117,7 +119,7 @@
|
|||||||
eventChannel.on('shareManagement', (data) => {
|
eventChannel.on('shareManagement', (data) => {
|
||||||
console.log(data, 'data1t111');
|
console.log(data, 'data1t111');
|
||||||
this.itemInfo = data.data;
|
this.itemInfo = data.data;
|
||||||
this.getData(this.itemInfo.id)
|
this.getData(this.itemInfo.id ||this.itemInfo.deviceId)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user