|
|
@ -94,14 +94,14 @@ export default { |
|
|
|
"ContrastOrderResponse-WeiQi", |
|
|
|
], |
|
|
|
loading: false, |
|
|
|
mergeNum: 0, |
|
|
|
mergeArray: [], |
|
|
|
} |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
activeName: { |
|
|
|
handler (data) { |
|
|
|
if (data === 'secord' && this.paymentClickToggle === 2) { |
|
|
|
this.getList() |
|
|
|
this.getList() |
|
|
|
} |
|
|
|
}, |
|
|
|
deep: true |
|
|
@ -111,17 +111,13 @@ export default { |
|
|
|
// 合并单元格 |
|
|
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
|
|
|
if (columnIndex < 10) { |
|
|
|
if (rowIndex % (this.mergeNum) === 0) { |
|
|
|
return { |
|
|
|
rowspan: this.mergeNum, |
|
|
|
colspan: 1, |
|
|
|
} |
|
|
|
} else { |
|
|
|
return { |
|
|
|
rowspan: 0, |
|
|
|
colspan: 0, |
|
|
|
} |
|
|
|
} |
|
|
|
const _row = this.mergeArray[rowIndex] |
|
|
|
const _col = _row > 0 ? 1 : 0; |
|
|
|
// console.log(`rowspan:${_row} colspan:${_col}`); |
|
|
|
return { |
|
|
|
rowspan: _row, |
|
|
|
colspan: _col |
|
|
|
}; |
|
|
|
} |
|
|
|
}, |
|
|
|
// 获取列表 |
|
|
@ -131,7 +127,9 @@ export default { |
|
|
|
this.loading = false |
|
|
|
if (code === 200) { |
|
|
|
this.tableData = data || [] |
|
|
|
this.mergeNum = data[0]['ContrastOrderResponse-List'] |
|
|
|
this.tableData.forEach(el => { |
|
|
|
this.mergeArray.push(el['ContrastOrderResponse-List']) |
|
|
|
}) |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.loading = false |
|
|
|