Compare commits
1 Commits
0067999831
...
feature-lo
| Author | SHA1 | Date | |
|---|---|---|---|
| f93057e4d1 |
@@ -1,32 +0,0 @@
|
|||||||
/*
|
|
||||||
* @Author: Kane
|
|
||||||
* @Date: 2023-01-22 23:11:26
|
|
||||||
* @LastEditors: Kane
|
|
||||||
* @LastEditTime: 2023-01-22 23:47:15
|
|
||||||
* @FilePath: \AdminSys\src\main\java\com\cpic\xim\web\controllers\FileUpload\FileUpload.java
|
|
||||||
* @Description: 用于接受上传文件的Controller。
|
|
||||||
*
|
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.cpic.xim.web.controllers.FileUpload;
|
|
||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
@SuppressWarnings( "unused" )
|
|
||||||
@Controller
|
|
||||||
@RequestMapping( path = "/file" )
|
|
||||||
public class FileUpload
|
|
||||||
{
|
|
||||||
@RequestMapping( path = "/file-upload.do" )
|
|
||||||
public void getUploadFile( @RequestParam( "task-name" ) String taskName,
|
|
||||||
@RequestParam( "file" ) MultipartFile[] files )
|
|
||||||
{
|
|
||||||
int fileCount = files.length;
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2022-12-15 11:11:21
|
* @Date: 2022-12-15 11:11:21
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-17 23:28:21
|
* @LastEditTime: 2023-01-11 09:18:29
|
||||||
* @FilePath: \AdminSys\src\main\java\com\cpic\xim\web\controllers\account\P13AccountCheckController.java
|
* @FilePath: \AdminSys\src\main\java\com\cpic\xim\web\controllers\account\P13AccountCheckController.java
|
||||||
* @Description: P13账号验证用Controller。
|
* @Description: P13账号验证用Controller。
|
||||||
*
|
*
|
||||||
@@ -30,13 +30,7 @@ import com.cpic.xim.myutils.account.LdapAccountCheck;
|
|||||||
public class P13AccountCheckController
|
public class P13AccountCheckController
|
||||||
{
|
{
|
||||||
/*****************************************************
|
/*****************************************************
|
||||||
* 根据用户提供的P09工号或者P13账号密码,查找用户信息,并AD域服务器验证p13账号密码。
|
*
|
||||||
* 验证通过即返回人员信息。
|
|
||||||
* 验证不通过result.success值为false,并在message提供失败原因。
|
|
||||||
* @param param 由json格式转换的请求参数
|
|
||||||
* @param request
|
|
||||||
* @param response
|
|
||||||
* @return 返回一个P13AccountCheckResult对象,其中提供验证结果
|
|
||||||
*****************************************************/
|
*****************************************************/
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@RequestMapping( path = "/p13_account_check.do" )
|
@RequestMapping( path = "/p13_account_check.do" )
|
||||||
@@ -60,6 +54,7 @@ public class P13AccountCheckController
|
|||||||
staff = null;
|
staff = null;
|
||||||
result.setMessage( "人员工号或P13账号不存在!" );
|
result.setMessage( "人员工号或P13账号不存在!" );
|
||||||
result.setSuccess( false );
|
result.setSuccess( false );
|
||||||
|
|
||||||
}
|
}
|
||||||
catch ( ClassNotFoundException error )
|
catch ( ClassNotFoundException error )
|
||||||
{
|
{
|
||||||
@@ -112,3 +107,4 @@ public class P13AccountCheckController
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* @Author: Kane
|
|
||||||
* @Date: 2023-01-12 15:01:22
|
|
||||||
* @LastEditors: Kane
|
|
||||||
* @LastEditTime: 2023-01-13 09:23:55
|
|
||||||
* @FilePath: \AdminSys\src\main\java\com\cpic\xim\web\filters\token\TokenFilter.java
|
|
||||||
* @Description: 用于检查token的过滤器
|
|
||||||
*
|
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
|
||||||
*/
|
|
||||||
package com.cpic.xim.web.filters.token;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import javax.servlet.Filter;
|
|
||||||
import javax.servlet.FilterChain;
|
|
||||||
import javax.servlet.ServletException;
|
|
||||||
import javax.servlet.ServletRequest;
|
|
||||||
import javax.servlet.ServletResponse;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
@SuppressWarnings( "unused")
|
|
||||||
public class TokenFilter implements Filter
|
|
||||||
{
|
|
||||||
/*****************************************************
|
|
||||||
*
|
|
||||||
*****************************************************/
|
|
||||||
@Override
|
|
||||||
public void doFilter( ServletRequest req, ServletResponse resp, FilterChain chain )
|
|
||||||
throws ServletException, IOException
|
|
||||||
{
|
|
||||||
HttpServletRequest request = (HttpServletRequest) req;
|
|
||||||
HttpServletResponse response = (HttpServletResponse) resp;
|
|
||||||
|
|
||||||
String URI = request.getRequestURI();
|
|
||||||
|
|
||||||
chain.doFilter( request, response );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1">
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
|
|
||||||
version="3.1">
|
|
||||||
<display-name>Archetype Created Web Application</display-name>
|
<display-name>Archetype Created Web Application</display-name>
|
||||||
|
|
||||||
<servlet>
|
<servlet>
|
||||||
@@ -27,15 +24,6 @@
|
|||||||
<url-pattern>*.do</url-pattern>
|
<url-pattern>*.do</url-pattern>
|
||||||
</filter-mapping>
|
</filter-mapping>
|
||||||
|
|
||||||
<filter>
|
|
||||||
<filter-name>token-filter</filter-name>
|
|
||||||
<filter-class>com.cpic.xim.web.filters.token.TokenFilter</filter-class>
|
|
||||||
</filter>
|
|
||||||
<filter-mapping>
|
|
||||||
<filter-name>token-filter</filter-name>
|
|
||||||
<url-pattern>*.do</url-pattern>
|
|
||||||
</filter-mapping>
|
|
||||||
|
|
||||||
<!-- 配置文件路径参数 -->
|
<!-- 配置文件路径参数 -->
|
||||||
<context-param>
|
<context-param>
|
||||||
<param-name>config_file_location</param-name>
|
<param-name>config_file_location</param-name>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
VUE_APP_API_URL_LOGIN = "http://222.76.244.118:11001/admin-system/account/p13_account_check.do"
|
VUE_APP_API_URL_LOGIN = "http://localhost:8080/admin-system/account/p13_account_check.do"
|
||||||
|
|||||||
@@ -2,29 +2,21 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2022-12-14 15:12:46
|
* @Date: 2022-12-14 15:12:46
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-19 14:26:17
|
* @LastEditTime: 2022-12-14 17:03:58
|
||||||
* @FilePath: \admin_system\src\App.vue
|
* @FilePath: \admin_system\src\App.vue
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-config-provider :locale="this.locale">
|
<router-view></router-view>
|
||||||
<router-view></router-view>
|
|
||||||
</el-config-provider>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
//引入语言组件
|
// import HelloWorld from "./components/HelloWorld.vue";
|
||||||
import zhCn from "element-plus/lib/locale/lang/zh-cn";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "App",
|
name: "App",
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
locale: zhCn, //语言属性
|
|
||||||
};
|
|
||||||
},
|
|
||||||
components: {
|
components: {
|
||||||
// HelloWorld,
|
// HelloWorld,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,26 +2,26 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2023-01-04 11:05:44
|
* @Date: 2023-01-04 11:05:44
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-19 14:52:24
|
* @LastEditTime: 2023-01-09 15:50:52
|
||||||
* @FilePath: \admin_system\src\layout\Index.vue
|
* @FilePath: \admin_system\src\layout\Index.vue
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-container id="layout-container">
|
<el-container id="layout-container">
|
||||||
<el-header id="layout-header">
|
<el-header id="layout-header">
|
||||||
<LayoutHeader />
|
<LayoutHeader />
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-container id="layout-container-down">
|
<el-container id="layout-container-down">
|
||||||
<el-aside :width="asideWidth" id="layout-aside">
|
<el-aside :width="asideWidth" id="layout-aside">
|
||||||
<LayoutAside />
|
<LayoutAside />
|
||||||
</el-aside>
|
</el-aside>
|
||||||
<el-main id="layout-main">
|
<el-main id="layout-main">
|
||||||
<LayoutMain />
|
<LayoutMain />
|
||||||
</el-main>
|
</el-main>
|
||||||
|
</el-container>
|
||||||
</el-container>
|
</el-container>
|
||||||
</el-container>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -30,51 +30,50 @@ import LayoutHeader from "./components/Header.vue";
|
|||||||
import LayoutMain from "./components/Main.vue";
|
import LayoutMain from "./components/Main.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "layoutPage",
|
name: "layoutPage",
|
||||||
components: {
|
components: {
|
||||||
LayoutAside,
|
LayoutAside, LayoutHeader, LayoutMain,
|
||||||
LayoutHeader,
|
|
||||||
LayoutMain,
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
asideWidth() {
|
|
||||||
const collapse = this.$store.state.app.asideBarCollapse;
|
|
||||||
|
|
||||||
return collapse === true ? "65px" : "180px";
|
|
||||||
},
|
},
|
||||||
},
|
computed: {
|
||||||
|
asideWidth()
|
||||||
|
{
|
||||||
|
const collapse = this.$store.state.app.asideBarCollapse;
|
||||||
|
|
||||||
|
return collapse === true ? "65px" : "175px";
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
#layout-container {
|
#layout-container {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
max-height: 100vh;
|
max-height: 100vh;
|
||||||
/* overflow: hiddens; */
|
/* overflow: hiddens; */
|
||||||
}
|
}
|
||||||
|
|
||||||
#layout-aside {
|
#layout-aside {
|
||||||
/* width: 175px; */
|
/* width: 175px; */
|
||||||
background-color: #223142;
|
background-color: #223142;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
#layout-header {
|
#layout-header {
|
||||||
height: 50px;
|
height: 50px;
|
||||||
/* background-color: #77bc99; */
|
/* background-color: #77bc99; */
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
flex-grow: 0;
|
flex-grow: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#layout-main {
|
#layout-main {
|
||||||
background-color: #ecf2f9;
|
background-color: #ddd;
|
||||||
/* height: 0; */
|
/* height: 0; */
|
||||||
/* flex-grow: 1; */
|
/* flex-grow: 1; */
|
||||||
overflow: overlay;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#layout-container-down {
|
#layout-container-down {
|
||||||
height: calc(100vh - 50px);
|
height: calc(100vh - 50px);
|
||||||
/* max-height: calc(100vh - 50px); */
|
/* max-height: calc(100vh - 50px); */
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -2,29 +2,24 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2023-01-04 11:39:04
|
* @Date: 2023-01-04 11:39:04
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-19 14:53:38
|
* @LastEditTime: 2023-01-11 17:07:13
|
||||||
* @FilePath: \admin_system\src\layout\components\Header.vue
|
* @FilePath: \admin_system\src\layout\components\Header.vue
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="app_banner no_select">
|
<div class="app_banner no_select">
|
||||||
<span class="company_name">CPIC</span>
|
<span class="company_name">CPIC</span>
|
||||||
<div class="version_div">
|
<div class="version_div">
|
||||||
<div>测试版</div>
|
<div>测试版</div>
|
||||||
<div>3.6.7 x64 Build 202208301257</div>
|
<div>3.6.7 x64 Build 202208301257</div>
|
||||||
|
</div>
|
||||||
|
<div class="buttons_div">
|
||||||
|
<User style="width: 25px; height; 25px; margin-right: 8px" />
|
||||||
|
<SwitchButton style="width: 25px; height; 25px; margin-right: 8px; cursor:pointer;" @click="logout" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="buttons_div">
|
|
||||||
<User
|
|
||||||
style="width: 25px; height; 25px; margin-right: 8px; cursor:pointer;"
|
|
||||||
/>
|
|
||||||
<SwitchButton
|
|
||||||
style="width: 25px; height; 25px; margin-right: 8px; cursor:pointer;"
|
|
||||||
@click="logout"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -32,69 +27,73 @@
|
|||||||
import { Logout } from "../../utils/api/info/account";
|
import { Logout } from "../../utils/api/info/account";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AppBanner",
|
name: "AppBanner",
|
||||||
data() {
|
data()
|
||||||
return {};
|
{
|
||||||
},
|
return {};
|
||||||
// created() {
|
},
|
||||||
// console.log("banner请求数据!");
|
// created() {
|
||||||
// },
|
// console.log("banner请求数据!");
|
||||||
mounted() {
|
// },
|
||||||
//console.log("banner请求数据!");
|
mounted()
|
||||||
},
|
{
|
||||||
methods: {
|
//console.log("banner请求数据!");
|
||||||
logout() {
|
},
|
||||||
this.$confirm("是否退出系统?", "请确认", {
|
methods: {
|
||||||
confirmButtonText: "是",
|
logout()
|
||||||
cancelButtonText: "否",
|
{
|
||||||
type: "warning",
|
this.$confirm("是否退出系统?", "提示", {
|
||||||
}).then(() => {
|
confirmButtonText: "是",
|
||||||
Logout();
|
cancelButtonText: "否",
|
||||||
});
|
type: "warning",
|
||||||
|
}).then(() =>
|
||||||
|
{
|
||||||
|
Logout();
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.app_banner {
|
.app_banner {
|
||||||
background-color: var(--banner-background-color);
|
background-color: var(--banner-background-color);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: left;
|
justify-content: left;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0px 15px 0px 15px;
|
padding: 0px 15px 0px 15px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.no_select {
|
.no_select {
|
||||||
-webkit-touch-callout: none;
|
-webkit-touch-callout: none;
|
||||||
-moz-user-select: none;
|
-moz-user-select: none;
|
||||||
/*火狐*/
|
/*火狐*/
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
/*webkit浏览器*/
|
/*webkit浏览器*/
|
||||||
-ms-user-select: none;
|
-ms-user-select: none;
|
||||||
/*IE10*/
|
/*IE10*/
|
||||||
-khtml-user-select: none;
|
-khtml-user-select: none;
|
||||||
/*早期浏览器*/
|
/*早期浏览器*/
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app_banner > * + * {
|
.app_banner>*+* {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.company_name {
|
.company_name {
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.version_div {
|
.version_div {
|
||||||
font-size: 0.5rem;
|
font-size: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.buttons_div {
|
.buttons_div {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
/* border: 1px solid salmon; */
|
/* border: 1px solid salmon; */
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -2,14 +2,14 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2023-01-04 11:40:03
|
* @Date: 2023-01-04 11:40:03
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-06 12:54:17
|
* @LastEditTime: 2023-01-11 21:27:22
|
||||||
* @FilePath: \admin_system\src\layout\components\Main.vue
|
* @FilePath: \admin_system\src\layout\components\Main.vue
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<router-view />
|
<div><router-view /></div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -19,5 +19,8 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.main_content {
|
||||||
|
min-height: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2022-12-14 15:12:46
|
* @Date: 2022-12-14 15:12:46
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-12 14:52:09
|
* @LastEditTime: 2023-01-11 10:28:24
|
||||||
* @FilePath: \admin_system\src\router\index.js
|
* @FilePath: \admin_system\src\router\index.js
|
||||||
* @Description: 定义应用路由配置
|
* @Description: 定义应用路由配置
|
||||||
*
|
*
|
||||||
@@ -62,15 +62,6 @@ const routes = [
|
|||||||
icon: "edit",
|
icon: "edit",
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
|
||||||
path: "/staffInfo",
|
|
||||||
name: "StaffInfo",
|
|
||||||
meta: {
|
|
||||||
title: "人员信息",
|
|
||||||
icon: "edit",
|
|
||||||
},
|
|
||||||
component: () => import("../views/info/StaffInfo.vue"),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: "/newsIndex",
|
path: "/newsIndex",
|
||||||
name: "NewsIndex",
|
name: "NewsIndex",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2022-12-22 09:10:20
|
* @Date: 2022-12-22 09:10:20
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-18 21:45:12
|
* @LastEditTime: 2023-01-11 17:02:15
|
||||||
* @FilePath: \admin_system\src\utils\api\info\account.js
|
* @FilePath: \admin_system\src\utils\api\info\account.js
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
@@ -13,13 +13,11 @@ import { API_URL } from "@/utils/api/config"; //所有API的地址
|
|||||||
import router from "../../../router/index";
|
import router from "../../../router/index";
|
||||||
import store from "../../../store/index";
|
import store from "../../../store/index";
|
||||||
|
|
||||||
/**
|
|
||||||
* 登录请求函数
|
|
||||||
* @param {*} userInfo
|
|
||||||
* @returns 返回promise对象
|
|
||||||
*/
|
|
||||||
export function Login(userInfo)
|
export function Login(userInfo)
|
||||||
{
|
{
|
||||||
|
//debugger;
|
||||||
|
console.log(API_URL.URL_LOGIN);
|
||||||
|
|
||||||
return instance.request(
|
return instance.request(
|
||||||
{
|
{
|
||||||
method: "post",
|
method: "post",
|
||||||
@@ -29,11 +27,17 @@ export function Login(userInfo)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 退出登录
|
|
||||||
*/
|
|
||||||
export function Logout()
|
export function Logout()
|
||||||
{
|
{
|
||||||
|
// if (this.$store && this.$store.state.app)
|
||||||
|
// {
|
||||||
|
// //this.$store.commit();
|
||||||
|
// }
|
||||||
|
|
||||||
|
//const store = useStore();
|
||||||
|
|
||||||
|
//console.log(store);
|
||||||
|
|
||||||
console.log(store);
|
console.log(store);
|
||||||
|
|
||||||
window.localStorage.removeItem("token");
|
window.localStorage.removeItem("token");
|
||||||
|
|||||||
@@ -2,16 +2,14 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2022-12-22 17:18:10
|
* @Date: 2022-12-22 17:18:10
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-12 17:47:39
|
* @LastEditTime: 2023-01-11 14:58:44
|
||||||
* @FilePath: \admin_system\src\utils\api\request.js
|
* @FilePath: \admin_system\src\utils\api\request.js
|
||||||
* @Description: 配置axios拦截器
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import store from "../../store/index";
|
import store from "../../store/index";
|
||||||
import { ElMessageBox } from "element-plus";
|
|
||||||
import router from "@/router";
|
|
||||||
|
|
||||||
const service = axios.create(
|
const service = axios.create(
|
||||||
{
|
{
|
||||||
@@ -20,10 +18,7 @@ const service = axios.create(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//加上请求拦截器
|
||||||
/**
|
|
||||||
* 加上请求拦截器
|
|
||||||
*/
|
|
||||||
service.interceptors.request.use(
|
service.interceptors.request.use(
|
||||||
function (config)
|
function (config)
|
||||||
{
|
{
|
||||||
@@ -52,42 +47,13 @@ service.interceptors.request.use(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
//响应拦截器
|
|
||||||
service.interceptors.response.use(
|
service.interceptors.response.use(
|
||||||
function (response)
|
function (response)
|
||||||
{
|
{
|
||||||
//200
|
|
||||||
if (response.status === 200)
|
|
||||||
{
|
|
||||||
console.log("响应拦截器,响应代码", response.status);
|
|
||||||
}
|
|
||||||
|
|
||||||
//401,用户token失效,跳转到
|
|
||||||
if (response.state === 401)
|
|
||||||
{
|
|
||||||
ElMessageBox.confirm(
|
|
||||||
"用户登录超时,请重新登录",
|
|
||||||
"警告",
|
|
||||||
{
|
|
||||||
confirmButtonText: "是",
|
|
||||||
cancelButtonText: "否",
|
|
||||||
type: "warning",
|
|
||||||
},
|
|
||||||
).then(() =>
|
|
||||||
{
|
|
||||||
router.replace("/login");
|
|
||||||
}).catch(() =>
|
|
||||||
{
|
|
||||||
router.replace("/login");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
},
|
},
|
||||||
function (error)
|
function (error)
|
||||||
{
|
{
|
||||||
console.log("响应拦截器,异常信息:", error);
|
|
||||||
|
|
||||||
return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2022-12-14 15:23:54
|
* @Date: 2022-12-14 15:23:54
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-18 22:24:21
|
* @LastEditTime: 2023-01-11 14:40:11
|
||||||
* @FilePath: \admin_system\src\views\account\Login.vue
|
* @FilePath: \admin_system\src\views\account\Login.vue
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
@@ -29,16 +29,16 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-show="current_menu === tab_menu[1].type">
|
<el-form-item v-show="current_menu === tab_menu[1].type">
|
||||||
<label class="form-label">确认密码</label>
|
<label class="form-label">确认密码</label>
|
||||||
<el-input type="password" disabled v-model.lazy.trim="loginForm.confirm_password"></el-input>
|
<el-input type="password" v-model.lazy.trim="loginForm.confirm_password"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<label class="form-label">验证码</label>
|
<label class="form-label">验证码</label>
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :span="14">
|
<el-col :span="14">
|
||||||
<el-input type="text" disabled></el-input>
|
<el-input type="text"></el-input>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-button type="danger" disabled class="el-button-block" @click="getValidateCode()">获取验证码</el-button>
|
<el-button type="danger" class="el-button-block" @click="getValidateCode()">获取验证码</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -93,9 +93,6 @@ export default {
|
|||||||
type: "error",
|
type: "error",
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/**
|
|
||||||
* 登录
|
|
||||||
*/
|
|
||||||
login()
|
login()
|
||||||
{
|
{
|
||||||
if (this.loginForm.username.length === 0 || this.loginForm.password === 0)
|
if (this.loginForm.username.length === 0 || this.loginForm.password === 0)
|
||||||
|
|||||||
@@ -1,191 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
<!--
|
|
||||||
* @Author: Kane
|
|
||||||
* @Date: 2023-01-12 14:43:46
|
|
||||||
* @LastEditors: Kane
|
|
||||||
* @LastEditTime: 2023-01-20 00:37:38
|
|
||||||
* @FilePath: \admin_system\src\views\info\StaffInfo.vue
|
|
||||||
* @Description:
|
|
||||||
*
|
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
|
||||||
-->
|
|
||||||
<template>
|
|
||||||
<div class="query_box">
|
|
||||||
<el-form inline width="600px">
|
|
||||||
<el-row :gutter="10" class="el-row">
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-input v-model="query_param.staff_code" placeholder="请输入P09工号或P13账号"></el-input>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-button type="danger">查询</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12"></el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<el-table ref="table" :data="table_data" border width="100%" stripe>
|
|
||||||
<el-table-column type="selection" min-width="30" align="center"></el-table-column>
|
|
||||||
<el-table-column min-width="200" label="员工名称" align="left" fixed="left">
|
|
||||||
<template #default="rowdata">
|
|
||||||
<span @click="onShowStaffInfo(rowdata.row)" style="cursor: pointer; display: block; height: 100%">{{
|
|
||||||
rowdata.row.staff_name
|
|
||||||
}}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="staff_code" min-width="100" label="工号" align="left"></el-table-column>
|
|
||||||
<el-table-column prop="p13uid" min-width="200" label="P13账号" align="left"></el-table-column>
|
|
||||||
<el-table-column label="操作" min-width="200" align="center" fixed="right">
|
|
||||||
<template #default>
|
|
||||||
<el-button type="warning">编辑</el-button>
|
|
||||||
<el-button type="danger">删除</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<el-row :gutter="10" width="100%">
|
|
||||||
<el-col :span="18"></el-col>
|
|
||||||
<el-pagination class="pull_left" @current-change="onCurrentPageIndexChange"
|
|
||||||
@size-change="onTablePageSizeChange" size="small" background :current-page="this.table_current_page"
|
|
||||||
:page-size="10" :page-sizes="[10, 20, 50, 100]" layout="total, sizes, prev, pager, nex, jumper"
|
|
||||||
:total="table_data.length"></el-pagination>
|
|
||||||
<el-col :span="6" class="pull_right">
|
|
||||||
<el-button type="primary">重置</el-button>
|
|
||||||
<el-button type="danger">批量删除</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
/* eslint-disable no-unused-vars*/
|
|
||||||
export default {
|
|
||||||
name: "staff-info",
|
|
||||||
data()
|
|
||||||
{
|
|
||||||
return {
|
|
||||||
query_param: {
|
|
||||||
staff_code: "",
|
|
||||||
},
|
|
||||||
table_current_page: 1,
|
|
||||||
table_data: [
|
|
||||||
{
|
|
||||||
staff_name: "王炜",
|
|
||||||
staff_code: "588",
|
|
||||||
p13uid: "wangwei-202",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
staff_name: "王炜",
|
|
||||||
staff_code: "588",
|
|
||||||
p13uid: "wangwei-202",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
staff_name: "王炜",
|
|
||||||
staff_code: "588",
|
|
||||||
p13uid: "wangwei-202",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
staff_name: "王炜",
|
|
||||||
staff_code: "588",
|
|
||||||
p13uid: "wangwei-202",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
staff_name: "王炜",
|
|
||||||
staff_code: "588",
|
|
||||||
p13uid: "wangwei-202",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
onTableEdit(row) { },
|
|
||||||
/**
|
|
||||||
* 根据表格行index返回样式,实现斑马纹
|
|
||||||
* @param row
|
|
||||||
* @param rowIndex
|
|
||||||
* @return 返回的样式名称
|
|
||||||
*/
|
|
||||||
tabRowClassName(row, rowIndex)
|
|
||||||
{
|
|
||||||
let index = rowIndex + 1;
|
|
||||||
if (index % 2 == 0)
|
|
||||||
{
|
|
||||||
return "warning-row";
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 点击表格 用户名称 时的消息处理函数
|
|
||||||
* @param {*} staff
|
|
||||||
*/
|
|
||||||
onShowStaffInfo(staff)
|
|
||||||
{
|
|
||||||
console.log("点击名称", staff);
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 表格页显示数量变更时消息处理函数
|
|
||||||
*/
|
|
||||||
onTablePageSizeChange() { },
|
|
||||||
/**
|
|
||||||
* 用户变更当前页时消息处理函数
|
|
||||||
*/
|
|
||||||
onCurrentPageIndexChange() { },
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.el-row {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-label {
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.query_box {
|
|
||||||
width: 100%;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 5px;
|
|
||||||
padding: 15px;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.query_box>*+* {
|
|
||||||
margin-top: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info_box {
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 5px;
|
|
||||||
padding: 15px;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-table .warning-row {
|
|
||||||
background-color: #f3f9ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.query_box:hover,
|
|
||||||
.info_box:hover {
|
|
||||||
box-shadow: 0px 0px 20px 0px rgb(14 18 22 / 25%);
|
|
||||||
}
|
|
||||||
|
|
||||||
div.cell {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pull_left {
|
|
||||||
margin-left: 15px;
|
|
||||||
margin-right: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pull_right {
|
|
||||||
display: flex;
|
|
||||||
justify-content: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pull_right:last-child {
|
|
||||||
margin-right: 15px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
Reference in New Issue
Block a user