123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- <template>
- <!-- 界面整体背景图 -->
- <div class="container">
- <!-- 界面左边背景图 -->
- <div class="left"></div>
- <!-- 界面右边背景图 -->
- <div class="right">
- <!-- 分为上下两部分,上面是标题,使用背景图片 -->
- <div class="right_top"></div>
- <!-- 登录界面 -->
- <div class="right_bottom">
- <!-- 登录标题 -->
- <h3 class="right_bottom_dl">登 录</h3>
- <el-form
- ref="loginForm"
- :model="loginForm"
- :rules="LoginRules"
- class="login-form"
- style="width: 70%"
- hide-required-asterisk="false"
- >
- <!-- 账号密码登录 -->
- <el-form-item prop="username" label="账号">
- <el-input
- v-model="loginForm.username"
- type="text"
- placeholder="请输入手机号/邮箱"
- >
- </el-input>
- </el-form-item>
- <el-form-item prop="password" label="密码">
- <el-input
- v-model="loginForm.password"
- type="password"
- placeholder="请输入密码"
- @keyup.enter.native="getCode"
- >
- </el-input>
- </el-form-item>
- <el-checkbox v-model="loginForm.rememberMe" style="margin: 0 0 25px 0"
- >记住密码</el-checkbox
- >
- <!-- 下方的登录按钮 -->
- <el-form-item style="width: 100%">
- <el-button
- :loading="loading"
- size="medium"
- type="primary"
- style="width: 100%"
- @click.native.prevent="getCode"
- class="custom-style"
- >
- <span v-if="!loading">登 录</span>
- <span v-else>登 录 中...</span>
- </el-button>
- </el-form-item>
- </el-form>
- </div>
- </div>
- </div>
- </template>
- <script>
- export default {
- data() {
- return {
- loginForm: {
- username: "admin",
- password: "admin123",
- rememberMe: true,
- tenantName: "泸州公安局文库系统",
- },
- LoginRules: {
- username: [
- { required: true, trigger: "blur", message: "账号错误" }
- ],
- password: [
- { required: true, trigger: "blur", message: "密码错误" }
- ],
- },
- };
- },
- };
- </script>
- <style scoped lang='scss'>
- .container {
- background: url(../assets/img/dl_background.png);
- background-size: cover;
- height: 100%;
- width: 100%;
- display: flex;
- .left {
- background: url(../assets/img/dl_logo.png) no-repeat center/contain;
- height: calc(100vh * (894 / 1080));
- width: calc(100vw * (820 / 1920));
- margin-top: 93px;
- margin-left: 189px;
- }
- .right {
- height: calc(100vh * (780 / 1080));
- width: calc(100vw * (516 / 1920));
- // background: red;
- margin-top: 140px;
- margin-left: 193px;
- .right_top {
- background: url(../assets/img/dl_title.png) no-repeat center/contain;
- height: calc(100vh * (70 / 1080));
- width: calc(100vw * (497 / 1920));
- font-family: YouSheBiaoTiHei-Regular;
- }
- .right_bottom {
- background: url(../assets/img/dl_login.png) no-repeat center/contain;
- height: calc(100vh * (630 / 1080));
- width: calc(100vw * (482 / 1920));
- box-sizing: border-box;
- border: 1px solid rgba(0, 116, 223, 0.2);
- margin-top: 30px;
- .right_bottom_dl {
- width: 60px;
- height: 42px;
- font-size: 25px;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 500;
- color: #ffffff;
- line-height: 30px;
- margin-left: 45%;
- margin-top: 15%;
- }
- .login-form {
- margin-left: 60px;
- margin-top: -30px;
- }
- }
- }
- ::v-deep .el-input--medium .el-input__inner {
- background:#03486F;
- border: 1px solid #03486F;
- }
- }
- </style>
|