master
e 3 years ago
parent b7e4ae25be
commit 88677dcf95
  1. 16
      src/views/Transaction.vue

@ -416,8 +416,10 @@ export default {
this.tableData.forEach(async (item, index) => { this.tableData.forEach(async (item, index) => {
// //
if (item.operationIds) { if (item.operationIds) {
this.operationIData = []
let list = this.treeData let list = this.treeData
let idstr = item.operationIds let idstr = item.operationIds
item.operationIData = []
let idArr = idstr.split(',') let idArr = idstr.split(',')
idArr.shift() idArr.shift()
let startId = idArr.shift() let startId = idArr.shift()
@ -426,10 +428,16 @@ export default {
for(let i=0; i<list.length; i++) { for(let i=0; i<list.length; i++) {
if(list[i].id == startId) { if(list[i].id == startId) {
findOut = this.cxk(idArr, list[i]) findOut = this.cxk(idArr, list[i])
// item.operationIData.push(findOut)
} }
} }
item.operationIName = findOut
console.log(findOut) 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.$nextTick(() => {
// this.$refs[`tree-${index}`].setCheckedKeys([item.operationIds]); // this.$refs[`tree-${index}`].setCheckedKeys([item.operationIds]);
// }) // })
@ -450,9 +458,7 @@ export default {
if(arr.length === 0) { if(arr.length === 0) {
return obj return obj
} }
let nameArr = [] this.operationIData.push(obj)
nameArr.push(obj)
console.log(nameArr)
let findIt = arr.shift() let findIt = arr.shift()
let tmp = obj.children.find(item => item.id == findIt) let tmp = obj.children.find(item => item.id == findIt)
return this.cxk(arr, tmp) return this.cxk(arr, tmp)

Loading…
Cancel
Save