diff --git a/src/views/iot/device/index.vue b/src/views/iot/device/index.vue index 6703ad4e..795cac6b 100644 --- a/src/views/iot/device/index.vue +++ b/src/views/iot/device/index.vue @@ -159,7 +159,7 @@ 编辑 @@ -364,6 +364,14 @@ const isRowConnected = (row: any) => { return String(getRowConnectValue(row)) === '1' } +const handleEdit = async (row: DeviceVO) => { + if (isRowConnected(row)) { + await message.alertWarning('设备在线状态,无法编辑,请先断开连接') + return + } + openForm('update', row.id) +} + const handleToggleConnect = async (row: DeviceVO) => { const id = row?.id if (!id) {