|
|
|
@ -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: ""}); |
|
|
|
|