登录样式

bak
Dragon 1 year ago
parent 9faf0ab0bd
commit 1834e76ba6

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 579 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 997 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 977 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 902 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 904 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 661 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

@ -0,0 +1,251 @@
<script lang="ts" setup>
import { reactive, ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { useMessage } from 'naive-ui'
import captcha from './captcha.vue'
import { PageEnum } from '@/enums/pageEnum'
import { useUserStore } from '@/store/modules/user'
import { ResultEnum } from '@/enums/httpEnum'
import { getFilter, setFilter } from '@/api/home/filter'
import { getConfig } from '@/api/system/user'
import { asideMap } from '@/config/aside'
interface FormState {
enterprisecode?: string
username: string
password: string
captcha: string
}
const formRef = ref()
const message = useMessage()
const loading = ref(false)
const autoLogin = ref(true)
const LOGIN_NAME = PageEnum.BASE_LOGIN_NAME
const userStore = useUserStore()
const router = useRouter()
const route = useRoute()
const formInline: FormState = reactive({
enterprisecode: '三方系统标识8',
username: '13311111111',
password: '123456',
captcha: '',
})
const rules = {
enterprisecode: { required: true, message: '请输入企业编码', trigger: 'blur' },
username: { required: true, message: '请输入用户名', trigger: 'blur' },
password: { required: true, message: '请输入密码', trigger: 'blur' },
captcha: { required: true, message: '请输入验证码', trigger: 'blur' },
}
function handleSubmit(e) {
e.preventDefault()
formRef.value.validate(async (errors) => {
if (!errors) {
const { username, password, enterprisecode, captcha } = formInline
message.loading('登录中...')
loading.value = true
const params = {
logincode: captcha,
username,
password,
codetoken: userStore.getCapToken,
agentcode: enterprisecode,
}
try {
const { code, message: msg } = await userStore.login(params)
await userStore.getInformation()
const response = await getFilter()
//
if (response.data === null) {
const systemConfig = await getConfig()
const onList: string[] = []
Object.keys(systemConfig.data).forEach((key) => {
//
if (key.startsWith('iz') && systemConfig.data[key] === 'Y' && asideMap[key]?.isDefaultFilter)
onList.push(key)
})
await setFilter({ searchcount: onList.join(',') })
}
message.destroyAll()
if (code === ResultEnum.SUCCESS) {
const toPath = decodeURIComponent((route.query?.redirect || '/') as string)
message.success('登录成功,即将进入系统')
if (route.name === LOGIN_NAME)
router.replace('/')
else router.replace(toPath)
}
else {
message.info(msg || '登录失败')
}
}
finally {
loading.value = false
}
}
else {
message.error('请填写完整信息,并且进行验证码校验')
}
})
}
</script>
<template>
<div class="view-account">
<div class="view-account-container">
<div class="view-account-form">
<n-tabs>
<n-tab-pane name="pwdsignin" tab="密码登录">
<n-form ref="formRef" label-placement="left" size="large" :model="formInline" :rules="rules">
<n-form-item path="enterprisecode">
<n-input v-model:value="formInline.enterprisecode" placeholder="请输入企业编码">
<template #prefix>
<svg-icon size="20" name="enterprise" />
</template>
</n-input>
</n-form-item>
<n-form-item path="username">
<n-input v-model:value="formInline.username" placeholder="请输入用户名">
<template #prefix>
<svg-icon size="20" name="account" />
</template>
</n-input>
</n-form-item>
<n-form-item path="password">
<n-input v-model:value="formInline.password" type="password" show-password-on="click" placeholder="请输入密码">
<template #prefix>
<svg-icon size="20" name="password" />
</template>
</n-input>
</n-form-item>
<n-form-item path="captcha">
<n-grid x-gap="12" :cols="4">
<n-gi span="3">
<n-input v-model:value="formInline.captcha" placeholder="请输入验证码">
<template #prefix>
<svg-icon size="20" name="captcha" />
</template>
</n-input>
</n-gi>
<n-gi>
<captcha />
</n-gi>
</n-grid>
</n-form-item>
<n-form-item>
<n-button type="primary" size="large" :loading="loading" block @click="handleSubmit">
登录
</n-button>
</n-form-item>
<n-form-item class="default-color">
<div class="w-full flex justify-between">
<div class="flex-initial">
<n-checkbox v-model:checked="autoLogin">
记住账号
</n-checkbox>
</div>
<div class="flex-initial order-last">
<a href="javascript:">忘记密码</a>
</div>
</div>
</n-form-item>
</n-form>
</n-tab-pane>
<n-tab-pane name="msgsignin" tab="短信登陆">
<n-form ref="formRef" label-placement="left" size="large" :model="formInline" :rules="rules">
<n-form-item path="username">
<n-input v-model:value="formInline.username" placeholder="请输入用户名">
<template #prefix>
<svg-icon size="20" name="account" />
</template>
</n-input>
</n-form-item>
<n-form-item path="password">
<n-input v-model:value="formInline.password" type="password" placeholder="请输入密码">
<template #prefix>
<svg-icon size="20" name="password" />
</template>
</n-input>
</n-form-item>
<n-form-item>
<n-button type="primary" size="large" :loading="loading" block @click="handleSubmit">
登录
</n-button>
</n-form-item>
<n-form-item class="default-color">
<div class="w-full flex justify-between">
<div class="flex-initial">
<n-checkbox v-model:checked="autoLogin">
记住账号
</n-checkbox>
</div>
<div class="flex-initial order-last">
<a href="javascript:">忘记密码</a>
</div>
</div>
</n-form-item>
</n-form>
</n-tab-pane>
</n-tabs>
</div>
</div>
</div>
</template>
<style lang="less" scoped>
.view-account {
display: flex;
flex-direction: column;
height: 100vh;
overflow: auto;
&-container {
flex: 1;
max-width: 384px;
min-width: 420px;
margin: 0 auto;
padding-top: 230px;
}
&-form {
background: rgba(255, 255, 255, 0.20);
border: 1px solid #ffffff;
border-radius: 6px;
box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.04);
backdrop-filter: blur(9px);
padding: 50px 30px;
}
&-other {
width: 100%;
}
.default-color {
color: #515a6e;
.ant-checkbox-wrapper {
color: #515a6e;
}
}
}
.view-account {
background-image: url('../../assets/images/login.png');
background-repeat: no-repeat;
background-size: cover;
}
.page-account-container {
padding: 32px 0 24px 0;
}
::v-deep(.n-input .n-input__suffix) {
display: none;
}
</style>

