|
|
@ -302,7 +302,7 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<template v-else-if="scope.row.type == 7"> |
|
|
|
<template v-else-if="scope.row.type == 7"> |
|
|
|
<div style="line-height: 65px">需点击</div> |
|
|
|
<div style="line-height: 65px">需点击7</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<template v-else> |
|
|
|
<template v-else> |
|
|
@ -343,6 +343,7 @@ export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
count: 0, |
|
|
|
count: 0, |
|
|
|
|
|
|
|
fromChange: -999, |
|
|
|
fromCountIndex: -999, |
|
|
|
fromCountIndex: -999, |
|
|
|
checkChange: [], |
|
|
|
checkChange: [], |
|
|
|
changeArr: [], |
|
|
|
changeArr: [], |
|
|
@ -488,17 +489,37 @@ export default { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleCheckChange(data, checked, indeterminate, row, index) { // 处理勾选 |
|
|
|
handleCheckChange(data, checked, indeterminate, row, index) { // 处理勾选 |
|
|
|
|
|
|
|
// console.log(this.fromChange) |
|
|
|
|
|
|
|
// console.log(row.operationIds) |
|
|
|
|
|
|
|
// console.log(checked) |
|
|
|
|
|
|
|
// console.log(this.count) |
|
|
|
|
|
|
|
// if(this.fromChange === row.operationIds) { |
|
|
|
|
|
|
|
// this.count++ |
|
|
|
|
|
|
|
// }else { |
|
|
|
|
|
|
|
// this.fromChange = row.operationIds |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// if(this.count === 2 || this.count === 0) { |
|
|
|
|
|
|
|
// this.checkChange.splice(index, 1, false) |
|
|
|
|
|
|
|
// this.count = 0; |
|
|
|
|
|
|
|
// }else { |
|
|
|
|
|
|
|
// this.checkChange.splice(index, 1, true) |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// if(this.fromChange === row.operationIds) { |
|
|
|
|
|
|
|
// this.count++ |
|
|
|
|
|
|
|
// this.checkChange.splice(index, 1, checked) |
|
|
|
|
|
|
|
// }else { |
|
|
|
|
|
|
|
// this.checkChange.splice(index, 1, true) |
|
|
|
|
|
|
|
// this.fromChange = row.operationIds |
|
|
|
|
|
|
|
// } |
|
|
|
this.changeArr.push(checked) |
|
|
|
this.changeArr.push(checked) |
|
|
|
|
|
|
|
console.log(this.changeArr) |
|
|
|
if(this.changeArr.length === 4) { |
|
|
|
if(this.changeArr.length === 4) { |
|
|
|
if(this.changeArr[0] && this.changeArr[2]) { |
|
|
|
this.checkChange.splice(index, 1, this.changeArr[2]) |
|
|
|
this.checkChange.splice(index, 1, true) |
|
|
|
this.changeArr.splice(0, this.changeArr.length) |
|
|
|
}else { |
|
|
|
}else if(this.changeArr.length === 2) { |
|
|
|
this.checkChange.splice(index, 1, false) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.changeArr.splice(0, 4) |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
this.checkChange.splice(index, 1, true) |
|
|
|
this.checkChange.splice(index, 1, true) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let divTree = '#divTree'+index; |
|
|
|
let divTree = '#divTree'+index; |
|
|
|
let dom = document.querySelector(divTree) |
|
|
|
let dom = document.querySelector(divTree) |
|
|
|
let depTree = '#depTree'+index; |
|
|
|
let depTree = '#depTree'+index; |
|
|
@ -523,6 +544,15 @@ export default { |
|
|
|
this.currentNodeData = {}; |
|
|
|
this.currentNodeData = {}; |
|
|
|
this.$refs[`tree-${index}`].setCheckedNodes([data]); |
|
|
|
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() { // 获取树结构数据 |
|
|
|
getTreeData() { // 获取树结构数据 |
|
|
@ -530,7 +560,6 @@ export default { |
|
|
|
if (res.status == 200 && res.list.length>0) { |
|
|
|
if (res.status == 200 && res.list.length>0) { |
|
|
|
if (res.list.length>0) { |
|
|
|
if (res.list.length>0) { |
|
|
|
this.treeData = this.toTreeId(res.list, res.list[0].parentId); |
|
|
|
this.treeData = this.toTreeId(res.list, res.list[0].parentId); |
|
|
|
console.log(this.treeData) |
|
|
|
|
|
|
|
if (this.$route.query.lcId) { |
|
|
|
if (this.$route.query.lcId) { |
|
|
|
this.lcId = this.$route.query.lcId; |
|
|
|
this.lcId = this.$route.query.lcId; |
|
|
|
this.getInfoData(this.$route.query.lcId); |
|
|
|
this.getInfoData(this.$route.query.lcId); |
|
|
@ -618,7 +647,7 @@ export default { |
|
|
|
id: "", |
|
|
|
id: "", |
|
|
|
lcId: i.lcId, |
|
|
|
lcId: i.lcId, |
|
|
|
itemId:'', |
|
|
|
itemId:'', |
|
|
|
type: i.type ? i.type : "", |
|
|
|
type: i.type ? i.type : "7", |
|
|
|
operationIds: i.operationIds, |
|
|
|
operationIds: i.operationIds, |
|
|
|
resultOperation: i.resultOperation, |
|
|
|
resultOperation: i.resultOperation, |
|
|
|
ruleOperation: i.ruleOperation |
|
|
|
ruleOperation: i.ruleOperation |
|
|
|