代码调试

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

View File

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

View File

@ -207,14 +207,23 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="IOT设备" align="center" prop="ownHouseName"> <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>
<el-table-column <el-table-column
label="位置信息" label="位置信息"
align="center" align="center"
prop="ownHouseName" 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>
<!-- <el-table-column <!-- <el-table-column
label="所在仓库" label="所在仓库"