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