index.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. <template>
  2. <div class="login-main">
  3. <div class="login-main-block">
  4. <div class="lmb-head">
  5. 欢迎使用社管总体平台
  6. </div>
  7. <div class="lmb-content">
  8. <div class="lmbc-left">
  9. <img src="./img/login-bg-left.png"/>
  10. </div>
  11. <img class="lmbc-center" src="./img/login-bg-center.png"/>
  12. <div class="lmbc-right">
  13. <el-form class="form" ref="ref_form" :model="form" label-width="80px"
  14. :inline="true" :show-message ="true">
  15. <el-form-item label="" prop="username" :rules="[
  16. { required: true, trigger: 'blur', message: '请输入您的用户名' }]">
  17. <el-input @keyup.enter="onNormalClick" v-model="form.username" placeholder="输入您的用户名">
  18. <template v-slot:prefix>
  19. <img src="./img/login-bg-username.png"/>
  20. </template>
  21. </el-input>
  22. </el-form-item>
  23. <el-form-item label="" prop="password" :rules="[
  24. { required: true, trigger: 'blur', message: '请输入您的密码' }]">
  25. <el-input @keyup.enter="onNormalClick" v-model="form.password" placeholder="输入您的密码" show-password>
  26. <template v-slot:prefix>
  27. <img src="./img/login-bg-password.png"/>
  28. </template>
  29. </el-input>
  30. </el-form-item>
  31. <el-form-item class="code" label="" prop="code" :rules="[
  32. { required: true, trigger: 'blur', message: '请输入验证码' }]">
  33. <el-input @keyup.enter="onNormalClick" v-model="form.code" placeholder="验证码" class="code">
  34. <template v-slot:prefix>
  35. <img src="./img/login-bg-code.png"/>
  36. </template>
  37. <template v-slot:suffix>
  38. <img v-if="codeImg" :src="codeImg"/>
  39. </template>
  40. </el-input>
  41. </el-form-item>
  42. </el-form>
  43. <div class="__hover login-button">安全登录</div>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. </template>
  49. <script lang="ts">
  50. import {
  51. defineComponent,
  52. computed,
  53. onMounted,
  54. ref,
  55. reactive,
  56. watch,
  57. getCurrentInstance,
  58. ComponentInternalInstance,
  59. toRefs,
  60. nextTick
  61. } from 'vue'
  62. import {useStore} from 'vuex'
  63. import {useRouter, useRoute} from 'vue-router'
  64. export default defineComponent({
  65. name: '',
  66. components: {},
  67. setup() {
  68. const store = useStore();
  69. const router = useRouter();
  70. const route = useRoute();
  71. const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties
  72. const state = reactive({
  73. form: {},
  74. codeImg: ''
  75. })
  76. const onNormalClick = () => {
  77. }
  78. return {
  79. ...toRefs(state),
  80. onNormalClick
  81. }
  82. },
  83. })
  84. </script>
  85. <style scoped lang="scss">
  86. .login-main {
  87. width: 100%;
  88. height: 100%;
  89. background-color: rgba(0, 0, 0, 0.5);
  90. display: flex;
  91. align-items: center;
  92. justify-content: center;
  93. .login-main-block {
  94. background: url("./img/login-bg.png") 100% 100% no-repeat;
  95. width: 961px;
  96. height: 561px;
  97. display: flex;
  98. flex-direction: column;
  99. align-items: center;
  100. .lmb-head {
  101. background: url("./img/login-bg-head.png") 100% 100% no-repeat;
  102. width: 614px;
  103. height: 63px;
  104. display: flex;
  105. justify-content: center;
  106. font-size: 30px;
  107. font-family: FZLanTingHeiS-DB-GB;
  108. font-weight: 400;
  109. color: #97E3F4;
  110. line-height: 56px;
  111. }
  112. .lmb-content {
  113. display: flex;
  114. align-items: flex-start;
  115. justify-content: center;
  116. .lmbc-left, .lmbc-right {
  117. width: 381px;
  118. }
  119. .lmbc-left {
  120. position: relative;
  121. height: 443px;
  122. >img {
  123. position: absolute;
  124. top: 0;
  125. left: -210px;
  126. }
  127. }
  128. .lmbc-center {
  129. margin-top: 69px;
  130. }
  131. .lmbc-right {
  132. margin-top: 69px;
  133. padding-left: 50px;
  134. height: 443px;
  135. :deep(.form) {
  136. width: 100%;
  137. display: flex;
  138. flex-direction: column;
  139. align-items: center;
  140. justify-content: center;
  141. .el-form-item {
  142. margin-right: 0px;
  143. margin-bottom: 25px;
  144. width: 100%;
  145. height: 58px;
  146. input:-webkit-autofill , textarea:-webkit-autofill, select:-webkit-autofill {
  147. }
  148. .el-input {
  149. width: 100%;
  150. height: 100%;
  151. .el-input__wrapper {
  152. border: 1px solid #17396F;
  153. background-color: rgba(107,185,248,0.1);
  154. padding: 2px;
  155. box-sizing: border-box;
  156. border-radius: 0;
  157. box-shadow: 0 0 0 1px transparent inset;
  158. .el-input__prefix {
  159. width: 58px;
  160. height: 100%;
  161. background: #17396F;
  162. display: flex;
  163. align-items: center;
  164. justify-content: center;
  165. .el-input__prefix-inner {
  166. >img {
  167. margin-right: 0px;
  168. }
  169. }
  170. }
  171. .el-input__inner {
  172. padding-left: 15px;
  173. width: 100%;
  174. height: 100%;
  175. background: rgba(107,185,248,0.1) !important;
  176. font-size: 20px;
  177. font-family: FZLanTingHeiS-DB-GB;
  178. font-weight: 400;
  179. color: #FFFFFF;
  180. border-color: transparent;
  181. &:focus {
  182. border-color: #0d84ff;
  183. }
  184. &::placeholder {
  185. font-size: 18px;
  186. font-family: FZLanTingHei-R-GBK;
  187. font-weight: 400;
  188. color: #FFFFFF;
  189. }
  190. &:-webkit-autofill {
  191. background-color: rgba(34, 58, 80, 0.3) !important;
  192. -webkit-text-fill-color: #ededed !important;
  193. -webkit-box-shadow: 0 0 0px 1000px transparent inset !important;
  194. background-image: none;
  195. transition: background-color 50000s ease-in-out 0s;
  196. caret-color: #eee; //光标颜色
  197. //背景色透明 生效时长 过渡效果 启用时延迟的时间
  198. }
  199. }
  200. .el-input__suffix {
  201. width: 58px;
  202. display: flex;
  203. align-items: center;
  204. justify-content: center;
  205. background: rgba(107,185,248,0.1);
  206. .el-input__suffix-inner {
  207. >i {
  208. font-size: 20px;
  209. margin-left: 0;
  210. }
  211. }
  212. }
  213. }
  214. }
  215. }
  216. }
  217. .login-button {
  218. margin-top: 13px;
  219. width: 100%;
  220. height: 58px;
  221. background: #56C7FC;
  222. border: 1px solid #134B7E;
  223. font-size: 24px;
  224. font-family: FZLanTingHeiS-DB-GB;
  225. font-weight: 400;
  226. color: #FFFFFF;
  227. display: flex;
  228. justify-content: center;
  229. align-items: center;
  230. }
  231. }
  232. }
  233. }
  234. }
  235. </style>