|
@@ -1,97 +1,33 @@
|
|
|
<template>
|
|
|
- <Dialog
|
|
|
- :flag="passengerDialogFlag"
|
|
|
- width="440px"
|
|
|
- >
|
|
|
- <div
|
|
|
- id="dialogPassenger"
|
|
|
- ref="dialog"
|
|
|
- v-loading="loading"
|
|
|
- tabindex="0"
|
|
|
- element-loading-text="拼命加载中"
|
|
|
- element-loading-spinner="el-icon-loading"
|
|
|
- element-loading-background="rgba(0, 0, 0, 0.8)"
|
|
|
- @keyup.self.esc="dialogHide"
|
|
|
- >
|
|
|
+ <Dialog :flag="passengerDialogFlag" width="440px">
|
|
|
+ <div id="dialogPassenger" ref="dialog" v-loading="loading" tabindex="0" 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"
|
|
|
- />
|
|
|
+ <i class="el-icon-close" @click="dialogHide" />
|
|
|
</div>
|
|
|
<div class="content">
|
|
|
<template v-if="!userChecked">
|
|
|
- <el-form
|
|
|
- ref="checkForm"
|
|
|
- :model="checkForm"
|
|
|
- :rules="checkRules"
|
|
|
- class="check-form"
|
|
|
- label-position="left"
|
|
|
- label-width="70px"
|
|
|
- >
|
|
|
- <el-form-item
|
|
|
- label="密码"
|
|
|
- prop="password"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- ref="password"
|
|
|
- v-model="checkForm.password"
|
|
|
- show-password
|
|
|
- placeholder="密码"
|
|
|
- name="password"
|
|
|
- tabindex="1"
|
|
|
- class="password"
|
|
|
- />
|
|
|
+ <el-form ref="checkForm" :model="checkForm" :rules="checkRules" class="check-form" label-position="left" label-width="70px">
|
|
|
+ <el-form-item label="密码" 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
|
|
|
- label="验证码"
|
|
|
- prop="verificationCode"
|
|
|
- class="flex1"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- ref="verificationCode"
|
|
|
- v-model="checkForm.verificationCode"
|
|
|
- placeholder="请输入验证码"
|
|
|
- name="verificationCode"
|
|
|
- tabindex="2"
|
|
|
- @keyup.enter.native="submitHandler"
|
|
|
- />
|
|
|
+ <el-form-item label="验证码" 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
|
|
|
- :identify-code="checkCode"
|
|
|
- style="margin-left: 24px"
|
|
|
- @changeCode="changeCode"
|
|
|
- />
|
|
|
+ <Identify :identify-code="checkCode" style="margin-left: 24px" @changeCode="changeCode" />
|
|
|
</div>
|
|
|
</el-form>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<div class="passenger-info-box">
|
|
|
- <img
|
|
|
- v-show="!loading"
|
|
|
- :src="passengerImg"
|
|
|
- alt="旅客信息"
|
|
|
- title="旅客信息"
|
|
|
- class="passenger-info-img"
|
|
|
- >
|
|
|
+ <img v-show="!loading" :src="passengerImg" alt="旅客信息" title="旅客信息" class="passenger-info-img">
|
|
|
</div>
|
|
|
</template>
|
|
|
</div>
|
|
|
- <div
|
|
|
- v-if="!userChecked"
|
|
|
- class="footer"
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="small"
|
|
|
- @click="submitHandler"
|
|
|
- >提交</el-button>
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- @click="dialogHide"
|
|
|
- >取消</el-button>
|
|
|
+ <div v-if="!userChecked" class="footer">
|
|
|
+ <el-button type="primary" size="small" @click="submitHandler">提交</el-button>
|
|
|
+ <el-button size="small" @click="dialogHide">取消</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</Dialog>
|
|
@@ -103,7 +39,7 @@ import Identify from '@/views/login/identify'
|
|
|
import { mapGetters } from 'vuex'
|
|
|
import { GetCheckCode, CheckUser } from '@/api/temp'
|
|
|
import { GetPassengerInfo } from '@/api/flight'
|
|
|
-import '@/config/staticConfig' // 配置文件
|
|
|
+//import '@/config/staticConfig' // 配置文件
|
|
|
// import { getToken } from '@/utils/auth'
|
|
|
import MD5 from 'blueimp-md5'
|
|
|
|
|
@@ -119,7 +55,7 @@ export default {
|
|
|
'userChecked',
|
|
|
]),
|
|
|
},
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
return {
|
|
|
checkForm: {
|
|
|
password: '',
|
|
@@ -137,7 +73,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
- passengerDialogFlag(val) {
|
|
|
+ passengerDialogFlag (val) {
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs['dialog']?.focus()
|
|
|
})
|
|
@@ -152,12 +88,12 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
- dialogHide() {
|
|
|
+ dialogHide () {
|
|
|
this.$refs['checkForm']?.resetFields()
|
|
|
this.$store.dispatch('app/togglePassengerDialogFlag', false)
|
|
|
},
|
|
|
// 获取动态验证码
|
|
|
- async getCheckCode() {
|
|
|
+ async getCheckCode () {
|
|
|
try {
|
|
|
const { code, data, message } = await GetCheckCode({
|
|
|
appToken: PLATFROM_CONFIG.tempAppToken,
|
|
@@ -172,10 +108,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 验证码重新获取
|
|
|
- changeCode() {
|
|
|
+ changeCode () {
|
|
|
this.getCheckCode()
|
|
|
},
|
|
|
- submitHandler() {
|
|
|
+ submitHandler () {
|
|
|
this.$refs['checkForm'].validate(async valid => {
|
|
|
if (valid) {
|
|
|
try {
|
|
@@ -189,7 +125,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- async checkUser() {
|
|
|
+ async checkUser () {
|
|
|
this.loading = true
|
|
|
try {
|
|
|
const { code, data, message } = await CheckUser({
|
|
@@ -207,7 +143,7 @@ export default {
|
|
|
}
|
|
|
this.loading = false
|
|
|
},
|
|
|
- async getPassengerInfo() {
|
|
|
+ async getPassengerInfo () {
|
|
|
this.loading = true
|
|
|
try {
|
|
|
const { passengerName, flightNO, flightDate } =
|
|
@@ -272,7 +208,7 @@ export default {
|
|
|
.el-button {
|
|
|
width: 80px;
|
|
|
border-radius: 4px;
|
|
|
- font-family: 'Microsoft YaHei';
|
|
|
+ font-family: "Microsoft YaHei";
|
|
|
&:not(:last-child) {
|
|
|
margin-right: 14px;
|
|
|
}
|