|
@@ -63,6 +63,7 @@
|
|
|
show-summary
|
|
|
:cell-class-name="cellClass"
|
|
|
:summary-method="summaryRow(tableData.length)"
|
|
|
+ :span-method="objectSpanMethod"
|
|
|
@cell-click="cellClickHandler"
|
|
|
>
|
|
|
<el-table-column
|
|
@@ -688,11 +689,7 @@ export default {
|
|
|
this.$refs['dialog'].focus()
|
|
|
},
|
|
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
- if (
|
|
|
- ['FlightDate', 'DepartureTime', 'SourceAirport', 'TargetAirport', 'PassengerNameUpcase', 'BagWeight'].includes(
|
|
|
- column.property
|
|
|
- )
|
|
|
- ) {
|
|
|
+ if (['PassengerNameUpcase', 'BagWeight'].includes(column.property)) {
|
|
|
const _row = this.spanArr[rowIndex]
|
|
|
const _col = _row > 0 ? 1 : 0
|
|
|
return {
|
|
@@ -917,7 +914,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- const tableData = this._.sortBy(result, ['FlightNO', 'FlightDate', 'BagSN'])
|
|
|
+ const tableData = this._.sortBy(result, ['FlightDate', 'FlightNO', 'PassengerNameUpcase'])
|
|
|
this.spanArr = []
|
|
|
let contactDot = this.contactDot
|
|
|
this.tableData = tableData.map((item, index, arr) => {
|
|
@@ -927,7 +924,12 @@ export default {
|
|
|
if (index === 0) {
|
|
|
this.spanArr.push(1)
|
|
|
} else {
|
|
|
- if (item.FlightNO === arr[index - 1].FlightNO && item.FlightDate === arr[index - 1].FlightDate) {
|
|
|
+ // if (item.FlightNO === arr[index - 1].FlightNO && item.FlightDate === arr[index - 1].FlightDate) {
|
|
|
+ if (
|
|
|
+ item['FlightNO'] === arr[index - 1]['FlightNO'] &&
|
|
|
+ item['FlightDate'] === arr[index - 1]['FlightDate'] &&
|
|
|
+ item['PassengerNameUpcase'] === arr[index - 1]['PassengerNameUpcase']
|
|
|
+ ) {
|
|
|
this.spanArr[contactDot] += 1
|
|
|
this.spanArr.push(0)
|
|
|
} else {
|