index.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. <template>
  2. <div class="login-container flex" style="justify-content: space-between">
  3. <div class="login-left">
  4. <div class="login-left-logo">
  5. <img :src="logoMini" />
  6. <div class="login-left-logo-text">
  7. <span>{{ getThemeConfig.globalViceTitle }}</span>
  8. <span class="login-left-logo-text-msg">{{ getThemeConfig.globalViceTitleMsg }}</span>
  9. </div>
  10. </div>
  11. <!-- <div class="login-left-img">
  12. <img :src="loginMain" style="width: 100%;height: 100%;object-fit: fill"/>
  13. </div>-->
  14. <!-- <img :src="loginBg" class="login-left-waves" />-->
  15. </div>
  16. <div class="login-right flex">
  17. <div class="login-right-warp flex-margin">
  18. <span class="login-right-warp-one"></span>
  19. <span class="login-right-warp-two"></span>
  20. <div class="login-right-warp-mian">
  21. <div class="login-right-warp-main-title">{{ getThemeConfig.globalTitle }} 欢迎您!</div>
  22. <div class="login-right-warp-main-form">
  23. <div v-if="!state.isScan">
  24. <el-tabs v-model="state.tabsActiveName">
  25. <el-tab-pane label="账号登录" name="account">
  26. <Account />
  27. </el-tab-pane>
  28. <!-- <el-tab-pane label="AD域登录" name="mobile">
  29. <Ldap />
  30. </el-tab-pane>-->
  31. </el-tabs>
  32. </div>
  33. <!-- <Scan v-if="state.isScan" />-->
  34. <!-- <div class="login-content-main-sacn" @click="state.isScan = !state.isScan">
  35. <i class="iconfont" :class="state.isScan ? 'icon-diannao1' : 'icon-barcode-qr'"></i>
  36. <div class="login-content-main-sacn-delta"></div>
  37. </div>-->
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. </template>
  44. <script setup lang="ts" name="loginIndex">
  45. import { defineAsyncComponent, onMounted, reactive, computed } from 'vue';
  46. import { storeToRefs } from 'pinia';
  47. import { useThemeConfig } from '/@/stores/themeConfig';
  48. import { NextLoading } from '/@/utils/loading';
  49. import logoMini from '/logo.png';
  50. import loginMain from '/@/assets/shenzhen.webp';
  51. import loginBg from '/@/assets/login-bg.svg';
  52. ``
  53. // 引入组件
  54. const Account = defineAsyncComponent(() => import('/@/views/login/component/account.vue'));
  55. // 定义变量内容
  56. const storesThemeConfig = useThemeConfig();
  57. const { themeConfig } = storeToRefs(storesThemeConfig);
  58. const state = reactive({
  59. tabsActiveName: 'account',
  60. isScan: false,
  61. });
  62. // 获取布局配置信息
  63. const getThemeConfig = computed(() => {
  64. return themeConfig.value;
  65. });
  66. // 页面加载时
  67. onMounted(() => {
  68. NextLoading.done();
  69. });
  70. </script>
  71. <style scoped lang="scss">
  72. .login-container {
  73. height: 100%;
  74. text-align: right;
  75. //background: var(--el-color-white);
  76. background-image: url("/@/assets/login-bg.png");
  77. .login-left {
  78. position: relative;
  79. background-color: rgba(211, 239, 255, 1);
  80. margin-right: 100px;
  81. display: inline-flex;
  82. .login-left-logo {
  83. width: 350px;
  84. display: flex;
  85. align-items: center;
  86. position: absolute;
  87. top: 50px;
  88. left: 80px;
  89. z-index: 1;
  90. animation: logoAnimation 0.3s ease;
  91. img {
  92. width: 52px;
  93. height: 52px;
  94. }
  95. .login-left-logo-text {
  96. display: flex;
  97. flex-direction: column;
  98. span {
  99. margin-left: 10px;
  100. font-size: 28px;
  101. color: #83b6cf;
  102. }
  103. .login-left-logo-text-msg {
  104. font-size: 12px;
  105. color: #32a99e;
  106. }
  107. }
  108. }
  109. .login-left-img {
  110. position: absolute;
  111. top: 50%;
  112. left: 50%;
  113. transform: translate(-50%, -50%);
  114. width: 100%;
  115. height: 52%;
  116. img {
  117. width: 100%;
  118. height: 100%;
  119. animation: error-num 0.6s ease;
  120. }
  121. }
  122. .login-left-waves {
  123. position: absolute;
  124. top: 0;
  125. right: -100px;
  126. }
  127. }
  128. .login-right {
  129. opacity: .9;
  130. width: 700px;
  131. .login-right-warp {
  132. border: 1px solid var(--el-color-primary-light-3);
  133. border-radius: 3px;
  134. width: 500px;
  135. height: 500px;
  136. position: relative;
  137. overflow: hidden;
  138. background-color: var(--el-color-white);
  139. .login-right-warp-one,
  140. .login-right-warp-two {
  141. position: absolute;
  142. display: block;
  143. width: inherit;
  144. height: inherit;
  145. &::before,
  146. &::after {
  147. content: '';
  148. position: absolute;
  149. z-index: 1;
  150. }
  151. }
  152. .login-right-warp-one {
  153. &::before {
  154. filter: hue-rotate(0deg);
  155. top: 0px;
  156. left: 0;
  157. width: 100%;
  158. height: 3px;
  159. background: linear-gradient(90deg, transparent, var(--el-color-primary));
  160. animation: loginLeft 3s linear infinite;
  161. }
  162. &::after {
  163. filter: hue-rotate(60deg);
  164. top: -100%;
  165. right: 2px;
  166. width: 3px;
  167. height: 100%;
  168. background: linear-gradient(180deg, transparent, var(--el-color-primary));
  169. animation: loginTop 3s linear infinite;
  170. animation-delay: 0.7s;
  171. }
  172. }
  173. .login-right-warp-two {
  174. &::before {
  175. filter: hue-rotate(120deg);
  176. bottom: 2px;
  177. right: -100%;
  178. width: 100%;
  179. height: 3px;
  180. background: linear-gradient(270deg, transparent, var(--el-color-primary));
  181. animation: loginRight 3s linear infinite;
  182. animation-delay: 1.4s;
  183. }
  184. &::after {
  185. filter: hue-rotate(300deg);
  186. bottom: -100%;
  187. left: 0px;
  188. width: 3px;
  189. height: 100%;
  190. background: linear-gradient(360deg, transparent, var(--el-color-primary));
  191. animation: loginBottom 3s linear infinite;
  192. animation-delay: 2.1s;
  193. }
  194. }
  195. .login-right-warp-mian {
  196. display: flex;
  197. flex-direction: column;
  198. height: 100%;
  199. .login-right-warp-main-title {
  200. height: 130px;
  201. line-height: 130px;
  202. font-size: 27px;
  203. text-align: center;
  204. letter-spacing: 3px;
  205. animation: logoAnimation 0.3s ease;
  206. animation-delay: 0.3s;
  207. color: var(--el-text-color-primary);
  208. }
  209. .login-right-warp-main-form {
  210. flex: 1;
  211. padding: 0 50px 50px;
  212. .login-content-main-sacn {
  213. position: absolute;
  214. top: 0;
  215. right: 0;
  216. width: 50px;
  217. height: 50px;
  218. overflow: hidden;
  219. cursor: pointer;
  220. transition: all ease 0.3s;
  221. color: var(--el-color-primary);
  222. &-delta {
  223. position: absolute;
  224. width: 35px;
  225. height: 70px;
  226. z-index: 2;
  227. top: 2px;
  228. right: 21px;
  229. background: var(--el-color-white);
  230. transform: rotate(-45deg);
  231. }
  232. &:hover {
  233. opacity: 1;
  234. transition: all ease 0.3s;
  235. color: var(--el-color-primary) !important;
  236. }
  237. i {
  238. width: 47px;
  239. height: 50px;
  240. display: inline-block;
  241. font-size: 48px;
  242. position: absolute;
  243. right: 1px;
  244. top: 0px;
  245. }
  246. }
  247. }
  248. }
  249. }
  250. }
  251. }
  252. </style>