浏览代码

11111111111

chenrui  1 年之前
父节点
当前提交
6515d61492

二进制
public/管理端 深圳机场航空货运一个码项目-操作手册v4.0.pdf


+ 35 - 25
src/api/newLogin.ts

@@ -6,78 +6,88 @@
  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  * @FilePath: \CABaggageData\src\api\login.js
  */
-import request from '@/utils/mockAxiosReq'
+import request from "@/utils/mockAxiosReq";
 
 //获取动态验证码
 export function GetCheckCode(params) {
   return request({
-    url: '/foxlibc/verification-code',
-    method: 'post',
+    url: "/foxlibc/verification-code",
+    method: "post",
     data: params,
-  })
+  });
 }
 
 //登录
 export function login(params) {
   return request({
-    url: '/foxlibc/sign-in',
-    method: 'post',
+    url: "/foxlibc/sign-in",
+    method: "post",
     data: params,
-  })
+  });
 }
 
 //登出
 export function loginUp(params?) {
   return request({
-    url: '/foxlibc/sign-out',
-    method: 'post',
+    url: "/foxlibc/sign-out",
+    method: "post",
     data: params,
-  })
+  });
 }
 
 //忘记密码
 export function changePassword(params) {
   return request({
-    url: '/foxlibc/reset-passwd',
-    method: 'post',
+    url: "/foxlibc/reset-passwd",
+    method: "post",
     data: params,
-  })
+  });
 }
 
 //忘记密码
 export function changeSecpasswd(params) {
   return request({
-    url: '/foxlibc/reset-secpasswd',
-    method: 'post',
+    url: "/foxlibc/reset-secpasswd",
+    method: "post",
     data: params,
-  })
+  });
 }
 
 //权限获取
 export function permission(params) {
   return request({
-    url: '/api/fs4a/GetAuth/v1',
-    method: 'post',
+    url: "/api/fs4a/GetAuth/v1",
+    method: "post",
     data: params,
-  })
+  });
 }
 
 //token
 export function gettoken(params) {
   return request({
-    url: '/foxlibc/application-token',
-    method: 'post',
+    url: "/foxlibc/application-token",
+    method: "post",
     data: params,
     istoken: true,
-  })
+  });
 }
 
 //获取系统基础设置
 export function GetSystemSet(params) {
   return request({
-    url: '/foxlibc/system/setting',
-    method: 'post',
+    url: "/foxlibc/system/setting",
+    method: "post",
     data: params,
     proxy: true,
-  })
+  });
+}
+
+//登录后接口
+export function Getmus(params) {
+  return request({
+    url: "/newOpenApi/search",
+    method: "post",
+    data: params,
+    proxy: true,
+  });
 }

+ 48 - 8
src/layout/components/NavBarTop/index.vue

@@ -2,27 +2,42 @@
   <div class="appNav">
     <div class="rowBC">
       <div class="appNav-left">
-        <el-avatar class="appNav-avatar" :size="25" :src="imgUrl" @error="errorHandler">
+        <el-avatar
+          class="appNav-avatar"
+          :size="25"
+          :src="imgUrl"
+          @error="errorHandler"
+        >
           <img src="../../../assets/home/pc_err.png" />
         </el-avatar>
         <span class="appNav-name">深圳机场货运一个码系统-管理端</span>
       </div>
       <div class="appNav-right">
-        <el-avatar class="appNav-avatar" :size="25" :src="imgUrl" @error="errorHandler">
+        <div class="help" style="float: left" @click="downFile">帮助</div>
+        <el-avatar
+          class="appNav-avatar"
+          :size="25"
+          :src="imgUrl"
+          @error="errorHandler"
+        >
           <img src="../../../assets/home/pc_err.png" />
         </el-avatar>
         <el-dropdown trigger="click" size="default">
           <div class="avatar-wrapper">
-            <span class="name">{{name}}</span>
-            <ArrowDownBold style="width: 1.2em; height: 1.3em;" />
+            <span class="name">{{ name }}</span>
+            <ArrowDownBold style="width: 1.2em; height: 1.3em" />
           </div>
           <template #dropdown>
             <el-dropdown-menu>
               <router-link to="/">
                 <el-dropdown-item>首页</el-dropdown-item>
               </router-link>
-              <el-dropdown-item divided @click="changePassword">修改密码</el-dropdown-item>
-              <el-dropdown-item divided @click="loginOut">退出登录</el-dropdown-item>
+              <el-dropdown-item divided @click="changePassword"
+                >修改密码</el-dropdown-item
+              >
+              <el-dropdown-item divided @click="loginOut"
+                >退出登录</el-dropdown-item
+              >
             </el-dropdown-menu>
           </template>
         </el-dropdown>
@@ -37,7 +52,7 @@ import { ElMessage } from "element-plus";
 import { ArrowDownBold } from "@element-plus/icons-vue";
 import { useUserStore } from "@/store/user";
 import imgUrl from "../../../assets/home/pic_logo.png";
-import ChangePassword from '@/layout/components/ChangePassword/index.vue'
+import ChangePassword from "@/layout/components/ChangePassword/index.vue";
 const userStore = useUserStore();
 const { username: name } = storeToRefs(userStore);
 const errorHandler = () => true;
@@ -62,7 +77,22 @@ const loginOut = async () => {
     ElMessage.error(result.message);
   }
 };
