From 282e032b5771da13d224214d3b0b71f3efde9a42 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 25 八月 2023 18:45:42 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmMes

---
 screen_standard/src/views/index.vue |   71 ++++++++++++++++++++++++++++++-----
 1 files changed, 61 insertions(+), 10 deletions(-)

diff --git a/screen_standard/src/views/index.vue b/screen_standard/src/views/index.vue
index 16b27c6..025a41b 100644
--- a/screen_standard/src/views/index.vue
+++ b/screen_standard/src/views/index.vue
@@ -285,9 +285,11 @@
     .then(res => {
       if (res.length > 0) {
         data.baseNum = res[0].doneNum
-        data.production = res
-        start()
+      } else {
+        data.baseNum = 0
       }
+      data.production = res
+      data.fifthScroll = true
     })
   // 浠撳簱瀹炴椂浣欓噺缁熻
   // getStockList(companyId.value, departId.value)
@@ -405,6 +407,11 @@
         fontSize: 12
       }
     },
+    grid: {
+      top: 40,
+      bottom: 30,
+      left: 60
+    },
     xAxis: {
       type: 'category',
       boundaryGap: false,
@@ -412,6 +419,15 @@
         lineStyle: {
           width: 0.5,
           color: ['#fff']
+        }
+      },
+      axisLine: {
+        show: true,
+        onZero: true,
+        lineStyle: {
+          width: 0.5,
+          color: '#fff',
+          opacity: .5
         }
       },
       axisLabel: {
@@ -428,6 +444,15 @@
         lineStyle: {
           width: 0.5,
           color: ['#fff']
+        }
+      },
+      axisLine: {
+        show: true,
+        onZero: true,
+        lineStyle: {
+          width: 1,
+          color: '#fff',
+          opacity: .5
         }
       },
       axisLabel: {
@@ -767,18 +792,29 @@
   if (scrollDom.offsetHeight == 0) {
     scrollDom = scrollContainer4.value
   } else {
-    // console.log(bottom1.value.height);
-    let num = scrollContainer4.value.offsetHeight / 35;
-    // alert(scrollDom.children.length  +"---------------"+num)
-    // 濡傛灉鍒楄〃鏁伴噺杩囧皯涓嶈繘琛屾粴鍔�
+    // console.log(scrollDom.offsetHeight);
+    let num = scrollDom.offsetHeight / 35;
+    num = num + (scrollDom.offsetHeight % 35  > 0 ? 1 : 0)
+    // console.log('----------');
+    // console.log('scrollDom.children.length', scrollDom.children.length)
+    // console.log('scrollDom.offsetHeight % 35', scrollDom.offsetHeight % 35)
+    // console.log('num', num)
+    // console.log('----------');
+    // // 濡傛灉鍒楄〃鏁伴噺杩囧皯涓嶈繘琛屾粴鍔�
     if (scrollDom.children.length <= num) {
       clearTimeout(timer4.value)
       return
     }
     // 缁勪欢杩涜婊氬姩
-    scrollDom.scrollTop += 2
+    scrollDom.scrollTop += 1
+    
     // 鍒ゆ柇鏄惁婊氬姩鍒板簳閮�
-    if (scrollDom.scrollTop+1 >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
+    if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
+      console.log('scrollDom.scrollTop', scrollDom.scrollTop);
+      console.log('scrollDom.scrollHeight', scrollDom.scrollHeight);
+      console.log('scrollDom.clientHeight', scrollDom.clientHeight );
+    // if (scrollDom.scrollTop >= 35) {
+      
       // 鑾峰彇缁勪欢绗竴涓妭鐐�
       let first = scrollDom.children[0]
       // 鍒犻櫎鑺傜偣
@@ -794,8 +830,23 @@
 // })
 
 onMounted(() => {
-  if (!departId.value) return;
-  timer5.value = setInterval(init(), 60000)
+  if (departId.value) {
+    console.log('onMounted');
+    init()
+    timer5.value = setInterval(init, 60000)
+    timer.value = setInterval(scrillAction, 100)
+  }
+  window.addEventListener('resize', () => {
+    setTypeChart()
+    setDayChart()
+  })
+  
+})
+
+onUnmounted(() => {
+  clearTimeout(timer.value)
+  clearTimeout(timer5.value)
+  
 })
 </script>
 

--
Gitblit v1.9.3