diff --git a/src/App.vue b/src/App.vue index cdabd52..5ee9392 100644 --- a/src/App.vue +++ b/src/App.vue @@ -22,7 +22,9 @@ body { margin: 0; background-color: #f8f7f7; } - +/deep/.el-tree-node__content { + height: 20px!important; +} #nav { padding: 30px; } diff --git a/src/components/myTree/src/tree.vue b/src/components/myTree/src/tree.vue index 44cf9f4..4362231 100644 --- a/src/components/myTree/src/tree.vue +++ b/src/components/myTree/src/tree.vue @@ -486,7 +486,6 @@ }, mounted() { - console.log(this.data) this.initTabIndex(); this.$el.addEventListener('keydown', this.handleKeydown); }, diff --git a/src/views/Catalog.vue b/src/views/Catalog.vue index 3808158..283a999 100644 --- a/src/views/Catalog.vue +++ b/src/views/Catalog.vue @@ -214,12 +214,15 @@ export default { margin: 0 50px; } /deep/ .el-tree-node:focus > .el-tree-node__content { + height: 20px!important; background-color: #f5f2ff; } /deep/ .el-tree-node__content:hover { + height: 20px!important; background-color: #f5f2ff; } /deep/ .el-tree-node__label:active { + height: 20px!important; color: #9278ff; } // 第一部分 diff --git a/src/views/Transaction.vue b/src/views/Transaction.vue index 0c54ead..1fbef06 100644 --- a/src/views/Transaction.vue +++ b/src/views/Transaction.vue @@ -69,9 +69,9 @@ + + @@ -395,16 +399,6 @@ export default { if (item.operationIds) { this.$nextTick(() => { this.$refs[`tree-${index}`].setCheckedKeys([item.operationIds]); - for (var i=0;i0){ - let children = this.treeData[i].children - for (var j=0;j0) { - let childrens = children[i].children - } - } - } - } // let currentNode = this.$refs[`tree-${index}`].getNode([item]); // while ( parentLevel>0)//包含一级节点,因为一级节点有多个,如果是一级节点有一个,那这个判断就是while ( 1!=parentLevel) // let dom = document.querySelector("#divTree") @@ -426,7 +420,7 @@ export default { this.$message.warning(res.message); } }).catch(err => { - console.log(err); + // console.log(err); }); }, //计算此节点的距离思路1.计算出当前节点据顶部的高度+当前节点在树的位置的高度-盒子高度的一半 @@ -486,12 +480,23 @@ export default { this.$set(this.tableData, index, item); } }).catch(err => { - console.log(err); + // console.log(err); }); }, handleCheckChange(data, checked, indeterminate, row, index) { // 处理勾选 + console.log('---') + console.log(this.checkChange) this.checkChange[this.checkChange.length -1 ] = true this.checkChange.push(false) + let divTree = '#divTree'+index; + let dom = document.querySelector(divTree) + let depTree = '#depTree'+index; + let dom1 = document.querySelector(depTree) + let nodeHight =26 + dom1.style.height = (data.number * nodeHight) + "px" + let contHeight=(data.number * nodeHight)//总高度,盒子高度的一半 + dom.scrollTo(0, contHeight) + this.checkChange = true if (checked && data.isNode === 1) { this.tableData[index].operationIds = data.id; // 操作id串 // for () @@ -525,7 +530,7 @@ export default { this.$message.warning(res.message); } }).catch(err => { - console.log(err); + // console.log(err); }); }, toTreeId(data, parentId) { // id重新串连成(父+子+孙),已便达到树节点需要的key唯一性,且后面提交数据,需要传这个id串到后台 @@ -563,7 +568,7 @@ export default { this.isNameRepeat = true; } }).catch(err => { - console.log(err); + // console.log(err); }); } }, @@ -641,7 +646,7 @@ export default { this.$message.warning(res.message); } }).catch(err => { - console.log(err); + // console.log(err); }); } else if (this.isEdit) { // 编辑判分点 this.$post(this.api.updateJudgmentPoint, this.formData).then(res => { @@ -652,7 +657,7 @@ export default { this.$message.warning(res.message); } }).catch(err => { - console.log(err); + // console.log(err); }); } }, @@ -813,7 +818,11 @@ export default { } }; - +