刘琳琳 1 week ago
parent
commit
e5e87b06c8

+ 43 - 22
pages/settings/visitorLog/index.acss

@@ -245,7 +245,17 @@
 /* 键盘样式开始 */
 
 /* 键盘 */
-.main .visitor-list-content .keyboard {
+.main .keyboard-mask {
+  position: fixed;
+  top: 0;
+  bottom: 0;
+  background: rgba(0, 0, 0, 0.5);
+  width: 100%;
+  height: 100%;
+  z-index: 997;
+
+}
+.main .keyboard {
   position: fixed;
   width: calc(640vmax / 12.80);
   padding: 0 calc(15vmax / 12.80) calc(15vmax / 12.80) calc(15vmax / 12.80);
@@ -255,7 +265,7 @@
   left: 50%;
   top: 50%;
   transform: translate(-50%,-50%);
-  z-index: 99;
+  z-index: 998;
   /*background-color: #fff;*/
   border: 0 solid #1689FF;
   box-shadow: 0 0 calc(8vmax / 12.80) 0 rgba(22, 137, 255, 1);
@@ -267,7 +277,7 @@
   border-radius: calc(16vmax / 12.80);
   background: linear-gradient(180deg, #1689FF 0%, #07D3E0 100%);
 }
-.main .visitor-list-content .keyboard .keyboard-tit {
+.main .keyboard .keyboard-tit {
   color: #fff;
   font-size: calc(28vmax / 12.80);
   font-weight: 700;
@@ -275,7 +285,7 @@
   line-height: calc(60vmax / 12.80);
 }
 
-.main .visitor-list-content .keyboard .keyboard-mini {
+.main .keyboard .keyboard-mini {
   background-color: #fff;
   padding: calc(15vmax / 12.80) 0;
   position: relative;
@@ -287,21 +297,21 @@
   border-radius: calc(16vmax / 12.80);
 }
 
-.main .visitor-list-content .keyboard .keyboard-mini .provinces,
-.main .visitor-list-content .keyboard .keyboard-mini .keyNums{
+.main .keyboard .keyboard-mini .provinces,
+.main .keyboard .keyboard-mini .keyNums{
   overflow: hidden;
   display: flex;
   flex-wrap: wrap;
 }
 
-.main .visitor-list-content .keyboard .kb-btn-box {
+.main .keyboard .kb-btn-box {
   width: calc(295vmax / 12.80);
   display: flex;
   justify-content: space-between;
   align-items: center;
 }
 
-.main .visitor-list-content .keyboard .kb-btn-box .kb-delete-btn {
+.main .keyboard .kb-btn-box .kb-delete-btn {
   background: rgba(225, 69, 69, 1) !important;
   color: #fff;
   width: calc(140vmax / 12.80);
@@ -312,7 +322,7 @@
   text-align: center;
 }
 
-.main .visitor-list-content .keyboard .kb-btn-box .kb-sure-btn {
+.main .keyboard .kb-btn-box .kb-sure-btn {
   background: #ccc;
   color: #fff;
   width: calc(140vmax / 12.80);
@@ -323,12 +333,12 @@
   text-align: center;
 }
 
-.main .visitor-list-content .keyboard .kb-btn-box .down-blue {
+.main .keyboard .kb-btn-box .down-blue {
   background-color: rgba(24, 186, 255, 1) !important;
   color: #ffffff !important;
 }
 
-.main .visitor-list-content .keyboard .keyboard-mini .pro-li {
+.main .keyboard .keyboard-mini .pro-li {
   background: rgba(208, 244, 248, 1);
   color: #145676;
   width: calc(50vmax / 12.80);
@@ -590,7 +600,17 @@
 /* 键盘样式开始 */
 
 /* 键盘 */
-.portrait-main .visitor-list-content .keyboard {
+.portrait-main .keyboard-mask {
+  position: fixed;
+  top: 0;
+  bottom: 0;
+  background: rgba(0, 0, 0, 0.5);
+  width: 100%;
+  height: 100%;
+  z-index: 997;
+
+}
+.portrait-main .keyboard {
   position: fixed;
   width: calc(640vmin / 12.80);
   padding: 0 calc(15vmin / 12.80) calc(15vmin / 12.80) calc(15vmin / 12.80);
@@ -600,7 +620,7 @@
   left: 50%;
   top: 50%;
   transform: translate(-50%,-50%);
-  z-index: 99;
+  z-index: 998;
   /*background-color: #fff;*/
   border: 0 solid #1689FF;
   box-shadow: 0 0 calc(8vmin / 12.80) 0 rgba(22, 137, 255, 1);
@@ -612,7 +632,8 @@
   border-radius: calc(16vmin / 12.80);
   background: linear-gradient(180deg, #1689FF 0%, #07D3E0 100%);
 }
-.portrait-main .visitor-list-content .keyboard .keyboard-tit {
+
+.portrait-main .keyboard .keyboard-tit {
   color: #fff;
   font-size: calc(28vmin / 12.80);
   font-weight: 700;
@@ -620,7 +641,7 @@
   line-height: calc(60vmin / 12.80);
 }
 
-.portrait-main .visitor-list-content .keyboard .keyboard-mini {
+.portrait-main .keyboard .keyboard-mini {
   background-color: #fff;
   padding: calc(15vmin / 12.80) 0;
   position: relative;
@@ -632,21 +653,21 @@
   border-radius: calc(16vmin / 12.80);
 }
 
-.portrait-main .visitor-list-content .keyboard .keyboard-mini .provinces,
-.portrait-main .visitor-list-content .keyboard .keyboard-mini .keyNums{
+.portrait-main .keyboard .keyboard-mini .provinces,
+.portrait-main .keyboard .keyboard-mini .keyNums{
   overflow: hidden;
   display: flex;
   flex-wrap: wrap;
 }
 
-.portrait-main .visitor-list-content .keyboard .kb-btn-box {
+.portrait-main .keyboard .kb-btn-box {
   width: calc(295vmin / 12.80);
   display: flex;
   justify-content: space-between;
   align-items: center;
 }
 
-.portrait-main .visitor-list-content .keyboard .kb-btn-box .kb-delete-btn {
+.portrait-main .keyboard .kb-btn-box .kb-delete-btn {
   background: rgba(225, 69, 69, 1) !important;
   color: #fff;
   width: calc(140vmin / 12.80);
@@ -657,7 +678,7 @@
   text-align: center;
 }
 
-.portrait-main .visitor-list-content .keyboard .kb-btn-box .kb-sure-btn {
+.portrait-main .keyboard .kb-btn-box .kb-sure-btn {
   background: #ccc;
   color: #fff;
   width: calc(140vmin / 12.80);
@@ -668,12 +689,12 @@
   text-align: center;
 }
 
-.portrait-main .visitor-list-content .keyboard .kb-btn-box .down-blue {
+.portrait-main .keyboard .kb-btn-box .down-blue {
   background-color: rgba(24, 186, 255, 1) !important;
   color: #ffffff !important;
 }
 
-.portrait-main .visitor-list-content .keyboard .keyboard-mini .pro-li {
+.portrait-main .keyboard .keyboard-mini .pro-li {
   background: rgba(208, 244, 248, 1);
   color: #145676;
   width: calc(50vmin / 12.80);

+ 41 - 39
pages/settings/visitorLog/index.axml

@@ -1,5 +1,5 @@
 <import-sjs from='../../../utils/index/utils.sjs' name='util'>
-  <view class="page">
+  <view class="page" >
     <view class="{{isPortraitScreen?'portrait-main':'main'}}" onTap="clickAudio">
       <top-title urlPath='../../../' titleText="访客记录" />
       <!--<view class="tip"><image
@@ -208,50 +208,52 @@
             <view class="previous magnify" onTap="previousFun">上一页</view>
             <view class="next magnify" onTap="nextFun">下一页</view>
           </view>
-          <!-- 键盘结构 -->
-          <view class="keyboard" hidden="{{hiddenPro&&hiddenStr}}" catchTap="stopPropagation">
-            <view class="keyboard-tit">
-              车牌选择
-            </view>
-            <view class="keyboard-mini">
-              <!-- 限制键盘 -->
-              <!-- 省键盘 -->
-              <view class="provinces" hidden="{{hiddenPro}}">
-                <view
-                        a:for="{{provinceArr}}"
-                        class="pro-li"
-                        catchTap="proTap"
-                        data-province="{{item}}"
-                >
-                  {{item}}
-                </view>
+        </view>
+      <!-- 键盘结构 -->
+      <view class="keyboard-mask" hidden="{{hiddenPro&&hiddenStr}}" onTap="hidePopup">
+        <view class="keyboard" catchTap="stopPropagation">
+          <view class="keyboard-tit">
+            车牌选择
+          </view>
+          <view class="keyboard-mini">
+            <!-- 限制键盘 -->
+            <!-- 省键盘 -->
+            <view class="provinces" hidden="{{hiddenPro}}">
+              <view
+                      a:for="{{provinceArr}}"
+                      class="pro-li"
+                      catchTap="proTap"
+                      data-province="{{item}}"
+              >
+                {{item}}
               </view>
-              <!-- 号码键盘	 -->
-              <view class="keyNums" hidden="{{hiddenStr}}">
-                <view
-                        a:for="{{strArr}}"
-                        class="pro-li"
-                        :key="{{index}}"
-                        catchTap="strTap"
-                        disabled="{{strDisabled||(notNum&&index<10)}}"
-                        data-str="{{item}}"
-                >
-                  {{item}}
-                </view>
+            </view>
+            <!-- 号码键盘	 -->
+            <view class="keyNums" hidden="{{hiddenStr}}">
+              <view
+                      a:for="{{strArr}}"
+                      class="pro-li"
+                      :key="{{index}}"
+                      catchTap="strTap"
+                      disabled="{{strDisabled||(notNum&&index<10)}}"
+                      data-str="{{item}}"
+              >
+                {{item}}
               </view>
-              <!-- 提交按钮	 -->
-              <view class="kb-btn-box">
-                <view class="kb-delete-btn" catchTap="backSpace">删除</view>
-                <view
-                        class="kb-sure-btn {{downBtn=='完成'?'down-blue':''}}"
-                        catchTap="applyNum"
-                >
-                  {{downBtn}}
-                </view>
+            </view>
+            <!-- 提交按钮	 -->
+            <view class="kb-btn-box">
+              <view class="kb-delete-btn" catchTap="backSpace">删除</view>
+              <view
+                      class="kb-sure-btn {{downBtn=='完成'?'down-blue':''}}"
+                      catchTap="applyNum"
+              >
+                {{downBtn}}
               </view>
             </view>
           </view>
         </view>
+      </view>
 <!--      </block>-->
       <!--竖版样式-->
       <!--<block a:else>

+ 6 - 0
pages/settings/visitorLog/index.js

@@ -394,4 +394,10 @@ Page({
       hiddenStr: true,
     })
   },
+  // 点击其他地方关闭弹窗
+  hidePopup() {
+    if (!this.data.hiddenPro || !this.data.hiddenStr) {
+      this.applyNum();
+    }
+  },
 });