数据导入修复

dev
yujialong 3 years ago
parent f4690f7e70
commit 637b49c6e3
  1. 3
      src/utils/api.js
  2. 16
      src/views/data/Framework.vue

@ -1,8 +1,5 @@
let host = 'http://39.108.250.202:9000' let host = 'http://39.108.250.202:9000'
if(process.env.NODE_ENV === 'development'){
host = 'http://192.168.31.216:9000'
}
let host1 = 'http://192.168.31.216:9000'//榕 let host1 = 'http://192.168.31.216:9000'//榕
let host2 = 'http://192.168.31.125:9000'//林 let host2 = 'http://192.168.31.125:9000'//林
// let host = 'http://192.168.31.137:9000'// 陈赓 // let host = 'http://192.168.31.137:9000'// 陈赓

@ -319,6 +319,18 @@ export default {
} }
}) })
}, },
renderChecked(){
let result = []
let list = this.$refs.typeTree.getCheckedNodes()
list.map((n,i) => {
if(n.tableLen && n.tableLen > n.children.length){
result = [...result,...n.children.map(n => n.id)]
}else{
result.push(n.id)
}
})
this.$refs.typeTree.setCheckedKeys(result)
},
loadType(e){ loadType(e){
clearTimeout(this.typeTimer) clearTimeout(this.typeTimer)
let typeTree = this.$refs.typeTreeWrap let typeTree = this.$refs.typeTreeWrap
@ -328,7 +340,7 @@ export default {
this.getMoreTable(this.importTypeList,this.curExpand) this.getMoreTable(this.importTypeList,this.curExpand)
setTimeout(() => { setTimeout(() => {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.typeTree.setCheckedKeys(this.defaultTypeChecked) this.renderChecked()
}) })
},300) },300)
} }
@ -431,7 +443,7 @@ export default {
}, },
importTypeExpand(obj,node,com){ importTypeExpand(obj,node,com){
this.curExpand = obj.id this.curExpand = obj.id
this.$refs.typeTree.setCheckedKeys(this.defaultTypeChecked) this.renderChecked()
}, },
closeImport(){ closeImport(){
this.$refs.typeTree.setCheckedKeys([]) this.$refs.typeTree.setCheckedKeys([])

Loading…
Cancel
Save