修改返回结构弹窗

master
ZhiShuo_Lou 2023-12-03 10:00:23 +08:00
parent 92f65e2be7
commit b906cdbe17
1 changed files with 16 additions and 7 deletions

View File

@ -31,7 +31,6 @@
</el-form>
<el-button type="success" plain @click="upiInsertDialog" icon="el-icon-check">添加围栏</el-button>
<el-button type="danger" plain @click="deleteFence()" icon="el-icon-check">删除围栏</el-button>
<el-table :data="fenceData" style="width: 500%" @selection-change="handleSelectionChange">
@ -206,10 +205,14 @@ export default {
this.updateFences.fenceLocation = this.mapAddr
console.log(this.updateFences)
updateFenceMapAddr(this.updateFences).then(res =>{
this.dialogVisible=false
this.getFenceList()
this.updateFences = {}
this.mapAddr = ''
if(res.code == 200) {
alert(res.msg)
this.dialogVisible=false
this.getFenceList()
this.updateFences = {}
this.mapAddr = ''
}
// location.reload()
})
},
@ -284,6 +287,9 @@ export default {
//
deleteFence(id) {
deleteFenceById(id).then(res =>{
if (res.code == 200) {
alert(res.msg)
}
this.getFenceList()
})
},
@ -294,8 +300,11 @@ export default {
onSubmit() {
insertFence(this.insertFences).then(res =>{
this.dialogVisibleTwo = false
this.getFenceList()
this.insertFences={}
if (res.code == 200) {
alert(res.msg)
this.getFenceList()
this.insertFences={}
}
})
},
getFenceList() {