| | |
| | | node-key="oid" |
| | | @check="checkNode" |
| | | @current-change="changeNode" |
| | | @node-click="clickNode" |
| | | ref="tree"> |
| | | </el-tree> |
| | | </div> |
| | |
| | | isMuti:false, |
| | | data:[], |
| | | checkDatas:[], |
| | | currentClickNode:null, |
| | | params:{}, |
| | | sourceDataMapParams:{} |
| | | } |
| | |
| | | if (this.sourceData.oid.indexOf('@vcitreesep@') > -1) { |
| | | this.sourceData.oid = this.sourceData.oid.split('@vcitreesep@')[1]; |
| | | } |
| | | sourceDataMap.sourceBtmName = this.sourceBtmType;; |
| | | sourceDataMap.sourceBtmName = this.sourceBtmType; |
| | | ; |
| | | sourceDataMap.sourceOid = this.sourceData.oid; |
| | | } |
| | | for (let i in this.sourceData) { |
| | |
| | | queryRoot: true |
| | | }, this.params)).then(res => { |
| | | this.data = res.data.treeData; |
| | | this.checkDatas = []; |
| | | }).catch(error => { |
| | | this.$message.error(error); |
| | | }) |
| | |
| | | parentOid= parentOid.split('@vcitreesep@')[1]; |
| | | } |
| | | const parentBtmName = (node.level === 0) ? '' : node.data.attributes.btmname; |
| | | let params=this.params; |
| | | if(parentOid===0){ |
| | | //params.queryRoot=true; |
| | | } |
| | | getTree(parentOid,parentBtmName,this.params).then(res => { |
| | | resolve(res.data.treeData) |
| | | }).catch(error => { |
| | |
| | | this.checkDatas=[data]; |
| | | } |
| | | }, |
| | | clickNode(data, node) { |
| | | this.currentClickNode = node; |
| | | }, |
| | | handleRefresh(){ |
| | | if (!this.lazy) { |
| | | this.initData(); |
| | | } else { |
| | | if (this.currentClickNode) { |
| | | let node = this.currentClickNode.parent; |
| | | node.loaded = false; |
| | | node.expand(); |
| | | } |
| | | } |
| | | this.checkDatas = []; |
| | | } |
| | | }, |
| | | } |