代码合并

This commit is contained in:
BianLzhaoMin 2024-08-05 17:19:18 +08:00
parent b192d7edb7
commit dddc269455
1 changed files with 9 additions and 31 deletions

View File

@ -56,7 +56,13 @@
>
</template>
</el-table-column>
<el-table-column prop="qrCode" align="center" label="二维码" />
<el-table-column align="center" label="二维码">
<template slot-scope="{ row }">
<el-button type="text" size="small" @click="showQrCode(row)"
>查看</el-button
>
</template>
</el-table-column>
<el-table-column align="center" label="绑定状态">
<template slot-scope="{ row }">
<el-tag
@ -303,36 +309,6 @@ export default {
this.dialogConfig.outerVisible = false
},
/** 删除按钮 */
handleDelete(id) {
this.$confirm('是否确定删除当前设备, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(async () => {
const res = await deleteDeviceApi(id)
if (res.code === 200) {
this.$message.success('删除成功!')
this.getDeviceList()
}
})
},
/** 解绑按钮 */
handleUnbind(iotId) {
this.$confirm('是否确定解绑当前设备, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(async () => {
const res = await unbindDeviceApi({ id: iotId, iotId })
console.log('解绑设备', res)
if (res.code === 200) {
this.$message.success('解绑成功!')
this.getDeviceList()
}
})
},
/** 删除和解绑设备 */
handleDeleteAndUnbind(id, type) {
const title = type === 1 ? '删除' : '解绑'
@ -370,6 +346,8 @@ export default {
}
})
},
/** 查看二维码 */
showQrCode() {},
},
}
</script>