数据架构新增删除后循环一次列表

dev
yujialong 3 years ago
parent 8de30231c5
commit 78473fc905
  1. 13
      src/views/data/Framework.vue

@ -292,6 +292,7 @@ export default {
this.$post(`${this.api.deleteTable}?tableIds=${row.id}`).then(res => {
this.$message.success('删除成功')
this.getData()
this.cacheTable(this.typeList)
}).catch(res => {})
}).catch(() => {})
},
@ -315,6 +316,7 @@ export default {
this.$refs.table.clearSelection()
this.$message.success('删除成功')
this.getData()
this.cacheTable(this.typeList)
}).catch(res => {})
}).catch(() => {})
}else{
@ -446,10 +448,21 @@ export default {
setTimeout(() => {
this.submited = false
},1000)
this.cacheTable(this.typeList)
}).catch(res => {
this.submited = false
})
},
cacheTable(list){
list.map(n => {
if(n.children.length){
this.cacheTable(n.children)
}else{
this.$post(`${this.api.getIdQueryTable}?categoryId=${n.id}&showName=&pageNum=1&pageSize=1000&updateTime=`).then(res => {}).catch(res => {})
}
})
}
}
};
</script>

Loading…
Cancel
Save