|
|
|
@ -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){ |
|
|
|
|
clearTimeout(this.typeTimer) |
|
|
|
|
let typeTree = this.$refs.typeTreeWrap |
|
|
|
@ -328,7 +340,7 @@ export default { |
|
|
|
|
this.getMoreTable(this.importTypeList,this.curExpand) |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
this.$refs.typeTree.setCheckedKeys(this.defaultTypeChecked) |
|
|
|
|
this.renderChecked() |
|
|
|
|
}) |
|
|
|
|
},300) |
|
|
|
|
} |
|
|
|
@ -431,7 +443,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
importTypeExpand(obj,node,com){ |
|
|
|
|
this.curExpand = obj.id |
|
|
|
|
this.$refs.typeTree.setCheckedKeys(this.defaultTypeChecked) |
|
|
|
|
this.renderChecked() |
|
|
|
|
}, |
|
|
|
|
closeImport(){ |
|
|
|
|
this.$refs.typeTree.setCheckedKeys([]) |
|
|
|
|