Browse Source

Merge remote-tracking branch 'origin/master'

sys5923812@126.com 1 month ago
parent
commit
fc717c3875

+ 84 - 54
src/views/xjc-integratedmachine/environment/university/query_universitydb_conditions.vue

@@ -56,6 +56,7 @@
                     style="width: 1392px;height: 84px"
                     placeholder="请输入你要查询的高校"
                     @input="byKeyword"
+                    @focus="focusSearchKeyboard"
                 >
                   <template #suffix>
                                     <span @click="clearResult" style="font-size: 38px;color: #444040;margin-left: 37px;">
@@ -124,6 +125,13 @@
         </div>
       </el-dialog>
     </div>
+    <SearchKeyboard
+            v-if="showSearchKeyboard"
+            :input="form.name"
+            @onChange="handleSearchKeyboardInputChange"
+            @onKeyPress="handleSearchKeyboardKeyPress"
+            @onClose="showSearchKeyboard = false"
+    />
   </div>
 
 </template>
@@ -131,6 +139,7 @@
 <script setup>
 import headComponent from '@/views/xjc-integratedmachine/components/head_component.vue'
 import Drag_component from "@/views/xjc-integratedmachine/components/drag_component.vue";
+import SearchKeyboard from '@/views/xjc-integratedmachine/components/xjc_keyboard.vue'
 import {ref} from "vue";
 import {getUniversityByKeyword} from "@/api/xjc-integratedmachine/environment/university.js";
 
