Login.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <template>
  2. <div :class="prefixCls" class="relative w-full h-full px-4 login-main">
  3. <!-- <AppLocalePicker
  4. class="absolute text-white top-4 right-4 enter-x xl:text-gray-600"
  5. :showText="false"
  6. v-if="!sessionTimeout && showLocale"
  7. /> -->
  8. <!-- <AppDarkModeToggle class="absolute top-3 right-7 enter-x" v-if="!sessionTimeout" /> -->
  9. <span class="-enter-x xl:hidden">
  10. <AppLogo :alwaysShowTitle="true" />
  11. </span>
  12. <div class="container relative h-full py-2 mx-auto sm:px-10">
  13. <div class="flex h-full">
  14. <div class="hidden min-h-full pl-4 mr-4 xl:flex xl:flex-col xl:w-6/12">
  15. <AppLogo class="-enter-x" />
  16. <div class="my-auto" style="visibility: hidden">
  17. <img
  18. :alt="title"
  19. src="../../../assets/svg/login-box-bg.svg"
  20. class="w-1/2 -mt-16 -enter-x"
  21. />
  22. <div class="mt-10 font-medium text-white -enter-x">
  23. <span class="inline-block mt-4 text-3xl"> {{ t('sys.login.signInTitle') }}</span>
  24. </div>
  25. <div class="mt-5 font-normal text-white text-md dark:text-gray-500 -enter-x">
  26. {{ t('sys.login.signInDesc') }}
  27. </div>
  28. </div>
  29. </div>
  30. <div class="flex w-full h-full py-5 xl:h-auto xl:py-0 xl:my-0 xl:w-6/12">
  31. <div
  32. :class="`${prefixCls}-form`"
  33. class="
  34. relative
  35. w-full
  36. px-5
  37. py-8
  38. mx-auto
  39. my-auto
  40. rounded-md
  41. shadow-md
  42. xl:ml-16 xl:bg-transparent
  43. sm:px-8
  44. xl:p-4 xl:shadow-none
  45. sm:w-3/4
  46. lg:w-2/4
  47. xl:w-auto
  48. enter-x
  49. "
  50. >
  51. <div class="title">
  52. <div style="font-weight: bold; font-size: 60px">
  53. <p style="margin-bottom: 0">江门市公安</p>
  54. <span>局警用三维实景平台</span>
  55. </div>
  56. <p style="font-weight: 400; font-size: 14px;margin-bottom:80px;color:#666">Three-Dimensional Police Security Platform for Public Security Bureau of Jiangmen Municipalit</p>
  57. </div>
  58. <LoginForm />
  59. <ForgetPasswordForm />
  60. <RegisterForm />
  61. <MobileForm />
  62. <QrCodeForm />
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. </template>
  69. <script lang="ts" setup>
  70. import { computed } from 'vue';
  71. import { AppLogo } from '/@/components/Application';
  72. import { AppLocalePicker, AppDarkModeToggle } from '/@/components/Application';
  73. import LoginForm from './LoginForm.vue';
  74. import ForgetPasswordForm from './ForgetPasswordForm.vue';
  75. import RegisterForm from './RegisterForm.vue';
  76. import MobileForm from './MobileForm.vue';
  77. import QrCodeForm from './QrCodeForm.vue';
  78. import { useGlobSetting } from '/@/hooks/setting';
  79. import { useI18n } from '/@/hooks/web/useI18n';
  80. import { useDesign } from '/@/hooks/web/useDesign';
  81. import { useLocaleStore } from '/@/store/modules/locale';
  82. defineProps({
  83. sessionTimeout: {
  84. type: Boolean,
  85. },
  86. });
  87. const globSetting = useGlobSetting();
  88. const { prefixCls } = useDesign('login');
  89. const { t } = useI18n();
  90. const localeStore = useLocaleStore();
  91. const showLocale = localeStore.getShowPicker;
  92. const title = computed(() => globSetting?.title ?? '');
  93. </script>
  94. <style lang="less">
  95. @prefix-cls: ~'@{namespace}-login';
  96. @logo-prefix-cls: ~'@{namespace}-app-logo';
  97. @countdown-prefix-cls: ~'@{namespace}-countdown-input';
  98. @dark-bg: #293146;
  99. html[data-theme='dark'] {
  100. .@{prefix-cls} {
  101. background-color: @dark-bg;
  102. &::before {
  103. background-image: url(/@/assets/svg/login-bg-dark.svg);
  104. }
  105. .ant-input,
  106. .ant-input-password {
  107. background-color: #232a3b;
  108. }
  109. .ant-btn:not(.ant-btn-link):not(.ant-btn-primary) {
  110. border: 1px solid #4a5569;
  111. }
  112. &-form {
  113. background: transparent !important;
  114. }
  115. .app-iconify {
  116. color: #fff;
  117. }
  118. }
  119. input.fix-auto-fill,
  120. .fix-auto-fill input {
  121. -webkit-text-fill-color: #c9d1d9 !important;
  122. box-shadow: inherit !important;
  123. }
  124. }
  125. .@{prefix-cls} {
  126. min-height: 100%;
  127. overflow: hidden;
  128. @media (max-width: @screen-xl) {
  129. background-color: #293146;
  130. .@{prefix-cls}-form {
  131. background-color: #fff;
  132. }
  133. }
  134. &::before {
  135. position: absolute;
  136. top: 0;
  137. left: 0;
  138. width: 100%;
  139. height: 100%;
  140. margin-left: -48%;
  141. background-position: 100%;
  142. background-repeat: no-repeat;
  143. background-size: auto 100%;
  144. content: '';
  145. @media (max-width: @screen-xl) {
  146. display: none;
  147. }
  148. }
  149. .@{logo-prefix-cls} {
  150. position: absolute;
  151. top: 12px;
  152. height: 30px;
  153. &__title {
  154. font-size: 16px;
  155. color: #fff;
  156. }
  157. img {
  158. width: 32px;
  159. }
  160. }
  161. .container {
  162. .@{logo-prefix-cls} {
  163. display: flex;
  164. width: 60%;
  165. height: 80px;
  166. &__title {
  167. // font-size: 24px;
  168. // color: #fff;
  169. font-size: 32px;
  170. font-family: Source Han Sans CN, Source Han Sans CN;
  171. font-weight: 500;
  172. color: #000000;
  173. line-height: 38px;
  174. }
  175. img {
  176. width: 40px;
  177. height: 40px;
  178. }
  179. }
  180. }
  181. &-sign-in-way {
  182. .anticon {
  183. font-size: 22px;
  184. color: #888;
  185. cursor: pointer;
  186. &:hover {
  187. color: @primary-color;
  188. }
  189. }
  190. }
  191. input:not([type='checkbox']) {
  192. min-width: 360px;
  193. @media (max-width: @screen-xl) {
  194. min-width: 320px;
  195. }
  196. @media (max-width: @screen-lg) {
  197. min-width: 260px;
  198. }
  199. @media (max-width: @screen-md) {
  200. min-width: 240px;
  201. }
  202. @media (max-width: @screen-sm) {
  203. min-width: 160px;
  204. }
  205. }
  206. .@{countdown-prefix-cls} input {
  207. min-width: unset;
  208. }
  209. .ant-divider-inner-text {
  210. font-size: 12px;
  211. color: @text-color-secondary;
  212. }
  213. }
  214. .login-main {
  215. background-image: url(/@/assets/images/bg@2x.png);
  216. background-position: 100%;
  217. background-repeat: no-repeat;
  218. background-size: cover;
  219. }
  220. </style>