From df991b6721ac6fb89ae0da6c3f0920efc4e879e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E5=A4=A7=E5=8F=94?= <494979559@qq.com> Date: Tue, 9 Jul 2024 11:19:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/device/detail.vue | 24 +++++++++++++++--------- src/views/system/device/index.vue | 2 +- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/views/system/device/detail.vue b/src/views/system/device/detail.vue index f536174..d09ef6d 100644 --- a/src/views/system/device/detail.vue +++ b/src/views/system/device/detail.vue @@ -57,10 +57,10 @@ - - - - + + + + @@ -157,11 +157,17 @@ export default { return ((expireTime - now) / 60000).toFixed(2); }, handleReset() { - resetDevice(this.deviceData.deviceId).then(res => { - if (res.code === 200) { - this.$message.success('操作成功'); - this.getDevice(); - } + this.$confirm('是否确认归零设备?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + resetDevice(this.deviceData.deviceId).then(res => { + if (res.code === 200) { + this.$message.success('操作成功'); + this.getDevice(); + } + }) }) }, handleAddElectricity() { diff --git a/src/views/system/device/index.vue b/src/views/system/device/index.vue index 030beb9..d8df603 100644 --- a/src/views/system/device/index.vue +++ b/src/views/system/device/index.vue @@ -218,7 +218,7 @@ - +