|
|
@ -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" |
|
|
@ -301,8 +301,12 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template v-else-if="scope.row.type == 7"> |
|
|
|
|
|
|
|
<div style="line-height: 65px">需</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<template v-else> |
|
|
|
<template v-else> |
|
|
|
<div style="line-height: 65px">{{ checkChange[scope.$index]? '需点击' : '' }}</div> |
|
|
|
<div style="line-height: 65px">{{ checkChange[scope.$index]? '需点击222' : checkChange[scope.$index] }}</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
@ -395,16 +399,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") |
|
|
@ -426,7 +420,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.计算出当前节点据顶部的高度+当前节点在树的位置的高度-盒子高度的一半 |
|
|
@ -486,12 +480,23 @@ 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('---') |
|
|
|
|
|
|
|
console.log(this.checkChange) |
|
|
|
this.checkChange[this.checkChange.length -1 ] = true |
|
|
|
this.checkChange[this.checkChange.length -1 ] = true |
|
|
|
this.checkChange.push(false) |
|
|
|
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) { |
|
|
|
if (checked && data.isNode === 1) { |
|
|
|
this.tableData[index].operationIds = data.id; // 操作id串 |
|
|
|
this.tableData[index].operationIds = data.id; // 操作id串 |
|
|
|
// for () |
|
|
|
// for () |
|
|
@ -525,7 +530,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串到后台 |
|
|
@ -563,7 +568,7 @@ export default { |
|
|
|
this.isNameRepeat = true; |
|
|
|
this.isNameRepeat = true; |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => { |
|
|
|
console.log(err); |
|
|
|
// console.log(err); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -641,7 +646,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 => { |
|
|
@ -652,7 +657,7 @@ export default { |
|
|
|
this.$message.warning(res.message); |
|
|
|
this.$message.warning(res.message); |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => { |
|
|
|
console.log(err); |
|
|
|
// console.log(err); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -813,7 +818,11 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
<style> |
|
|
|
|
|
|
|
.el-tree-node__content { |
|
|
|
|
|
|
|
height: 26Px!important; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
</style> |
|
|
|
<style lang="scss" scoped> |
|
|
|
<style lang="scss" scoped> |
|
|
|
.content { |
|
|
|
.content { |
|
|
|
position: relative; |
|
|
|
position: relative; |
|
|
|