console.log(this.oneAgData['Detail']); this.DetailFirstColumn = []; this.DetailSecondColumn = []; // this.DetailThirdlyColumn = []; for (var j = 0; j < this.oneAgData['Detail'].length; j++) { //--循环所有的列 if (j % 3 == 0) { this.DetailFirstColumn.push(this.oneAgData['Detail'][j]); } else if (j % 3 == 1) { let obj = {}; for (let k in this.oneAgData['Detail'][j]) { obj[k + '1'] = this.oneAgData['Detail'][j][k]; } this.DetailFirstColumn.push(obj); } else if (j % 3 == 2) { let obj = {}; for (let k in this.oneAgData['Detail'][j]) { obj[k + '2'] = this.oneAgData['Detail'][j][k]; } this.DetailFirstColumn.push(obj); } } console.log(this.DetailFirstColumn); for (let i = 0; i < this.DetailFirstColumn.length; i++) { if (i % 3 == 0) { this.DetailSecondColumn.push(this.DetailFirstColumn[i]); } else if (i % 3 == 1) { Object.assign(this.DetailSecondColumn[this.DetailSecondColumn.length - 1], this.DetailFirstColumn[i]); } else if (i % 3 == 2) { Object.assign(this.DetailSecondColumn[this.DetailSecondColumn.length - 1], this.DetailFirstColumn[i]); } } console.log(this.DetailSecondColumn);