chenrui  1 жил өмнө
parent
commit
69fcb032ad

+ 99 - 3
src/views/statisticsCharts/components/newPieStatisticsCharts.vue

@@ -10,14 +10,19 @@
       ref="headerWrapper"
       class="statstics-header"
     >
-      <StatisticsHeader
+    <PublicPageHeader class="TablePage_header" :page-title="dataTitle ? dataTitle : pageTitle">
+      <template slot="d_foot">
+        <SimpleQuery v-if="simpleQueryFlag" :selectOptions="advancedQueryValue" :simple-query-item="simpleQueryItem" @queryValue="queryValue" />
+      </template>
+    </PublicPageHeader>
+      <!-- <StatisticsHeader
         :title="`${chartsTitle}统计`"
         :data="formData"
         :items="formItems"
         :custom-items="customFormItems"
         @getFormData="getFormData"
         @export="exportHandler"
-      />
+      /> -->
     </div>
     <div class="statstics-content">
       <div
@@ -30,6 +35,9 @@
 </template>
 
 <script>
+import PublicPageHeader from '@/components/PublicPageHeader'
+import SimpleQuery from '@/components/SimpleQuery'
+import AuthButton from '@/components/AuthButton'
 import StatisticsHeader from './statisticsHeader.vue'
 import { TempQuery } from '@/api/temp'
 import { mapGetters } from 'vuex'
