master
luoJunYong.123 3 years ago
parent ec36d948f2
commit a8ff72aa41
  1. 23
      src/views/Transaction.vue

@ -425,18 +425,22 @@ export default {
let startId = idArr.shift()
let findOut = null
let testObj = null
for(let i=0; i<list.length; i++) {
if(list[i].id == startId) {
findOut = this.cxk(idArr, list[i])
testObj = list[i]
findOut = this.cxk(idArr, list[i], testObj)
// item.operationIData.push(findOut)
}
}
console.log('testObj')
console.log(testObj)
this.operationIData.push(findOut)
for (let a=0;a<this.operationIData.length;a++){
console.log(a+1)
this.operationIData[a].nub = 'aaa'
}
console.log(this.operationIData)
// for (let a=0;a<this.operationIData.length;a++){
// console.log(a+1)
// this.operationIData[a].nub = 'aaa'
// }
// console.log(this.operationIData)
// console.log(item.operationIData)
// this.$nextTick(() => {
// this.$refs[`tree-${index}`].setCheckedKeys([item.operationIds]);
@ -454,14 +458,17 @@ export default {
// console.log(err);
});
},
cxk(arr, obj) {
cxk(arr, obj, needObj) {
if(arr.length === 0) {
return obj
}
// console.log('arr')
// console.log(arr)
this.operationIData.push(obj)
let findIt = arr.shift()
let tmp = obj.children.find(item => item.id == findIt)
return this.cxk(arr, tmp)
needObj.children = obj.children.filter(item => item.id == findIt)
return this.cxk(arr, tmp, needObj.children[0])
},
//1.+-
scrollToDepTree(deptCode){

Loading…
Cancel
Save