From 1f4e7d0f73a73e7350cf5a1df279d5f30904c5d5 Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期三, 06 十二月 2023 08:41:32 +0800 Subject: [PATCH] bug --- screen_standard/src/views/index.vue | 91 ++++++++++++++++++++++++++++++++++----------- 1 files changed, 69 insertions(+), 22 deletions(-) diff --git a/screen_standard/src/views/index.vue b/screen_standard/src/views/index.vue index e477f37..975400e 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> <!-- 璁惧宸℃璁板綍 --> @@ -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) @@ -319,8 +321,8 @@ } } }) - - + + // 鎶ュ伐鏃ュ織 getRecordLogPage(companyId.value, departId.value, { capacity: 20, @@ -405,6 +407,12 @@ fontSize: 12 } }, + grid: { + top: 40, + bottom: 30, + left: 60, + right: 10 + }, xAxis: { type: 'category', boundaryGap: false, @@ -412,6 +420,15 @@ lineStyle: { width: 0.5, color: ['#fff'] + } + }, + axisLine: { + show: true, + onZero: true, + lineStyle: { + width: 0.5, + color: '#fff', + opacity: .5 } }, axisLabel: { @@ -428,6 +445,15 @@ lineStyle: { width: 0.5, color: ['#fff'] + } + }, + axisLine: { + show: true, + onZero: true, + lineStyle: { + width: 1, + color: '#fff', + opacity: .5 } }, axisLabel: { @@ -688,14 +714,17 @@ scrollDom = scrollContainer1.value } else { // 濡傛灉鍒楄〃鏁伴噺杩囧皯涓嶈繘琛屾粴鍔� - if (scrollDom.children.length < 6) { + if (scrollDom.children.length <= 6) { clearTimeout(timer1.value) return } + // console.log(data.plannedProgress); // 缁勪欢杩涜婊氬姩 scrollDom.scrollTop += 2 + // scrollDom.scrollTo(0, scrollDom.scrollTop + 3) + // console.log('2-----',scrollDom.scrollTop, scrollDom.scrollHeight, scrollDom.clientHeight ); // 鍒ゆ柇鏄惁婊氬姩鍒板簳閮� - if (scrollDom.scrollTop+2 >= (scrollDom.scrollHeight - scrollDom.clientHeight)) { + if (scrollDom.scrollTop && scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) { // 鑾峰彇缁勪欢绗竴涓妭鐐� let first = scrollDom.children[0] // 鍒犻櫎鑺傜偣 @@ -713,16 +742,17 @@ scrollDom = scrollContainer2.value } else { // 濡傛灉鍒楄〃鏁伴噺杩囧皯涓嶈繘琛屾粴鍔� - if (scrollDom.children.length < 10) { + if (scrollDom.children.length <= 10) { clearTimeout(timer2.value) return } // 缁勪欢杩涜婊氬姩 - scrollDom.scrollTop += 1 + scrollDom.scrollTo(0, scrollDom.scrollTop + 1) // += 1 + // scrollDom.scrollTop(scrollDom.scrollTop + 1) // console.log('scrollDom.scrollTop', scrollDom.scrollTop); // console.log('scrollDom.scrollHeight - scrollDom.clientHeight', scrollDom.scrollHeight - scrollDom.clientHeight); // 鍒ゆ柇鏄惁婊氬姩鍒板簳閮� - if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) { + if (scrollDom.scrollTop &&scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) { // 鑾峰彇缁勪欢绗竴涓妭鐐� let first = scrollDom.children[0] // 鍒犻櫎鑺傜偣 @@ -750,7 +780,7 @@ // 缁勪欢杩涜婊氬姩 scrollDom.scrollTop = scrollDom.scrollTop+2 // 鍒ゆ柇鏄惁婊氬姩鍒板簳閮� - if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) { + if (scrollDom.scrollTop && scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) { // 鑾峰彇缁勪欢绗竴涓妭鐐� let first = scrollDom.children[0] // 鍒犻櫎鑺傜偣 @@ -764,21 +794,23 @@ let scrollDom = scrollContainer4.value if (!scrollDom) return // 鍒よ缁勪欢鏄惁娓叉煋瀹屾垚 - if (scrollDom.offsetHeight == 0) { + if (scrollDom.scrollTop && 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) 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.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) { + // if (scrollDom.scrollTop >= 35) { + // 鑾峰彇缁勪欢绗竴涓妭鐐� let first = scrollDom.children[0] // 鍒犻櫎鑺傜偣 @@ -794,8 +826,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> @@ -1093,7 +1140,7 @@ &:nth-child(5) { flex: 3; - + } } } -- Gitblit v1.9.3