@@ -170,6 +179,7 @@ function setHeadinfo() {
 
 //切换tabs
 const showPage = (val) => {
+  showSearchKeyboard.value = false
   if (val === 1) {
     onePage.value = true;
     twoPage.value = false;
@@ -310,6 +320,24 @@ function clearResult(item) {
   byKeyword();
 }
 
+
+    /* 软键盘事件 ↓*/
+    // 启动软键盘标识
+    const showSearchKeyboard = ref(false)
+    function focusSearchKeyboard(){
+      showSearchKeyboard.value = true
+    }
+    function handleSearchKeyboardInputChange(input) {
+      form.value.name = input
+    }
+    function handleSearchKeyboardKeyPress(button) {
+      if(button === '{enter}'){
+        showSearchKeyboard.value = false
+      }
+    }
+
+    /* 软键盘事件 ↑*/
+
 </script>
 
 
@@ -513,65 +541,67 @@ p , div{
 
 }
 
+
+
+.item-result-box-active {
+  min-width: 220px;
+  height: 92px;
+  background: linear-gradient(180deg, #B6FFEF 0%, #C5EEFF 100%);
+  box-shadow: inset 0px -2px 7px 0px #1E410E;
+  border-radius: 5px 5px 5px 5px;
+  border: 1px solid #A2F57F;
+  font-weight: 400;
+  font-size: 30px;
+  color: #0DE6A1;
+  line-height: 90px;
+  text-align: center;
+  margin-left: 50px;
+  margin-right: 50px;
+  margin-top: 32px;
+  padding-left: 20px;
+  padding-right: 20px;
+}
+
+.item-result-box {
+  min-width: 220px;
+  height: 92px;
+  background: #E0EEF4;
+  border-radius: 5px 5px 5px 5px;
+  font-weight: 400;
+  font-size: 30px;
+  color: #000000;
+  line-height: 92px;
+  text-align: center;
+  margin-left: 50px;
+  margin-right: 50px;
+  margin-top: 32px;
+  padding-left: 20px;
+  padding-right: 20px;
+}
+
+.item-result-box:hover {
+  min-width: 220px;
+  height: 92px;
+  background: linear-gradient(180deg, #B6FFEF 0%, #C5EEFF 100%);
+  box-shadow: inset 0px -2px 7px 0px #1E410E;
+  border-radius: 5px 5px 5px 5px;
+  border: 1px solid #A2F57F;
+  font-weight: 400;
+  font-size: 30px;
+  color: #000000;
+  //line-height: 90px;
+  text-align: center;
+  margin-left: 50px;
+  margin-top: 32px;
+  padding-left: 20px;
+  padding-right: 20px;
+}
+
 .dialog-box {
   display: flex;
   flex-wrap: wrap;
   justify-content: space-between;
 
-
-  .item-result-box-active {
-    min-width: 220px;
-    height: 92px;
-    background: linear-gradient(180deg, #B6FFEF 0%, #C5EEFF 100%);
-    box-shadow: inset 0px -2px 7px 0px #1E410E;
-    border-radius: 5px 5px 5px 5px;
-    border: 1px solid #A2F57F;
-    font-weight: 400;
-    font-size: 30px;
-    color: #0DE6A1;
-    line-height: 90px;
-    text-align: center;
-    margin-left: 50px;
-    margin-right: 50px;
-    margin-top: 32px;
-    padding-left: 20px;
-    padding-right: 20px;
-  }
-
-  .item-result-box {
-    min-width: 220px;
-    height: 92px;
-    background: #E0EEF4;
-    border-radius: 5px 5px 5px 5px;
-    font-weight: 400;
-    font-size: 30px;
-    color: #000000;
-    line-height: 92px;
-    text-align: center;
-    margin-left: 50px;
-    margin-right: 50px;
-    margin-top: 32px;
-    padding-left: 20px;
-    padding-right: 20px;
-  }
-
-  .item-result-box:hover {
-    min-width: 220px;
-    height: 92px;
-    background: linear-gradient(180deg, #B6FFEF 0%, #C5EEFF 100%);
-    box-shadow: inset 0px -2px 7px 0px #1E410E;
-    border-radius: 5px 5px 5px 5px;
-    border: 1px solid #A2F57F;
-    font-weight: 400;
-    font-size: 30px;
-    color: #000000;
-    //line-height: 90px;
-    text-align: center;
-    margin-left: 50px;
-    margin-top: 32px;
-    padding-left: 20px;
-    padding-right: 20px;
-  }
   //p {
   //  min-width: 120px;
   //  padding-left: 10px;

+ 53 - 1
src/views/xjc-integratedmachine/login/student_login.vue

@@ -18,6 +18,7 @@
                         auto-complete="off"
                         placeholder="身份证号"
                         class="form-box-input1"
+                        @focus="focusUsernameKeyboard"
                     >
                       <template #prefix>
                         <svg-icon icon-class="user_login" class="el-input__icon input-icon"/>
@@ -34,6 +35,7 @@
                         show-password
                         class="form-box-input1"
                         @keyup.enter="handleLogin"
+                        @focus="focusPasswordKeyboard"
                     >
                       <template #prefix>
                         <svg-icon icon-class="password_login" class="el-input__icon input-icon"/>
@@ -64,7 +66,20 @@
           </div>
         </div>
       </div>
-
+      <UsernameKeyboard
+              v-if="showUsernameKeyboard"
+              :input="loginForm.username"
+              @onChange="handleUsernameKeyboardInputChange"
+              @onKeyPress="handleUsernameKeyboardKeyPress"
+              @onClose="showUsernameKeyboard = false"
+      />
+      <PasswordKeyboard
+              v-if="showPasswordKeyboard"
+              :input="loginForm.password"
+              @onChange="handlePasswordKeyboardInputChange"
+              @onKeyPress="handlePasswordKeyboardKeyPress"
+              @onClose="showPasswordKeyboard = false"
+      />
     </div>
 </template>
 
@@ -73,6 +88,10 @@
     import useUserStore from '@/store/modules/user'
     import { setToken } from '@/utils/auth'
     import HeadComponent from '@/views/xjc-integratedmachine/components/head_component.vue';
+    import UsernameKeyboard from '@/views/xjc-integratedmachine/components/xjc_keyboard.vue'
+    import PasswordKeyboard from '@/views/xjc-integratedmachine/components/xjc_keyboard.vue'
+    import {ref} from "vue";
+
     const userStore = useUserStore()
 
     const {proxy} = getCurrentInstance()
@@ -100,6 +119,39 @@
         password: [{required: true, trigger: "blur", message: "请输入您的密码"}],
     }
 
+    /* 软键盘事件 ↓*/
+    // 启动软键盘标识
+    const showUsernameKeyboard = ref(false)
+    function focusUsernameKeyboard(){
+      showUsernameKeyboard.value = true
+      showPasswordKeyboard.value = false
+    }
+    function handleUsernameKeyboardInputChange(input) {
+        loginForm.value.username = input
+    }
+    function handleUsernameKeyboardKeyPress(button) {
+      if(button === '{enter}'){
+        showUsernameKeyboard.value = false
+      }
+    }
+
+    const showPasswordKeyboard = ref(false)
+    function focusPasswordKeyboard(){
+      showUsernameKeyboard.value = false
+      showPasswordKeyboard.value = true
+    }
+    function handlePasswordKeyboardInputChange(input) {
+        loginForm.value.password = input
+    }
+    function handlePasswordKeyboardKeyPress(button) {
+      if(button === '{enter}'){
+        showPasswordKeyboard.value = false
+      }
+    }
+
+    /* 软键盘事件 ↑*/
+
+    // 登录
     function handleLogin() {
         proxy.$refs.loginRef.validate(valid => {
             if (valid) {