@ -97,155 +97,284 @@ function handleSubmit(e) {
</script> </script>
<template> <template>
<div class="view-account"> <div class="wrap-login">
<div class="view-account-container"> <div class="content">
<div class="view-account-form"> <div class="header f-c-b">
<n-tabs> <img class="img-logo" src="../../assets/images/login/logo.png" alt="">
<n-tab-pane name="pwdsignin" tab="密码登录"> <div class="btn-login f-c-c">
<n-form ref="formRef" label-placement="left" size="large" :model="formInline" :rules="rules">
<n-form-item path="enterprisecode">
<n-input v-model:value="formInline.enterprisecode" placeholder="请输入企业编码">
<template #prefix>
<svg-icon size="20" name="enterprise" />
</template>
</n-input>
</n-form-item>
<n-form-item path="username">
<n-input v-model:value="formInline.username" placeholder="请输入用户名">
<template #prefix>
<svg-icon size="20" name="account" />
</template>
</n-input>
</n-form-item>
<n-form-item path="password">
<n-input v-model:value="formInline.password" type="password" show-password-on="click" placeholder="请输入密码">
<template #prefix>
<svg-icon size="20" name="password" />
</template>
</n-input>
</n-form-item>
<n-form-item path="captcha">
<n-grid x-gap="12" :cols="4">
<n-gi span="3">
<n-input v-model:value="formInline.captcha" placeholder="请输入验证码">
<template #prefix>
<svg-icon size="20" name="captcha" />
</template>
</n-input>
</n-gi>
<n-gi>
<captcha />
</n-gi>
</n-grid>
</n-form-item>
<n-form-item>
<n-button type="primary" size="large" :loading="loading" block @click="handleSubmit">
登录
</n-button>
</n-form-item>
<n-form-item class="default-color">
<div class="w-full flex justify-between">
<div class="flex-initial">
<n-checkbox v-model:checked="autoLogin">
记住账号
</n-checkbox>
</div>
<div class="flex-initial order-last">
<a href="javascript:">忘记密码</a>
</div>
</div>
</n-form-item>
</n-form>
</n-tab-pane>
<n-tab-pane name="msgsignin" tab="短信登陆">
<n-form ref="formRef" label-placement="left" size="large" :model="formInline" :rules="rules">
<n-form-item path="username">
<n-input v-model:value="formInline.username" placeholder="请输入用户名">
<template #prefix>
<svg-icon size="20" name="account" />
</template>
</n-input>
</n-form-item>
<n-form-item path="password">
<n-input v-model:value="formInline.password" type="password" placeholder="请输入密码">
<template #prefix>
<svg-icon size="20" name="password" />
</template>
</n-input>
</n-form-item>
<n-form-item>
<n-button type="primary" size="large" :loading="loading" block @click="handleSubmit">
登录 登录
</n-button>
</n-form-item>
<n-form-item class="default-color">
<div class="w-full flex justify-between">
<div class="flex-initial">
<n-checkbox v-model:checked="autoLogin">
记住账号
</n-checkbox>
</div> </div>
<div class="flex-initial order-last">
<a href="javascript:">忘记密码</a>
</div> </div>
<div class="img-wrap f-s">
<img class="img-ai" src="../../assets/images/login/ai.png" alt="">
<div class="right">
<div class="f-c">
<img class="img-item" src="../../assets/images/login/img-item-1.png" alt="">
<img class="img-item" src="../../assets/images/login/img-item-2.png" alt="">
<img class="img-item" src="../../assets/images/login/img-item-3.png" alt="">
<img class="img-item" src="../../assets/images/login/img-item-4.png" alt="">
<img class="img-item" src="../../assets/images/login/img-item-5.png" alt="">
</div>
<div class="img-task">
Task approval
</div>
</div>
</div>
<div class="center-text f-c-b">
<img class="img-ip" src="../../assets/images/login/img-ip.png" alt="">
<img class="img-text" src="../../assets/images/login/img-text.png" alt="">
<img class="img-icon-1" src="../../assets/images/login/img-icon-1.png" alt="">
</div>
<div class="text">
企业级 SaaS 智能审批解决方案
</div>
<img class="img-icon-2" src="../../assets/images/login/img-icon-2.png" alt="">
<div class="btn-login-2 f-c-c">
立即登录 ->
</div>
<div class="item-wrap f-c">
<div class="item">
<img class="item-img" src="../../assets/images/login/item-1.png" alt="">
<div class="title">
AI一键查重
</div>
<div class="subtitle">
一键查重生成任务包
</div>
</div>
<div class="item">
<img class="item-img" src="../../assets/images/login/item-2.png" alt="">
<div class="title">
AI工单管理
</div>
<div class="subtitle">
智能批量辨识真假假图快速审批
</div> </div>
</n-form-item>
</n-form>
</n-tab-pane>
</n-tabs>
</div> </div>
<div class="item">
<img class="item-img" src="../../assets/images/login/item-3.png" alt="">
<div class="title">
AI快速审批
</div>
<div class="subtitle">
智能图片比对批量审批一键确认
</div>
</div>
<div class="item">
<img class="item-img" src="../../assets/images/login/item-4.png" alt="">
<div class="title">
OCR
</div>
<div class="subtitle">
图片自动识别文档图片版面解析
</div>
</div>
<div class="item">
<img class="item-img" src="../../assets/images/login/item-5.png" alt="">
<div class="title">
更多功能
</div>
<div class="subtitle">
探索更多功能
</div>
</div>
</div>
<img class="item-footer" src="../../assets/images/login/footer.png" alt="">
</div> </div>
</div> </div>
</template> </template>
<style lang="less" scoped> <style lang="less" scoped>
.view-account { .wrap-login {
display: flex; background-image: url('../../assets/images/login/bg.png');
flex-direction: column; background-repeat: no-repeat;
background-size: cover;
height: 100vh; height: 100vh;
overflow: auto;
&-container { .f-c-c{
flex: 1; display: flex;
max-width: 384px; align-items: center;
min-width: 420px; justify-content: center;
margin: 0 auto;
padding-top: 230px;
} }
&-form { .f-c-b{
background: rgba(255, 255, 255, 0.20); display: flex;
border: 1px solid #ffffff; align-items: center;
justify-content: space-between;
}
.f-c{
display: flex;
align-items: center;
}
.f-s{
display: flex;
align-items: flex-start;
}
.img-logo{
width: 121px;
height: 35px;
}
.img-ai{
width: 97px;
height: 90px;
}
.img-item{
width: 53px;
height: 52px;
margin-left: -10px;
}
.img-task{
width: 138px;
height: 54px;
border-radius: 6px; border-radius: 6px;
box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.04); background-image: url('../../assets/images/login/img-task.png');
backdrop-filter: blur(9px); background-repeat: no-repeat;
padding: 50px 30px; background-size: cover;
font-size: 14px;
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC-Regular;
font-weight: Regular;
text-align: left;
color: #666666;
margin-left: -10px;
margin-top: -10px;
padding-top: 10px;
box-sizing: border-box;
text-align: center;
} }
&-other { .img-ip{
width: 100%; width: 80px;
height: 80px;
} }
.default-color { .img-text{
color: #515a6e; width: 600px;
height: 65px;
margin-top: 43px;
}
.ant-checkbox-wrapper { .img-icon-1{
color: #515a6e; width: 54px;
height: 54px;
} }
.img-icon-2{
width: 54px;
height: 54px;
margin-left: 830px;
} }
.content{
width: 1300px;
margin: 0 auto;
padding-top: 27px;
} }
.view-account { .header{
background-image: url('../../assets/images/login.png'); margin-bottom: 44px;
.btn-login{
width: 76px;
height: 40px;
border: 1px solid #666666;
border-radius: 8px;
font-size: 16px;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: Regular;
color: #333333;
cursor: pointer;
}
}
.img-wrap{
padding-left: 174px;
}
.center-text{
margin: 0 auto;
width: 776px;
}
.text{
font-size: 20px;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: Regular;
text-align: center;
color: #666666;
line-height: 28px;
margin-top: 32px;
}
.btn-login-2{
width: 138px;
height: 44px;
background: linear-gradient(136deg,#3258e8, #786efc 100%);
border-radius: 8px;
box-shadow: 0px 2px 6px 0px rgba(116,153,253,0.30);
font-size: 16px;
font-family: PingFang SC, PingFang SC-Medium;
font-weight: Medium;
text-align: left;
color: #ffffff;
line-height: 22px;
margin: 0 auto;
cursor: pointer;
}
.item-wrap{
margin-top: 78px;
.item{
width: 258px;
height: 132px;
background-image: url('../../assets/images/login/item-bg.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
position: relative;
padding-top: 50px;
padding-left: 28px;
box-sizing: border-box;
}
.item-img{
width: 66px;
height: 76px;
position: absolute;
top: -15px;
left: 20px;
} }
.page-account-container { .title{
padding: 32px 0 24px 0; font-size: 16px;
font-family: PingFang SC, PingFang SC-Medium;
font-weight: Medium;
color: #333333;
line-height: 22px;
margin-bottom: 8px;
} }
::v-deep(.n-input .n-input__suffix) { .subtitle{
display: none; font-size: 12px;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: Regular;
color: #666666;
line-height: 17px;
}
}
.item-footer{
width: 970px;
height: 119px;
position: fixed;
left: 50%;
bottom: 0;
margin-left: -485px;
}
} }
</style> </style>

Loading…
Cancel
Save