|
|
@ -1,54 +1,79 @@ |
|
|
|
<template> |
|
|
|
<div class="login-box"> |
|
|
|
<!-- w:w="100vw" |
|
|
|
w:h="100vh" |
|
|
|
w:p="t-240px" |
|
|
|
w:flex="md:~ col" |
|
|
|
w:align="items-center" |
|
|
|
w:bg="login contain" --> |
|
|
|
<div class="login-logo"> |
|
|
|
<h1 class="mb-0 ml-2 text-3xl font-bold">问题工单管理系统</h1> |
|
|
|
<div class="login-container"> |
|
|
|
<div class="login-box"> |
|
|
|
<div class="login-content"> |
|
|
|
<div class="login-header"> |
|
|
|
<div class="logo-wrapper"> |
|
|
|
<img src="@/assets/logo.png" alt="logo" class="logo-img" /> |
|
|
|
</div> |
|
|
|
<h1 class="login-title">问题工单管理系统</h1> |
|
|
|
<div class="title-divider"> |
|
|
|
<span class="line"></span> |
|
|
|
<span class="dot"></span> |
|
|
|
<span class="line"></span> |
|
|
|
</div> |
|
|
|
<p class="login-subtitle">欢迎使用工单管理系统</p> |
|
|
|
</div> |
|
|
|
|
|
|
|
<a-form layout="vertical" :model="state.formInline" @submit.prevent="handleSubmit"> |
|
|
|
<a-form-item> |
|
|
|
<a-input |
|
|
|
v-model:value="state.formInline.username" |
|
|
|
size="large" |
|
|
|
placeholder="请输入用户名" |
|
|
|
class="custom-input" |
|
|
|
> |
|
|
|
<template #prefix><user-outlined /></template> |
|
|
|
</a-input> |
|
|
|
</a-form-item> |
|
|
|
|
|
|
|
<a-form-item> |
|
|
|
<a-input |
|
|
|
v-model:value="state.formInline.password" |
|
|
|
size="large" |
|
|
|
type="password" |
|
|
|
placeholder="请输入密码" |
|
|
|
autocomplete="new-password" |
|
|
|
class="custom-input" |
|
|
|
> |
|
|
|
<template #prefix><lock-outlined /></template> |
|
|
|
</a-input> |
|
|
|
</a-form-item> |
|
|
|
|
|
|
|
<a-form-item> |
|
|
|
<a-input |
|
|
|
v-model:value="state.formInline.verifyCode" |
|
|
|
placeholder="请输入验证码" |
|
|
|
:maxlength="4" |
|
|
|
size="large" |
|
|
|
class="custom-input" |
|
|
|
> |
|
|
|
<template #prefix><SafetyOutlined /></template> |
|
|
|
<template #suffix> |
|
|
|
<img |
|
|
|
:src="state.captcha" |
|
|
|
class="captcha-img" |
|
|
|
@click="setCaptcha" |
|
|
|
/> |
|
|
|
</template> |
|
|
|
</a-input> |
|
|
|
</a-form-item> |
|
|
|
|
|
|
|
<a-form-item> |
|
|
|
<a-button |
|
|
|
type="primary" |
|
|
|
html-type="submit" |
|
|
|
size="large" |
|
|
|
:loading="state.loading" |
|
|
|
class="login-button" |
|
|
|
block |
|
|
|
> |
|
|
|
登录 |
|
|
|
</a-button> |
|
|
|
</a-form-item> |
|
|
|
</a-form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<a-form layout="horizontal" :model="state.formInline" @submit.prevent="handleSubmit"> |
|
|
|
<a-form-item> |
|
|
|
<a-input v-model:value="state.formInline.username" size="large" placeholder="rootadmin"> |
|
|
|
<template #prefix><user-outlined type="user" /></template> |
|
|
|
</a-input> |
|
|
|
</a-form-item> |
|
|
|
<a-form-item> |
|
|
|
<a-input |
|
|
|
v-model:value="state.formInline.password" |
|
|
|
size="large" |
|
|
|
type="password" |
|
|
|
placeholder="123456" |
|
|
|
autocomplete="new-password" |
|
|
|
> |
|
|
|
<template #prefix><lock-outlined type="user" /></template> |
|
|
|
</a-input> |
|
|
|
</a-form-item> |
|
|
|
<a-form-item> |
|
|
|
<a-input |
|
|
|
v-model:value="state.formInline.verifyCode" |
|
|
|
placeholder="验证码" |
|
|
|
:maxlength="4" |
|
|
|
size="large" |
|
|
|
> |
|
|
|
<template #prefix><SafetyOutlined /></template> |
|
|
|
<template #suffix> |
|
|
|
<img |
|
|
|
:src="state.captcha" |
|
|
|
class="absolute right-0 h-full cursor-pointer" |
|
|
|
@click="setCaptcha" |
|
|
|
/> |
|
|
|
</template> |
|
|
|
</a-input> |
|
|
|
</a-form-item> |
|
|
|
<a-form-item> |
|
|
|
<a-button type="primary" html-type="submit" size="large" :loading="state.loading" block> |
|
|
|
登录 |
|
|
|
</a-button> |
|
|
|
</a-form-item> |
|
|
|
</a-form> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@ -120,36 +145,153 @@ |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="less" scoped> |
|
|
|
.login-box { |
|
|
|
display: flex; |
|
|
|
width: 100vw; |
|
|
|
height: 100vh; |
|
|
|
padding-top: 240px; |
|
|
|
background: url('@/assets/login.svg'); |
|
|
|
background-size: 100%; |
|
|
|
flex-direction: column; |
|
|
|
align-items: center; |
|
|
|
.login-container { |
|
|
|
display: flex; |
|
|
|
width: 100vw; |
|
|
|
height: 100vh; |
|
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); |
|
|
|
align-items: center; |
|
|
|
justify-content: center; |
|
|
|
} |
|
|
|
|
|
|
|
.login-logo { |
|
|
|
.login-box { |
|
|
|
width: 460px; |
|
|
|
padding: 40px; |
|
|
|
background: rgba(255, 255, 255, 0.95); |
|
|
|
border-radius: 16px; |
|
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); |
|
|
|
backdrop-filter: blur(10px); |
|
|
|
animation: fadeIn 0.5s ease-out; |
|
|
|
} |
|
|
|
|
|
|
|
.login-content { |
|
|
|
.login-header { |
|
|
|
text-align: center; |
|
|
|
margin-bottom: 40px; |
|
|
|
|
|
|
|
.logo-wrapper { |
|
|
|
margin-bottom: 16px; |
|
|
|
|
|
|
|
.logo-img { |
|
|
|
width: 64px; |
|
|
|
height: 64px; |
|
|
|
object-fit: contain; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.login-title { |
|
|
|
font-size: 32px; |
|
|
|
font-weight: 700; |
|
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); |
|
|
|
-webkit-background-clip: text; |
|
|
|
-webkit-text-fill-color: transparent; |
|
|
|
margin-bottom: 16px; |
|
|
|
letter-spacing: 2px; |
|
|
|
} |
|
|
|
|
|
|
|
.title-divider { |
|
|
|
display: flex; |
|
|
|
margin-bottom: 30px; |
|
|
|
align-items: center; |
|
|
|
|
|
|
|
.svg-icon { |
|
|
|
font-size: 48px; |
|
|
|
justify-content: center; |
|
|
|
margin: 20px 0; |
|
|
|
|
|
|
|
.line { |
|
|
|
width: 40px; |
|
|
|
height: 1px; |
|
|
|
background: linear-gradient(90deg, transparent, #667eea); |
|
|
|
|
|
|
|
&:last-child { |
|
|
|
background: linear-gradient(90deg, #764ba2, transparent); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.dot { |
|
|
|
width: 6px; |
|
|
|
height: 6px; |
|
|
|
background: #667eea; |
|
|
|
border-radius: 50%; |
|
|
|
margin: 0 8px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
:deep(.ant-form) { |
|
|
|
width: 400px; |
|
|
|
|
|
|
|
.ant-col { |
|
|
|
|
|
|
|
.login-subtitle { |
|
|
|
font-size: 16px; |
|
|
|
color: #666; |
|
|
|
margin: 0; |
|
|
|
font-weight: 500; |
|
|
|
position: relative; |
|
|
|
display: inline-block; |
|
|
|
|
|
|
|
&::after { |
|
|
|
content: ''; |
|
|
|
position: absolute; |
|
|
|
bottom: -4px; |
|
|
|
left: 50%; |
|
|
|
transform: translateX(-50%); |
|
|
|
width: 0; |
|
|
|
height: 2px; |
|
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); |
|
|
|
transition: width 0.3s ease; |
|
|
|
} |
|
|
|
|
|
|
|
&:hover::after { |
|
|
|
width: 100%; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.ant-form-item-label { |
|
|
|
padding-right: 6px; |
|
|
|
} |
|
|
|
.custom-input { |
|
|
|
border-radius: 8px; |
|
|
|
|
|
|
|
:deep(.ant-input) { |
|
|
|
padding: 12px 16px; |
|
|
|
font-size: 14px; |
|
|
|
|
|
|
|
&:focus { |
|
|
|
box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
:deep(.ant-input-prefix) { |
|
|
|
color: #666; |
|
|
|
margin-right: 10px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.captcha-img { |
|
|
|
height: 100%; |
|
|
|
border-radius: 4px; |
|
|
|
cursor: pointer; |
|
|
|
transition: opacity 0.3s; |
|
|
|
|
|
|
|
&:hover { |
|
|
|
opacity: 0.8; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.login-button { |
|
|
|
height: 46px; |
|
|
|
font-size: 16px; |
|
|
|
border-radius: 8px; |
|
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); |
|
|
|
border: none; |
|
|
|
transition: all 0.3s; |
|
|
|
|
|
|
|
&:hover { |
|
|
|
transform: translateY(-1px); |
|
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@keyframes fadeIn { |
|
|
|
from { |
|
|
|
opacity: 0; |
|
|
|
transform: translateY(20px); |
|
|
|
} |
|
|
|
to { |
|
|
|
opacity: 1; |
|
|
|
transform: translateY(0); |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|