|
@@ -604,14 +604,26 @@ export default {
|
|
|
item => item.relation_data == column.property
|
|
|
)[0]
|
|
|
if (clickBtn) {
|
|
|
- const { open_method, route_info, pass_parameters } = clickBtn
|
|
|
+ const { open_method, route_info, pass_parameters, relation_data } = clickBtn
|
|
|
if (open_method == 2) {
|
|
|
if (pass_parameters) {
|
|
|
const query = pass_parameters.split(',')
|
|
|
const obj = {}
|
|
|
- query.forEach(item => {
|
|
|
- obj[item] = row[item]
|
|
|
+ query.forEach(key => {
|
|
|
+ obj[key] = row[key]
|
|
|
})
|
|
|
+ if (relation_data === 'Inbound_flight_number') {
|
|
|
+ obj.outAirport = obj.inbound_flights_departure_airport
|
|
|
+ obj.landAirport = obj.current_airport
|
|
|
+ delete obj.current_airport
|
|
|
+ delete obj.inbound_flights_departure_airport
|
|
|
+ }
|
|
|
+ if (relation_data === 'departure_flights_number') {
|
|
|
+ obj.outAirport = obj.current_airport
|
|
|
+ obj.landAirport = obj.departure_flights_destination_airport
|
|
|
+ delete obj.current_airport
|
|
|
+ delete obj.departure_flights_destination_airport
|
|
|
+ }
|
|
|
this.$router.push({
|
|
|
path: route_info,
|
|
|
query: obj,
|
|
@@ -628,9 +640,20 @@ export default {
|
|
|
exportToExcel(table, `${this.downName || this.AqueryParams.auth_name}`, fileName)
|
|
|
},
|
|
|
formatter (row, column, cellValue, index) {
|
|
|
- const sameColumn = this.tableCols.find(
|
|
|
- col => col.columnName === column.property
|
|
|
- )
|
|
|
+ let sameColumn = null
|
|
|
+ this.tableCols.some(col => {
|
|
|
+ if (col.columnName === column.property) {
|
|
|
+ sameColumn = col
|
|
|
+ return true
|
|
|
+ } else if (col.children) {
|
|
|
+ col.children.some(childCol => {
|
|
|
+ if (childCol.columnName === column.property) {
|
|
|
+ sameColumn = childCol
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
if (sameColumn && this.fromDataType(sameColumn.dataType) === 'datetime') {
|
|
|
return (cellValue ?? '').replace('T', ' ')
|
|
|
}
|