|
@@ -136,7 +136,7 @@ const { trackAirlines, trackBoxStyle } = useTrackData(props.name, trackData)
|
|
|
const tableData = computed(() =>
|
|
|
trackData.value.reduce((data, current) => {
|
|
|
const sameRow = data.find(row =>
|
|
|
- ['stockCode', 'flightNO', 'flightDate', 'ULDNO', 'CargoSN'].every(
|
|
|
+ ['stockCode', 'flightNO', 'flightDate', 'CargoSN'].every(
|
|
|
key => row[key] === current[key]
|
|
|
)
|
|
|
)
|
|
@@ -163,6 +163,25 @@ const tableData = computed(() =>
|
|
|
}\n${execTime ?? ''}`
|
|
|
if (sameRow) {
|
|
|
sameRow[String(nodeCode)] = nodeValue
|
|
|
+ ;[
|
|
|
+ 'ULDNO',
|
|
|
+ // 'CargoSN'
|
|
|
+ ].forEach(key => {
|
|
|
+ const oldValue = sameRow[key]
|
|
|
+ const currentValue = current[key]
|
|
|
+ if (typeof currentValue === 'string' && currentValue !== oldValue) {
|
|
|
+ if (typeof oldValue === 'string') {
|
|
|
+ sameRow[key] = [
|
|
|
+ ...new Set([...oldValue.split(','), ...currentValue.split(',')]),
|
|
|
+ ].join(',')
|
|
|
+ } else {
|
|
|
+ sameRow[key] = currentValue
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ ;['pullMark', 'returnMark'].forEach(key => {
|
|
|
+ sameRow[key] = sameRow[key] ?? current[key]
|
|
|
+ })
|
|
|
} else {
|
|
|
data.push({
|
|
|
...current,
|