From 06997ad92d77b7dd8a002df16b5b0cadc528d5f5 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期四, 24 八月 2023 15:28:52 +0800
Subject: [PATCH] 111

---
 screen_standard/src/views/index.vue |   63 ++++++++++++++++++-------------
 1 files changed, 36 insertions(+), 27 deletions(-)

diff --git a/screen_standard/src/views/index.vue b/screen_standard/src/views/index.vue
index 98a72b4..16b27c6 100644
--- a/screen_standard/src/views/index.vue
+++ b/screen_standard/src/views/index.vue
@@ -157,7 +157,7 @@
           <span>杩�7澶╀笉鑹搧鍒嗗竷</span>
         </div>
         <div class="content_right_top_nr">
-          
+
           <div class="content_right_top_nr_top" id="lineChrat"></div>
           <div class="content_right_top_nr_bottom">
             <div class="content_right_top_nr_bottom_yuan" v-if="data.typeDistribution.length > 0">
@@ -166,7 +166,7 @@
             </div>
             <div id="pieChart"></div>
           </div>
-          
+
         </div>
       </div>
       <!-- 璁惧宸℃璁板綍 -->
@@ -221,10 +221,11 @@
   dayDistribution: [],
   typeDistribution: [],
   num: 0,
-  baseNum: 0
+  baseNum: 0,
+  bottomAuthHeight: 284
 })
 
-let { baseNum } = toRefs(data)
+let { baseNum, bottomAuthHeight } = toRefs(data)
 
 let timer = ref(null)
 let timer1 = ref(null)
@@ -232,7 +233,6 @@
 let timer3 = ref(null)
 let timer4 = ref(null)
 let timer5 = ref(null)
-let bottomAuthHeight = 284;
 let scrollContainer = ref(null)
 let scrollContainer1 = ref(null)
 let scrollContainer2 = ref(null)
@@ -319,8 +319,8 @@
       }
     }
   })
