|
@@ -1,22 +1,12 @@
|
|
<template>
|
|
<template>
|
|
- <div class="login-container flex-row">
|
|
|
|
- <el-switch
|
|
|
|
- class="switch"
|
|
|
|
- v-model="getThemeConfig.isIsDark"
|
|
|
|
- size="large"
|
|
|
|
- inline-prompt
|
|
|
|
- @change="onAddDarkChange"
|
|
|
|
- :active-icon="Sunny"
|
|
|
|
- :inactive-icon="Moon"
|
|
|
|
- style="--el-switch-on-color: #fff; --el-switch-off-color: #151515"
|
|
|
|
- ></el-switch>
|
|
|
|
|
|
+ <div class="login-container flex-row" v-if="showImg">
|
|
|
|
+ <el-switch class="switch" v-model="getThemeConfig.isIsDark" size="large" inline-prompt @change="onAddDarkChange" :active-icon="Sunny" :inactive-icon="Moon" style="--el-switch-on-color: #fff; --el-switch-off-color: #151515"></el-switch>
|
|
<div class="part left">
|
|
<div class="part left">
|
|
<div class="flex logo">
|
|
<div class="flex logo">
|
|
- <el-image v-if="sysinfo.systemLogo" class="logoimg" :src="sysinfo.systemLogo" />
|
|
|
|
- <el-image v-else class="logoimg" src="/imgs/logo.png" />
|
|
|
|
- {{ sysinfo.systemName }}</div>
|
|
|
|
- <el-image class="img" v-if="sysinfo.systemLoginPIC" :src="sysinfo.systemLoginPIC" />
|
|
|
|
- <el-image class="img" v-else src="/imgs/login-box-bg.svg" />
|
|
|
|
|
|
+ <el-image class="logoimg" :src="sysinfo.systemLogo" />
|
|
|
|
+ {{ sysinfo.systemName }}
|
|
|
|
+ </div>
|
|
|
|
+ <el-image class="img" :src="sysinfo.systemLoginPIC" />
|
|
<span class="text" v-if="sysinfo.buildTime">{{ sysinfo.buildVersion }} </span>
|
|
<span class="text" v-if="sysinfo.buildTime">{{ sysinfo.buildVersion }} </span>
|
|
<span class="text" v-if="sysinfo.buildTime">{{ dayjs(sysinfo.buildTime).format('YYYY-MM-DD HH:mm:ss') }}</span>
|
|
<span class="text" v-if="sysinfo.buildTime">{{ dayjs(sysinfo.buildTime).format('YYYY-MM-DD HH:mm:ss') }}</span>
|
|
</div>
|
|
</div>
|
|
@@ -34,6 +24,8 @@ import { useStore } from '/@/store/index';
|
|
import logoMini from '/imgs/logo.png';
|
|
import logoMini from '/imgs/logo.png';
|
|
import { Sunny, Moon } from '@element-plus/icons-vue';
|
|
import { Sunny, Moon } from '@element-plus/icons-vue';
|
|
import dayjs from 'dayjs';
|
|
import dayjs from 'dayjs';
|
|
|
|
+import CloseFull from '/@/layout/navBars/breadcrumb/closeFull.vue';
|
|
|
|
+import api from '/@/api/system';
|
|
|
|
|
|
// 定义接口来定义对象的类型
|
|
// 定义接口来定义对象的类型
|
|
interface LoginState {
|
|
interface LoginState {
|
|
@@ -51,6 +43,7 @@ export default defineComponent({
|
|
Sunny,
|
|
Sunny,
|
|
Moon,
|
|
Moon,
|
|
dayjs,
|
|
dayjs,
|
|
|
|
+ showImg: false,
|
|
sysinfo: {
|
|
sysinfo: {
|
|
buildVersion: '',
|
|
buildVersion: '',
|
|
systemName: '',
|
|
systemName: '',
|
|
@@ -62,7 +55,9 @@ export default defineComponent({
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- this.sysinfo = JSON.parse(localStorage.sysinfo || '{}');
|
|
|
|
|
|
+ api.sysinfo().then((res: any) => {
|
|
|
|
+ this.sysinfo = res
|
|
|
|
+ }).finally(() => this.showImg = true)
|
|
},
|
|
},
|
|
setup() {
|
|
setup() {
|
|
const store = useStore();
|
|
const store = useStore();
|
|
@@ -102,50 +97,61 @@ html[data-theme='dark'] {
|
|
.login-container {
|
|
.login-container {
|
|
background: #293146;
|
|
background: #293146;
|
|
}
|
|
}
|
|
|
|
+
|
|
.left {
|
|
.left {
|
|
background-image: url(/@/assets/login-bg-dark.svg);
|
|
background-image: url(/@/assets/login-bg-dark.svg);
|
|
}
|
|
}
|
|
|
|
+
|
|
.title {
|
|
.title {
|
|
color: #aaa;
|
|
color: #aaa;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
.flex {
|
|
.flex {
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
}
|
|
}
|
|
|
|
+
|
|
.text {
|
|
.text {
|
|
color: #fff;
|
|
color: #fff;
|
|
}
|
|
}
|
|
|
|
+
|
|
.switch {
|
|
.switch {
|
|
position: fixed;
|
|
position: fixed;
|
|
right: 20px;
|
|
right: 20px;
|
|
top: 20px;
|
|
top: 20px;
|
|
}
|
|
}
|
|
|
|
+
|
|
.login-container {
|
|
.login-container {
|
|
width: 100vw;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
height: 100vh;
|
|
position: relative;
|
|
position: relative;
|
|
background: #fff;
|
|
background: #fff;
|
|
|
|
+
|
|
.title {
|
|
.title {
|
|
font-size: 30px;
|
|
font-size: 30px;
|
|
color: #333;
|
|
color: #333;
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
letter-spacing: 20px;
|
|
letter-spacing: 20px;
|
|
}
|
|
}
|
|
|
|
+
|
|
.logo {
|
|
.logo {
|
|
font-size: 30px;
|
|
font-size: 30px;
|
|
color: #fff;
|
|
color: #fff;
|
|
|
|
+
|
|
.logoimg {
|
|
.logoimg {
|
|
height: 50px;
|
|
height: 50px;
|
|
display: block;
|
|
display: block;
|
|
margin-right: 12px;
|
|
margin-right: 12px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
.img {
|
|
.img {
|
|
width: 50%;
|
|
width: 50%;
|
|
display: block;
|
|
display: block;
|
|
margin: 15vh 0;
|
|
margin: 15vh 0;
|
|
}
|
|
}
|
|
|
|
+
|
|
.part {
|
|
.part {
|
|
flex: 1;
|
|
flex: 1;
|
|
display: flex;
|
|
display: flex;
|
|
@@ -153,6 +159,7 @@ html[data-theme='dark'] {
|
|
justify-content: center;
|
|
justify-content: center;
|
|
align-items: center;
|
|
align-items: center;
|
|
}
|
|
}
|
|
|
|
+
|
|
.left {
|
|
.left {
|
|
height: 100vh;
|
|
height: 100vh;
|
|
background-image: url(/@/assets/login-bg.svg);
|
|
background-image: url(/@/assets/login-bg.svg);
|
|
@@ -162,24 +169,29 @@ html[data-theme='dark'] {
|
|
align-items: flex-start;
|
|
align-items: flex-start;
|
|
padding-left: 8%;
|
|
padding-left: 8%;
|
|
}
|
|
}
|
|
|
|
+
|
|
.login-icon-group {
|
|
.login-icon-group {
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 100%;
|
|
height: 100%;
|
|
position: relative;
|
|
position: relative;
|
|
|
|
+
|
|
.login-icon-group-title {
|
|
.login-icon-group-title {
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
justify-content: center;
|
|
justify-content: center;
|
|
margin: 12px 0;
|
|
margin: 12px 0;
|
|
|
|
+
|
|
img {
|
|
img {
|
|
width: auto;
|
|
width: auto;
|
|
height: 40px;
|
|
height: 40px;
|
|
}
|
|
}
|
|
|
|
+
|
|
&-text {
|
|
&-text {
|
|
padding-left: 20px;
|
|
padding-left: 20px;
|
|
color: var(--el-color-primary);
|
|
color: var(--el-color-primary);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
&-icon {
|
|
&-icon {
|
|
width: 60%;
|
|
width: 60%;
|
|
height: 70%;
|
|
height: 70%;
|
|
@@ -188,11 +200,13 @@ html[data-theme='dark'] {
|
|
bottom: 0;
|
|
bottom: 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
.login-content-out {
|
|
.login-content-out {
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 100%;
|
|
height: 100%;
|
|
padding-top: calc(50vh - 227px);
|
|
padding-top: calc(50vh - 227px);
|
|
}
|
|
}
|
|
|
|
+
|
|
.login-content {
|
|
.login-content {
|
|
width: 500px;
|
|
width: 500px;
|
|
padding: 20px;
|
|
padding: 20px;
|
|
@@ -203,9 +217,11 @@ html[data-theme='dark'] {
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
z-index: 1;
|
|
z-index: 1;
|
|
position: relative;
|
|
position: relative;
|
|
|
|
+
|
|
.login-content-main {
|
|
.login-content-main {
|
|
margin: 0 auto;
|
|
margin: 0 auto;
|
|
width: 80%;
|
|
width: 80%;
|
|
|
|
+
|
|
.login-content-title {
|
|
.login-content-title {
|
|
color: var(--el-text-color-primary);
|
|
color: var(--el-text-color-primary);
|
|
font-weight: 500;
|
|
font-weight: 500;
|
|
@@ -219,6 +235,7 @@ html[data-theme='dark'] {
|
|
transition: all 0.3s ease;
|
|
transition: all 0.3s ease;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
.login-content-main-sacn {
|
|
.login-content-main-sacn {
|
|
position: absolute;
|
|
position: absolute;
|
|
top: 0;
|
|
top: 0;
|
|
@@ -229,6 +246,7 @@ html[data-theme='dark'] {
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
transition: all ease 0.3s;
|
|
transition: all ease 0.3s;
|
|
color: var(--el-text-color-primary);
|
|
color: var(--el-text-color-primary);
|
|
|
|
+
|
|
&-delta {
|
|
&-delta {
|
|
position: absolute;
|
|
position: absolute;
|
|
width: 35px;
|
|
width: 35px;
|
|
@@ -239,11 +257,13 @@ html[data-theme='dark'] {
|
|
background: var(--el-color-white);
|
|
background: var(--el-color-white);
|
|
transform: rotate(-45deg);
|
|
transform: rotate(-45deg);
|
|
}
|
|
}
|
|
|
|
+
|
|
&:hover {
|
|
&:hover {
|
|
opacity: 1;
|
|
opacity: 1;
|
|
transition: all ease 0.3s;
|
|
transition: all ease 0.3s;
|
|
color: var(--el-color-primary) !important;
|
|
color: var(--el-color-primary) !important;
|
|
}
|
|
}
|
|
|
|
+
|
|
i {
|
|
i {
|
|
width: 47px;
|
|
width: 47px;
|
|
height: 50px;
|
|
height: 50px;
|
|
@@ -255,13 +275,16 @@ html[data-theme='dark'] {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
.login-footer {
|
|
.login-footer {
|
|
position: absolute;
|
|
position: absolute;
|
|
bottom: 5px;
|
|
bottom: 5px;
|
|
width: 100%;
|
|
width: 100%;
|
|
|
|
+
|
|
&-content {
|
|
&-content {
|
|
width: 100%;
|
|
width: 100%;
|
|
display: flex;
|
|
display: flex;
|
|
|
|
+
|
|
&-warp {
|
|
&-warp {
|
|
margin: auto;
|
|
margin: auto;
|
|
color: #e0e3e9;
|
|
color: #e0e3e9;
|