From 9ffe7c2f351ab8bfe52b5f0deb6ff328374e0966 Mon Sep 17 00:00:00 2001 From: zhoule Date: Thu, 9 May 2024 20:32:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=AA=E9=98=B3=E8=83=BD=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SolarEnergy/components/DeviceParams.vue | 51 +++++++++++++++++-- 1 file changed, 46 insertions(+), 5 deletions(-) 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",