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) {