master
yujialong 3 years ago
commit 96321ead83
  1. 83
      src/views/Transaction.vue

@ -375,10 +375,6 @@ export default {
});
this.getTreeData();
if (this.$route.query.lcId) {
this.lcId = this.$route.query.lcId;
this.getInfoData(this.$route.query.lcId);
}
if (this.$route.query.systemId) {
this.formData.lcJudgmentPoint.systemId = this.$route.query.systemId;
}
@ -396,54 +392,31 @@ export default {
this.anewPosttingData(judgmentRuleList)
this.tableData.forEach(async (item, index) => {
//
console.log(item.operationIds)
if (item.operationIds) {
this.$nextTick(() => {
this.$refs[`tree-${index}`].setCheckedKeys([item.operationIds]);
let currentNode = this.$refs[`tree-${index}`].getNode([item]);
let parentLevel
let nodeCount = 1//
let nodeIndex = 1//
let dataIndex; //
for ( let i=0; i<this.treeData.length; i++){
if(this.treeData[i].children !=null){//
if(this.treeData[i].children==this.treeData[i].children){ //this.orgListLine[i].orgCodeorgCodethis.orgListLine[i].orgCodeorgCode()
dataIndex =i
}
}
if(this.treeData[i].children==item.operationIds){ //
dataIndex =i
}
}
console.log(dataIndex)
let topHeight=dataIndex*20;//
if(currentNode){
let currentNodeOrgCode= currentNode&&currentNode.children.operationIds;
//nodeCountnodeIndex
do {
currentNode = currentNode.parent
parentLevel = currentNode.level
let childNodes = currentNode.childNodes
nodeCount += childNodes.length
for (let i = 0; i < childNodes.length; i ++) {
if (childNodes[i].data.children == currentNodeOrgCode) {
nodeIndex += (i + 1)
}
}
currentNodeOrgCode = currentNode.children.operationIds
}
while ( parentLevel>0)//while ( 1!=parentLevel)
let dom = document.querySelector("#divTree")
let dom1 = document.querySelector("#depTree")
//26px,
let nodeHight =26
dom1.style.height = (nodeCount * nodeHight) + "px"
let contHeight=(nodeIndex * nodeHight)+topHeight-300//,
dom.scrollTo(0, contHeight)
}
console.log(this.$refs[`tree-${index}`].getCheckedNodes(true))
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]);
// while ( parentLevel>0)//while ( 1!=parentLevel)
// let dom = document.querySelector("#divTree")
// let dom1 = document.querySelector("#depTree")
// //26px,
// let nodeHight =26
// dom1.style.height = (nodeCount * nodeHight) + "px"
// let contHeight=(nodeIndex * nodeHight)+topHeight-300//,
// dom.scrollTo(0, contHeight)
// this.scrollToDepTree(item.operationIds)
});
})
}
// id,
if (item.isSubject && item.type && item.type != 4 && item.emptyOne) {
@ -526,6 +499,7 @@ export default {
this.checkChange = true
if (checked && data.isNode === 1) {
this.tableData[index].operationIds = data.id; // id
// for ()
row.value1 = "";
row.value2 = "";
row.value3 = "";
@ -539,18 +513,25 @@ export default {
row.type = "";
this.currentNodeData = {};
this.$refs[`tree-${index}`].setCheckedNodes([data]);
}
}
},
getTreeData() { //
console.log('getTreeData')
this.$get(this.api.getLcRecord).then(res => {
if (res.status === 200 && res.list) {
if (res.list.length) {
console.log(res)
if (res.status == 200 && res.list.length>0) {
if (res.list.length>0) {
this.treeData = this.toTreeId(res.list, res.list[0].parentId);
<<<<<<< HEAD
console.log('---this.treeData')
console.log(this.treeData)
=======
if (this.$route.query.lcId) {
this.lcId = this.$route.query.lcId;
this.getInfoData(this.$route.query.lcId);
}
>>>>>>> ec22a93db6e0a2fc0e096d7988bd1adb8413af1a
}
} else {
console.log('---this.treeData拿取失败')

Loading…
Cancel
Save