From abb17a38533d3b96dec9aff4a9e4ec42b950d46d Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Mon, 5 Aug 2024 16:19:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-ui/src/views/iotDevice/index.vue | 4 ++-- .../machinery/coding/component/BindIOT.vue | 19 +++++++------------ .../machinery/coding/index.vue | 13 +++++++++++-- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/sgzb-ui/src/views/iotDevice/index.vue b/sgzb-ui/src/views/iotDevice/index.vue index 3f09b191..bcab24dd 100644 --- a/sgzb-ui/src/views/iotDevice/index.vue +++ b/sgzb-ui/src/views/iotDevice/index.vue @@ -316,7 +316,7 @@ export default { cancelButtonText: '取消', type: 'warning', }).then(async () => { - const res = await unbindDeviceApi({ iotId }) + const res = await unbindDeviceApi({ id: iotId, iotId }) console.log('解绑设备', res) if (res.code === 200) { this.$message.success('解绑成功!') @@ -334,7 +334,7 @@ export default { type: 'warning', }).then(async () => { let ApiFun = type === 1 ? deleteDeviceApi : unbindDeviceApi - let params = type === 1 ? id : { iotId: id } + let params = type === 1 ? id : { id } const res = await ApiFun(params) if (res.code === 200) { this.$message.success(`${title}成功!`) diff --git a/sgzb-ui/src/views/warehouseManage/machinery/coding/component/BindIOT.vue b/sgzb-ui/src/views/warehouseManage/machinery/coding/component/BindIOT.vue index ffef51f2..fcfd1ca5 100644 --- a/sgzb-ui/src/views/warehouseManage/machinery/coding/component/BindIOT.vue +++ b/sgzb-ui/src/views/warehouseManage/machinery/coding/component/BindIOT.vue @@ -107,12 +107,7 @@ style="width: 280px" @change="changeIotType" > - + @@ -297,12 +292,12 @@ export default { }, // 获取下拉 async getIotType() { - try { - const res = await selectList() - this.typeOptions = res.data - } catch (err) { - console.log('🚀 ~ getIotType ~ err:', err) - } + // try { + // const res = await selectList() + // this.typeOptions = res.data + // } catch (err) { + // console.log('🚀 ~ getIotType ~ err:', err) + // } }, // 设备类型改变 async changeIotType(iotTypeId) { diff --git a/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue b/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue index 29e185d4..2d77f719 100644 --- a/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue +++ b/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue @@ -207,14 +207,23 @@ - 未绑定 + - +