|
@@ -149,9 +149,8 @@
|
|
|
:span="6"
|
|
|
>
|
|
|
<div class="card">
|
|
|
- <!-- <div class="message-date">{{ message.date }}</div> -->
|
|
|
<div class="message-content">
|
|
|
- {{ message }}
|
|
|
+ {{ message.replace(/\s+/g, "").split(".").join("\n.") }}
|
|
|
<!-- BSM <br>
|
|
|
.V/1LHRB <br>
|
|
|
.F/XX1640/08APR/PEK/Y <br>
|
|
@@ -216,6 +215,7 @@
|
|
|
import Dialog from '@/layout/components/Dialog/index.vue'
|
|
|
import { queryMap, myQuery } from '@/api/dataIntegration'
|
|
|
import tableColsMixin from '../../mixins/tableCols'
|
|
|
+import { getQuery } from '@/api/flight'
|
|
|
|
|
|
export default {
|
|
|
name: 'BaggageView',
|
|
@@ -392,7 +392,8 @@ export default {
|
|
|
baggageTableData: [],
|
|
|
spanArr: [],
|
|
|
pos: 0,
|
|
|
- loopEvent: null
|
|
|
+ loopEvent: null,
|
|
|
+ msgEvent:null
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -407,15 +408,20 @@ export default {
|
|
|
},
|
|
|
watch: {
|
|
|
infoBtn(val) {
|
|
|
+ let that = this;
|
|
|
if (val === '跟踪报文') {
|
|
|
- const that = this
|
|
|
- this.getMessage()
|
|
|
- this.queryMessageLoop = setInterval(function () {
|
|
|
- that.getMessage()
|
|
|
+ clearInterval(this.loopEvent);
|
|
|
+ this.baggageMessageQuery()
|
|
|
+ this.msgEvent = setInterval(function(){
|
|
|
+ that.baggageMessageQuery()
|
|
|
+ },5000)
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ clearInterval(this.loopEvent);
|
|
|
+ this.queryBaggageAll()
|
|
|
+ this.loopEvent = setInterval(function () {
|
|
|
+ that.queryBaggageAll()
|
|
|
}, 3000)
|
|
|
- } else {
|
|
|
- clearInterval(this.queryMessageLoop)
|
|
|
- this.queryMessageLoop = null
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -425,7 +431,7 @@ export default {
|
|
|
const that = this
|
|
|
this.queryBaggageAll()
|
|
|
this.loopEvent = setInterval(function () {
|
|
|
- that.queryBaggageAll()
|
|
|
+ that.queryBaggageAll()
|
|
|
}, 3000)
|
|
|
},
|
|
|
beforeDestroy() {
|
|
@@ -522,7 +528,7 @@ export default {
|
|
|
DealTime: item.dealTime.replace('T', '\n')
|
|
|
})
|
|
|
if (item['dealTime'].split('T').length > 1) {
|
|
|
- item['dealTime'] = item['dealTime'].split('T')[1]
|
|
|
+ item['dealTime'] = item['dealTime'].split('T')[1]
|
|
|
}
|
|
|
item['departureAirport'] = `${item['departureAirport']}\n${item['departureTime'].split('T')[1]}`
|
|
|
item['landingAirport'] = `${item['landingAirport']}\n${item['landingTime'].split('T')[1]}`
|
|
@@ -533,14 +539,22 @@ export default {
|
|
|
console.log('错误', error)
|
|
|
}
|
|
|
},
|
|
|
- async getMessage(queryData = this.queryData) {
|
|
|
- const { FlightNO, FlightDate, BagSN } = queryData
|
|
|
- const dataContent = [FlightNO, FlightDate, BagSN]
|
|
|
- try {
|
|
|
- const messageList = await this.queryMessage(dataContent)
|
|
|
- this.messageList = messageList
|
|
|
+ async baggageMessageQuery() {
|
|
|
+ const { FlightNO, FlightDate, BagSN } = this.queryData
|
|
|
+ let dataContent = [FlightNO,FlightDate,BagSN]
|
|
|
+ try {
|
|
|
+ const res = await getQuery({
|
|
|
+ id:75,
|
|
|
+ dataContent:dataContent
|
|
|
+ }
|
|
|
+ )
|
|
|
+ if (res.code == 0) {
|
|
|
+ this.messageList = res.returnData
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message)
|
|
|
+ }
|
|
|
} catch (error) {
|
|
|
- console.log('错误', error)
|
|
|
+ console.log('出错了', error)
|
|
|
}
|
|
|
}
|
|
|
}
|