修改自动定位bug

master
e 3 years ago
parent 96cd76b123
commit 175e1c9b12
  1. 4
      src/App.vue
  2. 3
      src/views/Catalog.vue
  3. 38
      src/views/Transaction.vue

@ -22,7 +22,9 @@ body {
margin: 0; margin: 0;
background-color: #f8f7f7; background-color: #f8f7f7;
} }
/deep/.el-tree-node__content {
height: 20px!important;
}
#nav { #nav {
padding: 30px; padding: 30px;
} }

@ -214,12 +214,15 @@ export default {
margin: 0 50px; margin: 0 50px;
} }
/deep/ .el-tree-node:focus > .el-tree-node__content { /deep/ .el-tree-node:focus > .el-tree-node__content {
height: 20px!important;
background-color: #f5f2ff; background-color: #f5f2ff;
} }
/deep/ .el-tree-node__content:hover { /deep/ .el-tree-node__content:hover {
height: 20px!important;
background-color: #f5f2ff; background-color: #f5f2ff;
} }
/deep/ .el-tree-node__label:active { /deep/ .el-tree-node__label:active {
height: 20px!important;
color: #9278ff; color: #9278ff;
} }
// //

@ -69,9 +69,9 @@
<template slot-scope="scope" v-if="scope.row.isSubject"> <template slot-scope="scope" v-if="scope.row.isSubject">
<p class="p">操作一致性规则用户完成的功能操作与下方设置的操作点一致</p> <p class="p">操作一致性规则用户完成的功能操作与下方设置的操作点一致</p>
<div class="tree-con"> <div class="tree-con">
<div class="block1" id="divTree"> <div class="block1" :id="'divTree'+scope.$index">
<my-tree <my-tree
id="depTree" :id="'depTree'+scope.$index"
class="action" class="action"
:ref="'tree-'+scope.$index" :ref="'tree-'+scope.$index"
:data="treeData" :data="treeData"
@ -394,16 +394,6 @@ export default {
if (item.operationIds) { if (item.operationIds) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs[`tree-${index}`].setCheckedKeys([item.operationIds]); this.$refs[`tree-${index}`].setCheckedKeys([item.operationIds]);
for (var i=0;i<this.treeData.length;i++){
if (this.treeData[i].children>0){
let children = this.treeData[i].children
for (var j=0;j<children.length;j++){
if (children[j].children>0) {
let childrens = children[i].children
}
}
}
}
// let currentNode = this.$refs[`tree-${index}`].getNode([item]); // let currentNode = this.$refs[`tree-${index}`].getNode([item]);
// while ( parentLevel>0)//while ( 1!=parentLevel) // while ( parentLevel>0)//while ( 1!=parentLevel)
// let dom = document.querySelector("#divTree") // let dom = document.querySelector("#divTree")
@ -425,7 +415,7 @@ export default {
this.$message.warning(res.message); this.$message.warning(res.message);
} }
}).catch(err => { }).catch(err => {
console.log(err); // console.log(err);
}); });
}, },
//1.+- //1.+-
@ -485,10 +475,22 @@ export default {
this.$set(this.tableData, index, item); this.$set(this.tableData, index, item);
} }
}).catch(err => { }).catch(err => {
console.log(err); // console.log(err);
}); });
}, },
handleCheckChange(data, checked, indeterminate, row, index) { // handleCheckChange(data, checked, indeterminate, row, index) { //
console.log('=================')
let divTree = '#divTree'+index;
let dom = document.querySelector(divTree)
let depTree = '#depTree'+index;
let dom1 = document.querySelector(depTree)
let nodeHight =20
dom1.style.height = (data.number * nodeHight) + "px"
let contHeight=(data.number * nodeHight)//,
console.log(contHeight)
dom.scrollTo(0, contHeight)
console.log(data)
console.log('=================')
this.checkChange = true this.checkChange = true
if (checked && data.isNode === 1) { if (checked && data.isNode === 1) {
this.tableData[index].operationIds = data.id; // id this.tableData[index].operationIds = data.id; // id
@ -523,7 +525,7 @@ export default {
this.$message.warning(res.message); this.$message.warning(res.message);
} }
}).catch(err => { }).catch(err => {
console.log(err); // console.log(err);
}); });
}, },
toTreeId(data, parentId) { // id++,便key,id toTreeId(data, parentId) { // id++,便key,id
@ -561,7 +563,7 @@ export default {
this.isNameRepeat = true; this.isNameRepeat = true;
} }
}).catch(err => { }).catch(err => {
console.log(err); // console.log(err);
}); });
} }
}, },
@ -639,7 +641,7 @@ export default {
this.$message.warning(res.message); this.$message.warning(res.message);
} }
}).catch(err => { }).catch(err => {
console.log(err); // console.log(err);
}); });
} else if (this.isEdit) { // } else if (this.isEdit) { //
this.$post(this.api.updateJudgmentPoint, this.formData).then(res => { this.$post(this.api.updateJudgmentPoint, this.formData).then(res => {
@ -650,7 +652,7 @@ export default {
this.$message.warning(res.message); this.$message.warning(res.message);
} }
}).catch(err => { }).catch(err => {
console.log(err); // console.log(err);
}); });
} }
}, },

Loading…
Cancel
Save