...
|
...
|
@@ -98,9 +98,6 @@ |
|
|
},
|
|
|
btnStatus: true,
|
|
|
listLoading: false,
|
|
|
countryOption: [],
|
|
|
countryList: [],
|
|
|
countryResultList: [],
|
|
|
airportList:[],
|
|
|
airportResultCode: [],
|
|
|
airportCode: [],
|
...
|
...
|
@@ -127,15 +124,9 @@ |
|
|
mounted() {
|
|
|
// 延迟加载,否则会出错
|
|
|
setTimeout(() => {
|
|
|
|
|
|
this.countryResultList = this.countryList.map(item => {
|
|
|
return {value: item.countryCode, label: item.countryNameCn}
|
|
|
})
|
|
|
|
|
|
this.airportResultCode = this.airportCode.map(item =>{
|
|
|
return {label: item.airportdescchn,value: item.airportid}
|
|
|
})
|
|
|
console.log(this.airportResultCode)
|
|
|
}, 6000)
|
|
|
},
|
|
|
computed:{
|
...
|
...
|
@@ -223,25 +214,12 @@ |
|
|
})
|
|
|
},
|
|
|
remoteMethod(query) {
|
|
|
// if (query !== '') {
|
|
|
// this.listLoading = true
|
|
|
// setTimeout(() => {
|
|
|
// this.listLoading = false
|
|
|
// this.countryOption = this.countryResultList.filter(item => {
|
|
|
// return item.value.toUpperCase().trim()
|
|
|
// .indexOf(query.toUpperCase()) > -1
|
|
|
// })
|
|
|
// }, 200)
|
|
|
// } else {
|
|
|
// this.countryOption = []
|
|
|
// }
|
|
|
if (query !== '') {
|
|
|
this.listLoading = true
|
|
|
setTimeout(() => {
|
|
|
this.listLoading = false
|
|
|
this.airportCode = this.airportResultCode.filter(item => {
|
|
|
return item.value.toUpperCase().trim()
|
|
|
.indexOf(query.toUpperCase()) > -1
|
|
|
return item.value.trim().indexOf(query.toUpperCase()) > -1
|
|
|
})
|
|
|
}, 200)
|
|
|
} else {
|
...
|
...
|
|