- 
-  
+
+
   // 鎶ュ伐鏃ュ織
   getRecordLogPage(companyId.value, departId.value, {
     capacity: 20,
@@ -379,8 +379,7 @@
 }
 function  setBottomHeight(){
   const pageHeight = window.innerHeight;
-  bottomAuthHeight = pageHeight -700;
-  // bottom1.style.height=bottomAuthHeight;
+  bottomAuthHeight = pageHeight - 700;
 }
 
 /**
@@ -662,15 +661,16 @@
   if (scrollDom.offsetHeight == 0) {
     scrollDom = scrollContainer.value
   } else {
+    let maxLength = scrollDom.clientHeight/34
     // 濡傛灉鍒楄〃鏁伴噺杩囧皯涓嶈繘琛屾粴鍔�
-    if (scrollDom.children.length < 6) {
+    if (scrollDom.children.length <= maxLength) {
       clearTimeout(timer.value)
       return
     }
     // 缁勪欢杩涜婊氬姩
-    scrollDom.scrollTop += 1
+    scrollDom.scrollTop += 2
     // 鍒ゆ柇鏄惁婊氬姩鍒板簳閮�
-    if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
+    if (Math.floor(scrollDom.scrollTop) >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
       // 鑾峰彇缁勪欢绗竴涓妭鐐�
       let first = scrollDom.children[0]
       // 鍒犻櫎鑺傜偣
@@ -688,14 +688,14 @@
     scrollDom = scrollContainer1.value
   } else {
     // 濡傛灉鍒楄〃鏁伴噺杩囧皯涓嶈繘琛屾粴鍔�
-    if (scrollDom.children.length < 7) {
+    if (scrollDom.children.length < 6) {
       clearTimeout(timer1.value)
       return
     }
     // 缁勪欢杩涜婊氬姩
-    scrollDom.scrollTop += 1
+    scrollDom.scrollTop += 2
     // 鍒ゆ柇鏄惁婊氬姩鍒板簳閮�
-    if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
+    if (scrollDom.scrollTop+2 >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
       // 鑾峰彇缁勪欢绗竴涓妭鐐�
       let first = scrollDom.children[0]
       // 鍒犻櫎鑺傜偣
@@ -740,12 +740,15 @@
     scrollDom = scrollContainer3.value
   } else {
     // 濡傛灉鍒楄〃鏁伴噺杩囧皯涓嶈繘琛屾粴鍔�
-    if (scrollDom.children.length <= 5) {
+    let num = scrollContainer3.value.offsetHeight / 35;
+    // alert(scrollDom.children.length  +"---------------"+num)
+    // 濡傛灉鍒楄〃鏁伴噺杩囧皯涓嶈繘琛屾粴鍔�
+    if (scrollDom.children.length <= num) {
       clearTimeout(timer3.value)
       return
     }
     // 缁勪欢杩涜婊氬姩
-    scrollDom.scrollTop += 1
+    scrollDom.scrollTop = scrollDom.scrollTop+2
     // 鍒ゆ柇鏄惁婊氬姩鍒板簳閮�
     if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
       // 鑾峰彇缁勪欢绗竴涓妭鐐�
@@ -764,15 +767,18 @@
   if (scrollDom.offsetHeight == 0) {
     scrollDom = scrollContainer4.value
   } else {
+    // console.log(bottom1.value.height);
+    let num = scrollContainer4.value.offsetHeight / 35;
+    // alert(scrollDom.children.length  +"---------------"+num)
     // 濡傛灉鍒楄〃鏁伴噺杩囧皯涓嶈繘琛屾粴鍔�
-    if (scrollDom.children.length < 5) {
+    if (scrollDom.children.length <= num) {
       clearTimeout(timer4.value)
       return
     }
     // 缁勪欢杩涜婊氬姩
-    scrollDom.scrollTop += 1
+    scrollDom.scrollTop += 2
     // 鍒ゆ柇鏄惁婊氬姩鍒板簳閮�
-    if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
+    if (scrollDom.scrollTop+1 >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
       // 鑾峰彇缁勪欢绗竴涓妭鐐�
       let first = scrollDom.children[0]
       // 鍒犻櫎鑺傜偣
@@ -794,6 +800,8 @@
 </script>
 
 <style lang="scss" scoped>
+
+$fixed-height: 690px;
 .content1 {
   flex: 1;
   width: 100%;
@@ -807,7 +815,7 @@
     margin-right: 20px;
     .content_left_item1 {
       width: 100%;
-      height:  calc(100vh - 700px);
+      height:  calc(100vh - 690px);
     //  height: 284px;
       margin-bottom: 20px;
       .content_left_item1_head {
@@ -832,7 +840,7 @@
 
       .content_left_item1_content {
         width: 100%;
-        height: 246px;
+        height: calc(100% - 36px);
         padding: 20px;
         overflow: hidden;
         box-sizing: border-box;
@@ -843,7 +851,8 @@
           display: flex;
           align-items: center;
           justify-content: space-between;
-          margin-bottom: 13px;
+          // margin-bottom: 13px;
+          padding: 7px 0;
 
           &:last-child {
             margin: 0;
@@ -969,7 +978,7 @@
 
         .main_container {
           width: 100%;
-          height: calc(100% - 35px);
+          height: calc(100% - 38px);
 
           .scroll_container {
             width: 100%;
@@ -1084,7 +1093,7 @@
 
             &:nth-child(5) {
               flex: 3;
-              
+
             }
           }
         }
@@ -1281,7 +1290,7 @@
     .content_center_bottom {
       width: 100%;
      // height: 284px;
-      height:  calc(100vh - 700px);
+      height:  calc(100vh - 690px);
       flex: 2;
       .content_center_bottom_head {
         width: 100%;
@@ -1467,7 +1476,7 @@
       width: 100%;
      // height: 284px;
 
-      height:  calc(100vh - 700px);
+      height:  calc(100vh - 690px);
       .content_right_bottom_head {
         width: 100%;
         height: 38px;

--
Gitblit v1.9.3