树控件自动定位到默认选中的位置bug

master
e 3 years ago
parent 502ae60db5
commit 84bad8865d
  1. 22
      src/views/Transaction.vue

@ -485,16 +485,6 @@ export default {
});
},
handleCheckChange(data, checked, indeterminate, row, index) { //
this.checkChange.splice(index, 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)
if (checked && data.isNode === 1) {
this.tableData[index].operationIds = data.id; // id
// for ()
@ -511,6 +501,15 @@ export default {
this.currentNodeData = {};
this.$refs[`tree-${index}`].setCheckedNodes([data]);
}
let divTree = '#divTree'+index;
let dom = document.querySelector(divTree)
let depTree = '#depTree'+index;
let dom1 = document.querySelector(depTree)
let nodeHight =26
dom.scrollTo(0, 26)
dom1.style.height = (data.number * nodeHight) + "px"
let contHeight=(data.number * nodeHight)//,
dom.scrollTo(0, contHeight)
}
},
getTreeData() { //
@ -518,7 +517,6 @@ export default {
if (res.status == 200 && res.list.length>0) {
if (res.list.length>0) {
this.treeData = this.toTreeId(res.list, res.list[0].parentId);
console.log(this.treeData)
if (this.$route.query.lcId) {
this.lcId = this.$route.query.lcId;
this.getInfoData(this.$route.query.lcId);
@ -660,7 +658,7 @@ export default {
}
},
addRule() { //
if(!this.isAddRule) {
this.isAddRule = true;
// this.tableData.length && this.tableData.push({ruleOperation: 0, indexNo: ""});

Loading…
Cancel
Save