From e253a0a873dc8f657c0b680d2cada50708fc8da4 Mon Sep 17 00:00:00 2001 From: 23357 <842520863@qq.com> Date: Wed, 8 Nov 2023 17:25:01 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=96=B0=E5=A2=9E=E4=B8=8B=E5=8F=91?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E8=AE=BE=E5=A4=87=E6=8E=A7=E5=88=B6=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/iot/device.js | 9 ++++ .../DeviceManage/EDeviceChildren.vue | 40 +++++++++++++++++- .../DeviceDetailsView/deviceSelectNav.vue | 42 ++++++++++++++++++- 3 files changed, 89 insertions(+), 2 deletions(-) diff --git a/src/api/iot/device.js b/src/api/iot/device.js index 7167c1a1..bc3b9175 100644 --- a/src/api/iot/device.js +++ b/src/api/iot/device.js @@ -133,6 +133,15 @@ export function setSwitchControl(data) { }); } +// 开关控制 最新接口 +export function searchDevControl(data) { + return request({ + url: "/iot/dev/opt/search", + method: "post", + data: data + }); +} + // 断路器上报间隔设置 export function setLivetimeControl(data) { return request({ diff --git a/src/views/iot/project/profileV2/DeviceManage/EDeviceChildren.vue b/src/views/iot/project/profileV2/DeviceManage/EDeviceChildren.vue index 729f9bc0..4d3c0b51 100644 --- a/src/views/iot/project/profileV2/DeviceManage/EDeviceChildren.vue +++ b/src/views/iot/project/profileV2/DeviceManage/EDeviceChildren.vue @@ -45,6 +45,16 @@ > 一键分闸 +
+ 查找设备 +
0) { + this.handleSearchDevDirect( this.tableSelectList.toString()); + } + }, // 点击子设备 线路开关 handleSendSwitchDirect(type, ids) { this.$prompt("请输入登录密码", "提示", { @@ -333,6 +348,29 @@ export default { }); }); }, + //查找设备(设备亮灯) + handleSearchDevDirect( ids) { + this.$prompt("请输入登录密码", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + inputPattern: /^[a-z A-z 0-9 $.]+/, + inputType: "password", + inputErrorMessage: "登录密码不能为空", + }).then(({ value }) => { + let params = { + data: { + params: { + }, + }, + deviceId: ids, + verifyKey: value, + }; + + searchDevControl(params).then((res) => { + this.msgSuccess("修改成功"); + }); + }); + }, handleRefresh() { this.queryParams.pageNum = 1; this.getChildrenDeviceList(); diff --git a/src/views/profile/DeviceDetailsView/deviceSelectNav.vue b/src/views/profile/DeviceDetailsView/deviceSelectNav.vue index d20f6e52..715486d7 100644 --- a/src/views/profile/DeviceDetailsView/deviceSelectNav.vue +++ b/src/views/profile/DeviceDetailsView/deviceSelectNav.vue @@ -109,6 +109,25 @@ 一键分闸 + +
+ + 查找设备 +
+
{ + let params = { + data: { + params: { + }, + }, + deviceId: this.tSelectList.toString(), + verifyKey: value, + }; + searchDevControl(params).then((res) => { + this.msgSuccess("修改成功"); + }); + }); + }, handleAllSelect() { if (this.childDeviceList.length > 0) { if (this.tSelectList.length >= this.childDeviceList.length) {