|
@@ -1,37 +1,39 @@
|
|
|
<template>
|
|
|
<div class="login-form-wrapper">
|
|
|
- <div class="login-form-title">Easy life</div>
|
|
|
- <div class="login-form-sub-title">Login to Easy life</div>
|
|
|
-
|
|
|
- <a-form ref="loginForm" :model="formData" class="login-form" @submit-success="handleSubmit">
|
|
|
- <a-form-item field="username" :rules="[{ required: true, message: '用户名不能为空' }]"
|
|
|
- :validate-trigger="['change', 'blur']" hide-label>
|
|
|
- <a-input v-model="formData.username" :placeholder="$t('login.userName')">
|
|
|
- <template #prefix>
|
|
|
- <icon-user />
|
|
|
- </template>
|
|
|
- </a-input>
|
|
|
- </a-form-item>
|
|
|
- <a-form-item field="password" :rules="[{ required: true, message: '密码不能为空' }]"
|
|
|
- :validate-trigger="['change', 'blur']" hide-label>
|
|
|
- <a-input-password v-model="formData.password" :placeholder="$t('login.password')" allow-clear>
|
|
|
- <template #prefix>
|
|
|
- <icon-lock />
|
|
|
- </template>
|
|
|
- </a-input-password>
|
|
|
- </a-form-item>
|
|
|
-
|
|
|
-
|
|
|
- <a-space :size="16" direction="vertical">
|
|
|
- <div class="login-form-password-actions">
|
|
|
- <a-checkbox v-model="rememberPassword">
|
|
|
- {{ $t('login.RememberAccountNumber') }}
|
|
|
- </a-checkbox>
|
|
|
- <!-- <a-link>忘记密码</a-link> -->
|
|
|
- </div>
|
|
|
- <a-button type="primary" html-type="submit" long :loading="formLoading">{{ $t('login.disembark') }}</a-button>
|
|
|
- </a-space>
|
|
|
- </a-form>
|
|
|
+ <div class="item">
|
|
|
+ <div class="login-form-title">FlexiStream</div>
|
|
|
+ <div class="login-form-sub-title">Login to FlexiStream</div>
|
|
|
+
|
|
|
+ <a-form ref="loginForm" :model="formData" class="login-form" @submit-success="handleSubmit">
|
|
|
+ <a-form-item field="username" :rules="[{ required: true, message: '用户名不能为空' }]"
|
|
|
+ :validate-trigger="['change', 'blur']" hide-label>
|
|
|
+ <a-input v-model="formData.username" :placeholder="$t('login.userName')">
|
|
|
+ <template #prefix>
|
|
|
+ <icon-user />
|
|
|
+ </template>
|
|
|
+ </a-input>
|
|
|
+ </a-form-item>
|
|
|
+ <a-form-item field="password" :rules="[{ required: true, message: '密码不能为空' }]"
|
|
|
+ :validate-trigger="['change', 'blur']" hide-label>
|
|
|
+ <a-input-password v-model="formData.password" :placeholder="$t('login.password')" allow-clear>
|
|
|
+ <template #prefix>
|
|
|
+ <icon-lock />
|
|
|
+ </template>
|
|
|
+ </a-input-password>
|
|
|
+ </a-form-item>
|
|
|
+
|
|
|
+
|
|
|
+ <a-space :size="16" direction="vertical">
|
|
|
+ <div class="login-form-password-actions">
|
|
|
+ <a-checkbox v-model="rememberPassword">
|
|
|
+ {{ $t('login.RememberAccountNumber') }}
|
|
|
+ </a-checkbox>
|
|
|
+ <!-- <a-link>忘记密码</a-link> -->
|
|
|
+ </div>
|
|
|
+ <a-button type="primary" html-type="submit" long :loading="formLoading">{{ $t('login.disembark') }}</a-button>
|
|
|
+ </a-space>
|
|
|
+ </a-form>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -43,8 +45,8 @@ import { useSystemStore } from "@/store/modules/systemStore"
|
|
|
import { useRouter } from 'vue-router'
|
|
|
import { updateRouteByMenu } from '@/router/router.update'
|
|
|
import { FormLoginUser } from '@/store/modules/Login'
|
|
|
-import {useI18n} from 'vue-i18n'
|
|
|
-const {t} = useI18n();
|
|
|
+import { useI18n } from 'vue-i18n'
|
|
|
+const { t } = useI18n();
|
|
|
const router = useRouter()
|
|
|
const systemStore = useSystemStore()
|
|
|
const LoginSet = FormLoginUser()
|
|
@@ -92,15 +94,15 @@ const handleSubmit = async () => {
|
|
|
await updateRouteByMenu(router, systemStore)
|
|
|
|
|
|
const settingLayout = localStorage.getItem('LayoutDisposition') || false
|
|
|
- if(!settingLayout) {
|
|
|
+ if (!settingLayout) {
|
|
|
const item = {
|
|
|
- crumbs:false,
|
|
|
- BreadcrumbIcon:false,
|
|
|
- SidebarLogo:false,
|
|
|
- HeadNavigationBar:false,
|
|
|
- laoutStyle:1
|
|
|
+ crumbs: false,
|
|
|
+ BreadcrumbIcon: false,
|
|
|
+ SidebarLogo: false,
|
|
|
+ HeadNavigationBar: false,
|
|
|
+ laoutStyle: 0
|
|
|
}
|
|
|
- localStorage.setItem('LayoutDisposition',JSON.stringify(item))
|
|
|
+ localStorage.setItem('LayoutDisposition', item)
|
|
|
}
|
|
|
|
|
|
router.push({
|
|
@@ -120,14 +122,27 @@ onMounted(() => {
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
.login-form-wrapper {
|
|
|
- margin: 0 1rem;
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ left: 80%;
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
+ background-color: #fff;
|
|
|
+ width: 550px;
|
|
|
+ height: 500px;
|
|
|
+ border-radius: 16px;
|
|
|
+}
|
|
|
+
|
|
|
+.item {
|
|
|
+ width: 80%;
|
|
|
}
|
|
|
|
|
|
.login-form {
|
|
|
margin-top: 32px;
|
|
|
|
|
|
&-wrapper {
|
|
|
- width: 320px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
}
|
|
|
|
|
|
&-title {
|
|
@@ -153,4 +168,4 @@ onMounted(() => {
|
|
|
color: @text_color_3 !important;
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|