|
@@ -4,6 +4,7 @@ import type { FormRules, FormInstance } from 'element-plus'
|
|
|
import { useRequest } from '@/hooks/useRequest'
|
|
|
import router from '@/router'
|
|
|
import axiosInstance from '@/utils/axios/axiosInstance'
|
|
|
+import TextInput from '@/components/input/TextInput.vue'
|
|
|
|
|
|
const { AllApi, analysisResCode } = useRequest()
|
|
|
|
|
@@ -61,54 +62,101 @@ onMounted(() => {})
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
- <div class="loginBox">
|
|
|
- <el-form
|
|
|
- ref="loginFormRef"
|
|
|
- class="loginForm"
|
|
|
- :rules="rules"
|
|
|
- :model="loginInfo"
|
|
|
- label-width="auto"
|
|
|
- style="max-width: 600px"
|
|
|
- >
|
|
|
- <el-form-item label="用户名" prop="userName">
|
|
|
- <el-input class="formItem" v-model="loginInfo.userName" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="密码" prop="password">
|
|
|
- <el-input class="formItem" v-model="loginInfo.password" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button type="primary" @click="onSubmit(loginFormRef)">登录</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
+ <div class="container">
|
|
|
+ <div class="loginBox">
|
|
|
+ <div class="banner"></div>
|
|
|
+ <div class="logo"></div>
|
|
|
+ <div class="content">
|
|
|
+ <div class="loginFormBox">
|
|
|
+ <div class="loginFormTitle">登录管理系统</div>
|
|
|
+ <div class="loginFormSubTitle">登录管理系统</div>
|
|
|
+ <form class="loginForm">
|
|
|
+ <TextInput
|
|
|
+ :input-obj="{
|
|
|
+ inputType: 'text',
|
|
|
+ inputValue: loginInfo.userName
|
|
|
+ }"
|
|
|
+ ></TextInput>
|
|
|
+ </form>
|
|
|
+ <!-- <el-form
|
|
|
+ ref="loginFormRef"
|
|
|
+ class="loginForm"
|
|
|
+ :rules="rules"
|
|
|
+ :model="loginInfo"
|
|
|
+ label-width="auto"
|
|
|
+ >
|
|
|
+ <el-form-item label="用户名" prop="userName">
|
|
|
+ <el-input class="formItem" v-model="loginInfo.userName" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="密码" prop="password">
|
|
|
+ <el-input class="formItem" v-model="loginInfo.password" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="onSubmit(loginFormRef)">登录</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form> -->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<style scoped lang="less">
|
|
|
-.loginBox {
|
|
|
+.container {
|
|
|
width: 100vw;
|
|
|
height: 100vh;
|
|
|
background-color: lightblue;
|
|
|
- // position: relative;
|
|
|
- // left: 50%;
|
|
|
- // top: 50%;
|
|
|
- // transform: translate(-50%, -50%);
|
|
|
- // background-color: lightblue;
|
|
|
+ position: relative;
|
|
|
+}
|
|
|
+
|
|
|
+.loginBox {
|
|
|
+ position: absolute;
|
|
|
+ left: 50%;
|
|
|
+ top: 50%;
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
+ width: 900px;
|
|
|
+ height: 500px;
|
|
|
+ background-color: lightcoral;
|
|
|
+ display: flex;
|
|
|
+}
|
|
|
+
|
|
|
+.banner {
|
|
|
+ width: 400px;
|
|
|
+ height: 100%;
|
|
|
+ background-color: lightgreen;
|
|
|
+}
|
|
|
+
|
|
|
+.content {
|
|
|
+ width: 500px;
|
|
|
+ position: relative;
|
|
|
+ background-color: white;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+}
|
|
|
+
|
|
|
+.loginFormBox {
|
|
|
+ width: 320px;
|
|
|
+}
|
|
|
+.loginFormTitle {
|
|
|
+ color: black;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 24px;
|
|
|
+ line-height: 32px;
|
|
|
+}
|
|
|
+
|
|
|
+.loginFormSubTitle {
|
|
|
+ color: rgb(134, 144, 156);
|
|
|
+ font-size: 16px;
|
|
|
+ line-height: 24px;
|
|
|
}
|
|
|
|
|
|
.loginForm {
|
|
|
- width: 25vw;
|
|
|
- height: 40vh;
|
|
|
+ width: 100%;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
- justify-content: center;
|
|
|
+
|
|
|
align-items: center;
|
|
|
- position: relative;
|
|
|
- left: 50%;
|
|
|
- top: 50%;
|
|
|
- transform: translate(-50%, -50%);
|
|
|
- background: rgba(255, 255, 255, 0.7);
|
|
|
- backdrop-filter: blur(30px);
|
|
|
- border-radius: 15px;
|
|
|
}
|
|
|
|
|
|
.formItem {
|