|
@@ -345,15 +345,16 @@ export default {
|
|
// 选择机场
|
|
// 选择机场
|
|
async getAirPortData () {
|
|
async getAirPortData () {
|
|
try {
|
|
try {
|
|
- // const res = await TempQuery({
|
|
|
|
- // id: SERVICE_ID.departureAirMainId,
|
|
|
|
- // dataContent: []
|
|
|
|
- // })
|
|
|
|
const res = await this.getQueryListAuth(SERVICE_ID.departureAirMainId, {}, 1, 9999, 276)
|
|
const res = await this.getQueryListAuth(SERVICE_ID.departureAirMainId, {}, 1, 9999, 276)
|
|
if (Number(res.code) === 0) {
|
|
if (Number(res.code) === 0) {
|
|
if (res.returnData?.listValues?.length) {
|
|
if (res.returnData?.listValues?.length) {
|
|
|
|
+ const defaultAirport = 'CAN'
|
|
|
|
+ let currentAirport = res.returnData.listValues[0].planDepartureApt
|
|
this.AirportList = this._.orderBy(res.returnData.listValues, o => o.planDepartureApt)
|
|
this.AirportList = this._.orderBy(res.returnData.listValues, o => o.planDepartureApt)
|
|
- this.formData.currentAirport = res.returnData.listValues[0].planDepartureApt
|
|
|
|
|
|
+ if (res.returnData.listValues.some(item => item.planDepartureApt === defaultAirport)) {
|
|
|
|
+ currentAirport = defaultAirport
|
|
|
|
+ }
|
|
|
|
+ this.formData.currentAirport = currentAirport
|
|
this.resetLoopEvent()
|
|
this.resetLoopEvent()
|
|
} else {
|
|
} else {
|
|
this.$message.warning('无航站数据权限')
|
|
this.$message.warning('无航站数据权限')
|