-
+//下载
+const downFile = () => {
+  const a = document.createElement("a");
+  // 给a标签的href属性值加上地址,注意:这里是绝对路径,不用加 点.
+  a.href = "./管理端 深圳机场航空货运一个码项目-操作手册v4.0.pdf";
+  // 设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可
+  a.download = "管理端 深圳机场航空货运一个码项目-操作手册v4.0.pdf";
+  // 障眼法藏起来a标签
+  a.style.display = "none";
+  // 将a标签追加到文档对象中
+  document.body.appendChild(a);
+  // 模拟点击了<a>标签,会触发<a>标签的href的读取,浏览器就会自动下载了
+  a.click();
+  // 一次性的,用完就删除a标签
+  a.remove();
+};
 const changePassword = () => {
   userStore.togglePasswordDialog(true);
 };
@@ -98,5 +128,15 @@ const changePassword = () => {
       top: -3px;
     }
   }
+  .help {
+    padding: 2px 2px;
+    display: flex;
+    font-size: 14px;
+    font-family: Microsoft YaHei;
+    font-weight: bold;
+    color: #ffffff;
+    cursor: pointer;
+    margin-right: 10px;
+  }
 }
 </style>

+ 59 - 12
src/views/login/Login.vue

@@ -1,28 +1,67 @@
 <!--suppress ALL -->
 <template>
   <div class="login-container columnCC">
-    <el-form ref="refloginForm" class="login-form" :model="formInline" :rules="formRules">
+    <el-form
+      ref="refloginForm"
+      class="login-form"
+      :model="formInline"
+      :rules="formRules"
+    >
       <div class="title-container rowSS">
-        <el-avatar class="appNav-avatar" :size="36" :src="imgUrl" @error="errorHandler">
+        <el-avatar
+          class="appNav-avatar"
+          :size="36"
+          :src="imgUrl"
+          @error="errorHandler"
+        >
           <img src="../../assets/home/pc_err.png" />
         </el-avatar>
         <h3 class="title">{{ title }}</h3>
       </div>
       <el-form-item prop="username" :rules="formRules.isNotNull">
-        <el-input size="large" autocomplete="on" v-model="formInline.username" placeholder="用户名" />
+        <el-input
+          size="large"
+          autocomplete="on"
+          v-model="formInline.username"
+          placeholder="用户名"
+        />
       </el-form-item>
       <!--<el-form-item prop="password" :rules="formRules.passwordValid">-->
       <el-form-item prop="password" :rules="formRules.isNotNull">
-        <el-input size="large" show-password ref="refPassword" autocomplete="on" v-model="formInline.password" type="password" name="password" placeholder="密码" />
+        <el-input
+          size="large"
+          show-password
+          ref="refPassword"
+          autocomplete="on"
+          v-model="formInline.password"
+          type="password"
+          name="password"
+          placeholder="密码"
+        />
       </el-form-item>
       <div v-if="verificationCodeEnable" class="rowSS">
         <el-form-item prop="verificationCode" :rules="formRules.isNotNull">
-          <el-input size="large" @keyup.enter="handleLogin" v-model="formInline.verificationCode" placeholder="请输入验证码" />
+          <el-input
+            size="large"
+            @keyup.enter="handleLogin"
+            v-model="formInline.verificationCode"
+            placeholder="请输入验证码"
+          />
         </el-form-item>
-        <Identify :identifyCode="identifyCode" @changeCode="changeCode" style="margin-left:18px" />
+        <Identify
+          :identifyCode="identifyCode"
+          @changeCode="changeCode"
+          style="margin-left: 18px"
+        />
       </div>
       <div class="tip-message">{{ tipMessage }}</div>
-      <el-button :loading="loading" type="primary" class="login-btn" size="large" @click.prevent="handleLogin">
+      <el-button
+        :loading="loading"
+        type="primary"
+        class="login-btn"
+        size="large"
+        @click.prevent="handleLogin"
+      >
         登录
       </el-button>
     </el-form>
@@ -31,7 +70,7 @@
 
 <script setup lang="ts">
 import { ref, reactive, onBeforeMount } from "vue";
-import { GetCheckCode, gettoken, GetSystemSet } from "@/api/newLogin";
+import { GetCheckCode, gettoken, GetSystemSet, Getmus } from "@/api/newLogin";
 import { setCodeToken, getCodeToken } from "@/utils/auth";
 import Identify from "./identify.vue";
 import { ElMessage } from "element-plus";
@@ -80,7 +119,7 @@ onBeforeMount(() => {
   getToken();
 });
 
-const verificationCodeEnable = ref(false)
+const verificationCodeEnable = ref(false);
 const getToken = async () => {
   const { code, returnData, message } = (await gettoken({
     appid: PLATFROM_CONFIG.appId,
@@ -88,7 +127,7 @@ const getToken = async () => {
   })) as any;
   if (code == 0 && returnData) {
     setCodeToken(returnData.appToken);
-    verificationCodeEnable.value = returnData.verificationCode
+    verificationCodeEnable.value = returnData.verificationCode;
     getCheckCode();
     //getSystemSet();
   } else {
@@ -155,11 +194,20 @@ let loginReq = () => {
     .then(() => {
       ElMessage({ message: "登录成功", type: "success" });
       sessionStorage.setItem("userName", params.username);
+      let paras = {
+        id: 135,
+        dataContent: [sessionStorage.getItem("User_Id")],
+      };
+      Getmus(paras);
       // router.push({ path: state.redirect || "/", query: state.otherQuery });
       router.push({ path: "/", query: state.otherQuery });
     })
     .catch((res) => {
-      console.log(res);
+      let paras = {
+        id: 136,
+        dataContent: [params.username],
+      };
+      Getmus(paras);
       tipMessage.value = res.msg;
       useCommon()
         .sleep(30)
@@ -246,4 +294,3 @@ $light_gray: #eee;
   text-align: center;
 }
 </style>
-