zhaoke 1 year ago
parent
commit
e31be2515d

+ 2 - 2
public/index.html

@@ -11,8 +11,8 @@
     <meta http-equiv="X-Content-Type-Options" content="nosniff" />
     <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
     <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>
     <div id="app"></div>

+ 2 - 2
src/api/flight.js

@@ -1,5 +1,5 @@
 import request from '@/utils/request'
-import '@/config/staticConfig' //配置文件
+//import '@/config/staticConfig' //配置文件
 // 全部机场查询
 export function CurrentAirportQuery (params) {
   return request({
@@ -226,7 +226,7 @@ export function generalDataReception (params) {
 }
 
 // 获取旅客信息
-export function GetPassengerInfo(params) {
+export function GetPassengerInfo (params) {
   return request({
     url: PLATFROM_CONFIG.getBase64,
     method: 'post',

+ 1 - 1
src/api/temp.js

@@ -1,6 +1,6 @@
 import request from '@/utils/request'
 import { Message } from 'element-ui'
-import '@/config/staticConfig' //配置文件
+//import '@/config/staticConfig' //配置文件
 export function GeneralDataReception (params) {
   return request({
     url: '/openApi/generalDataReception',

+ 23 - 87
src/components/PassengerDialog/index.vue

@@ -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;
       }

+ 1 - 1
src/config/staticConfig.js

@@ -9,7 +9,7 @@ window.PLATFROM_CONFIG = {
   editRule: /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[`!@#$%^&*()_+{}":?><`,./';=-])[\da-zA-Z`!@#$%^&*()_+{}":?><`,./';=-]{8,}$/,
   maxCount: 5, //登录错误次数
   maxTime: 10, //登录错误次数后可再次登录时间(分钟)
-  loseTimeHour: 48 //失效间隔时间(小时)
+  loseTimeHour: 480 //失效间隔时间(小时)
 }
 
 const baseNewUrl = window.location.hostname

+ 1 - 1
src/getMenu.js

@@ -8,7 +8,7 @@ import getPageTitle from '@/utils/get-page-title'
 import Layout from '@/layout'
 import { setTree, listToTree } from '@/utils/validate'
 import * as _ from 'lodash'
-import '@/config/staticConfig' //按钮权限 全局自定义指令v-is
+//import '@/config/staticConfig' //按钮权限 全局自定义指令v-is
 
 NProgress.configure({ showSpinner: false }) // NProgress Configuration
 

+ 1 - 1
src/layout/index.vue

@@ -65,7 +65,7 @@ import PassengerDialog from '@/components/PassengerDialog'
 import AbnormalBaggageDialog from '@/components/AbnormalBaggageDialog'
 import WarningDialog from '@/components/WarningDialog'
 import ErrorDialog from '@/components/ErrorDialog'
-import '@/config/staticConfig' // 按钮权限 全局自定义指令v-is
+//import '@/config/staticConfig' // 按钮权限 全局自定义指令v-is
 export default {
   name: 'Layout',
   components: {

+ 2 - 2
src/main.js

@@ -20,9 +20,9 @@ import router from './router'
 import '@/icons' // icon
 // import '@/permission'
 import '@/getMenu'
-import '@/config/staticConfig' //按钮权限 全局自定义指令v-is
+//import '@/config/staticConfig' //按钮权限 全局自定义指令v-is
 import '@/config/checkPermission' //配置文件
-import '@/config/config' //服务配置文件
+//import '@/config/config' //服务配置文件
 
 Vue.use(ElementUI)
 Vue.prototype._ = _

+ 1 - 1
src/store/modules/user.js

@@ -3,7 +3,7 @@ import { resetRouter } from '@/router'
 import { Query } from "@/api/webApi"
 import { isValue } from "@/utils/validate"
 import { getAuth, signIn, loginOut } from '@/api/login'
-import '@/config/staticConfig' //按钮权限 全局自定义指令v-is
+//import '@/config/staticConfig' //按钮权限 全局自定义指令v-is
 const getDefaultState = () => {
   return {
     token: getToken(),

+ 1 - 1
src/utils/request-new.js

@@ -2,7 +2,7 @@ import axios from 'axios'
 import { MessageBox, Message } from 'element-ui'
 import { getToken, getCodeToken, TokenKey } from '@/utils/auth'
 import store from '@/store'
-import '@/config/staticConfig' //按钮权限 全局自定义指令v-is
+//import '@/config/staticConfig' //按钮权限 全局自定义指令v-is
 let isMttoken
 // create an axios instance
 const service = axios.create({

+ 1 - 1
src/utils/request.js

@@ -3,7 +3,7 @@ import { MessageBox, Message } from "element-ui";
 import store from "@/store";
 import router, { resetRouter } from "@/router";
 import { getToken, TokenKey, removeToken } from "@/utils/auth";
-import '@/config/staticConfig' //按钮权限 全局自定义指令v-is
+//import '@/config/staticConfig' //按钮权限 全局自定义指令v-is
 // create an axios instance
 // let baseURL
 // if (process.env.NODE_ENV === "development") {

+ 1 - 1
src/utils/requestTemp.js

@@ -2,7 +2,7 @@ import axios from 'axios'
 import { MessageBox, Message } from 'element-ui'
 import store from '@/store'
 import router, { resetRouter } from '@/router'
-import '@/config/staticConfig' //按钮权限 全局自定义指令v-is
+//import '@/config/staticConfig' //按钮权限 全局自定义指令v-is
 // import { getToken, getUserId, removeToken } from '@/utils/auth'
 // import MD5 from 'blueimp-md5'
 // create an axios instance

+ 1 - 1
src/views/login/index copy.vue

@@ -44,7 +44,7 @@ import { getVCode, getToken } from '@/api/login'
 import { setCodeToken, getCodeToken, setToken } from '@/utils/auth'
 import MD5 from 'blueimp-md5'
 import { mapGetters } from 'vuex'
-import '@/config/staticConfig' // 按钮权限 全局自定义指令v-is
+//import '@/config/staticConfig' // 按钮权限 全局自定义指令v-is
 export default {
   name: 'Login',
   data () {

+ 1 - 1
src/views/login/index.vue

@@ -43,7 +43,7 @@ import { getVCode, getToken } from '@/api/login'
 import { setCodeToken, getCodeToken, setToken } from '@/utils/auth'
 import MD5 from 'blueimp-md5'
 import { mapGetters } from 'vuex'
-import '@/config/staticConfig' // 按钮权限 全局自定义指令v-is
+//import '@/config/staticConfig' // 按钮权限 全局自定义指令v-is
 export default {
   name: 'Login',
   data () {

+ 4 - 4
src/views/newUserManagement/index.vue

@@ -227,7 +227,7 @@ import Dialog from '@/layout/components/Dialog'
 import pf from '@/layout/mixin/publicFunc'
 import MD5 from 'blueimp-md5'
 import { listToTree } from '@/utils/validate'
-import '@/config/staticConfig' // 按钮权限 全局自定义指令v-is
+//import '@/config/staticConfig' // 按钮权限 全局自定义指令v-is
 export default {
   name: 'NewManageMent',
   components: { Dialog },
@@ -309,15 +309,15 @@ export default {
       arrTreebelong: [],
       arrTrees: [{
         id: '公司',
-        name:'公司'
+        name: '公司'
       },
       {
         id: '部门',
-        name:'部门'
+        name: '部门'
       },
       {
         id: '岗位',
-        name:'岗位'
+        name: '岗位'
       }],
       treeCheckObj: {}
     }