update
@@ -1,9 +1,9 @@
|
|||||||
# 王昊地址
|
# 王昊地址
|
||||||
VITE_GLOB_API_URL=http://192.168.1.6
|
#VITE_GLOB_API_URL=http://192.168.1.3
|
||||||
#开发环境
|
#开发环境
|
||||||
#VITE_GLOB_API_URL=http://cqyt.dev.yg.dt.io
|
VITE_GLOB_API_URL=http://cqyt.dev.yg.dt.io
|
||||||
|
|
||||||
#应急求助-websocket
|
#应急求助-websocket
|
||||||
VITE_GLOB_API_YIN_JI=ws://192.168.1.6:7098/websocket/watchMonitor
|
VITE_GLOB_API_YIN_JI=ws://cqyt.dev.yg.dt.io/health-watch/websocket/watchMonitor
|
||||||
#健康监测工具报警-websocket
|
#健康监测工具报警-websocket
|
||||||
VITE_GLOB_API_JIAN_CE=ws://192.168.1.6:7011/websocket/emergency
|
VITE_GLOB_API_JIAN_CE=ws://cqyt.dev.yg.dt.io/health-emergency/websocket/emergency
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
|
||||||
|
#后台地址
|
||||||
VITE_GLOB_API_URL=http://cqyt.dev.yg.dt.io
|
VITE_GLOB_API_URL=https://api.cqygjk.com
|
||||||
|
#应急求助-websocket
|
||||||
|
VITE_GLOB_API_YIN_JI=ws://api.cqygjk.com/health-watch/websocket/watchMonitor
|
||||||
|
#健康监测工具报警-websocket
|
||||||
|
VITE_GLOB_API_JIAN_CE=ws://api.cqygjk.com/health-emergency/websocket/emergency
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
#测试环境
|
||||||
|
VITE_GLOB_API_URL=http://cqyt.test.yg.dt.io
|
||||||
|
|
||||||
|
#应急求助-websocket
|
||||||
|
VITE_GLOB_API_YIN_JI=ws://192.168.1.3:7098/websocket/watchMonitor
|
||||||
|
#健康监测工具报警-websocket
|
||||||
|
VITE_GLOB_API_JIAN_CE=ws://cqyt.test.yg.dt.io/health-emergency/websocket/emergency
|
||||||
@@ -14,12 +14,13 @@
|
|||||||
"@iamzzg/data-view": "^2.10.0",
|
"@iamzzg/data-view": "^2.10.0",
|
||||||
"axios": "^1.6.2",
|
"axios": "^1.6.2",
|
||||||
"dayjs": "^1.11.10",
|
"dayjs": "^1.11.10",
|
||||||
|
"jsencrypt": "^3.3.2",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"mitt": "^3.0.1",
|
"mitt": "^3.0.1",
|
||||||
"path": "^0.12.7",
|
"path": "^0.12.7",
|
||||||
|
"pinia": "^2.1.7",
|
||||||
"prettier": "^3.1.0",
|
"prettier": "^3.1.0",
|
||||||
"qs": "^6.11.2",
|
"qs": "^6.11.2",
|
||||||
"vue": "^3.3.4",
|
|
||||||
"vue-router": "^4.2.5",
|
"vue-router": "^4.2.5",
|
||||||
"vue3-seamless-scroll": "^2.0.1"
|
"vue3-seamless-scroll": "^2.0.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,61 @@
|
|||||||
|
import { useMessage } from '/@/hooks/web/useMessage.ts';
|
||||||
|
import { t } from '/@/hooks/locales/useLocales.ts';
|
||||||
|
import { useUserStore } from '/@/store/modules/user.ts';
|
||||||
|
|
||||||
|
const { createMessage } = useMessage();
|
||||||
|
const error = createMessage.error!;
|
||||||
|
const userStore = useUserStore();
|
||||||
|
|
||||||
|
export function checkStatus(status: number, msg: string, errorMessageMode = 'message') {
|
||||||
|
let errMessage = '';
|
||||||
|
switch (status) {
|
||||||
|
case 400:
|
||||||
|
errMessage = `${msg}`;
|
||||||
|
break;
|
||||||
|
// 401: Not logged in
|
||||||
|
// Jump to the login page if not logged in, and carry the path of the current page
|
||||||
|
// Return to the current page after successful login. This step needs to be operated on the login page.
|
||||||
|
case 401:
|
||||||
|
userStore.setToken(undefined);
|
||||||
|
errMessage = msg || t('api.errMsg401');
|
||||||
|
userStore.logout(true);
|
||||||
|
break;
|
||||||
|
case 403:
|
||||||
|
errMessage = t('api.errMsg403');
|
||||||
|
break;
|
||||||
|
// 404请求不存在
|
||||||
|
case 404:
|
||||||
|
errMessage = t('api.errMsg404');
|
||||||
|
break;
|
||||||
|
case 405:
|
||||||
|
errMessage = t('api.errMsg405');
|
||||||
|
break;
|
||||||
|
case 408:
|
||||||
|
errMessage = t('api.errMsg408');
|
||||||
|
break;
|
||||||
|
case 500:
|
||||||
|
errMessage = t('api.errMsg500');
|
||||||
|
break;
|
||||||
|
case 501:
|
||||||
|
errMessage = t('api.errMsg501');
|
||||||
|
break;
|
||||||
|
case 502:
|
||||||
|
errMessage = t('api.errMsg502');
|
||||||
|
break;
|
||||||
|
case 503:
|
||||||
|
errMessage = t('api.errMsg503');
|
||||||
|
break;
|
||||||
|
case 504:
|
||||||
|
errMessage = t('api.errMsg504');
|
||||||
|
break;
|
||||||
|
case 505:
|
||||||
|
errMessage = t('api.errMsg505');
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
if (errMessage) {
|
||||||
|
if (errMessage == 'message') {
|
||||||
|
error({ content: errMessage, key: `global_error_message_status_${status}` });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,24 +1,34 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { getAppEnvConfig } from '../utils/env.ts';
|
import { getAppEnvConfig } from '../utils/env.ts';
|
||||||
|
import { useUserStore } from '/@/store/modules/user.ts';
|
||||||
|
import { getAuthCache } from '/@/utils/auth.ts';
|
||||||
|
import { TOKEN_KEY } from '/@/enum/cacheEnum.ts';
|
||||||
|
|
||||||
const { VITE_GLOB_API_URL } = getAppEnvConfig();
|
const { VITE_GLOB_API_URL } = getAppEnvConfig();
|
||||||
let token =
|
const userStore = useUserStore();
|
||||||
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiaWRlbnRpZmllciI6ImU5Y2EyM2Q2OGQ4ODRkNGViYjE5ZDA3ODg5NzI3ZGFlIiwiZXhwIjoxNzAzMjMyOTQ0fQ.de0NagvCsVmg_sZGoE5PirZcdDRXPX-j9yj3AqbV6t4';
|
const { token } = userStore;
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
baseURL: VITE_GLOB_API_URL,
|
baseURL: VITE_GLOB_API_URL,
|
||||||
timeout: 50000,
|
timeout: 50000,
|
||||||
headers: {
|
headers: {
|
||||||
// 设置后端需要的传参类型
|
// 设置后端需要的传参类型
|
||||||
'Content-Type': 'application/json;charset=UTF-8',
|
'Content-Type': 'application/json;charset=UTF-8',
|
||||||
'X-Access-Token': token,
|
'X-Access-Token': token || getAuthCache(TOKEN_KEY),
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* @description: 响应错误处理
|
||||||
|
*/
|
||||||
|
responseInterceptorsCatch(error: any) {
|
||||||
|
const { response, code, message, config } = error || {};
|
||||||
|
const errorMessageMode = config?.requestOptions?.errorMessageMode || 'none';
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
export const get = (url, params) => {
|
export const get = (url, params = {}) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
service
|
service
|
||||||
.get(url, { params: params })
|
.get(url, { params: params })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.data.code === 200) {
|
if (res.data.code === 200 || res.data.code === 0) {
|
||||||
resolve(res.data);
|
resolve(res.data);
|
||||||
} else {
|
} else {
|
||||||
reject(res.data);
|
reject(res.data);
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
const requestURL = "http://192.168.1.16";
|
|
||||||
|
|
||||||
export default requestURL
|
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
import { get, post } from '/@/api/request.ts';
|
||||||
|
|
||||||
|
enum Api {
|
||||||
|
getInputCode = '/sys/randomImage',
|
||||||
|
Login = '/sys/login',
|
||||||
|
Logout = '/sys/logout',
|
||||||
|
GetUserInfo = '/sys/user/getUserInfo',
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getCodeInfo = (params: any) => get(Api.getInputCode + `/${params}`);
|
||||||
|
|
||||||
|
export function loginApi(params: any) {
|
||||||
|
return post(Api.Login, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: getUserInfo
|
||||||
|
*/
|
||||||
|
export function getUserInfo() {
|
||||||
|
return get(Api.GetUserInfo, {}).catch((e) => {
|
||||||
|
if (e && (e.message.includes('timeout') || e.message.includes('401'))) {
|
||||||
|
//接口不通时跳转到登录界面
|
||||||
|
// const userStore = useUserStoreWithOut();
|
||||||
|
// userStore.setToken('');
|
||||||
|
// router.push(PageEnum.BASE_LOGIN);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function doLogout() {
|
||||||
|
return get(Api.Logout);
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 2.2 KiB |
@@ -138,6 +138,11 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//表格
|
||||||
|
.ant-table-tbody > tr.ant-table-placeholder:hover > td {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
//直升机
|
//直升机
|
||||||
.helicopter {
|
.helicopter {
|
||||||
width: 60px;
|
width: 60px;
|
||||||
|
|||||||
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 536 B |
|
After Width: | Height: | Size: 84 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 212 KiB |
@@ -0,0 +1,365 @@
|
|||||||
|
::-webkit-input-placeholder {
|
||||||
|
/* WebKit browsers */
|
||||||
|
color: #868686;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-moz-placeholder {
|
||||||
|
/* Mozilla Firefox 19+ */
|
||||||
|
color: #868686;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:-ms-input-placeholder {
|
||||||
|
/* Internet Explorer 10+ */
|
||||||
|
color: #868686;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input:-webkit-autofill {
|
||||||
|
transition: background-color 5000s ease-in-out 0s;
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
scroll-behavior: smooth;
|
||||||
|
}
|
||||||
|
|
||||||
|
html,
|
||||||
|
body {
|
||||||
|
color: #333;
|
||||||
|
margin: 0;
|
||||||
|
height: 100%;
|
||||||
|
font-family: 'Myriad Set Pro', 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
a,
|
||||||
|
label,
|
||||||
|
button,
|
||||||
|
input,
|
||||||
|
select {
|
||||||
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
|
display: block;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background: #e3f0ff;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
html,
|
||||||
|
body,
|
||||||
|
div,
|
||||||
|
dl,
|
||||||
|
dt,
|
||||||
|
dd,
|
||||||
|
ol,
|
||||||
|
ul,
|
||||||
|
li,
|
||||||
|
h1,
|
||||||
|
h2,
|
||||||
|
h3,
|
||||||
|
h4,
|
||||||
|
h5,
|
||||||
|
h6,
|
||||||
|
p,
|
||||||
|
blockquote,
|
||||||
|
pre,
|
||||||
|
button,
|
||||||
|
fieldset,
|
||||||
|
form,
|
||||||
|
input,
|
||||||
|
legend,
|
||||||
|
textarea,
|
||||||
|
th,
|
||||||
|
td {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: #08acee;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
input,
|
||||||
|
optgroup,
|
||||||
|
select,
|
||||||
|
textarea {
|
||||||
|
margin: 0;
|
||||||
|
font: inherit;
|
||||||
|
color: inherit;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
li {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clearfix::after {
|
||||||
|
clear: both;
|
||||||
|
content: '.';
|
||||||
|
display: block;
|
||||||
|
height: 0;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clearfix {
|
||||||
|
}
|
||||||
|
|
||||||
|
.divHeight {
|
||||||
|
width: 100%;
|
||||||
|
height: 10px;
|
||||||
|
background: #f5f5f5;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.r-line {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.r-line:after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
z-index: 0;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 100%;
|
||||||
|
border-right: 1px solid #d9d9d9;
|
||||||
|
-webkit-transform: scaleX(0.5);
|
||||||
|
transform: scaleX(0.5);
|
||||||
|
-webkit-transform-origin: 100% 0;
|
||||||
|
transform-origin: 100% 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.b-line {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.b-line:after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
z-index: 2;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 1px;
|
||||||
|
border-bottom: 1px solid #dedede;
|
||||||
|
-webkit-transform: scaleY(0.5);
|
||||||
|
transform: scaleY(0.5);
|
||||||
|
-webkit-transform-origin: 0 100%;
|
||||||
|
transform-origin: 0 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-arrow {
|
||||||
|
position: relative;
|
||||||
|
padding-right: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-arrow span {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
color: #9b9b9b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-arrow:after {
|
||||||
|
content: ' ';
|
||||||
|
display: inline-block;
|
||||||
|
height: 6px;
|
||||||
|
width: 6px;
|
||||||
|
border-width: 2px 2px 0 0;
|
||||||
|
border-color: #848484;
|
||||||
|
border-style: solid;
|
||||||
|
-webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
|
||||||
|
transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
|
||||||
|
position: relative;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
margin-top: -4px;
|
||||||
|
right: 2px;
|
||||||
|
border-radius: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-flex {
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-align: center;
|
||||||
|
-webkit-align-items: center;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-flex-box {
|
||||||
|
-webkit-box-flex: 1;
|
||||||
|
-webkit-flex: 1;
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 必要布局样式css */
|
||||||
|
.aui-flexView {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0 auto;
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-box-direction: normal;
|
||||||
|
-webkit-flex-direction: column;
|
||||||
|
-ms-flex-direction: column;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-scrollView {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
-webkit-box-flex: 1;
|
||||||
|
-webkit-flex: 1;
|
||||||
|
-ms-flex: 1;
|
||||||
|
flex: 1;
|
||||||
|
overflow-y: auto;
|
||||||
|
overflow-x: hidden;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
position: relative;
|
||||||
|
padding-bottom: 53px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-navBar {
|
||||||
|
height: 44px;
|
||||||
|
position: relative;
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
z-index: 102;
|
||||||
|
background-color: #5064eb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-navBar-item {
|
||||||
|
height: 44px;
|
||||||
|
min-width: 15%;
|
||||||
|
-webkit-box-flex: 0;
|
||||||
|
-webkit-flex: 0 0 15%;
|
||||||
|
-ms-flex: 0 0 15%;
|
||||||
|
flex: 0 0 15%;
|
||||||
|
padding: 0 0.9rem;
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-align: center;
|
||||||
|
-webkit-align-items: center;
|
||||||
|
-ms-flex-align: center;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 0.7rem;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
color: #808080;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-navBar-item:first-child {
|
||||||
|
-webkit-box-ordinal-group: 2;
|
||||||
|
-webkit-order: 1;
|
||||||
|
-ms-flex-order: 1;
|
||||||
|
order: 1;
|
||||||
|
margin-right: -25%;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-navBar-item:last-child {
|
||||||
|
-webkit-box-ordinal-group: 4;
|
||||||
|
-webkit-order: 3;
|
||||||
|
-ms-flex-order: 3;
|
||||||
|
order: 3;
|
||||||
|
-webkit-box-pack: end;
|
||||||
|
-webkit-justify-content: flex-end;
|
||||||
|
-ms-flex-pack: end;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-center {
|
||||||
|
-webkit-box-ordinal-group: 3;
|
||||||
|
-webkit-order: 2;
|
||||||
|
-ms-flex-order: 2;
|
||||||
|
order: 2;
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-pack: center;
|
||||||
|
-webkit-justify-content: center;
|
||||||
|
-ms-flex-pack: center;
|
||||||
|
justify-content: center;
|
||||||
|
-webkit-box-align: center;
|
||||||
|
-webkit-align-items: center;
|
||||||
|
-ms-flex-align: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 44px;
|
||||||
|
width: 80%;
|
||||||
|
margin-left: 22%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-center-title {
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
display: block;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
font-size: 0.95rem;
|
||||||
|
color: #fff;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
display: block;
|
||||||
|
border: none;
|
||||||
|
float: left;
|
||||||
|
background-size: 20px;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-background-img {
|
||||||
|
//background-image: url(../icon/jeecg_bg.png);
|
||||||
|
//background-size: cover;
|
||||||
|
//background-position: top center;
|
||||||
|
//background-repeat: no-repeat;
|
||||||
|
}
|
||||||
@@ -0,0 +1,726 @@
|
|||||||
|
.aui-content {
|
||||||
|
//padding: 40px 60px;
|
||||||
|
min-height: 100vh;
|
||||||
|
.aui-container {
|
||||||
|
max-width: 1000px;
|
||||||
|
margin: 0 auto;
|
||||||
|
box-shadow: 0 4px 8px 1px rgba(0, 0, 0, 0.2);
|
||||||
|
border-radius: 10px;
|
||||||
|
position: fixed;
|
||||||
|
top: 50%;
|
||||||
|
left: 68%;
|
||||||
|
width: 26%;
|
||||||
|
height: auto;
|
||||||
|
-webkit-transform: translateX(-50%) translateY(-50%);
|
||||||
|
-moz-transform: translateX(-50%) translateY(-50%);
|
||||||
|
-ms-transform: translateX(-50%) translateY(-50%);
|
||||||
|
transform: translateX(-50%) translateY(-50%);
|
||||||
|
-webkit-transform: translateX(-50%) translateY(-50%);
|
||||||
|
|
||||||
|
}
|
||||||
|
.aui-top {
|
||||||
|
width: 100%;
|
||||||
|
height: 55vh;
|
||||||
|
background-color: #2a6efe;
|
||||||
|
.aui-title {
|
||||||
|
position: fixed;
|
||||||
|
top: 5%;
|
||||||
|
left: 12%;
|
||||||
|
font-size: 30px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.aui-title-image {
|
||||||
|
position: fixed;
|
||||||
|
top: 16%;
|
||||||
|
left: 18%;
|
||||||
|
width: 30%;
|
||||||
|
height: 35%;
|
||||||
|
background: url('/@/assets/loginmini/icon/logo_title.png') no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.remember {
|
||||||
|
height: 40px;
|
||||||
|
margin-top: 16px;
|
||||||
|
.aui-check {
|
||||||
|
margin-left: 5px;
|
||||||
|
color: #999999;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.form-title {
|
||||||
|
font-size: 36px;
|
||||||
|
color: #1a1a1a;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
:deep(.ant-input:focus) {
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-get-code {
|
||||||
|
float: right;
|
||||||
|
position: relative;
|
||||||
|
z-index: 3;
|
||||||
|
background: #ffffff;
|
||||||
|
color: #1573e9;
|
||||||
|
border-radius: 100px;
|
||||||
|
padding: 5px 16px;
|
||||||
|
margin: 7px;
|
||||||
|
border: 1px solid #1573e9;
|
||||||
|
top: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-get-code:hover {
|
||||||
|
color: #1573e9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code-shape {
|
||||||
|
border-color: #dadada !important;
|
||||||
|
color: #aaa !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.jeecg-dark-switch) {
|
||||||
|
position: absolute;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-link-login {
|
||||||
|
height: 48px;
|
||||||
|
font-size: 20px;
|
||||||
|
background-color: #3a6ffe;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-phone-logo {
|
||||||
|
position: absolute;
|
||||||
|
margin-left: 10px;
|
||||||
|
width: 60px;
|
||||||
|
top: 2px;
|
||||||
|
z-index: 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-3 {
|
||||||
|
top: 0.45rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.aui-form {
|
||||||
|
width: 100%;
|
||||||
|
//background: #eee;
|
||||||
|
//display: -webkit-box;
|
||||||
|
//display: -moz-box;
|
||||||
|
//display: -ms-flexbox;
|
||||||
|
//display: -webkit-flex;
|
||||||
|
//display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-image {
|
||||||
|
padding: 180px 80px;
|
||||||
|
flex-basis: 60%;
|
||||||
|
-webkit-flex-basis: 60%;
|
||||||
|
background-color: #0198cd;
|
||||||
|
background-image: url(../icon/jeecg_ad.png);
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-image-text {
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-formBox {
|
||||||
|
flex-basis: 40%;
|
||||||
|
-webkit-flex-basis: 40%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 30px 20px;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 2px 9px 49px -17px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
.aui-logo {
|
||||||
|
width: 180px;
|
||||||
|
height: 80px;
|
||||||
|
position: absolute;
|
||||||
|
top: 2%;
|
||||||
|
left: 8%;
|
||||||
|
z-index: 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-account-line {
|
||||||
|
padding-top: 20px;
|
||||||
|
padding-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-code-line {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
border-left: 3px solid #fff;
|
||||||
|
height: 42px;
|
||||||
|
padding: 0 15px;
|
||||||
|
line-height: 40px;
|
||||||
|
font-size: 14px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-eye {
|
||||||
|
position: absolute;
|
||||||
|
right: 20px;
|
||||||
|
top: 10px;
|
||||||
|
width: 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-input-line {
|
||||||
|
background: #f5f5f9;
|
||||||
|
border-radius: 2px;
|
||||||
|
position: relative;
|
||||||
|
margin: 12px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-input-line input {
|
||||||
|
width: 100%;
|
||||||
|
padding: 12px 10px;
|
||||||
|
border: none;
|
||||||
|
color: #333333;
|
||||||
|
font-size: 14px;
|
||||||
|
background: unset;
|
||||||
|
padding-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-input-line .icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 10px;
|
||||||
|
left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-line-user {
|
||||||
|
background-image: url(../icon/icon-line-user.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-line-tel {
|
||||||
|
background-image: url(../icon/icon-line-tel.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-line-msg {
|
||||||
|
background-image: url(../icon/icon-line-msg.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-line-pad {
|
||||||
|
background-image: url(../icon/icon-line-pad.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-forgot .aui-input-line input {
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-forgot .aui-input-line {
|
||||||
|
background: none;
|
||||||
|
border: 1px solid #dbdbdb;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-forgot .aui-input-line:focus {
|
||||||
|
border-color: #1b90ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-forgot .aui-input-line:hover {
|
||||||
|
border-color: #1b90ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-forgot .aui-input-line .aui-code-line {
|
||||||
|
border-left: 1px solid #dbdbdb;
|
||||||
|
height: 40px;
|
||||||
|
color: #1b90ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-step-box {
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
margin-top: 50px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-step-box::after {
|
||||||
|
position: absolute;
|
||||||
|
top: 20px;
|
||||||
|
left: 50%;
|
||||||
|
width: 76%;
|
||||||
|
margin-left: -38%;
|
||||||
|
height: 1px;
|
||||||
|
background: #bcbcbc;
|
||||||
|
content: '';
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-step-item {
|
||||||
|
width: 33.333%;
|
||||||
|
float: left;
|
||||||
|
text-align: center;
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-step-tags em {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
border: 8px solid #fff;
|
||||||
|
line-height: 1.3;
|
||||||
|
border-radius: 100px;
|
||||||
|
background: #bcbcbc;
|
||||||
|
display: block;
|
||||||
|
margin: 0 auto;
|
||||||
|
font-style: normal;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 19px;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-step-tags p {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #bcbcbc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.activeStep .aui-step-tags em {
|
||||||
|
background: #1b90ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.activeStep .aui-step-tags p {
|
||||||
|
color: #1b90ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-success {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
height: 80px;
|
||||||
|
width: 100%;
|
||||||
|
margin-top: -40px;
|
||||||
|
margin-left: -50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-success-icon {
|
||||||
|
width: 40px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-success h3 {
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
color: #515151;
|
||||||
|
font-size: 18px;
|
||||||
|
padding-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-form-nav {
|
||||||
|
text-align: center;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-form-nav .aui-flex-box {
|
||||||
|
color: #040404;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 500;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-clear-left {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-clear-left .activeNav::after {
|
||||||
|
left: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.activeNav {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.activeNav::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
z-index: 0;
|
||||||
|
bottom: -10px;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -15px;
|
||||||
|
width: 30px;
|
||||||
|
height: 4px;
|
||||||
|
background: #1b90ff;
|
||||||
|
border-radius: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.phone .aui-inputClear {
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.phone .aui-inputClear input {
|
||||||
|
//padding-left: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.phone .aui-inputClear .aui-code {
|
||||||
|
text-align: right;
|
||||||
|
width: auto;
|
||||||
|
bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.phone .aui-inputClear .aui-code a {
|
||||||
|
color: #1b90ff;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.phoneChina {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 10px;
|
||||||
|
left: 0;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #040404;
|
||||||
|
}
|
||||||
|
|
||||||
|
.phoneChina::after {
|
||||||
|
position: absolute;
|
||||||
|
right: -25px;
|
||||||
|
bottom: 0;
|
||||||
|
content: '';
|
||||||
|
background-image: url(../icon/icon_dow.png);
|
||||||
|
background-size: 18px;
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.phoneChina:before {
|
||||||
|
position: absolute;
|
||||||
|
right: -42px;
|
||||||
|
bottom: -15px;
|
||||||
|
content: ' ';
|
||||||
|
background: #fff;
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-ewm {
|
||||||
|
width: 280px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-formEwm {
|
||||||
|
padding: 50px 40px 55px 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-inputClear {
|
||||||
|
width: 100%;
|
||||||
|
border-bottom: 1px solid #cccccc;
|
||||||
|
position: relative;
|
||||||
|
padding-left: 20px;
|
||||||
|
background: #fff;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-inputClear .icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 10px;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-inputClear input {
|
||||||
|
width: 100%;
|
||||||
|
padding: 10px;
|
||||||
|
border: none;
|
||||||
|
color: #333333;
|
||||||
|
font-size: 14px;
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-code {
|
||||||
|
position: absolute;
|
||||||
|
right: 8px;
|
||||||
|
bottom: 0;
|
||||||
|
width: 115px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-code {
|
||||||
|
background-image: url(../icon/icon-user.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-password {
|
||||||
|
background-image: url(../icon/icon-password.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-code {
|
||||||
|
background-image: url(../icon/icon-code.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-inputClear:focus {
|
||||||
|
border-bottom: 1px solid #1b90ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-inputClear:hover {
|
||||||
|
border-bottom: 1px solid #1b90ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-choice {
|
||||||
|
position: relative;
|
||||||
|
font-size: 12px;
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-align: center;
|
||||||
|
-webkit-align-items: center;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
color: #040404;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-choice input {
|
||||||
|
width: 14px;
|
||||||
|
height: 14px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-forget a {
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-forget a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-formButton {
|
||||||
|
margin-top: 20%;
|
||||||
|
margin-bottom: 2%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-formButton a {
|
||||||
|
height: 42px;
|
||||||
|
padding: 10px 15px;
|
||||||
|
font-size: 14px;
|
||||||
|
border-radius: 8px;
|
||||||
|
border-color: #67b5ff;
|
||||||
|
background: #1b90ff;
|
||||||
|
width: 100%;
|
||||||
|
cursor: pointer;
|
||||||
|
border: none;
|
||||||
|
color: #fff;
|
||||||
|
margin: 8px 0;
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-formButton a:focus {
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-formButton a:hover {
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-formButton .aui-linek-code {
|
||||||
|
background: #fff;
|
||||||
|
color: #3c3c3c;
|
||||||
|
border: 1px solid #dbdbdb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-formButton .aui-linek-code:hover {
|
||||||
|
color: #1b90ff;
|
||||||
|
border: 1px solid #1b90ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-third-text {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #3c3c3c;
|
||||||
|
margin-top: 25px;
|
||||||
|
margin-bottom: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-third-text span {
|
||||||
|
color: #afafaf;
|
||||||
|
display: block;
|
||||||
|
width: 38%;
|
||||||
|
margin: 0 auto;
|
||||||
|
text-align: center;
|
||||||
|
position: relative;
|
||||||
|
background: #fff;
|
||||||
|
z-index: 100;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-third-border {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-third-border::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
z-index: 0;
|
||||||
|
top: 8px;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 1px;
|
||||||
|
border-top: 1px solid #d9d9d9;
|
||||||
|
-webkit-transform: scaleY(0.5);
|
||||||
|
transform: scaleY(0.5);
|
||||||
|
-webkit-transform-origin: 0 100%;
|
||||||
|
transform-origin: 0 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-third-login {
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
margin: 0 auto;
|
||||||
|
border-radius: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-third-login a {
|
||||||
|
font-size: 22px;
|
||||||
|
margin: 0 auto;
|
||||||
|
border-radius: 100px;
|
||||||
|
display: inline-block;
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-third-login a:hover {
|
||||||
|
color: #1b90ff;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-third-login:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
@media screen and (max-width : 1024px) {
|
||||||
|
.aui-content{
|
||||||
|
.aui-top{
|
||||||
|
height: 58vh;
|
||||||
|
.aui-title{
|
||||||
|
left: 6%;
|
||||||
|
font-size: 28px;
|
||||||
|
}
|
||||||
|
.aui-title-image{
|
||||||
|
left: 9%;
|
||||||
|
top:22%;
|
||||||
|
width: 40%;
|
||||||
|
height: 28%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.aui-container{
|
||||||
|
width: 34%;
|
||||||
|
left:75%;
|
||||||
|
.form-title{
|
||||||
|
font-size: 22px;
|
||||||
|
}
|
||||||
|
.aui-link-login{
|
||||||
|
margin: 4px 0;
|
||||||
|
height: 40px;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (max-width: 320px) {
|
||||||
|
.aui-form {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-image {
|
||||||
|
order: 2;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-container {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 550px;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-content {
|
||||||
|
justify-content: initial;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 321px) and (max-width: 375px) {
|
||||||
|
.aui-form {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-image {
|
||||||
|
order: 2;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-container {
|
||||||
|
width: 100%;
|
||||||
|
left: 50%;
|
||||||
|
max-width: 550px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-content {
|
||||||
|
justify-content: initial;
|
||||||
|
width: 100%;
|
||||||
|
//padding: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 375px) and (max-width: 425px) {
|
||||||
|
.aui-form {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-image {
|
||||||
|
order: 2;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-container {
|
||||||
|
width: 90%;
|
||||||
|
max-width: 550px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-content {
|
||||||
|
justify-content: initial;
|
||||||
|
width: 100%;
|
||||||
|
//padding: 40px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 425px) and (max-width: 768px) {
|
||||||
|
.aui-form {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-image {
|
||||||
|
order: 2;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-container {
|
||||||
|
width: 90%;
|
||||||
|
max-width: 550px;
|
||||||
|
}
|
||||||
|
.aui-title{
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.aui-content {
|
||||||
|
justify-content: initial;
|
||||||
|
width: 100%;
|
||||||
|
padding: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-step-box::after {
|
||||||
|
width: 70%;
|
||||||
|
margin-left: -35%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 767px) {
|
||||||
|
.aui-logo {
|
||||||
|
top: 3%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 300px) {
|
||||||
|
.aui-logo {
|
||||||
|
top: 3%;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,7 +6,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</public-title>
|
</public-title>
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<vue3-seamless-scroll :list="scrollList" class="scroll" :hover="true" :limitScrollNum="4" v-bind="classOption">
|
<vue3-seamless-scroll :list="scrollList" class="scroll" :hover="true" :limitScrollNum="4"
|
||||||
|
v-bind="classOption">
|
||||||
<div class="item" v-for="(item, i) in scrollList" :key="i">
|
<div class="item" v-for="(item, i) in scrollList" :key="i">
|
||||||
<span class="fixed-width" :title="item?.realName">{{ item?.realName }}</span>
|
<span class="fixed-width" :title="item?.realName">{{ item?.realName }}</span>
|
||||||
<span class="fixed-width" :title="item?.eventType_dictText">{{ item?.eventType_dictText }}</span>
|
<span class="fixed-width" :title="item?.eventType_dictText">{{ item?.eventType_dictText }}</span>
|
||||||
@@ -146,6 +147,10 @@
|
|||||||
margin-right: 3px;
|
margin-right: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.right-text:hover {
|
||||||
|
color: #129bff;
|
||||||
|
}
|
||||||
|
|
||||||
.inner {
|
.inner {
|
||||||
height: calc(100% - 40px);
|
height: calc(100% - 40px);
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -21,12 +21,10 @@
|
|||||||
type: String,
|
type: String,
|
||||||
});
|
});
|
||||||
const sleepChart = ref<HTMLElement>();
|
const sleepChart = ref<HTMLElement>();
|
||||||
// onMounted(() => {
|
|
||||||
// init();
|
|
||||||
// });
|
|
||||||
watch(
|
watch(
|
||||||
props,
|
props,
|
||||||
() => {
|
() => {
|
||||||
|
console.log(111111111111);
|
||||||
init();
|
init();
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
|
|||||||
@@ -23,18 +23,23 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, onUnmounted, ref } from 'vue';
|
import { onMounted, onUnmounted, ref, watch } from 'vue';
|
||||||
import PublicTitle from '/@/components/publicTitle.vue';
|
import PublicTitle from '/@/components/publicTitle.vue';
|
||||||
import { getMonitorList } from '/@/components/secondaryScreen/commonApi.ts';
|
import { getMonitorList } from '/@/components/secondaryScreen/commonApi.ts';
|
||||||
import { monitorColumns } from '/@/components/secondaryScreen/screen-right/screenRightHooks.ts';
|
import { monitorColumns } from '/@/components/secondaryScreen/screen-right/screenRightHooks.ts';
|
||||||
import $bus from '/@/utils/bus.ts';
|
import $bus from '/@/utils/bus.ts';
|
||||||
import { earlyWarning } from '/@/utils/busConstant.ts';
|
import { earlyWarning } from '/@/utils/busConstant.ts';
|
||||||
|
import { useRefresh } from '/@/hooks/autoRefresh';
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
orgCode: String,
|
||||||
|
type: String,
|
||||||
|
});
|
||||||
const tableHeight = ref(0);
|
const tableHeight = ref(0);
|
||||||
const dataSource = ref([]);
|
const dataSource = ref([]);
|
||||||
const pagination = ref({
|
const pagination = ref({
|
||||||
current: 1,
|
current: 1,
|
||||||
pageSize: 10,
|
pageSize: 2,
|
||||||
total: 0,
|
total: 0,
|
||||||
onChange: pageChange,
|
onChange: pageChange,
|
||||||
});
|
});
|
||||||
@@ -45,23 +50,31 @@
|
|||||||
$bus.emit(earlyWarning, record);
|
$bus.emit(earlyWarning, record);
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
watch(
|
||||||
|
props,
|
||||||
|
() => {
|
||||||
init(1);
|
init(1);
|
||||||
setHeight();
|
tableHeight.value == 0 && setHeight();
|
||||||
window.addEventListener('resize', setHeight);
|
window.addEventListener('resize', setHeight);
|
||||||
interval();
|
timer.value && clearInterval(timer.value);
|
||||||
});
|
// interval();
|
||||||
|
},
|
||||||
|
{ immediate: true }
|
||||||
|
);
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
window.removeEventListener('resize', setHeight);
|
window.removeEventListener('resize', setHeight);
|
||||||
});
|
});
|
||||||
|
|
||||||
function setHeight() {
|
function setHeight() {
|
||||||
|
let dom = document.querySelector('.inner-screen');
|
||||||
|
if (!dom) return;
|
||||||
tableHeight.value = document.querySelector('.inner-screen').getBoundingClientRect().height - 60;
|
tableHeight.value = document.querySelector('.inner-screen').getBoundingClientRect().height - 60;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function init(page) {
|
async function init(page) {
|
||||||
const { pageSize, current } = pagination.value;
|
const { pageSize, current } = pagination.value;
|
||||||
const { code, result } = await getMonitorList({ pageSize, pageNo: page });
|
const { code, result } = await getMonitorList({ pageSize, pageNo: page, orgCode: props.orgCode });
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
dataSource.value = result.records;
|
dataSource.value = result.records;
|
||||||
pagination.value.total = result.total;
|
pagination.value.total = result.total;
|
||||||
@@ -77,12 +90,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function interval() {
|
function interval() {
|
||||||
timer.value = setInterval(() => {
|
console.log(55555);
|
||||||
|
// timer.value = setInterval(() => {
|
||||||
let page = pagination.value.current < pages.value ? pagination.value.current + 1 : 1;
|
let page = pagination.value.current < pages.value ? pagination.value.current + 1 : 1;
|
||||||
init(page);
|
init(page);
|
||||||
}, 10000);
|
// }, 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const { refreshState } = useRefresh(3000, () => {
|
||||||
|
interval();
|
||||||
|
});
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
clearInterval(timer.value);
|
clearInterval(timer.value);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, unref, onMounted } from 'vue';
|
import { ref, unref, onMounted, watch } from 'vue';
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
import PublicTitle from '/@/components/publicTitle.vue';
|
import PublicTitle from '/@/components/publicTitle.vue';
|
||||||
import { useSpin } from '/@/components/body-d-left/bodyLeftHooks.ts';
|
import { useSpin } from '/@/components/body-d-left/bodyLeftHooks.ts';
|
||||||
@@ -21,13 +21,16 @@
|
|||||||
orgCode: String,
|
orgCode: String,
|
||||||
type: String,
|
type: String,
|
||||||
});
|
});
|
||||||
|
watch(
|
||||||
|
props,
|
||||||
|
() => {
|
||||||
|
init();
|
||||||
|
},
|
||||||
|
{ immediate: true }
|
||||||
|
);
|
||||||
const { setSpin, spinning } = useSpin();
|
const { setSpin, spinning } = useSpin();
|
||||||
const healthChart = ref<HTMLElement>();
|
const healthChart = ref<HTMLElement>();
|
||||||
|
|
||||||
const color = ref(['#B750BE', '#6C63F0', '#3AACFF', '#ED589D', '#FB466C']);
|
const color = ref(['#B750BE', '#6C63F0', '#3AACFF', '#ED589D', '#FB466C']);
|
||||||
onMounted(() => {
|
|
||||||
init();
|
|
||||||
});
|
|
||||||
const { stepData, total, setStep } = useStep();
|
const { stepData, total, setStep } = useStep();
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
|
|||||||
@@ -53,7 +53,8 @@
|
|||||||
const { isShow, className, setIsShow } = useMoveClass();
|
const { isShow, className, setIsShow } = useMoveClass();
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
Map.initMap({ el: 'mapContainer' });
|
let mapContainer = document.querySelector('.mapContainer');
|
||||||
|
mapContainer && Map.initMap({ el: 'mapContainer' });
|
||||||
getMapList();
|
getMapList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ export function useDepart() {
|
|||||||
getOptionData();
|
getOptionData();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function setOrgCode(val) {
|
||||||
|
orgCode.value = val;
|
||||||
|
}
|
||||||
|
|
||||||
function setOption(data) {
|
function setOption(data) {
|
||||||
option.value = data;
|
option.value = data;
|
||||||
orgCode.value = data[0]?.orgCode;
|
orgCode.value = data[0]?.orgCode;
|
||||||
@@ -26,6 +30,7 @@ export function useDepart() {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
orgCode,
|
orgCode,
|
||||||
|
setOrgCode,
|
||||||
option,
|
option,
|
||||||
setOption,
|
setOption,
|
||||||
fieldNames,
|
fieldNames,
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
// token key
|
||||||
|
export const TOKEN_KEY = 'TOKEN__';
|
||||||
|
|
||||||
|
export const LOCALE_KEY = 'LOCALE__';
|
||||||
|
|
||||||
|
// user info key
|
||||||
|
export const USER_INFO_KEY = 'USER__INFO__';
|
||||||
|
|
||||||
|
// role info key
|
||||||
|
export const ROLES_KEY = 'ROLES__KEY__';
|
||||||
|
|
||||||
|
// dict info key
|
||||||
|
export const DB_DICT_DATA_KEY = 'UI_CACHE_DB_DICT_DATA';
|
||||||
|
|
||||||
|
// project config key
|
||||||
|
export const PROJ_CFG_KEY = 'PROJ__CFG__KEY__';
|
||||||
|
|
||||||
|
// lock info
|
||||||
|
export const LOCK_INFO_KEY = 'LOCK__INFO__KEY__';
|
||||||
|
|
||||||
|
export const MULTIPLE_TABS_KEY = 'MULTIPLE_TABS__KEY__';
|
||||||
|
|
||||||
|
export const APP_DARK_MODE_KEY_ = '__APP__DARK__MODE__';
|
||||||
|
|
||||||
|
// base global local key
|
||||||
|
export const APP_LOCAL_CACHE_KEY = 'COMMON__LOCAL__KEY__';
|
||||||
|
|
||||||
|
// base global session key
|
||||||
|
export const APP_SESSION_CACHE_KEY = 'COMMON__SESSION__KEY__';
|
||||||
|
// 租户 key
|
||||||
|
export const TENANT_ID = 'TENANT_ID';
|
||||||
|
// login info key
|
||||||
|
export const LOGIN_INFO_KEY = 'LOGIN__INFO__';
|
||||||
|
|
||||||
|
// 聊天UID key
|
||||||
|
export const JEECG_CHAT_UID = 'JEECG_CHAT_UID';
|
||||||
|
|
||||||
|
export enum CacheTypeEnum {
|
||||||
|
SESSION,
|
||||||
|
LOCAL,
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
export enum PageEnum {
|
||||||
|
// basic login path
|
||||||
|
BASE_LOGIN = '/login',
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
import { onMounted, onUnmounted, ref } from 'vue';
|
||||||
|
|
||||||
|
export function useRefresh(time = 3000, callback) {
|
||||||
|
const refreshState = ref(false);
|
||||||
|
const timer = ref(null);
|
||||||
|
|
||||||
|
function setRefreshState() {
|
||||||
|
timer.value = setInterval(() => {
|
||||||
|
refreshState.value = !refreshState.value;
|
||||||
|
callback();
|
||||||
|
}, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
function stopRefresh() {
|
||||||
|
clearInterval(timer.value);
|
||||||
|
timer.value = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
if (timer.value != null) {
|
||||||
|
timer.value = null;
|
||||||
|
}
|
||||||
|
setRefreshState();
|
||||||
|
});
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
stopRefresh();
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
refreshState,
|
||||||
|
stopRefresh,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export default {
|
||||||
|
//预警
|
||||||
|
};
|
||||||
@@ -0,0 +1,148 @@
|
|||||||
|
let types = {
|
||||||
|
api: {
|
||||||
|
operationFailed: '操作失败',
|
||||||
|
errorTip: '错误提示',
|
||||||
|
errorMessage: '操作失败,系统异常!',
|
||||||
|
timeoutMessage: '登录超时,请重新登录!',
|
||||||
|
apiTimeoutMessage: '接口请求超时,请刷新页面重试!',
|
||||||
|
apiRequestFailed: '请求出错,请稍候重试',
|
||||||
|
networkException: '网络异常',
|
||||||
|
networkExceptionMsg: '网络异常,请检查您的网络连接是否正常!',
|
||||||
|
|
||||||
|
errMsg401: '用户没有权限(令牌、用户名、密码错误)!',
|
||||||
|
errMsg403: '用户得到授权,但是访问是被禁止的。!',
|
||||||
|
errMsg404: '网络请求错误,未找到该资源!',
|
||||||
|
errMsg405: '网络请求错误,请求方法未允许!',
|
||||||
|
errMsg408: '网络请求超时!',
|
||||||
|
errMsg500: '服务器错误,请联系管理员!',
|
||||||
|
errMsg501: '网络未实现!',
|
||||||
|
errMsg502: '网络错误!',
|
||||||
|
errMsg503: '服务不可用,服务器暂时过载或维护!',
|
||||||
|
errMsg504: '网络超时!',
|
||||||
|
errMsg505: 'http版本不支持该请求!',
|
||||||
|
|
||||||
|
registerMsg: '注册成功',
|
||||||
|
},
|
||||||
|
app: { logoutTip: '温馨提醒', logoutMessage: '是否确认退出系统?', menuLoading: '菜单加载中...' },
|
||||||
|
errorLog: {
|
||||||
|
tableTitle: '错误日志列表',
|
||||||
|
tableColumnType: '类型',
|
||||||
|
tableColumnDate: '时间',
|
||||||
|
tableColumnFile: '文件',
|
||||||
|
tableColumnMsg: '错误信息',
|
||||||
|
tableColumnStackMsg: 'stack信息',
|
||||||
|
|
||||||
|
tableActionDesc: '详情',
|
||||||
|
|
||||||
|
modalTitle: '错误详情',
|
||||||
|
|
||||||
|
fireVueError: '点击触发vue错误',
|
||||||
|
fireResourceError: '点击触发资源加载错误',
|
||||||
|
fireAjaxError: '点击触发ajax错误',
|
||||||
|
|
||||||
|
enableMessage: '只在`/src/settings/projectSetting.ts` 内的useErrorHandle=true时生效.',
|
||||||
|
},
|
||||||
|
exception: {
|
||||||
|
backLogin: '返回登录',
|
||||||
|
backHome: '返回首页',
|
||||||
|
subTitle403: '抱歉,您无权访问此页面。',
|
||||||
|
subTitle404: '抱歉,您访问的页面不存在。',
|
||||||
|
subTitle500: '抱歉,服务器报告错误。',
|
||||||
|
noDataTitle: '当前页无数据',
|
||||||
|
networkErrorTitle: '网络错误',
|
||||||
|
networkErrorSubTitle: '抱歉,您的网络连接已断开,请检查您的网络!',
|
||||||
|
},
|
||||||
|
lock: {
|
||||||
|
unlock: '点击解锁',
|
||||||
|
alert: '锁屏密码错误',
|
||||||
|
backToLogin: '返回登录',
|
||||||
|
entry: '进入系统',
|
||||||
|
placeholder: '请输入锁屏密码或者用户密码',
|
||||||
|
},
|
||||||
|
login: {
|
||||||
|
backSignIn: '返回',
|
||||||
|
signInFormTitle: '登录',
|
||||||
|
mobileSignInFormTitle: '手机登录',
|
||||||
|
qrSignInFormTitle: '二维码登录',
|
||||||
|
signUpFormTitle: '注册',
|
||||||
|
forgetFormTitle: '重置密码',
|
||||||
|
|
||||||
|
signInTitle: 'Jeecg Boot',
|
||||||
|
signInDesc: '是中国最具影响力的 企业级低代码平台!在线开发,可视化拖拽设计,零代码实现80%的基础功能~',
|
||||||
|
policy: '我同意敲敲云隐私政策',
|
||||||
|
scanSign: `扫码后,即可完成登录`,
|
||||||
|
scanSuccess: `扫码成功,登录中`,
|
||||||
|
|
||||||
|
loginButton: '登录',
|
||||||
|
registerButton: '注册',
|
||||||
|
rememberMe: '记住我',
|
||||||
|
forgetPassword: '忘记密码?',
|
||||||
|
otherSignIn: '其他登录方式',
|
||||||
|
|
||||||
|
// notify
|
||||||
|
loginSuccessTitle: '登录成功',
|
||||||
|
loginSuccessDesc: '欢迎回来',
|
||||||
|
|
||||||
|
// placeholder
|
||||||
|
accountPlaceholder: '请输入账号',
|
||||||
|
passwordPlaceholder: '请输入密码',
|
||||||
|
inputCodePlaceholder: '请输入验证码',
|
||||||
|
smsPlaceholder: '请输入验证码',
|
||||||
|
mobilePlaceholder: '请输入手机号码',
|
||||||
|
policyPlaceholder: '勾选后才能注册',
|
||||||
|
diffPwd: '两次输入密码不一致',
|
||||||
|
|
||||||
|
loginTitle: '健康服务业务平台',
|
||||||
|
formTitle: '欢迎登录',
|
||||||
|
userName: '账号',
|
||||||
|
password: '密码',
|
||||||
|
inputCode: '验证码',
|
||||||
|
confirmPassword: '确认密码',
|
||||||
|
email: '邮箱',
|
||||||
|
smsCode: '短信验证码',
|
||||||
|
mobile: '手机号码',
|
||||||
|
|
||||||
|
subTitleText: '{0}秒后返回登录页面',
|
||||||
|
|
||||||
|
//重置密码页面中文
|
||||||
|
authentication: '验证身份',
|
||||||
|
resetLoginPassword: '重置登录密码',
|
||||||
|
resetSuccess: '重置成功',
|
||||||
|
nextStep: '下一步',
|
||||||
|
goToLogin: '去登录',
|
||||||
|
},
|
||||||
|
common: {
|
||||||
|
okText: '确认',
|
||||||
|
closeText: '关闭',
|
||||||
|
cancelText: '取消',
|
||||||
|
loadingText: '加载中...',
|
||||||
|
saveText: '保存',
|
||||||
|
delText: '删除',
|
||||||
|
resetText: '重置',
|
||||||
|
searchText: '搜索',
|
||||||
|
queryText: '查询',
|
||||||
|
|
||||||
|
inputText: '请输入',
|
||||||
|
chooseText: '请选择',
|
||||||
|
|
||||||
|
redo: '刷新',
|
||||||
|
back: '返回',
|
||||||
|
|
||||||
|
light: '亮色主题',
|
||||||
|
dark: '黑暗主题',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export function t(key) {
|
||||||
|
if (!key) return '';
|
||||||
|
if (key.includes('.')) {
|
||||||
|
let value = types;
|
||||||
|
let keys = key.split('.');
|
||||||
|
let obj = {};
|
||||||
|
for (let i = 0; i < keys.length; i++) {
|
||||||
|
// debugger;
|
||||||
|
value = value[keys[i]];
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,149 @@
|
|||||||
|
import type { ModalFunc, ModalFuncProps } from 'ant-design-vue/lib/modal/Modal';
|
||||||
|
import { Modal, message as Message, notification } from 'ant-design-vue';
|
||||||
|
import { InfoCircleFilled, CheckCircleFilled, CloseCircleFilled } from '@ant-design/icons-vue';
|
||||||
|
import { NotificationArgsProps, ConfigProps } from 'ant-design-vue/lib/notification';
|
||||||
|
import { isString } from '/@/utils/is';
|
||||||
|
import { h } from 'vue';
|
||||||
|
import { t } from '/@/hooks/locales/useLocales.ts';
|
||||||
|
|
||||||
|
export interface NotifyApi {
|
||||||
|
info(config: NotificationArgsProps): void;
|
||||||
|
|
||||||
|
success(config: NotificationArgsProps): void;
|
||||||
|
|
||||||
|
error(config: NotificationArgsProps): void;
|
||||||
|
|
||||||
|
warn(config: NotificationArgsProps): void;
|
||||||
|
|
||||||
|
warning(config: NotificationArgsProps): void;
|
||||||
|
|
||||||
|
open(args: NotificationArgsProps): void;
|
||||||
|
|
||||||
|
close(key: String): void;
|
||||||
|
|
||||||
|
config(options: ConfigProps): void;
|
||||||
|
|
||||||
|
destroy(): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare type NotificationPlacement = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
|
||||||
|
export declare type IconType = 'success' | 'info' | 'error' | 'warning';
|
||||||
|
|
||||||
|
export interface ModalOptionsEx extends Omit<ModalFuncProps, 'iconType'> {
|
||||||
|
iconType: 'warning' | 'success' | 'error' | 'info';
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ModalOptionsPartial = Partial<ModalOptionsEx> & Pick<ModalOptionsEx, 'content'>;
|
||||||
|
|
||||||
|
interface ConfirmOptions {
|
||||||
|
info: ModalFunc;
|
||||||
|
success: ModalFunc;
|
||||||
|
error: ModalFunc;
|
||||||
|
warn: ModalFunc;
|
||||||
|
warning: ModalFunc;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getIcon(iconType: string) {
|
||||||
|
try {
|
||||||
|
if (iconType === 'warning') {
|
||||||
|
return h(InfoCircleFilled, { class: 'modal-icon-warning' });
|
||||||
|
} else if (iconType === 'success') {
|
||||||
|
return h(CheckCircleFilled, { class: 'modal-icon-success' });
|
||||||
|
} else if (iconType === 'info') {
|
||||||
|
return h(InfoCircleFilled, { class: 'modal-icon-info' });
|
||||||
|
} else {
|
||||||
|
return h(CloseCircleFilled, { class: 'modal-icon-error' });
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderContent({ content }: Pick<ModalOptionsEx, 'content'>) {
|
||||||
|
try {
|
||||||
|
if (isString(content)) {
|
||||||
|
return h('div', h('div', { innerHTML: content as string }));
|
||||||
|
} else {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e);
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: Create confirmation box
|
||||||
|
*/
|
||||||
|
function createConfirm(options: ModalOptionsEx): ReturnType<ModalFunc> {
|
||||||
|
const iconType = options.iconType || 'warning';
|
||||||
|
Reflect.deleteProperty(options, 'iconType');
|
||||||
|
const opt: ModalFuncProps = {
|
||||||
|
centered: true,
|
||||||
|
icon: getIcon(iconType),
|
||||||
|
...options,
|
||||||
|
content: renderContent(options),
|
||||||
|
};
|
||||||
|
return Modal.confirm(opt);
|
||||||
|
}
|
||||||
|
|
||||||
|
const getBaseOptions = () => {
|
||||||
|
// const { t } = useI18n();
|
||||||
|
return {
|
||||||
|
okText: t('common.okText'),
|
||||||
|
centered: true,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
function createModalOptions(options: ModalOptionsPartial, icon: string): ModalOptionsPartial {
|
||||||
|
//update-begin-author:taoyan date:2023-1-10 for: 可以自定义图标
|
||||||
|
let titleIcon: any = '';
|
||||||
|
if (options.icon) {
|
||||||
|
titleIcon = options.icon;
|
||||||
|
} else {
|
||||||
|
titleIcon = getIcon(icon);
|
||||||
|
}
|
||||||
|
//update-end-author:taoyan date:2023-1-10 for: 可以自定义图标
|
||||||
|
return {
|
||||||
|
...getBaseOptions(),
|
||||||
|
...options,
|
||||||
|
content: renderContent(options),
|
||||||
|
icon: titleIcon,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function createSuccessModal(options: ModalOptionsPartial) {
|
||||||
|
return Modal.success(createModalOptions(options, 'success'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function createErrorModal(options: ModalOptionsPartial) {
|
||||||
|
return Modal.error(createModalOptions(options, 'close'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function createInfoModal(options: ModalOptionsPartial) {
|
||||||
|
return Modal.info(createModalOptions(options, 'info'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function createWarningModal(options: ModalOptionsPartial) {
|
||||||
|
return Modal.warning(createModalOptions(options, 'warning'));
|
||||||
|
}
|
||||||
|
|
||||||
|
notification.config({
|
||||||
|
placement: 'topRight',
|
||||||
|
duration: 3,
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: message
|
||||||
|
*/
|
||||||
|
export function useMessage() {
|
||||||
|
return {
|
||||||
|
createMessage: Message,
|
||||||
|
notification: notification as NotifyApi,
|
||||||
|
createConfirm: createConfirm,
|
||||||
|
createSuccessModal,
|
||||||
|
createErrorModal,
|
||||||
|
createInfoModal,
|
||||||
|
createWarningModal,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -2,13 +2,17 @@ import { createApp } from 'vue';
|
|||||||
import App from './App.vue';
|
import App from './App.vue';
|
||||||
import './assets/less/index.less';
|
import './assets/less/index.less';
|
||||||
import router from './router';
|
import router from './router';
|
||||||
|
|
||||||
import('ant-design-vue/dist/antd.less');
|
import('ant-design-vue/dist/antd.less');
|
||||||
import registerGlobComp from './assets/ts/antd.ts';
|
import registerGlobComp from './assets/ts/antd.ts';
|
||||||
import directiveMethods from './assets/ts/directive';
|
import directiveMethods from './assets/ts/directive';
|
||||||
|
import { setupStore } from './store/index.ts';
|
||||||
|
|
||||||
const app = createApp(App);
|
const app = createApp(App);
|
||||||
// 注册自定义事件
|
// 注册自定义事件
|
||||||
directiveMethods(app);
|
directiveMethods(app);
|
||||||
// 注册组件
|
// 注册组件
|
||||||
registerGlobComp(app);
|
registerGlobComp(app);
|
||||||
|
// 配置存储
|
||||||
|
setupStore(app);
|
||||||
app.use(router).mount('#app');
|
app.use(router).mount('#app');
|
||||||
|
|||||||
@@ -3,6 +3,19 @@ import { createRouter, createWebHistory, Router, RouteRecordRaw } from 'vue-rout
|
|||||||
const routes: Array<RouteRecordRaw> = [
|
const routes: Array<RouteRecordRaw> = [
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
|
name: 'default',
|
||||||
|
component: () => import('/@/views/sys/login.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/login',
|
||||||
|
name: 'login',
|
||||||
|
meta: {
|
||||||
|
title: '登录',
|
||||||
|
},
|
||||||
|
component: () => import('/@/views/sys/login.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/home',
|
||||||
name: 'index',
|
name: 'index',
|
||||||
meta: {
|
meta: {
|
||||||
title: '首页',
|
title: '首页',
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
import type { App } from 'vue';
|
||||||
|
import { createPinia } from 'pinia';
|
||||||
|
|
||||||
|
const store = createPinia();
|
||||||
|
|
||||||
|
export function setupStore(app: App<Element>) {
|
||||||
|
app.use(store);
|
||||||
|
}
|
||||||
|
|
||||||
|
export { store };
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
import { defineStore } from 'pinia';
|
||||||
|
import { loginApi, getUserInfo, doLogout } from '/@/api/user.ts';
|
||||||
|
import { TOKEN_KEY, USER_INFO_KEY } from '/@/enum/cacheEnum.ts';
|
||||||
|
import { PageEnum } from '/@/enum/pageEnum.ts';
|
||||||
|
import { getAuthCache, setAuthCache } from '/@/utils/auth.ts';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
export const useUserStore = defineStore({
|
||||||
|
id: 'app-user',
|
||||||
|
state: () => ({
|
||||||
|
token: '',
|
||||||
|
userInfo: null,
|
||||||
|
//登录返回信息
|
||||||
|
loginInfo: null,
|
||||||
|
}),
|
||||||
|
getters: {
|
||||||
|
getUserInfo() {
|
||||||
|
return (this.userInfo && Object.keys(this.userInfo).length > 0) || getAuthCache(USER_INFO_KEY) || {};
|
||||||
|
},
|
||||||
|
getLoginInfo() {
|
||||||
|
return this.loginInfo;
|
||||||
|
},
|
||||||
|
getToken() {
|
||||||
|
return this.token || getAuthCache(TOKEN_KEY);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
setToken(info) {
|
||||||
|
this.token = info;
|
||||||
|
setAuthCache(TOKEN_KEY, info);
|
||||||
|
},
|
||||||
|
setUserInfo(info) {
|
||||||
|
this.userInfo = info;
|
||||||
|
setAuthCache(USER_INFO_KEY, info);
|
||||||
|
},
|
||||||
|
setLoginInfo(info) {
|
||||||
|
this.loginInfo = info;
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 登录事件
|
||||||
|
*/
|
||||||
|
async login(params) {
|
||||||
|
try {
|
||||||
|
const { goHome = true, mode, ...loginParams } = params;
|
||||||
|
const data = await loginApi(loginParams, mode);
|
||||||
|
const { token, userInfo } = data.result;
|
||||||
|
// save token
|
||||||
|
this.setToken(token, false);
|
||||||
|
this.setUserInfo(userInfo);
|
||||||
|
return { userInfo };
|
||||||
|
} catch (error) {
|
||||||
|
return Promise.reject(error);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 登录完成处理
|
||||||
|
* @param goHome
|
||||||
|
*/
|
||||||
|
async afterLoginAction(goHome?: boolean, data?: any): Promise<any | null> {
|
||||||
|
if (!this.getToken) return null;
|
||||||
|
//获取用户信息
|
||||||
|
const userInfo = await this.getUserInfoAction();
|
||||||
|
const { multi_depart, departs } = data;
|
||||||
|
await this.setLoginInfo({ multi_depart, departs, isLogin: true });
|
||||||
|
return data;
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* @desc 获取用户信息
|
||||||
|
*/
|
||||||
|
async getUserInfoAction() {
|
||||||
|
if (!this.getToken) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
// @ts-ignore
|
||||||
|
const { userInfo } = await getUserInfo();
|
||||||
|
if (userInfo) {
|
||||||
|
this.setUserInfo(userInfo);
|
||||||
|
}
|
||||||
|
return userInfo;
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* @desc 退出登录
|
||||||
|
*/
|
||||||
|
async logout(goLogin = false) {
|
||||||
|
if (this.getToken) {
|
||||||
|
try {
|
||||||
|
await doLogout();
|
||||||
|
} catch {
|
||||||
|
console.log('注销Token失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.setToken('');
|
||||||
|
this.setUserInfo(null);
|
||||||
|
this.setLoginInfo(null);
|
||||||
|
goLogin && (await router.push({ path: PageEnum.BASE_LOGIN }));
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
import { isJSON } from '/@/utils/is.ts';
|
||||||
|
|
||||||
|
export function getAuthCache(key) {
|
||||||
|
let v = localStorage.getItem(key);
|
||||||
|
if (!isJSON(v)) {
|
||||||
|
return v;
|
||||||
|
} else {
|
||||||
|
return JSON.parse(v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function setAuthCache(key, value) {
|
||||||
|
if (!isJSON(value)) {
|
||||||
|
return localStorage.setItem(key, value);
|
||||||
|
} else {
|
||||||
|
return localStorage.setItem(key, JSON.stringify(value));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,3 +10,12 @@ export const isString = (val: any) => typeof val === 'string';
|
|||||||
export const isSymbol = (val: any) => typeof val === 'symbol';
|
export const isSymbol = (val: any) => typeof val === 'symbol';
|
||||||
export const isObject = (val: null) => val !== null && typeof val === 'object';
|
export const isObject = (val: null) => val !== null && typeof val === 'object';
|
||||||
export const isPromise = (val: any) => isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
export const isPromise = (val: any) => isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
||||||
|
|
||||||
|
export function isJSON(str) {
|
||||||
|
try {
|
||||||
|
JSON.parse(str);
|
||||||
|
return true;
|
||||||
|
} catch (e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
import { JSEncrypt } from 'jsencrypt';
|
||||||
|
// 公钥
|
||||||
|
export const publicKey =
|
||||||
|
'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCmZfR/bA9X3vp86y1aEpvwzXJYKRRF1fLau2+05/ZtaITLpV8bhkmSf3neSy/Q9gAdvG75Fr73E+GWE+K5b0BpvIS1jDGo319+PpZR39SaZTKZ27XFXrosmJTZutN79t819HS1VseleunHAFgMVufE9U5jP6LGzl/wbkSy01GhzwIDAQAB';
|
||||||
|
/**
|
||||||
|
* @Description:密码加密
|
||||||
|
* @date 2023/8/21
|
||||||
|
* @param password
|
||||||
|
*/
|
||||||
|
|
||||||
|
export function encipher(password): string | undefined {
|
||||||
|
if (password) {
|
||||||
|
// 新建JSEncrypt对象
|
||||||
|
const encryptor = new JSEncrypt();
|
||||||
|
// 设置公钥
|
||||||
|
encryptor.setPublicKey(publicKey);
|
||||||
|
// 加密数据
|
||||||
|
return encryptor.encrypt(password) as string;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
</SecondMap>
|
</SecondMap>
|
||||||
</div>
|
</div>
|
||||||
<div class="body-d-right">
|
<div class="body-d-right">
|
||||||
<one-r :orgCode="orgCode" :type="type" />
|
<one-r :orgCode="orgCode" :type="type" :key="refreshState" />
|
||||||
<two-r :orgCode="orgCode" :type="type" />
|
<two-r :orgCode="orgCode" :type="type" />
|
||||||
<three-r :orgCode="orgCode" :type="type" />
|
<three-r :orgCode="orgCode" :type="type" />
|
||||||
</div>
|
</div>
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { RollbackOutlined } from '@ant-design/icons-vue';
|
import { RollbackOutlined } from '@ant-design/icons-vue';
|
||||||
import { ref, watch } from 'vue';
|
import { nextTick, onMounted, ref, watch } from 'vue';
|
||||||
import OneR from '/@/components/secondaryScreen/screen-right/oneR.vue';
|
import OneR from '/@/components/secondaryScreen/screen-right/oneR.vue';
|
||||||
import TwoR from '/@/components/secondaryScreen/screen-right/twoR.vue';
|
import TwoR from '/@/components/secondaryScreen/screen-right/twoR.vue';
|
||||||
import ThreeR from '/@/components/secondaryScreen/screen-right/threeR.vue';
|
import ThreeR from '/@/components/secondaryScreen/screen-right/threeR.vue';
|
||||||
@@ -52,7 +52,12 @@
|
|||||||
import router from '/@/router';
|
import router from '/@/router';
|
||||||
import { useDepart, useTimeType, useTree } from '/@/components/secondaryScreen/secondMap/secondMapHooks.ts';
|
import { useDepart, useTimeType, useTree } from '/@/components/secondaryScreen/secondMap/secondMapHooks.ts';
|
||||||
import { useTopTime } from '/@/utils/utils.ts';
|
import { useTopTime } from '/@/utils/utils.ts';
|
||||||
|
import { useUserStore } from '/@/store/modules/user.ts';
|
||||||
|
import { useRefresh } from '/@/hooks/autoRefresh';
|
||||||
|
|
||||||
|
const { refreshState } = useRefresh(3000);
|
||||||
|
|
||||||
|
const useStore = useUserStore();
|
||||||
const dayTimeT = ref();
|
const dayTimeT = ref();
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
@@ -62,8 +67,6 @@
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
init();
|
|
||||||
|
|
||||||
function getTime() {
|
function getTime() {
|
||||||
const { timeRight } = useTopTime();
|
const { timeRight } = useTopTime();
|
||||||
dayTimeT.value = timeRight;
|
dayTimeT.value = timeRight;
|
||||||
@@ -73,7 +76,23 @@
|
|||||||
router.go(-1);
|
router.go(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
const { orgCode, option, fieldNames } = useDepart({});
|
const { orgCode, option, fieldNames, setOrgCode } = useDepart({});
|
||||||
|
// const reloadPage = ref(true);
|
||||||
|
onMounted(() => {
|
||||||
|
const userInfo = useStore.getUserInfo;
|
||||||
|
console.log('465', userInfo);
|
||||||
|
let orgCode = userInfo?.secondDepart?.orgCode;
|
||||||
|
console.log('9999', orgCode);
|
||||||
|
if (orgCode) {
|
||||||
|
nextTick(() => {
|
||||||
|
setOrgCode(orgCode);
|
||||||
|
init();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// setInterval(() => {
|
||||||
|
// reloadPage.value = !reloadPage.value;
|
||||||
|
// }, 3000);
|
||||||
|
});
|
||||||
|
|
||||||
function orgChange(val, option) {
|
function orgChange(val, option) {
|
||||||
console.log('val', val);
|
console.log('val', val);
|
||||||
|
|||||||
@@ -0,0 +1,313 @@
|
|||||||
|
<template>
|
||||||
|
<div class="mini-login login-background-img">
|
||||||
|
<div v-show="type === 'login'">
|
||||||
|
<div class="aui-content">
|
||||||
|
<div class="aui-top">
|
||||||
|
<div class="aui-title">{{ t('login.loginTitle') }}</div>
|
||||||
|
<div class="aui-title-image"></div>
|
||||||
|
</div>
|
||||||
|
<div class="aui-container">
|
||||||
|
<div class="aui-form">
|
||||||
|
<div class="aui-formBox">
|
||||||
|
<div class="aui-formWell">
|
||||||
|
<div class="form-title">{{ t('login.formTitle') }}</div>
|
||||||
|
<div class="aui-form-box" style="height: 180px">
|
||||||
|
<a-form ref="loginRef" :model="formData" @keyup.enter.native="loginHandleClick">
|
||||||
|
<div class="aui-account">
|
||||||
|
<div class="aui-inputClear">
|
||||||
|
<i class="icon icon-code"></i>
|
||||||
|
<a-form-item>
|
||||||
|
<a-input
|
||||||
|
v-model:value="formData.username"
|
||||||
|
:placeholder="t('login.userName')"
|
||||||
|
class="fix-auto-fill"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="aui-inputClear">
|
||||||
|
<i class="icon icon-password"></i>
|
||||||
|
<a-form-item>
|
||||||
|
<a-input
|
||||||
|
v-model:value="formData.password"
|
||||||
|
:placeholder="t('login.password')"
|
||||||
|
class="fix-auto-fill"
|
||||||
|
type="password"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="aui-inputClear">
|
||||||
|
<i class="icon icon-code"></i>
|
||||||
|
<a-form-item>
|
||||||
|
<a-input
|
||||||
|
v-model:value="formData.inputCode"
|
||||||
|
:placeholder="t('login.inputCode')"
|
||||||
|
class="fix-auto-fill"
|
||||||
|
type="text"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
<div class="aui-code">
|
||||||
|
<img
|
||||||
|
v-if="randCodeData.requestCodeSuccess"
|
||||||
|
:src="randCodeData.randCodeImage"
|
||||||
|
@click="handleChangeCheckCode"
|
||||||
|
/>
|
||||||
|
<img
|
||||||
|
v-else
|
||||||
|
:src="codeImg"
|
||||||
|
style="margin-top: 2px; max-width: initial"
|
||||||
|
@click="handleChangeCheckCode"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="aui-flex remember">
|
||||||
|
<div class="aui-flex-box">
|
||||||
|
<div class="aui-choice">
|
||||||
|
<a-input v-model:value="rememberMe" class="fix-auto-fill" type="checkbox" />
|
||||||
|
<span class="aui-check">{{ t('login.rememberMe') }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
<div class="aui-formButton">
|
||||||
|
<div class="aui-flex">
|
||||||
|
<a-button
|
||||||
|
:loading="loginLoading"
|
||||||
|
class="aui-link-login aui-flex-box"
|
||||||
|
type="primary"
|
||||||
|
@click="loginHandleClick"
|
||||||
|
>
|
||||||
|
{{ t('login.loginButton') }}
|
||||||
|
</a-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" name="login-mini" setup>
|
||||||
|
import { getCodeInfo } from '/@/api/user';
|
||||||
|
import { onMounted, reactive, ref, toRaw, watch } from 'vue';
|
||||||
|
import codeImg from '/@/assets/images/checkcode.png';
|
||||||
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
|
import { t } from '/@/hooks/locales/useLocales.ts';
|
||||||
|
import { encipher } from '/@/utils/jsencrypt';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
// console.log(t('login'));
|
||||||
|
const prefixCls = 'mini-login';
|
||||||
|
const { notification, createMessage } = useMessage();
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const randCodeData = reactive<any>({
|
||||||
|
randCodeImage: '',
|
||||||
|
requestCodeSuccess: false,
|
||||||
|
checkKey: null,
|
||||||
|
});
|
||||||
|
const rememberMe = ref<string>('0');
|
||||||
|
const type = ref<string>('login');
|
||||||
|
//账号登录表单字段
|
||||||
|
const formData = reactive<any>({
|
||||||
|
inputCode: '',
|
||||||
|
username: '',
|
||||||
|
password: '',
|
||||||
|
});
|
||||||
|
const loginRef = ref();
|
||||||
|
const loginLoading = ref<boolean>(false);
|
||||||
|
defineProps({
|
||||||
|
sessionTimeout: {
|
||||||
|
type: Boolean,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取验证码
|
||||||
|
*/
|
||||||
|
function handleChangeCheckCode() {
|
||||||
|
formData.inputCode = '';
|
||||||
|
randCodeData.checkKey = 1629428467008;
|
||||||
|
getCodeInfo(randCodeData.checkKey)
|
||||||
|
.then((res) => {
|
||||||
|
randCodeData.randCodeImage = res.result;
|
||||||
|
randCodeData.requestCodeSuccess = true;
|
||||||
|
})
|
||||||
|
.catch((e) => {});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 账号或者手机登录
|
||||||
|
*/
|
||||||
|
async function loginHandleClick() {
|
||||||
|
accountLogin();
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => formData.password,
|
||||||
|
() => {
|
||||||
|
formData.password = formData.password.replace(/[\u4e00-\u9fa5]/g, '');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
async function accountLogin() {
|
||||||
|
if (!formData.username) {
|
||||||
|
createMessage.warn(t('login.accountPlaceholder'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!formData.password) {
|
||||||
|
createMessage.warn(t('login.passwordPlaceholder'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!formData.inputCode) {
|
||||||
|
createMessage.warn(t('login.inputCodePlaceholder'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
loginLoading.value = true;
|
||||||
|
const { userInfo } = await userStore.login(
|
||||||
|
toRaw({
|
||||||
|
password: encipher(formData.password) as string,
|
||||||
|
// password: formData.password,
|
||||||
|
username: formData.username,
|
||||||
|
captcha: formData.inputCode,
|
||||||
|
checkKey: randCodeData.checkKey,
|
||||||
|
mode: 'none', //不要默认的错误提示
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
if (userInfo) {
|
||||||
|
notification.success({
|
||||||
|
message: t('login.loginSuccessTitle'),
|
||||||
|
description: `${t('login.loginSuccessDesc')}: ${userInfo.realname}`,
|
||||||
|
duration: 3,
|
||||||
|
});
|
||||||
|
router.replace({ path: '/home' });
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
notification.error({
|
||||||
|
message: t('api.errorTip'),
|
||||||
|
description: error.message || t('login.networkExceptionMsg'),
|
||||||
|
duration: 3,
|
||||||
|
});
|
||||||
|
handleChangeCheckCode();
|
||||||
|
} finally {
|
||||||
|
loginLoading.value = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
//加载验证码
|
||||||
|
handleChangeCheckCode();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
@import '/@/assets/loginmini/style/home.less';
|
||||||
|
@import '/@/assets/loginmini/style/base.less';
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
@prefix-cls: ~'mini-login';
|
||||||
|
@dark-bg: #293146;
|
||||||
|
@primary-color: #1890ff;
|
||||||
|
@text-color-secondary: fade(#000, 45%);
|
||||||
|
html[data-theme='dark'] {
|
||||||
|
.@{prefix-cls} {
|
||||||
|
background-color: @dark-bg !important;
|
||||||
|
background-image: none;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
background-image: url(/@/assets/svg/login-bg-dark.svg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-inputClear {
|
||||||
|
background-color: #232a3b !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-input,
|
||||||
|
.ant-input-password {
|
||||||
|
background-color: #232a3b !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-btn:not(.ant-btn-link):not(.ant-btn-primary) {
|
||||||
|
border: 1px solid #4a5569 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-form {
|
||||||
|
background: @dark-bg !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-iconify {
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-inputClear input,
|
||||||
|
.aui-input-line input,
|
||||||
|
.aui-choice {
|
||||||
|
color: #c9d1d9 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-formBox {
|
||||||
|
background-color: @dark-bg !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-third-text span {
|
||||||
|
background-color: @dark-bg !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-form-nav .aui-flex-box {
|
||||||
|
color: #c9d1d9 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-formButton .aui-linek-code {
|
||||||
|
background: @dark-bg !important;
|
||||||
|
color: white !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-code-line {
|
||||||
|
border-left: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-checkbox-inner,
|
||||||
|
.aui-success h3 {
|
||||||
|
border-color: #c9d1d9;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
input.fix-auto-fill,
|
||||||
|
.fix-auto-fill input {
|
||||||
|
-webkit-text-fill-color: #c9d1d9 !important;
|
||||||
|
box-shadow: inherit !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-sign-in-way {
|
||||||
|
.anticon {
|
||||||
|
font-size: 22px !important;
|
||||||
|
color: #888 !important;
|
||||||
|
cursor: pointer !important;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: @primary-color !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-divider-inner-text {
|
||||||
|
font-size: 12px !important;
|
||||||
|
color: @text-color-secondary !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aui-third-login a {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-btn-primary:not(.ant-btn-background-ghost):not([disabled]) {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||