Browse Source

样式屏幕适配优化

ming 1 year ago
parent
commit
f6bd2f10f7

+ 5 - 1
src/assets/styles/index.scss

@@ -1287,4 +1287,8 @@ input::placeholder{
  }
 
 }
-// 项目管理 end
+// 项目管理 end
+
+
+
+

+ 1 - 1
src/components/officialAccount/index.vue

@@ -2,7 +2,7 @@
     <div class="officialAccount">
         <div class="officialAccount-contain">
             <div class="officialAccount-contain-top">
-                <img src="@/assets/images/gzh.png" />
+                <img src="@/assets/images/gzh.png" style="width:30rem"/>
             </div>
             <div class="officialAccount-contain-middle" @click="returnPage">
                 <span>为访客预约成功后能成功接收通知,请首次访客预约用户关注“XXXX”公众号,进行手机号授权,已关注用户可直接点击“下一步”。</span>

+ 36 - 5
src/views/fillIn.vue

@@ -2,7 +2,7 @@
   <div class="app-container fillIn">
     <div class="fillIn-contain">
       <p style="color: red; margin-bottom: 2%; font-size: 1.5rem">* 访客基本信息由身份证读卡器自动获取,请确保信息准确无误</p>
-      <el-form ref="formRef" :model="form" :rules="rules" label-width="140px" class="fillIn-contain-form">
+      <el-form ref="formRef" :model="form" :rules="rules" label-width="15rem" class="fillIn-contain-form">
         <el-row>
           <el-col :span="12">
             <el-form-item label="访客名称" prop="visitorName" :rules="rules.visitorName">
@@ -61,7 +61,7 @@
           </el-col>
         </el-row>
       </el-form>
-      <el-button type="primary" style="width: 20%; margin: 20px 40% 0" size="large"  @click="submitForm()">
+      <el-button type="primary" style="width: 20%; margin: 2rem 40% 0" size="large"  @click="submitForm()">
         <span>提 交</span>
       </el-button>
     </div>
@@ -70,7 +70,12 @@
 </template>
 
 <script setup name="Index">
+
+//大屏自适应
+import "@/assets/js/flexible.js";
+
 /*----------------------------------依赖引入-----------------------------------*/
+
 import axios from "axios";
 
 import { ref, reactive } from "vue";
@@ -175,15 +180,40 @@ onUnmounted(() => {
   timer.value = null;
 });
 </script>
+<style>
+
+/* 约束屏幕尺寸 */
+
+@media screen and (max-width: 1024px) {
+    html {
+        font-size: 5px !important;
+    }
+}
+
+@media screen and (min-width: 1920px) {
+    html {
+        font-size: 10px !important;
+    }
+}
+.el-form-item__error,.el-date-editor .el-range-input{
+  font-size:1.4rem
+}
+</style>
 
 <style scoped lang="scss">
+
+.el-button--large{
+ padding: 1.2rem 1.9rem;
+ --el-button-size:4rem
+}
+
 .fillIn {
   position: absolute;
   top: 25%;
   left: 0;
   width: 100%;
   &-contain {
-    width: 50%;
+    width: 95.9rem;
     margin: 0 auto;
     padding: 20px;
     // background-color: rgba(6,45,99,1);
@@ -197,13 +227,14 @@ onUnmounted(() => {
 <style>
 .fillIn .el-form .el-form-item__label {
   font-size: 1.6rem;
-  /* line-height: 4vh; */
+  line-height: 3rem;
+  height:3rem
 }
 .fillIn .el-input__inner {
   font-size: 1.6rem;
 }
 .fillIn .el-input__wrapper {
-  /* height: 4vh; */
+  height: 3rem;
   width: 60% !important;
 }
 .fillIn .el-form-item {

+ 6 - 4
src/views/index.vue

@@ -31,18 +31,20 @@ import layout from "@/components/layout/index.vue";
   height:100%;
   position: absolute;
   &-contain {
-    height:90%;
+    height:88%;
     &-middle{
-      width:65.8%;
+      // width:65.8%;
+      height:76vh;
       z-index: 1;
       margin:5.6% 17.1% 0;
       img{
-        width:100%;
+        // width:100%;
+        max-height:100%;
       }
     }
     &-bottom{
       width:100%;
-      margin-top:2.1%;
+      margin-top:1.5%;
       display: flex;
       justify-content: center;
       align-items: center;

+ 6 - 5
src/views/list.vue

@@ -52,18 +52,19 @@ function changeStage() {
   height:100%;
   position: absolute;
   &-contain {
-    height:90%;
+    height:88%;
     &-middle{
-      width:65.8%;
+      // width:65.8%;
+      height:76vh;
       z-index: 1;
-      margin:5% 17.1% 0;
+      margin:5.6% 17.1% 0;
       img{
-        width:100%;
+        height:100%;
       }
     }
     &-bottom{
       width:100%;
-      margin-top:2.1%;
+      margin-top:1.5%;
       display: flex;
       justify-content: center;
       align-items: center;