zhongxiaoyu 2 жил өмнө
parent
commit
40ab8253fd

+ 9 - 0
src/api/flight.js

@@ -224,3 +224,12 @@ export function generalDataReception (params) {
     data: params
   })
 }
+
+// 获取旅客信息
+export function GetPassengerInfo(params) {
+  return request({
+    url: 'http://10.211.67.163:8083/getBase64',
+    method: 'post',
+    data: params
+  })
+}

+ 10 - 1
src/api/newLogin.js

@@ -71,4 +71,13 @@ export function GetSystemSet (params) {
     data: params,
     proxy: true
   })
-}
+}
+
+// 密码校验
+export function CheckUser(params) {
+  return request({
+    url: '/foxlibc/sec-sign-in',
+    method: 'post',
+    data: params
+  })
+}

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

@@ -0,0 +1,257 @@
+<template>
+  <Dialog
+    :flag="passengerDialogFlag"
+    width="440px"
+  >
+    <div
+      id="dialogPassenger"
+      ref="dialog"
+      tabindex="0"
+      v-loading="loading"
+      element-loading-text="拼命加载中"
+      element-loading-spinner="el-icon-loading"
+      element-loading-background="rgba(0, 0, 0, 0.8)"
+      @keyup.self.esc="dialogHide"
+    >
+      <div class="title">
+        <span>查看旅客信息</span>
+        <i
+          class="el-icon-close"
+          @click="dialogHide"
+        />
+      </div>
+      <div class="content">
+        <template v-if="!checked">
+          <el-form
+            ref="checkForm"
+            :model="checkForm"
+            :rules="checkRules"
+            class="check-form"
+            label-position="left"
+          >
+            <el-form-item prop="password">
+              <el-input
+                ref="password"
+                v-model="checkForm.password"
+                show-password
+                placeholder="密码"
+                name="password"
+                tabindex="1"
+                class="password"
+              />
+            </el-form-item>
+            <div class="flex-wrap">
+              <el-form-item
+                prop="verificationCode"
+                class="flex1"
+              >
+                <el-input
+                  ref="verificationCode"
+                  v-model="checkForm.verificationCode"
+                  placeholder="请输入验证码"
+                  name="verificationCode"
+                  tabindex="2"
+                  @keyup.enter.native="submitHandler"
+                />
+              </el-form-item>
+              <Identify
+                :identifyCode="checkCode"
+                style="margin-left: 24px"
+                @changeCode="changeCode"
+              />
+            </div>
+          </el-form>
+        </template>
+        <template v-else>
+          <div class="passenger-info-box">
+            <img
+              :src="passengerImg"
+              alt="旅客信息"
+              title="旅客信息"
+              class="passenger-info-img"
+            >
+          </div>
+        </template>
+      </div>
+      <div
+        v-if="!checked"
+        class="footer"
+      >
+        <el-button
+          type="primary"
+          size="small"
+          @click="submitHandler"
+        >提交</el-button>
+        <el-button
+          size="small"
+          @click="dialogHide"
+        >取消</el-button>
+      </div>
+    </div>
+  </Dialog>
+</template>
+
+<script>
+import Dialog from '@/layout/components/Dialog'
+import Identify from '@/views/login/identify'
+import { mapGetters } from 'vuex'
+import { GetCheckCode, CheckUser } from '@/api/newLogin'
+import { GetPassengerInfo } from '@/api/flight'
+import { getToken } from '@/utils/auth'
+import MD5 from 'blueimp-md5'
+
+const noDataImage = require('@/assets/logo/nodata.png')
+
+export default {
+  name: 'PassengerDialog',
+  components: { Dialog, Identify },
+  computed: {
+    ...mapGetters(['passengerDialogFlag', 'passengerQueryParams'])
+  },
+  data() {
+    return {
+      checkForm: {
+        password: '',
+        verificationCode: ''
+      },
+      checkCode: null,
+      checkRules: {
+        password: [{ required: true, trigger: 'blur', message: '请输入密码' }],
+        verificationCode: [{ required: true, trigger: 'blur', message: '请输入验证码' }]
+      },
+      checked: false,
+      passengerImg: '',
+      loading: false
+    }
+  },
+  watch: {
+    passengerDialogFlag(val) {
+      this.checked = false
+      this.passengerImg = noDataImage
+      if (val) {
+        this.getCheckCode()
+      }
+    }
+  },
+  methods: {
+    dialogHide() {
+      this.$refs['checkForm']?.resetFields()
+      this.$store.dispatch('app/togglePassengerDialogFlag', false)
+    },
+    //获取动态验证码
+    async getCheckCode() {
+      try {
+        const { code, data, message } = await GetCheckCode({
+          appToken: getToken()
+        })
+        if (Number(code) === 0) {
+          this.checkCode = data
+        } else {
+          this.$message.error(message || '失败')
+        }
+      } catch (error) {
+        this.$message.error('失败')
+      }
+    },
+    //验证码重新获取
+    changeCode() {
+      this.getCheckCode()
+    },
+    submitHandler() {
+      this.$refs['checkForm'].validate(async valid => {
+        if (valid) {
+          try {
+            this.loading = true
+            await this.checkUser()
+            this.checked = true
+            await this.getPassengerInfo()
+            this.loading = false
+          } catch (error) {
+            this.$message.error(error?.message || '失败')
+            this.loading = false
+          }
+        }
+      })
+    },
+    async checkUser() {
+      try {
+        const { code, data, message } = await CheckUser({
+          userId: getToken('userid'),
+          password: MD5(this.checkForm.password.replace(/s+/g, '')),
+          verificationCode: this.checkForm.verificationCode
+        })
+        if (Number(code) !== 0) {
+          return Promise.reject(message || '失败')
+        }
+      } catch (error) {
+        return Promise.reject(error.message)
+      }
+    },
+    async getPassengerInfo() {
+      try {
+        const { passengerName, flightNO, flightDate } = this.passengerQueryParams
+        const { code, data, message } = await GetPassengerInfo({
+          id: '1803430',
+          dataContent: [passengerName, flightNO, flightDate]
+        })
+        if (Number(code) === 0) {
+          if (data?.verifyCodeImage) {
+            this.passengerImg = `data:image/png;base64,${data.verifyCodeImage}`
+          }
+        } else {
+          return Promise.reject(message || '失败')
+        }
+      } catch (error) {
+        return Promise.reject(error.message)
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+#dialogPassenger {
+  .title {
+    display: flex;
+    justify-content: space-between;
+    margin-bottom: 0;
+    .el-icon-close {
+      margin-right: 16px;
+      cursor: pointer;
+    }
+  }
+  .content {
+    margin: 0;
+    .el-form {
+      padding: 30px 20px 6px;
+    }
+    .passenger-info-box {
+      width: 100%;
+      min-height: 180px;
+      padding: 20px;
+      .passenger-info-img {
+        margin: 0 auto;
+        max-width: 100%;
+        max-height: 100%;
+        object-fit: cover;
+      }
+    }
+  }
+  .footer {
+    padding: 0 22px;
+    height: 56px;
+    display: flex;
+    justify-content: flex-end;
+    align-items: center;
+    background: #f0f5ff;
+    .el-button {
+      width: 80px;
+      border-radius: 4px;
+      font-family: 'Microsoft YaHei';
+      &:not(:last-child) {
+        margin-right: 14px;
+      }
+    }
+  }
+}
+</style>

+ 3 - 0
src/layout/index.vue

@@ -41,6 +41,7 @@
         </div>
       </div>
     </Dialog>
+    <PassengerDialog />
   </div>
 </template>
 
@@ -52,6 +53,7 @@ import { changePassword } from "@/api/newLogin";
 import { removeToken } from "@/utils/auth";
 import Dialog from "@/layout/components/Dialog";
 import MD5 from 'blueimp-md5'
+import PassengerDialog from '@/components/PassengerDialog'
 export default {
   name: "Layout",
   components: {
@@ -59,6 +61,7 @@ export default {
     Sidebar,
     AppMain,
     Dialog,
+    PassengerDialog
   },
   mixins: [ResizeMixin],
   data () {

+ 3 - 1
src/store/getters.js

@@ -32,6 +32,8 @@ const getters = {
   queryForm: state => state.app.queryForm,
   timeZone: state => state.timeZone.currentTimeZone,
   clickedCells: state => state.keepAlive.clickedCells,
-  savedPages: state => state.keepAlive.savedPages
+  savedPages: state => state.keepAlive.savedPages,
+  passengerDialogFlag: state => state.app.passengerDialogFlag,
+  passengerQueryParams: state => state.app.passengerQueryParams
 }
 export default getters

+ 26 - 8
src/store/modules/app.js

@@ -20,7 +20,13 @@ const state = {
   outflag: false,
   outcheck: false,
   systemSet: Cookies.get('systemSet') != null ? Cookies.get('systemSet') : null,
-  queryForm: JSON.parse(sessionStorage.getItem('queryForm')) ?? null
+  queryForm: JSON.parse(sessionStorage.getItem('queryForm')) ?? null,
+  passengerDialogFlag: false,
+  passengerQueryParams: {
+    flightNO: '',
+    flightDate: '',
+    passengerName: ''
+  }
 }
 const mutations = {
   TOGGLE_SIDEBAR: state => {
@@ -63,29 +69,35 @@ const mutations = {
   },
   EXPAND_SIDEBAR: (state, expandFlag) => {
     state.sidebar.expand = expandFlag
+  },
+  TOGGLE_PASSENGER_DIALOG_FLAG(state, flag) {
+    state.passengerDialogFlag = flag
+  },
+  SET_PASSENGER_QUERY_PARAMS(state, params) {
+    state.passengerQueryParams = params
   }
 }
 
 const actions = {
-  toggleSideBar ({ commit }) {
+  toggleSideBar({ commit }) {
     commit('TOGGLE_SIDEBAR')
   },
-  closeSideBar ({ commit }, { withoutAnimation }) {
+  closeSideBar({ commit }, { withoutAnimation }) {
     commit('CLOSE_SIDEBAR', withoutAnimation)
   },
-  toggleDevice ({ commit }, device) {
+  toggleDevice({ commit }, device) {
     commit('TOGGLE_DEVICE', device)
   },
-  toggleDialog ({ commit }, dialog) {
+  toggleDialog({ commit }, dialog) {
     commit('TOGGLE_DIALOG', dialog)
   },
-  togglePwdflag ({ commit }, pwdflag) {
+  togglePwdflag({ commit }, pwdflag) {
     commit('TOGGLE_PWDFLAG', pwdflag)
   },
-  toggleOutflag ({ commit }, outflag) {
+  toggleOutflag({ commit }, outflag) {
     commit('TOGGLE_OUTFLAG', outflag)
   },
-  toggleOutcheck ({ commit }, outcheck) {
+  toggleOutcheck({ commit }, outcheck) {
     commit('TOGGLE_OUTCHECK', outcheck)
   },
   getSystemSet({ commit }, systemSet) {
@@ -96,6 +108,12 @@ const actions = {
   },
   expandSidebar({ commit }, expandFlag) {
     commit('EXPAND_SIDEBAR', expandFlag)
+  },
+  togglePassengerDialogFlag({ commit }, flag) {
+    commit('TOGGLE_PASSENGER_DIALOG_FLAG', flag)
+  },
+  setPassengerQueryParams({ commit }, params) {
+    commit('SET_PASSENGER_QUERY_PARAMS', params)
   }
 }
 

+ 10 - 2
src/views/advancedQuery/views/advancedHome.vue

@@ -902,7 +902,7 @@ export default {
     cellClass({ row, column, rowIndex, columnIndex }) {
       const classes = []
       if (
-        ['flightNO', 'bagSN', 'U_Device_ID', 'preFlightNO', 'transferFlightNO'].includes(column.property) &&
+        ['flightNO', 'passengerNameUpcase', 'bagSN', 'U_Device_ID', 'preFlightNO', 'transferFlightNO'].includes(column.property) &&
         row[column.property] &&
         row[column.property] !== 'FBULK'
       ) {
@@ -922,7 +922,7 @@ export default {
     },
     cellClickHandler(row, column, cell, event) {
       if (
-        ['flightNO', 'bagSN', 'U_Device_ID', 'preFlightNO', 'transferFlightNO'].includes(column.property) &&
+        ['flightNO', 'passengerNameUpcase', 'bagSN', 'U_Device_ID', 'preFlightNO', 'transferFlightNO'].includes(column.property) &&
         row[column.property] &&
         row[column.property] !== 'FBULK'
       ) {
@@ -941,6 +941,14 @@ export default {
               }
             })
             break
+          case 'passengerNameUpcase':
+            this.$store.dispatch('app/setPassengerQueryParams', {
+              flightNO: row.flightNO,
+              flightDate: row.flightDate,
+              passengerName: row.passengerNameUpcase
+            })
+            this.$store.dispatch('app/togglePassengerDialogFlag', true)
+            break
           case 'bagSN':
             this.$router.push({
               path: '/advance/baggageView',

+ 9 - 2
src/views/advancedQuery/views/advancedNew.vue

@@ -693,7 +693,7 @@ export default {
       return function ({ row, column, rowIndex, columnIndex }) {
         const classes = []
         if (
-          ['flightNO', 'bagSN', 'U_Device_ID', 'preFlightNO', 'transferFlightNO'].includes(column.property) &&
+          ['flightNO', 'passengerName', 'bagSN', 'U_Device_ID', 'preFlightNO', 'transferFlightNO'].includes(column.property) &&
           row[column.property] &&
           row[column.property] !== 'FBULK'
         ) {
@@ -714,7 +714,7 @@ export default {
     },
     cellClickHandler(row, column, cell, event) {
       if (
-        ['flightNO', 'bagSN', 'U_Device_ID', 'preFlightNO', 'transferFlightNO'].includes(column.property) &&
+        ['flightNO', 'passengerName', 'bagSN', 'U_Device_ID', 'preFlightNO', 'transferFlightNO'].includes(column.property) &&
         row[column.property] &&
         row[column.property] !== 'FBULK'
       ) {
@@ -733,6 +733,13 @@ export default {
               }
             })
             break
+          case 'passengerName':
+            this.$store.dispatch('app/setPassengerQueryParams', {
+              flightNO: row.flightNO,
+              flightDate: row.flightDate,
+              passengerName: row.passengerName
+            })
+            this.$store.dispatch('app/togglePassengerDialogFlag', true)
           case 'bagSN':
             this.$router.push({
               path: '/advance/baggageView',

+ 28 - 4
src/views/baggageManagement/components/container/index.vue

@@ -166,7 +166,7 @@ import Dialog from '@/layout/components/Dialog/index.vue'
 // import TimeZoneSelector from '@/components/TimeZoneSelector'
 import { myQuery } from '@/api/dataIntegration'
 import tableColsMixin from '../../mixins/tableCols'
-import timeZoneMixin from '../../mixins/timeZone'
+// import timeZoneMixin from '../../mixins/timeZone'
 import TableHeaderCell from '@/components/TableHeaderCell'
 import { setTableFilters } from '@/utils/table'
 import { mapGetters } from 'vuex'
@@ -178,7 +178,10 @@ export default {
     Dialog,
     TableHeaderCell
   },
-  mixins: [tableColsMixin, timeZoneMixin],
+  mixins: [
+    tableColsMixin
+    //  timeZoneMixin
+  ],
   data() {
     return {
       fullscreenLoading: false,
@@ -371,8 +374,11 @@ export default {
     },
     rowClass({ row, rowIndex }) {
       const classes = []
-      if (row['Status'] === 'DEL') {
+      if (row['isDEL'] === 'DEL') {
         classes.push('bgl-deleted')
+        if (row['waitOFF'] === 1) {
+          classes.push('bgl-toUnload')
+        }
       }
       return classes.join(' ')
     },
@@ -434,7 +440,12 @@ export default {
         })
         switch (column.property) {
           case 'passengerName':
-            this.$message.info('开发中')
+            this.$store.dispatch('app/setPassengerQueryParams', {
+              flightNO: this.queryData.flightNO,
+              flightDate: this.queryData.flightDate,
+              passengerName: row.passengerName
+            })
+            this.$store.dispatch('app/togglePassengerDialogFlag', true)
             break
           case 'luggageSN':
             this.$router.push({
@@ -465,6 +476,16 @@ export default {
         return ['合计', `共${num}件`]
       }
     },
+    tableFormat(row, column, cellValue) {
+      switch (column.property) {
+        case 'isDEL':
+          return cellValue === 'DEL' ? '删除' : ''
+        case 'activeState':
+          return Number(cellValue) === 1 ? '激活' : '未激活'
+        default:
+          return cellValue ?? ''
+      }
+    },
     exportHandler(refName, tableName) {
       const table = this.$refs[refName].$el.cloneNode(true)
       const fileName = `${tableName}-${Object.values(this.queryData).join('-')}.xlsx`
@@ -550,6 +571,9 @@ export default {
               background: #d2d6df;
               font-style: italic;
             }
+            &.bgl-warning td {
+              background: lightcoral;
+            }
           }
         }
       }

+ 12 - 13
src/views/baggageManagement/components/containerHistory/index.vue

@@ -302,7 +302,7 @@ export default {
       const classes = []
       if (
         [
-          'flightNO',
+          'passengerName',
           'luggageSN'
           // 'inFlightNO',
           // 'transferFlightNO'
@@ -326,7 +326,7 @@ export default {
     cellClickHandler(row, column, cell, event) {
       if (
         [
-          // 'flightNO',
+          'passengerName',
           'luggageSN'
           // 'inFlightNO',
           // 'transferFlightNO'
@@ -339,15 +339,14 @@ export default {
           pageName: this.$route.name
         })
         switch (column.property) {
-          // case 'flightNO':
-          //   this.$router.push({
-          //     path: '/advance/flightView',
-          //     query: {
-          //       flightNO: this.selectedHistoryData.flightNO,
-          //       flightDate: this.selectedHistoryData.flightDate
-          //     }
-          //   })
-          //   break
+          case 'passengerName':
+            this.$store.dispatch('app/setPassengerQueryParams', {
+              flightNO: this.selectedHistoryData.flightNO,
+              flightDate: this.selectedHistoryData.flightDate,
+              passengerName: row.passengerName
+            })
+            this.$store.dispatch('app/togglePassengerDialogFlag', true)
+            break
           case 'luggageSN':
             this.$router.push({
               path: `/${this.$route.path.split('/').slice(1, -1).join('/')}/baggageView`,
@@ -384,9 +383,9 @@ export default {
     tableFormat(row, column, cellValue) {
       switch (column.property) {
         case 'isDEL':
-          return cellValue === 'DEL' ? cellValue : ''
+          return cellValue === 'DEL' ? '删除' : ''
         case 'activeState':
-          return cellValue === 1 ? '激活' : '未激活'
+          return Number(cellValue) === 1 ? '激活' : '未激活'
         default:
           return cellValue ?? ''
       }

+ 7 - 2
src/views/baggageManagement/components/flight/index.vue

@@ -801,7 +801,7 @@ export default {
               this.queryData = { flightNO, flightDate }
               this.queryAirline([flightNO, flightDate])
             }
-            this.selectedFilter = fastFilter
+            this.selectedFilter = fastFilter ?? ''
           } else {
             this.$router.push('/')
           }
@@ -1018,7 +1018,12 @@ export default {
           //   })
           //   break
           case 'PassengerNameUpcase':
-            this.$message.info('开发中')
+            this.$store.dispatch('app/setPassengerQueryParams', {
+              flightNO: this.queryData.flightNO,
+              flightDate: this.queryData.flightDate,
+              passengerName: row.PassengerNameUpcase
+            })
+            this.$store.dispatch('app/togglePassengerDialogFlag', true)
             break
           case 'BagSN':
             this.$router.push({