|
|
|
|
@ -159,7 +159,7 @@
|
|
|
|
|
<el-button
|
|
|
|
|
link
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="openForm('update', scope.row.id)"
|
|
|
|
|
@click.stop="handleEdit(scope.row)"
|
|
|
|
|
v-hasPermi="['iot:device:update']"
|
|
|
|
|
>
|
|
|
|
|
编辑
|
|
|
|
|
@ -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) {
|
|
|
|
|
|