Przeglądaj źródła

feat: 修复国航 config.js 文件泄露

MomentCheng 1 tydzień temu
rodzic
commit
e54fde9bd0

+ 2 - 2
public/index.html

@@ -14,8 +14,8 @@
   <title>
     <%= webpackConfig.name %>
   </title>
-  <script src="<%= BASE_URL %>staticConfig.js" type="text/javascript"></script>
-  <script id="configJS" src="<%= BASE_URL %>config.js" type="text/javascript"></script>
+  <!-- <script src="<%= BASE_URL %>staticConfig.js" type="text/javascript"></script>
+  <script id="configJS" src="<%= BASE_URL %>config.js" type="text/javascript"></script> -->
 </head>
 
 <body>

+ 26 - 5
public/staticConfig.js

@@ -15,9 +15,12 @@ switch (baseNewUrl) {
   case '10.211.66.23':
     PLATFROM_CONFIG = {
       ...PLATFROM_CONFIG,
-      baseNewUrl: 'http://10.211.66.23:8082',
-      baseURLCA: 'http://10.211.66.23:8082',
-      fileUrl: 'http://10.211.66.23:8082',
+      // baseNewUrl: 'http://10.211.66.23:8082',
+      // baseURLCA: 'http://10.211.66.23:8082',
+      // fileUrl: 'http://10.211.66.23:8082',
+      baseNewUrl: 'http://10.211.67.177:8043',
+      baseURLCA: 'http://10.211.67.177:8043',
+      fileUrl: 'http://10.211.67.177:8043',
       expressUrl: 'http://10.211.67.177:8043',
       tempUrl: 'http://10.211.67.163:16300', // 1.0临时地址
       tempToken: 'bb1bcfcb336b40e9b8602e808b053c3b', // 1.0临时token
@@ -32,6 +35,7 @@ switch (baseNewUrl) {
       baseNewUrl: 'http://10.211.67.177:8043',
       baseURLCA: 'http://10.211.67.177:8043',
       fileUrl: 'http://10.211.67.177:8043',
+      fileUrlNew: 'http://10.211.67.177:8043',
       expressUrl: 'http://10.211.67.177:8043',
       tempUrl: 'http://10.211.67.177:8043', // 1.0临时地址
       tempToken: 'bb1bcfcb336b40e9b8602e808b053c3b', // 1.0临时token
@@ -62,6 +66,13 @@ switch (baseNewUrl) {
       ...PLATFROM_CONFIG,
       baseNewUrl: 'https://cabdp.airchina.com.cn:8043',
       baseURLCA: 'https://cabdp.airchina.com.cn:8043',
+      fileUrl: 'https://cabdp.airchina.com.cn:8043',
+      fileUrlNew: 'https://cabdp.airchina.com.cn:8043',
+      expressUrl: 'https://cabdp.airchina.com.cn:8043',
+      tempUrl: 'https://cabdp.airchina.com.cn:8043',
+      tempToken: 'bb1bcfcb336b40e9b8602e808b053c3b', // 1.0临时token
+      tempUserId: '1656481036109',
+      tempAppToken: '2ecbda35d72c4ae89294464629f29f35',
       hasStaticRoutes: true,
     }
     break
@@ -90,8 +101,18 @@ switch (baseNewUrl) {
   default:
     PLATFROM_CONFIG = {
       ...PLATFROM_CONFIG,
-      baseNewUrl: 'http://10.211.66.23:8082',
-      baseURLCA: 'http://10.211.66.23:8082',
+      baseNewUrl: 'http://10.211.67.177:8043',
+      baseURLCA: 'http://10.211.67.177:8043',
+      fileUrl: 'http://10.211.67.177:8043',
+      fileUrlNew: 'http://10.211.67.177:8043',
+      expressUrl: 'http://10.211.67.177:8043',
+      tempUrl: 'http://10.211.67.163:16300',
+      tempToken: 'bb1bcfcb336b40e9b8602e808b053c3b', // 1.0临时token
+      tempUserId: '1656481036109',
+      tempAppToken: '2ecbda35d72c4ae89294464629f29f35',
+      // baseNewUrl: 'http://10.211.66.23:8082',
+      // baseURLCA: 'http://10.211.66.23:8082',
+      hasStaticRoutes: true,
     }
     break
 }

+ 2 - 1
src/api/flight.js

@@ -1,5 +1,6 @@
 import request from '@/utils/request'
-
+import '@/config/staticConfig.js'
+import '@/config/config.js'
 // 全部机场查询
 export function CurrentAirportQuery (params) {
   return request({

+ 2 - 0
src/api/temp.js

@@ -1,5 +1,7 @@
 import request from '@/utils/request'
 import { Message } from 'element-ui'
+import '@/config/staticConfig.js'
+import '@/config/config.js'
 
 export function GeneralDataReception (params) {
   return request({

+ 2 - 0
src/components/PassengerDialog/index.vue

@@ -105,6 +105,8 @@ import { GetCheckCode, CheckUser } from '@/api/temp'
 import { GetPassengerInfo } from '@/api/flight'
 // import { getToken } from '@/utils/auth'
 import MD5 from 'blueimp-md5'
+import '@/config/staticConfig.js'
+import '@/config/config.js'
 
 const noDataImage = require('@/assets/logo/nodata.png')
 

+ 1 - 0
public/config.js → src/config/config.js

@@ -187,6 +187,7 @@ window.SERVICE_ID = {
 
   /***-----速运行李------***/
   expressTransportationUpload: 20034, // 速运行李数据上传
+  expressTransportationUploadNew: 31, // 新速运行李数据上传
   expressTransportation: 1803435, // 速运行李数据查询
   expressTransportationNum: 1803436, // 速运行李次数查询
   expressTransportationFail: 1803437 // 速运行李数据查询-失败

+ 129 - 0
src/config/staticConfig.js

@@ -0,0 +1,129 @@
+/* url配置 */
+window.PLATFROM_CONFIG = {
+  baseNewUrl: '', //登录前的http请求地址
+  baseURLCA: '', // 登录后的http请求地址
+  appKeyString: '9inu7zpllz1folzsljm498dcpi0lsog1', //appSecret
+  appId: 'q7kdjmmaf0kerwpf', //appid
+  baggageMessageURL: '/openApi/query',
+  getBase64: 'http://10.211.67.163:8083/getBase64',
+  editRule: /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[`!@#$%^&*()_+{}":?><`,./';=-])[\da-zA-Z`!@#$%^&*()_+{}":?><`,./';=-]{8,}$/
+}
+
+const baseNewUrl = window.location.hostname
+// const baseNewUrl = '10.211.67.177'
+switch (baseNewUrl) {
+  case '10.211.66.23':
+    PLATFROM_CONFIG = {
+      ...PLATFROM_CONFIG,
+      // baseNewUrl: 'http://10.211.66.23:8082',
+      // baseURLCA: 'http://10.211.66.23:8082',
+      // fileUrl: 'http://10.211.66.23:8082',
+      baseNewUrl: 'http://10.211.67.177:8043',
+      baseURLCA: 'http://10.211.67.177:8043',
+      fileUrl: 'http://10.211.67.177:8043',
+      expressUrl: 'http://10.211.67.177:8043',
+      tempUrl: 'http://10.211.67.163:16300', // 1.0临时地址
+      tempToken: 'bb1bcfcb336b40e9b8602e808b053c3b', // 1.0临时token
+      tempUserId: '1656481036109',
+      tempAppToken: '2ecbda35d72c4ae89294464629f29f35',
+      hasStaticRoutes: true,
+    }
+    break
+  case '10.211.67.177':
+    PLATFROM_CONFIG = {
+      ...PLATFROM_CONFIG,
+      baseNewUrl: 'http://10.211.67.177:8043',
+      baseURLCA: 'http://10.211.67.177:8043',
+      fileUrl: 'http://10.211.67.177:8043',
+      fileUrlNew: 'http://10.211.67.177:8043',
+      expressUrl: 'http://10.211.67.177:8043',
+      tempUrl: 'http://10.211.67.177:8043', // 1.0临时地址
+      tempToken: 'bb1bcfcb336b40e9b8602e808b053c3b', // 1.0临时token
+      tempUserId: '1656481036109',
+      tempAppToken: '2ecbda35d72c4ae89294464629f29f35',
+      hasStaticRoutes: true,
+    }
+    break
+  case '10.211.67.163':
+    PLATFROM_CONFIG = {
+      ...PLATFROM_CONFIG,
+      baseNewUrl: 'http://10.211.67.163:8883',
+      baseURLCA: 'http://10.211.67.163:8883',
+      expressUrl: 'http://10.211.67.163:8883',
+      hasStaticRoutes: true,
+    }
+    break
+  case '10.199.7.20':
+    PLATFROM_CONFIG = {
+      ...PLATFROM_CONFIG,
+      baseNewUrl: 'http://10.199.7.20:8083',
+      baseURLCA: 'http://10.199.7.20:8083',
+      hasStaticRoutes: true,
+    }
+    break
+  case 'cabdp.airchina.com.cn':
+    PLATFROM_CONFIG = {
+      ...PLATFROM_CONFIG,
+      baseNewUrl: 'https://cabdp.airchina.com.cn:8043',
+      baseURLCA: 'https://cabdp.airchina.com.cn:8043',
+      fileUrl: 'https://cabdp.airchina.com.cn:8043',
+      fileUrlNew: 'https://cabdp.airchina.com.cn:8043',
+      expressUrl: 'https://cabdp.airchina.com.cn:8043',
+      tempUrl: 'https://cabdp.airchina.com.cn:8043',
+      tempToken: 'bb1bcfcb336b40e9b8602e808b053c3b', // 1.0临时token
+      tempUserId: '1656481036109',
+      tempAppToken: '2ecbda35d72c4ae89294464629f29f35',
+      hasStaticRoutes: true,
+    }
+    break
+  case '192.168.3.29':
+    PLATFROM_CONFIG = {
+      ...PLATFROM_CONFIG,
+      baseNewUrl: 'http://10.211.67.177:8043',
+      baseURLCA: 'http://10.211.67.177:8043',
+      hasStaticRoutes: true,
+    }
+    break
+  case 'localhost':
+    PLATFROM_CONFIG = {
+      ...PLATFROM_CONFIG,
+      baseNewUrl: 'http://10.211.67.177:8043',
+      baseURLCA: 'http://10.211.67.177:8043',
+      fileUrl: 'http://10.211.67.177:8043',
+      expressUrl: 'http://10.211.67.177:8043',
+      tempUrl: 'http://10.211.67.163:16300', // 1.0临时地址
+      tempToken: 'bb1bcfcb336b40e9b8602e808b053c3b', // 1.0临时token
+      tempUserId: '1656481036109',
+      tempAppToken: '2ecbda35d72c4ae89294464629f29f35',
+      hasStaticRoutes: true,
+    }
+    break
+  default:
+    PLATFROM_CONFIG = {
+      ...PLATFROM_CONFIG,
+      baseNewUrl: 'http://10.211.67.177:8043',
+      baseURLCA: 'http://10.211.67.177:8043',
+      fileUrl: 'http://10.211.67.177:8043',
+      fileUrlNew: 'http://10.211.67.177:8043',
+      expressUrl: 'http://10.211.67.177:8043',
+      tempUrl: 'http://10.211.67.163:16300',
+      tempToken: 'bb1bcfcb336b40e9b8602e808b053c3b', // 1.0临时token
+      tempUserId: '1656481036109',
+      tempAppToken: '2ecbda35d72c4ae89294464629f29f35',
+      // baseNewUrl: 'http://10.211.66.23:8082',
+      // baseURLCA: 'http://10.211.66.23:8082',
+      hasStaticRoutes: true,
+    }
+    break
+}
+
+/* 轮询间隔 */
+window.LOOP_INTERVAL = {
+  arrivalTable: 30 * 1000, // 进港视图表格
+  departureTable: 30 * 1000, // 离港视图表格
+  transferArrivalTable: 30 * 1000, // 中转进港表格
+  transferDepartureTable: 30 * 1000, // 中转离港表格
+  baggageTrack: 30 * 1000, // 行李跟踪节点信息
+  baggageDetails: 30 * 1000, // 行李详情表格
+  baggageMessage: 30 * 1000, // 行李原始报文
+}

+ 2 - 0
src/getMenu.js

@@ -8,6 +8,8 @@ import getPageTitle from '@/utils/get-page-title'
 import Layout from '@/layout'
 import { setTree, listToTree } from '@/utils/validate'
 import * as _ from 'lodash'
+import '@/config/staticConfig.js'
+import '@/config/config.js'
 
 NProgress.configure({ showSpinner: false }) // NProgress Configuration
 

+ 2 - 0
src/layout/index.vue

@@ -51,6 +51,8 @@
 </template>
 
 <script>
+import '@/config/staticConfig.js'
+import '@/config/config.js'
 import { Navbar, Sidebar, AppMain } from './components'
 import ResizeMixin from './mixin/ResizeHandler'
 import { mapGetters } from 'vuex'

+ 2 - 0
src/main.js

@@ -16,6 +16,8 @@ import App from './App'
 import store from './store'
 import router from './router'
 
+import '@/config/config.js'
+import '@/config/staticConfig.js'
 import '@/icons' // icon
 // import '@/permission'
 import '@/getMenu'

+ 2 - 0
src/utils/request-emal.js

@@ -2,6 +2,8 @@ import axios from 'axios'
 import { MessageBox, Message } from 'element-ui'
 import { getToken, getCodeToken, TokenKey } from '@/utils/auth'
 import store from '@/store'
+import '@/config/staticConfig.js'
+import '@/config/config.js'
 let isMttoken
 // create an axios instance
 const service = axios.create({

+ 3 - 0
src/utils/request-new.js

@@ -2,6 +2,9 @@ import axios from 'axios'
 import { MessageBox, Message } from 'element-ui'
 import { getToken, getCodeToken, TokenKey } from '@/utils/auth'
 import store from '@/store'
+import '@/config/staticConfig.js'
+import '@/config/config.js'
+
 let isMttoken
 // create an axios instance
 const service = axios.create({

+ 14 - 11
src/utils/request.js

@@ -16,6 +16,9 @@ import {
   isArray,
   isString
 } from "lodash";
+import '@/config/staticConfig.js'
+import '@/config/config.js'
+
 // create an axios instance
 // let baseURL
 // if (process.env.NODE_ENV === "development") {
@@ -109,17 +112,17 @@ service.interceptors.response.use(
             })
           });
         } else {
-            res.returnData.forEach((item, index) => {
-              // 取得属性名
-              let keys = Object.keys(item);
-              // 取得属性值
-              let values = Object.values(item);
-              keys.map(items => {
-                if (isoDateTimeRegex.test(item[items]) && /T/.test(item[items])) {
-                  item[items] = item[items].replace(/T/g, ' ');
-                }
-              })
-            });
+          res.returnData.forEach((item, index) => {
+            // 取得属性名
+            let keys = Object.keys(item);
+            // 取得属性值
+            let values = Object.values(item);
+            keys.map(items => {
+              if (isoDateTimeRegex.test(item[items]) && /T/.test(item[items])) {
+                item[items] = item[items].replace(/T/g, ' ');
+              }
+            })
+          });
         }
 
       }

+ 3 - 0
src/utils/requestTemp.js

@@ -2,6 +2,9 @@ import axios from 'axios'
 import { MessageBox, Message } from 'element-ui'
 import store from '@/store'
 import router, { resetRouter } from '@/router'
+import '@/config/staticConfig.js'
+import '@/config/config.js'
+
 // import { getToken, getUserId, removeToken } from '@/utils/auth'
 // import MD5 from 'blueimp-md5'
 // create an axios instance

+ 2 - 0
src/views/login/index.vue

@@ -59,6 +59,8 @@
 </template>
 
 <script>
+import '@/config/staticConfig.js'
+import '@/config/config.js'
 import { isValue } from "@/utils/validate";
 import { getVCode, getToken } from "@/api/login";
 import { modifypass } from "@/api/cretlogin";

+ 34 - 14
src/views/newFlightView/index.vue

@@ -18,9 +18,11 @@
         </div>
         <div class="newFlightView-left-top-list">
           <el-descriptions :column="2">
-            <el-descriptions-item label="起飞机场简称">{{ infoObj.takeoff_airport_name || takeoffName
+            <!-- 简称 -->
+            <el-descriptions-item label="起飞机场">{{ infoObj.takeoff_airport_name || takeoffName
               }}</el-descriptions-item>
-            <el-descriptions-item label="起飞机场三字码">{{ infoObj.outAirport }}</el-descriptions-item>
+              <!-- 起飞机场 -->
+            <el-descriptions-item label="三字码">{{ infoObj.outAirport }}</el-descriptions-item>
             <el-descriptions-item label="登机口">{{ infoObj.gateCd }}</el-descriptions-item>
             <el-descriptions-item label="停机位"> {{ infoObj.depstandCd }}</el-descriptions-item>
             <el-descriptions-item v-if="!UTCvalue" :span="2" :label="'计划' + infoObj.outAirport + '起飞时间'">{{
@@ -35,8 +37,10 @@
         </div>
         <div class="newFlightView-left-top-list">
           <el-descriptions :column="2">
-            <el-descriptions-item label="降落机场简称">{{ infoObj.target_airport_name || targetName }}</el-descriptions-item>
-            <el-descriptions-item label="降落机场三字码">{{ infoObj.landAirport }}</el-descriptions-item>
+            <!-- 简称 -->
+            <el-descriptions-item label="降落机场">{{ infoObj.target_airport_name || targetName }}</el-descriptions-item>
+            <!-- 降落机场 -->
+            <el-descriptions-item label="三字码">{{ infoObj.landAirport }}</el-descriptions-item>
             <el-descriptions-item label="提取转盘">{{ infoObj.arrcarouselCd }}</el-descriptions-item>
             <el-descriptions-item label="停机位"> {{ infoObj.arrstandCd }}</el-descriptions-item>
             <el-descriptions-item v-if="!UTCvalue" :span="2" :label="'计划' + infoObj.landAirport + '降落时间'">{{
@@ -452,15 +456,30 @@ export default {
     }
     // 2023-9-19新增结束
     this.infoObj = res[0]
-    const sts = await this.getViewInfo({ carrierFlights, carrierFlightsDate })
-    if (sts && sts.length) {
-      for (const p of sts) {
-        const { outAirport, landAirport, abnormalState } = p
-        this.deArrs.push({
-          abnormalState,
-          outAirport,
-          landAirport
-        })
+    // const sts = await this.getViewInfo({ carrierFlights, carrierFlightsDate })   // 航班日期+航班号进行查询
+    // if (sts && sts.length) {
+    //   for (const p of sts) {
+    //     const { outAirport, landAirport, abnormalState } = p
+    //     this.deArrs.push({
+    //       abnormalState,
+    //       outAirport,
+    //       landAirport,
+    //     })
+    //   }
+    // }
+    const flightGid = this?.infoObj?.flightGid;
+    console.log(flightGid,'flightGidflightGidflightGidflightGidflightGid')
+    if (flightGid) {
+      const sts = await this.getViewInfo({ flightGid }); // 改为 使用 flightGid 作为参数
+      if (sts && sts.length) {
+        for (const p of sts) {
+          const { outAirport, landAirport, abnormalState } = p;
+          this.deArrs.push({
+            abnormalState,
+            outAirport,
+            landAirport,
+          });
+        }
       }
     }
     const newDatas = _.cloneDeep(this.deArrs)
@@ -556,6 +575,7 @@ export default {
       const { code, returnData } = await this.getQueryList(SERVICE_ID.bagViewId, dataContent)
       if (code == 0) {
         return returnData
+
       } else {
         return []
       }
@@ -571,7 +591,7 @@ export default {
       const fileName = `${tableName}-${carrierFlights}-${carrierFlightsDate}-${outAirport}-${landAirport}.xlsx`
       exportToExcel(table, tableName, fileName)
     },
-    // 选中
+    // 选中 (需要修改)
     async checkChange(arr) {
       const datas = []
       const result = [...arr]

+ 5 - 2
src/views/newUserManagement/index.vue

@@ -223,6 +223,9 @@
 </template>
 
 <script>
+import '@/config/staticConfig.js'
+import '@/config/config.js'
+
 import pb from '@/layout/mixin/getPublicData'
 import Dialog from '@/layout/components/Dialog'
 import pf from '@/layout/mixin/publicFunc'
@@ -866,7 +869,7 @@ export default {
         { wch: 8 }, // 使用者
         { wch: 15 }, // 部门
         { wch: 8 }, // 者
-        { wch: 15 }, // 
+        { wch: 15 }, //
       ];
 
       // alert("开始导出");
@@ -992,4 +995,4 @@ export default {
     }
   }
 }
-</style>
+</style>

+ 8 - 3
src/views/upload/index1.vue

@@ -389,8 +389,13 @@ export default {
           throw new Error('失败')
         }
         this.airPortOptions = returnData
-        this.upLoadAirPortValue=this.airPortOptions[0].IATACode;
-        this.airPortValue=this.airPortOptions[0].IATACode
+        // this.upLoadAirPortValue=this.airPortOptions[0].IATACode;
+        if(this.airPortOptions.length == 1) {
+          this.airPortValue=this.airPortOptions[0].IATACode
+        } else {
+          this.airPortValue= "PEK"
+        }
+        this.upLoadAirPortValue=this.airPortValue
         this.getStateData()
       } catch (error) {
         this.$message.error('查询航站失败')
@@ -477,7 +482,7 @@ export default {
           "userName":sessionStorage.getItem("userName")
         }
         formData.append('file', file)
-        formData.append('service_id', SERVICE_ID.expressTransportationUploadNew)
+        formData.append('service_id', 31)
         formData.append('dataContent', JSON.stringify(obj))
         const { code } = await UploadFileNew(formData)
         if (code != "0") {