Browse Source

太阳能板

wangqin
zhoule 7 months ago
parent
commit
9ffe7c2f35
  1. 47
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SolarEnergy/components/DeviceParams.vue

47
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SolarEnergy/components/DeviceParams.vue

@ -56,11 +56,52 @@ export default {
let devs = [];
// Promise.all([this.getAc('A1'), this.getAc('A2'), this.getAc('A3'), this.getAc('A4'), this.getAc('A5'), this.getAc('A6')]).then(res => {
const res = await this.getAc();
await request({
url: `/business/device/batchFunctions`,
method: "post",
data: {
devices: [{
iotDeviceId: this.dialogData.iotDeviceId,
id: this.dialogData.id,
deviceType: 15
}],
functions: [
{
functionId: "A1",
params: {}
}, {
functionId: "A2",
params: {}
}, {
functionId: "A3",
params: {}
}, {
functionId: "A4",
params: {}
}, {
functionId: "A5",
params: {}
}, {
functionId: "A6",
params: {}
}
],
// parameter: {}
}
}).then(res => {
console.log('res', res)
if (res.code == 500) {
await this.getAc();
if (res.msg == 500) {
this.getAc();
}
})
.catch((err) => {
console.log('err', err)
this.getAc();
})
// console.log('res', res)
// if (res.code == 500) {
// await this.getAc();
// }
request({
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId}`,
method: "get",

Loading…
Cancel
Save