|
@@ -98,9 +98,6 @@ |
|
@@ -98,9 +98,6 @@ |
98
|
},
|
98
|
},
|
99
|
btnStatus: true,
|
99
|
btnStatus: true,
|
100
|
listLoading: false,
|
100
|
listLoading: false,
|
101
|
- countryOption: [],
|
|
|
102
|
- countryList: [],
|
|
|
103
|
- countryResultList: [],
|
|
|
104
|
airportList:[],
|
101
|
airportList:[],
|
105
|
airportResultCode: [],
|
102
|
airportResultCode: [],
|
106
|
airportCode: [],
|
103
|
airportCode: [],
|
|
@@ -127,15 +124,9 @@ |
|
@@ -127,15 +124,9 @@ |
127
|
mounted() {
|
124
|
mounted() {
|
128
|
// 延迟加载,否则会出错
|
125
|
// 延迟加载,否则会出错
|
129
|
setTimeout(() => {
|
126
|
setTimeout(() => {
|
130
|
-
|
|
|
131
|
- this.countryResultList = this.countryList.map(item => {
|
|
|
132
|
- return {value: item.countryCode, label: item.countryNameCn}
|
|
|
133
|
- })
|
|
|
134
|
-
|
|
|
135
|
this.airportResultCode = this.airportCode.map(item =>{
|
127
|
this.airportResultCode = this.airportCode.map(item =>{
|
136
|
return {label: item.airportdescchn,value: item.airportid}
|
128
|
return {label: item.airportdescchn,value: item.airportid}
|
137
|
})
|
129
|
})
|
138
|
- console.log(this.airportResultCode)
|
|
|
139
|
}, 6000)
|
130
|
}, 6000)
|
140
|
},
|
131
|
},
|
141
|
computed:{
|
132
|
computed:{
|
|
@@ -223,25 +214,12 @@ |
|
@@ -223,25 +214,12 @@ |
223
|
})
|
214
|
})
|
224
|
},
|
215
|
},
|
225
|
remoteMethod(query) {
|
216
|
remoteMethod(query) {
|
226
|
- // if (query !== '') {
|
|
|
227
|
- // this.listLoading = true
|
|
|
228
|
- // setTimeout(() => {
|
|
|
229
|
- // this.listLoading = false
|
|
|
230
|
- // this.countryOption = this.countryResultList.filter(item => {
|
|
|
231
|
- // return item.value.toUpperCase().trim()
|
|
|
232
|
- // .indexOf(query.toUpperCase()) > -1
|
|
|
233
|
- // })
|
|
|
234
|
- // }, 200)
|
|
|
235
|
- // } else {
|
|
|
236
|
- // this.countryOption = []
|
|
|
237
|
- // }
|
|
|
238
|
if (query !== '') {
|
217
|
if (query !== '') {
|
239
|
this.listLoading = true
|
218
|
this.listLoading = true
|
240
|
setTimeout(() => {
|
219
|
setTimeout(() => {
|
241
|
this.listLoading = false
|
220
|
this.listLoading = false
|
242
|
this.airportCode = this.airportResultCode.filter(item => {
|
221
|
this.airportCode = this.airportResultCode.filter(item => {
|
243
|
- return item.value.toUpperCase().trim()
|
|
|
244
|
- .indexOf(query.toUpperCase()) > -1
|
222
|
+ return item.value.trim().indexOf(query.toUpperCase()) > -1
|
245
|
})
|
223
|
})
|
246
|
}, 200)
|
224
|
}, 200)
|
247
|
} else {
|
225
|
} else {
|