zhouwx
2024-12-04 80c8993820fc3f958397bebe9dbd72be6a449c55
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<template>
    <div class="login-container">
        <div class="starBg">
 
        </div>
        <div class="loginContent">
          <div class="welcc">广域特殊气体泄漏在线监测预警系统</div>
            <div class="loginPanel">
                <div class="loginGroup">
                  <div style="width: 100%">
                    <div style="width:100%;text-align: center;font-size: 28px;color: #11FEEE">欢迎登录</div>
                      <AccountLogin />
                  </div>
                </div>
            </div>
        </div>
        <div class="rights">技术支持:苏州国科鸿宇智能科技有限公司<br/>
<!--          <span>GTXH Intelligent Security Management System V1.0.1</span>-->
        </div>
    </div>
</template>
 
<script lang="ts">
import { toRefs, reactive, computed, defineComponent, onMounted } from 'vue';
import { storeToRefs } from 'pinia';
import { useThemeConfig } from '/@/stores/themeConfig';
import logoMini from '/@/assets/logo-mini.svg';
import loginIconTwo from '/@/assets/login-icon-two.svg';
import { NextLoading } from '/@/utils/loading';
import AccountLogin from '/@/views/loginPage/component/accountLogin.vue';
import "amfe-flexible";
// 定义接口来定义对象的类型
interface LoginState {
    isScan: boolean;
}
 
export default defineComponent({
    name: 'loginIndex',
    components: { AccountLogin },
    setup() {
        const storesThemeConfig = useThemeConfig();
        const { themeConfig } = storeToRefs(storesThemeConfig);
        const state = reactive<LoginState>({
            isScan: false
        });
        // 获取布局配置信息
        const getThemeConfig = computed(() => {
            return themeConfig.value;
        });
        // 页面加载时
        onMounted(() => {
            NextLoading.done();
            const baseSize = 38;
            /* 设置 rem 函数 */
            function setRem() {
              const scale = document.documentElement.clientWidth / 1920; /* 当前页面宽度缩放比例,可根据自己需要修改 */
              document.documentElement.style.fontSize = baseSize * Math.min(scale, 2) + "px";/* 设置页面根节点字体大小 */
              console.log('切换尺寸>>',document.documentElement.style.fontSize)
            }
            setRem();/* 初始化 rem */
 
            window.onresize = () => {
              setRem();/* 改变窗口大小时重新设置 rem */
              console.log('执行切换')
            }
        });
        return {
            logoMini,
            loginIconTwo,
            getThemeConfig,
            ...toRefs(state)
        };
    }
});
</script>
 
<style scoped lang="scss">
.login-container {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../../assets/loginPage/login-bg.jpg') no-repeat center;
    background-size: 100% 100%;
    /*background-image: radial-gradient(at center, #0075c3, #000b61);*/
    .starBg{
      width: 1030px;
      height: 1135px;
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      top: 50px;
      z-index: -1;
      background: url("../../assets/loginPage/starFalls.gif") no-repeat center;
      background-size: 100% 100%;
      opacity: 0.1;
      -webkit-opacity: 0.1;
    }
    .rights {
        font-size: 12px;
        color: #fff;
        position: absolute;
        bottom: 30px;
        text-align: center;
 
        span{
            font-size: 12px;
            color: #eee;
        }
    }
    .loginContent {
        width: 40%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin-top: -10vh;
        .welcc {
          font-size: 40px;
          font-family: 'PingFang SC';
          text-align: center;
          font-weight: 900;
          color: #11FEEE;
          white-space: nowrap;
          z-index: 9999;
          margin-bottom: 3vh;
        }
        .loginPanel {
            width: 100%;
            padding: 60px 180px 80px;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
            align-items: center;
            background: url("../../assets/loginPage/panel-bg.png") no-repeat center;
            background-size: 100% 100%;
 
            :deep(.loginGroup){
              width: 100%;
              height: 100%;
              display: flex;
              align-items: center;
 
              .el-tabs__content{
                display: flex;
                justify-content: center;
              }
            }
        }
    }
}
</style>