master
e 3 years ago
parent 708a6e5252
commit 3ba47a3a2c
  1. 31
      src/views/Transaction.vue

@ -416,9 +416,23 @@ export default {
this.tableData.forEach(async (item, index) => {
//
if (item.operationIds) {
this.$nextTick(() => {
this.$refs[`tree-${index}`].setCheckedKeys([item.operationIds]);
})
let list = this.treeData
let idstr = item.operationIds
let idArr = idstr.split(',')
idArr.shift()
let startId = idArr.shift()
let findOut = null
for(let i=0; i<list.length; i++) {
if(list[i].id == startId) {
findOut = this.cxk(idArr, list[i])
}
}
item.operationIName = findOut
console.log(findOut)
// this.$nextTick(() => {
// this.$refs[`tree-${index}`].setCheckedKeys([item.operationIds]);
// })
}
// id,
if (item.isSubject && item.type && item.type != 4 && item.emptyOne) {
@ -432,6 +446,17 @@ export default {
// console.log(err);
});
},
cxk(arr, obj) {
if(arr.length === 0) {
return obj
}
let nameArr = []
nameArr.push(obj)
console.log(nameArr)
let findIt = arr.shift()
let tmp = obj.children.find(item => item.id == findIt)
return this.cxk(arr, tmp)
},
//1.+-
scrollToDepTree(deptCode){

Loading…
Cancel
Save