diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SolarEnergy/components/DeviceParams.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SolarEnergy/components/DeviceParams.vue index 832de3c8..4eb6d86b 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SolarEnergy/components/DeviceParams.vue +++ b/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(); - console.log('res', res) - if (res.code == 500) { - 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.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",