代码调试

This commit is contained in:
BianLzhaoMin 2024-08-05 16:19:06 +08:00
parent b68bd93dc4
commit abb17a3853
3 changed files with 20 additions and 16 deletions

View File

@ -316,7 +316,7 @@ export default {
cancelButtonText: '取消',
type: 'warning',
}).then(async () => {
const res = await unbindDeviceApi({ iotId })
const res = await unbindDeviceApi({ id: iotId, iotId })
console.log('解绑设备', res)
if (res.code === 200) {
this.$message.success('解绑成功!')
@ -334,7 +334,7 @@ export default {
type: 'warning',
}).then(async () => {
let ApiFun = type === 1 ? deleteDeviceApi : unbindDeviceApi
let params = type === 1 ? id : { iotId: id }
let params = type === 1 ? id : { id }
const res = await ApiFun(params)
if (res.code === 200) {
this.$message.success(`${title}成功!`)

View File

@ -107,12 +107,7 @@
style="width: 280px"
@change="changeIotType"
>
<el-option
v-for="item in typeOptions"
:key="item.iotTypeId"
:label="item.iotTypeName"
:value="item.iotTypeId"
/>
<el-option label="定位设备" :value="125" />
</el-select>
</el-form-item>
<el-form-item label="设备编号" prop="iotId">
@ -297,12 +292,12 @@ export default {
},
//
async getIotType() {
try {
const res = await selectList()
this.typeOptions = res.data
} catch (err) {
console.log('🚀 ~ getIotType ~ err:', err)
}
// try {
// const res = await selectList()
// this.typeOptions = res.data
// } catch (err) {
// console.log('🚀 ~ getIotType ~ err:', err)
// }
},
//
async changeIotType(iotTypeId) {

View File

@ -207,14 +207,23 @@
</template>
</el-table-column>
<el-table-column label="IOT设备" align="center" prop="ownHouseName">
<el-button type="text" @click="handleBindIOT">未绑定</el-button>
<template slot-scope="{ row }">
<el-button type="text" @click="handleBindIOT(row)"
>未绑定</el-button
>
</template>
</el-table-column>
<el-table-column
label="位置信息"
align="center"
prop="ownHouseName"
>
<i class="el-icon-location location-icon" @click="handleMap" />
<template slot-scope="{ row }">
<i
class="el-icon-location location-icon"
@click="handleMap(row)"
/>
</template>
</el-table-column>
<!-- <el-table-column
label="所在仓库"