gaoshp
2024-10-09 9ccaa7a607481405ee22519aa49c786a46b95e22
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<template>
    <div class="login_bg">
        <div class="login_adv" style="background-image: url(img/bg-login.fb434d90.jpg);">
            <div class="login_adv__bottom">
                © {{$CONFIG.APP_NAME}}
            </div>
        </div>
        <div class="login_main">
            <div class="login-form" style="margin-top: 26px;">
                <!-- <div class="title-name">制造信息管理系统</div> -->
                <div class="title-name" style="background-image: url(img/20240414142903.png);"></div>
                <password-form style="margin-top:25px;"></password-form>
            </div>
        </div>
    </div>
</template>
 
<script>
    import passwordForm from './components/passwordForm'
 
    export default {
        components: {
            passwordForm
        },
        data() {
            return {
                config: {
                    lang: this.$TOOL.data.get('APP_LANG') || this.$CONFIG.LANG,
                    dark: this.$TOOL.data.get('APP_DARK') || false
                },
                lang: [
                    {
                        name: '简体中文',
                        value: 'zh-cn',
                    },
                    {
                        name: 'English',
                        value: 'en',
                    }
                ]
            }
        },
        watch:{
            'config.dark'(val){
                if(val){
                    document.documentElement.classList.add("dark")
                    this.$TOOL.data.set("APP_DARK", val)
                }else{
                    document.documentElement.classList.remove("dark")
                    this.$TOOL.data.remove("APP_DARK")
                }
            },
            'config.lang'(val){
                this.$i18n.locale = val
                this.$TOOL.data.set("APP_LANG", val)
            }
        },
        created: function() {
            this.$TOOL.cookie.remove("TOKEN")
            this.$TOOL.data.remove("USER_INFO")
            this.$TOOL.data.remove("MENU")
            this.$TOOL.data.remove("PERMISSIONS")
            this.$TOOL.data.remove("DASHBOARDGRID")
            this.$TOOL.data.remove("grid")
            this.$store.commit("clearViewTags")
            this.$store.commit("clearKeepLive")
            this.$store.commit("clearIframeList")
        },
        methods: {
            configDark(){
                this.config.dark = this.config.dark ? false : true
            },
            configLang(command){
                this.config.lang = command.value
            }
        }
    }
</script>
 
<style scoped>
    .login_bg {width: 100%;height: 100%;background: #fff;display: flex;}
    .login_adv {width: 100%;background-color: #555;background-size: cover;background-position: center center;background-repeat: no-repeat;position: relative;}
    .login_adv__title {color: #fff;padding: 40px;position: absolute;top:0px;left:0px;right: 0px;z-index: 2;}
    .login_adv__title h2 {font-size: 40px;}
    .login_adv__title h4 {font-size: 18px;margin-top: 10px;font-weight: normal;}
    .login_adv__title p {font-size: 14px;margin-top:10px;line-height: 1.8;color: rgba(255,255,255,0.6);}
    .login_adv__title div {margin-top: 10px;display: flex;align-items: center;}
    .login_adv__title div span {margin-right: 15px;}
    .login_adv__title div i {font-size: 40px;}
    .login_adv__title div i.add {font-size: 20px;color: rgba(255,255,255,0.6);}
    .login_adv__bottom {position: absolute;left:0px;right: 0px;bottom: 0px;color: #fff;padding: 40px;background-image:linear-gradient(transparent, #000);z-index: 3;}
    .login_adv__mask {position: absolute;top:0px;left:0px;right: 0px;bottom: 0px;background: rgba(0,0,0,0.5);z-index: 1;}
    .login_main {position: absolute;top: 0;right:118px;width: 370px;height: 440px;top: 52%;-webkit-transform: translateY(-50%);transform: translateY(-50%);background: #fff;text-align: center;padding: 22px 25px 28px;}
    .login-header {margin-bottom: 40px;}
    .login-header .logo {display: flex;align-items: center;}
    .login-header .logo img {width: 40px;height: 40px;vertical-align: bottom;margin-right: 10px;}
    .login-header .logo label {font-size: 26px;font-weight: bold;}
    .login-oauth {display: flex;justify-content:space-around;}
    .login-form .el-divider {margin-top:40px;}
 
    .login-form:deep(.el-tabs) .el-tabs__header {margin-bottom: 25px;}
    .login-form:deep(.el-tabs) .el-tabs__header .el-tabs__item {font-size: 14px;}
 
    .login-form:deep(.login-forgot) {text-align: right;}
    .login-form:deep(.login-forgot) a {color: var(--el-color-primary);}
    .login-form:deep(.login-forgot) a:hover {color: var(--el-color-primary-light-3);}
    .login-form:deep(.login-reg) {font-size: 14px;color: var(--el-text-color-primary);}
    .login-form:deep(.login-reg) a {color: var(--el-color-primary);}
    .login-form:deep(.login-reg) a:hover {color: var(--el-color-primary-light-3);}
 
    .login_config {position: absolute;top:20px;right: 20px;}
 
    .login-form:deep(.login-msg-yzm) {display: flex;width: 100%;}
    .login-form:deep(.login-msg-yzm) .el-button {margin-left: 10px;--el-button-size:42px;}
 
    .qrCodeLogin {text-align: center;position: relative;padding: 20px 0;}
    .qrCodeLogin img.qrCode {background: #fff;padding:20px;border-radius:10px;}
    .qrCodeLogin p.msg {margin-top: 15px;}
    .qrCodeLogin .qrCodeLogin-result {position: absolute;top:0;left:0;right: 0;bottom: 0;text-align: center;background: var(--el-mask-color);}
    .title-name {font-weight: 900;font-size: 24px;color: #409eff;width: 100%;height: 39px;background-size: 100%;background-repeat: no-repeat;}
    @media (max-width: 1000px){
        .login_main {display: block;}
        .login_main .login_config {position: static;padding:20px 20px 0 20px;text-align: right;}
        .login_adv {display: none;}
    }
</style>