suerprisePlus
2024-09-30 703703929e97b94ca1c1c5e35a578e5fe9d4cfea
src/views/login.vue
@@ -1,18 +1,16 @@
<template>
    <div class="login">
        <el-row>
            <el-col :xs="24">
                <div style="color: #fff; background-color: #0f73ee; width: 100%; height: 200px; text-align: center; padding: 15px; font-family: '微软雅黑'">
                    <div style="font-size: 42px; padding-top: 40px; width: 400px; margin: 0 auto">
                        <div class="logoImg"></div>
                        <!-- <img :src="logo" alt="logo" style="width: 100px; height: 100px; float: left" /> -->
                        <div style="float: left; margin-top: 13px; width: 300px; text-align: left">
                            <div>TerraDT</div>
                            <div style="letter-spacing: 1.5px; font-size: 20px; font-weight: 600; margin-top: -8px; margin-left: 3px">泰瑞工业数字孪生管理平台</div>
                        </div>
                    </div>
        <div class="logoTitle">
            <div class="titleItem">
                <div class="logImg"></div>
                </div>
            <div class="titleItem">
                <div class="logText">数字孪生智能配网巡检系统</div>
            </div>
        </div>
        <div class="logContent">
            <div class="contFrom">
                <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
                    <!-- <div style="margin-bottom: 10px; font-size: 14px; font-family: '微软雅黑'; color: #f78e21">演示账号:fastbee 123456</div> -->
                    <el-form-item prop="username">
@@ -21,12 +19,14 @@
                        </el-input>
                    </el-form-item>
                    <el-form-item prop="password">
                        <el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码" @keyup.enter.native="handleLogin">
                        <el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码"
                            @keyup.enter.native="handleLogin">
                            <svg-icon slot="prefix" icon-class="password" class="input-icon" />
                        </el-input>
                    </el-form-item>
                    <el-form-item v-if="captchaOnOff" prop="code">
                        <el-input v-model="loginForm.code" auto-complete="off" placeholder="验证码" style="width: 63%" @keyup.enter.native="handleLogin">
                        <el-input v-model="loginForm.code" auto-complete="off" placeholder="验证码" style="width: 63%"
                            @keyup.enter.native="handleLogin">
                            <svg-icon slot="prefix" icon-class="validCode" class="input-icon" />
                        </el-input>
@@ -34,31 +34,34 @@
                            <img :src="codeUrl" @click="getCode" />
                        </div>
                    </el-form-item>
                    <el-checkbox v-model="loginForm.rememberMe" style="margin: 0px 0px 25px 0px; color: #000">记住密码</el-checkbox>
                    <el-checkbox v-model="loginForm.rememberMe"
                        style="margin: 0px 0px 25px 0px; color: #000">记住密码</el-checkbox>
                    <el-form-item style="width: 100%">
                        <div style="margin-bottom: 10px">
                            <el-button v-if="!bindAccount" :loading="loading" type="primary" style="width: 100%" @click.native.prevent="handleLogin">
                            <el-button v-if="!bindAccount" :loading="loading" type="primary" style="width: 100%"
                                @click.native.prevent="handleLogin">
                                <span v-if="!loading">登 录</span>
                                <span v-else>登 录 中...</span>
                            </el-button>
                            <el-button v-else :loading="loading" type="primary" style="width: 100%" @click.native.prevent="handleBind">
                            <el-button v-else :loading="loading" type="primary" style="width: 100%"
                                @click.native.prevent="handleBind">
                                <span v-if="!loading">绑 定</span>
                                <span v-else>绑 定 中...</span>
                            </el-button>
                        </div>
                    </el-form-item>
                </el-form>
            </el-col>
        </el-row>
        <!--  底部  -->
        <div class="el-login-footer">
            </div>
            <div class="contMessage">
            <span>
                Copyright © 2004-2023
                <a target="_blank" href="https://www.smartearth.cn/">SmartEarth</a>
                All Rights Reserved.
            </span>
        </div>
        </div>
    </div>
</template>
@@ -327,23 +330,66 @@
};
</script>
<style lang="scss">
<style scoped lang="scss">
.login {
    height: 100%;
    overflow: auto;
}
.logoImg {
    width: 100px;
    height: 100px;
    background: url('../assets/logo/logo.png') no-repeat;
    // overflow: auto;
    width: 100%;
    position: absolute;
    background: url('../assets/logo/sdw.png') no-repeat;
    background-size: 100% 100%;
    float: left;
    .logoTitle {
        height: 266px;
        background: rgba(51, 132, 198, 1);
        width: 100%;
        z-index: -1;
        position: absolute;
        display: flex;
        justify-content: center;
        .titleItem {
            height: 100%;
            display: flex;
            align-items: center;
}
.bindAccountTitle {
    margin: 0px auto 30px auto;
    text-align: center;
    color: #333;
    font-size: 24px;
        .logImg {
            width: 89px;
            height: 89px;
            background: url('../assets/logo/logo2.png') no-repeat;
            background-size: 100% 100%;
        }
        .logText {
            font-family: SourceHanSansSC-Bold;
            font-size: 36px;
            font-weight: bold;
            color: #ffffff;
            margin-left: 19px;
        }
    }
    .logContent {
        width: 100%;
        height: calc(100% - 266px);
        bottom: 0px;
        position: absolute;
        display: flex;
        flex-direction: column;
        .contFrom {
            flex: 1;
        }
        .contMessage {
            width: 100%;
            display: flex;
            justify-content: center;
            line-height: 40px;
        }
}
.login-form {
@@ -377,19 +423,6 @@
    }
}
.el-login-footer {
    height: 40px;
    line-height: 40px;
    position: fixed;
    bottom: 0;
    width: 100%;
    text-align: center;
    color: #333;
    font-family: Arial;
    font-size: 12px;
    letter-spacing: 1px;
}
.alert-box-wrap {
    border: 1px solid #f78e21;
@@ -400,4 +433,6 @@
        margin-left: 10px;
    }
}
}
</style>