@@ -39,8 +47,16 @@ import FileSaver from 'file-saver'
 
 export default {
   name: 'CommonBarStatisticsCharts',
-  components: { StatisticsHeader },
+  components: { StatisticsHeader, PublicPageHeader, SimpleQuery, AuthButton },
   props: {
+    dataTitle: {
+      type: String,
+      default: ''
+    },
+    pageAuthtablesList: {
+      type: Object,
+      default: () => {},
+    },
     chartsTitle: {
       type: String,
       required: true,
@@ -234,12 +250,34 @@ export default {
       },
       totalCount: [{ value: 0 }],
       categoryDatas: [],
+      pageQuery: {},
+      tableBtns: [], //表格按钮权限
+      pageTitle: '', //页面名称
+      pageServiceId: null, //表格serviceid
+      selected: 0, //是否勾选
+      triggerserviceid: null, //勾选后查询的serviceid
+      defaultfilter: { 1: 1 }, //默认查询参数
+      simpleQueryItem: [], //简易查询表单数据项
+      advancedQueryValue: [], //高级查询缓存值
+      simpleQueryFlag: false, //是否开启了简易查询
     }
   },
   computed: {
     ...mapGetters(['sidebar']),
+    pageAuthBtnQuery () {
+      return this.tableBtns.filter(item => item.servicetype == 0)[0]
+    },
+    pageAuthBtnAdd () {
+      return this.tableBtns.filter(item => item.servicetype == 2)[0]
+    },
   },
   watch: {
+    pageAuthtablesList: {
+      handler(obj) {
+        this.getPageTableSetting(obj.authArrs, obj.pageAuthtables)
+      },
+      deep: true,
+    },
     pieTitle: {
       handler(val) {
         this.options.title.text = val
@@ -322,6 +360,61 @@ export default {
     }
   },
   methods: {
+    //根据页面table设置数据
+    getPageTableSetting (pageAuths, pageAuthtables) {
+      const authTableObj = pageAuthtables[0]
+      //获取当前页面table的配置
+      const { pagename, pageconfigurationid, serviceid, pagecode, userpermissionsid, defaultfilter, selected, triggerserviceid } = authTableObj
+      this.pageTitle = pagename
+      const currPageBtns = pageAuths.filter(item => item['superiorid'] == pageconfigurationid && item.pagetype == 'button')
+      if (currPageBtns?.length) this.tableBtns.push(...currPageBtns)
+      const tableColumnArrs = pageAuths.filter(item => item['superiorid'] == pageconfigurationid && item['pagetype'] == 'column')
+      this.getColumnData(tableColumnArrs)
+    },
+    //获取表头数据
+    getColumnData (columnArrs = []) {
+      const returnData = [...columnArrs]
+      const simpleQueryItem = _.cloneDeep(returnData).filter((item) => item.easysearch && item.isfiltercolumn)
+      if (simpleQueryItem?.length) {
+        this.simpleQueryFlag = true
+        this.simpleQueryItem = simpleQueryItem
+      }
+    },
+        //格式化传递参数数据
+    formatDefault (item, data = {}) {
+      if (typeof item != 'string') return {}
+      const filterItem = {}
+      const parameters = item.replace('{', '').replace('}', '')
+      const parametersSplit = parameters?.split(',')
+      parametersSplit.map(item => {
+        const [key, val] = item?.split(':')
+        filterItem[key] = data[val]
+      })
+      return filterItem
+    },
+    //根据页面按钮设置表单form数据
+    getPageBtnFormSetting (pageAuths, pageAuthForms) {
+      const { pageconfigurationid } = [...pageAuthForms][0]
+      const tableColumnArrs = pageAuths.filter(item => item['superiorid'] == pageconfigurationid && item['pagetype'] == 'column')
+      const formItemCopy = tableColumnArrs.filter((item) => item.isdisplay != 0)
+      this.formItem = _.orderBy(formItemCopy, ['displaynumber'], ['asc'])
+    },
+        //简易查询-确定
+    queryValue (dataRules) {
+      const arr = [...dataRules]
+      if (arr && arr.length) {
+        arr.forEach(item => {
+          item.value = typeof item.value == 'string' ? item.value.replace(/\s*/g, "") : item.value
+        })
+      }
+      this.defaultfilter = arr.length ? arr : { 1: 1 }
+      this.resetDatas()
+      let params = {}
+      this.defaultfilter.forEach(element => {
+        params[element.column] = element.value
+      });
+      this.getMultipleChartsData(this.querySettings.serviceid, [params])
+    },
     legendFormatter(name) {
       const index = this.categoryDatas.findIndex(
         category => category.name === name
@@ -583,6 +676,9 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+.statstics-wrapper{
+  padding: 24px;
+}
 .statistics-chart {
   width: 100%;
 }

+ 85 - 3
src/views/statisticsCharts/components/newPieStatisticsChartscpsy.vue

@@ -10,14 +10,19 @@
       ref="headerWrapper"
       class="statstics-header"
     >
-      <StatisticsHeader
+    <PublicPageHeader class="TablePage_header" :page-title="dataTitle ? dataTitle : pageTitle">
+      <template slot="d_foot">
+        <SimpleQuery v-if="simpleQueryFlag" :selectOptions="advancedQueryValue" :simple-query-item="simpleQueryItem" @queryValue="queryValue" />
+      </template>
+    </PublicPageHeader>
+      <!-- <StatisticsHeader
         :title="`${chartsTitle}统计`"
         :data="formData"
         :items="formItems"
         :custom-items="customFormItems"
         @getFormData="getFormData"
         @export="exportHandler"
-      />
+      /> -->
     </div>
     <div class="statstics-content">
       <div
@@ -30,6 +35,9 @@
 </template>
 
 <script>
+import PublicPageHeader from '@/components/PublicPageHeader'
+import SimpleQuery from '@/components/SimpleQuery'
+import AuthButton from '@/components/AuthButton'
 import StatisticsHeader from './statisticsHeader.vue'
 import { TempQuery } from '@/api/temp'
 import { mapGetters } from 'vuex'
@@ -39,7 +47,7 @@ import FileSaver from 'file-saver'
 
 export default {
   name: 'CommonBarStatisticsCharts',
-  components: { StatisticsHeader },
+  components: { StatisticsHeader, PublicPageHeader, SimpleQuery, AuthButton },
   props: {
     chartsTitle: {
       type: String,
@@ -234,10 +242,26 @@ export default {
       },
       totalCount: [{ value: 0 }],
       categoryDatas: [],
+      pageQuery: {},
+      tableBtns: [], //表格按钮权限
+      pageTitle: '', //页面名称
+      pageServiceId: null, //表格serviceid
+      selected: 0, //是否勾选
+      triggerserviceid: null, //勾选后查询的serviceid
+      defaultfilter: { 1: 1 }, //默认查询参数
+      simpleQueryItem: [], //简易查询表单数据项
+      advancedQueryValue: [], //高级查询缓存值
+      simpleQueryFlag: false, //是否开启了简易查询
     }
   },
   computed: {
     ...mapGetters(['sidebar']),
+    pageAuthBtnQuery () {
+      return this.tableBtns.filter(item => item.servicetype == 0)[0]
+    },
+    pageAuthBtnAdd () {
+      return this.tableBtns.filter(item => item.servicetype == 2)[0]
+    },
   },
   watch: {
     pieTitle: {
@@ -322,6 +346,61 @@ export default {
     }
   },
   methods: {
+    //根据页面table设置数据
+    getPageTableSetting (pageAuths, pageAuthtables) {
+      const authTableObj = pageAuthtables[0]
+      //获取当前页面table的配置
+      const { pagename, pageconfigurationid, serviceid, pagecode, userpermissionsid, defaultfilter, selected, triggerserviceid } = authTableObj
+      this.pageTitle = pagename
+      const currPageBtns = pageAuths.filter(item => item['superiorid'] == pageconfigurationid && item.pagetype == 'button')
+      if (currPageBtns?.length) this.tableBtns.push(...currPageBtns)
+      const tableColumnArrs = pageAuths.filter(item => item['superiorid'] == pageconfigurationid && item['pagetype'] == 'column')
+      this.getColumnData(tableColumnArrs)
+    },
+    //获取表头数据
+    getColumnData (columnArrs = []) {
+      const returnData = [...columnArrs]
+      const simpleQueryItem = _.cloneDeep(returnData).filter((item) => item.easysearch && item.isfiltercolumn)
+      if (simpleQueryItem?.length) {
+        this.simpleQueryFlag = true
+        this.simpleQueryItem = simpleQueryItem
+      }
+    },
+        //格式化传递参数数据
+    formatDefault (item, data = {}) {
+      if (typeof item != 'string') return {}
+      const filterItem = {}
+      const parameters = item.replace('{', '').replace('}', '')
+      const parametersSplit = parameters?.split(',')
+      parametersSplit.map(item => {
+        const [key, val] = item?.split(':')
+        filterItem[key] = data[val]
+      })
+      return filterItem
+    },
+    //根据页面按钮设置表单form数据
+    getPageBtnFormSetting (pageAuths, pageAuthForms) {
+      const { pageconfigurationid } = [...pageAuthForms][0]
+      const tableColumnArrs = pageAuths.filter(item => item['superiorid'] == pageconfigurationid && item['pagetype'] == 'column')
+      const formItemCopy = tableColumnArrs.filter((item) => item.isdisplay != 0)
+      this.formItem = _.orderBy(formItemCopy, ['displaynumber'], ['asc'])
+    },
+        //简易查询-确定
+    queryValue (dataRules) {
+      const arr = [...dataRules]
+      if (arr && arr.length) {
+        arr.forEach(item => {
+          item.value = typeof item.value == 'string' ? item.value.replace(/\s*/g, "") : item.value
+        })
+      }
+      this.defaultfilter = arr.length ? arr : { 1: 1 }
+      this.resetDatas()
+      let params = {}
+      this.defaultfilter.forEach(element => {
+        params[element.column] = element.value
+      });
+      this.getMultipleChartsData(this.querySettings.serviceid, [params])
+    },
     legendFormatter(name) {
       const index = this.categoryDatas.findIndex(
         category => category.name === name
@@ -590,6 +669,9 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+.statstics-wrapper{
+  padding: 24px;
+}
 .statistics-chart {
   width: 100%;
 }

+ 10 - 1
src/views/statisticsCharts/views/flight/flightvolumeStatisticsCharts.vue

@@ -1,5 +1,5 @@
 <template>
-  <CommonBarStatisticsCharts charts-title="航站航班量" :rol="rol" :query-settings="querySettings" :form-data="formData" :form-items="formItems" />
+  <CommonBarStatisticsCharts charts-title="航站航班量" :pageAuthtablesList="pageAuthtablesList" :rol="rol" :query-settings="querySettings" :form-data="formData" :form-items="formItems" />
 </template>
 
 <script>
@@ -214,6 +214,10 @@ export default {
           requiredWarning: '请先选择时间范围',
         },
       ],
+      pageAuthtablesList: {
+        authArrs: [],
+        pageAuthtables:[]
+      },
     }
   },
   computed: {
@@ -232,12 +236,17 @@ export default {
       const { pagecode, qid, auth_id } = this.$route.meta
       //获取页面权限类型组件  pagetype 1模块  2页面  3按钮 4表格 5树形  6弹窗 
       const pageAuths = this.authArrs
+      this.pageAuthtablesList.authArrs = pageAuths
       if (!pageAuths.length) return
       //获取当前页面权限类型
       const pageAuthArrs = pageAuths.filter(item => item['superiorid'] == auth_id)
       if (!pageAuthArrs.length) return
       // console.log(pageAuthArrs)
       this.querySettings.serviceid = pageAuthArrs[0].serviceid
+       //获取图表权限
+      const pageAuthtables = pageAuthArrs.filter(item => item.pagetype == 'chart')
+      this.pageAuthtablesList.pageAuthtables = pageAuthtables
+      if (pageAuthtables?.length) return
     },
     async getAgentOptions (airport) {
       try {

+ 10 - 1
src/views/statisticsCharts/views/flight/numberairStatisticsCharts.vue

@@ -1,5 +1,5 @@
 <template>
-  <CommonBarStatisticsCharts charts-title="航司航班量" :rol="rol" :query-settings="querySettings" :form-data="formData" :form-items="formItems" />
+  <CommonBarStatisticsCharts charts-title="航司航班量" :rol="rol" :pageAuthtablesList="pageAuthtablesList" :query-settings="querySettings" :form-data="formData" :form-items="formItems" />
 </template>
 
 <script>
@@ -197,6 +197,10 @@ export default {
           requiredWarning: '请先选择时间范围',
         },
       ],
+      pageAuthtablesList: {
+        authArrs: [],
+        pageAuthtables:[]
+      },
     }
   },
   computed: {
@@ -215,12 +219,17 @@ export default {
       const { pagecode, qid, auth_id } = this.$route.meta
       //获取页面权限类型组件  pagetype 1模块  2页面  3按钮 4表格 5树形  6弹窗 
       const pageAuths = this.authArrs
+      this.pageAuthtablesList.authArrs = pageAuths
       if (!pageAuths.length) return
       //获取当前页面权限类型
       const pageAuthArrs = pageAuths.filter(item => item['superiorid'] == auth_id)
       if (!pageAuthArrs.length) return
       // console.log(pageAuthArrs)
       this.querySettings.serviceid = pageAuthArrs[0].serviceid
+       //获取图表权限
+      const pageAuthtables = pageAuthArrs.filter(item => item.pagetype == 'chart')
+      this.pageAuthtablesList.pageAuthtables = pageAuthtables
+      if (pageAuthtables?.length) return
     },
     async getAgentOptions (airport) {
       try {

+ 10 - 1
src/views/statisticsCharts/views/flight/volumeofStatisticsCharts.vue

@@ -1,5 +1,5 @@
 <template>
-  <CommonBarStatisticsCharts charts-title="航线航班量" :rol="rol" :query-settings="querySettings" :form-data="formData" :form-items="formItems" />
+  <CommonBarStatisticsCharts charts-title="航线航班量" :rol="rol" :pageAuthtablesList="pageAuthtablesList" :query-settings="querySettings" :form-data="formData" :form-items="formItems" />
 </template>
 
 <script>
@@ -197,6 +197,10 @@ export default {
           requiredWarning: '请先选择时间范围',
         },
       ],
+      pageAuthtablesList: {
+        authArrs: [],
+        pageAuthtables:[]
+      },
     }
   },
   computed: {
@@ -215,12 +219,17 @@ export default {
       const { pagecode, qid, auth_id } = this.$route.meta
       //获取页面权限类型组件  pagetype 1模块  2页面  3按钮 4表格 5树形  6弹窗 
       const pageAuths = this.authArrs
+      this.pageAuthtablesList.authArrs = pageAuths
       if (!pageAuths.length) return
       //获取当前页面权限类型
       const pageAuthArrs = pageAuths.filter(item => item['superiorid'] == auth_id)
       if (!pageAuthArrs.length) return
       // console.log(pageAuthArrs)
       this.querySettings.serviceid = pageAuthArrs[0].serviceid
+       //获取图表权限
+      const pageAuthtables = pageAuthArrs.filter(item => item.pagetype == 'chart')
+      this.pageAuthtablesList.pageAuthtables = pageAuthtables
+      if (pageAuthtables?.length) return
     },
     async getAgentOptions (airport) {
       try {

+ 10 - 1
src/views/statisticsCharts/views/passenger/passengerairlineStatisticsCharts.vue

@@ -1,5 +1,5 @@
 <template>
-  <CommonBarStatisticsCharts charts-title="航司旅客量" :rol="rol"  :query-settings="querySettings" :form-data="formData" :form-items="formItems" />
+  <CommonBarStatisticsCharts charts-title="航司旅客量" :pageAuthtablesList="pageAuthtablesList" :rol="rol"  :query-settings="querySettings" :form-data="formData" :form-items="formItems" />
 </template>
 
 <script>
@@ -147,6 +147,10 @@ export default {
           requiredWarning: '请先选择时间范围',
         },
       ],
+      pageAuthtablesList: {
+        authArrs: [],
+        pageAuthtables:[]
+      },
     }
   },
   computed: {
@@ -165,12 +169,17 @@ export default {
       const { pagecode, qid, auth_id } = this.$route.meta
       //获取页面权限类型组件  pagetype 1模块  2页面  3按钮 4表格 5树形  6弹窗 
       const pageAuths = this.authArrs
+      this.pageAuthtablesList.authArrs = pageAuths
       if (!pageAuths.length) return
       //获取当前页面权限类型
       const pageAuthArrs = pageAuths.filter(item => item['superiorid'] == auth_id)
       if (!pageAuthArrs.length) return
       // console.log(pageAuthArrs)
       this.querySettings.serviceid = pageAuthArrs[0].serviceid
+       //获取图表权限
+      const pageAuthtables = pageAuthArrs.filter(item => item.pagetype == 'chart')
+      this.pageAuthtablesList.pageAuthtables = pageAuthtables
+      if (pageAuthtables?.length) return
     },
     async getAgentOptions (airport) {
       try {

+ 10 - 1
src/views/statisticsCharts/views/passenger/passengerrouteStatisticsCharts.vue

@@ -1,5 +1,5 @@
 <template>
-  <CommonBarStatisticsCharts charts-title="航线旅客量" :rol="rol" :query-settings="querySettings" :form-data="formData" :form-items="formItems" />
+  <CommonBarStatisticsCharts charts-title="航线旅客量" :pageAuthtablesList="pageAuthtablesList" :rol="rol" :query-settings="querySettings" :form-data="formData" :form-items="formItems" />
 </template>
 
 <script>
@@ -147,6 +147,10 @@ export default {
           requiredWarning: '请先选择时间范围',
         },
       ],
+      pageAuthtablesList: {
+        authArrs: [],
+        pageAuthtables:[]
+      },
     }
   },
   computed: {
@@ -165,12 +169,17 @@ export default {
       const { pagecode, qid, auth_id } = this.$route.meta
       //获取页面权限类型组件  pagetype 1模块  2页面  3按钮 4表格 5树形  6弹窗 
       const pageAuths = this.authArrs
+      this.pageAuthtablesList.authArrs = pageAuths
       if (!pageAuths.length) return
       //获取当前页面权限类型
       const pageAuthArrs = pageAuths.filter(item => item['superiorid'] == auth_id)
       if (!pageAuthArrs.length) return
       // console.log(pageAuthArrs)
       this.querySettings.serviceid = pageAuthArrs[0].serviceid
+       //获取图表权限
+      const pageAuthtables = pageAuthArrs.filter(item => item.pagetype == 'chart')
+      this.pageAuthtablesList.pageAuthtables = pageAuthtables
+      if (pageAuthtables?.length) return
     },
     async getAgentOptions (airport) {
       try {

+ 10 - 1
src/views/statisticsCharts/views/passenger/terminalpassengersStatisticsCharts.vue

@@ -1,5 +1,5 @@
 <template>
-  <CommonBarStatisticsCharts charts-title="航站旅客量" :rol="rol" :query-settings="querySettings" :form-data="formData" :form-items="formItems" />
+  <CommonBarStatisticsCharts charts-title="航站旅客量" :pageAuthtablesList="pageAuthtablesList" :rol="rol" :query-settings="querySettings" :form-data="formData" :form-items="formItems" />
 </template>
 
 <script>
@@ -165,6 +165,10 @@ export default {
           requiredWarning: '请先选择时间范围',
         },
       ],
+      pageAuthtablesList: {
+        authArrs: [],
+        pageAuthtables:[]
+      },
     }
   },
   computed: {
@@ -183,12 +187,17 @@ export default {
       const { pagecode, qid, auth_id } = this.$route.meta
       //获取页面权限类型组件  pagetype 1模块  2页面  3按钮 4表格 5树形  6弹窗 
       const pageAuths = this.authArrs
+      this.pageAuthtablesList.authArrs = pageAuths
       if (!pageAuths.length) return
       //获取当前页面权限类型
       const pageAuthArrs = pageAuths.filter(item => item['superiorid'] == auth_id)
       if (!pageAuthArrs.length) return
       // console.log(pageAuthArrs)
       this.querySettings.serviceid = pageAuthArrs[0].serviceid
+       //获取图表权限
+      const pageAuthtables = pageAuthArrs.filter(item => item.pagetype == 'chart')
+      this.pageAuthtablesList.pageAuthtables = pageAuthtables
+      if (pageAuthtables?.length) return
     },
     async getAgentOptions (airport) {
       try {

+ 10 - 0
src/views/statisticsCharts/views/specialbaggageanalysisStatisticsCharts.vue

@@ -1,6 +1,7 @@
 <template>
   <CommonPieStatisticsCharts
     charts-title="特殊行李分析"
+    :pageAuthtablesList="pageAuthtablesList"
     :query-settings="querySettings"
     :categories="categories"
     :form-data="formData"
@@ -45,6 +46,10 @@ export default {
           requiredWarning: '请先选择统计时间范围',
         },
       ],
+      pageAuthtablesList: {
+        authArrs: [],
+        pageAuthtables:[]
+      },
     }
   },
   computed: {
@@ -63,12 +68,17 @@ export default {
       const { pagecode, qid, auth_id } = this.$route.meta
       //获取页面权限类型组件  pagetype 1模块  2页面  3按钮 4表格 5树形  6弹窗 
       const pageAuths = this.authArrs
+      this.pageAuthtablesList.authArrs = pageAuths
       if (!pageAuths.length) return
       //获取当前页面权限类型
       const pageAuthArrs = pageAuths.filter(item => item['superiorid'] == auth_id)
       if (!pageAuthArrs.length) return
       // console.log(pageAuthArrs)
       this.querySettings.serviceid = pageAuthArrs[0].serviceid
+       //获取图表权限
+      const pageAuthtables = pageAuthArrs.filter(item => item.pagetype == 'chart')
+      this.pageAuthtablesList.pageAuthtables = pageAuthtables
+      if (pageAuthtables?.length) return
     },
   },
 }

+ 10 - 1
src/views/statisticsCharts/views/workloadStatisticsCharts.vue

@@ -1,5 +1,5 @@
 <template>
-  <CommonBarStatisticsCharts charts-title="工作量" :query-settings="querySettings" :form-data="formData" :form-items="formItems" />
+  <CommonBarStatisticsCharts charts-title="工作量" :pageAuthtablesList="pageAuthtablesList" :query-settings="querySettings" :form-data="formData" :form-items="formItems" />
 </template>
 
 <script>
@@ -140,6 +140,10 @@ export default {
           requiredWarning: '请先选择时间范围',
         },
       ],
+      pageAuthtablesList: {
+        authArrs: [],
+        pageAuthtables:[]
+      },
     }
   },
   mounted() {
@@ -158,12 +162,17 @@ export default {
       const { pagecode, qid, auth_id } = this.$route.meta
       //获取页面权限类型组件  pagetype 1模块  2页面  3按钮 4表格 5树形  6弹窗 
       const pageAuths = this.authArrs
+      this.pageAuthtablesList.authArrs = pageAuths
       if (!pageAuths.length) return
       //获取当前页面权限类型
       const pageAuthArrs = pageAuths.filter(item => item['superiorid'] == auth_id)
       if (!pageAuthArrs.length) return
       // console.log(pageAuthArrs)
       this.querySettings.serviceid = pageAuthArrs[0].serviceid
+       //获取图表权限
+      const pageAuthtables = pageAuthArrs.filter(item => item.pagetype == 'chart')
+      this.pageAuthtablesList.pageAuthtables = pageAuthtables
+      if (pageAuthtables?.length) return
     },
     async getAgentOptions (airport) {
       try {