From 166982c6c138b0b3face42de4a4e1b305ef0e02e Mon Sep 17 00:00:00 2001
From: Mr.Zhang <710666463@qq.com>
Date: 星期三, 23 八月 2023 18:41:54 +0800
Subject: [PATCH] 大屏
---
screen_standard/src/views/index.vue | 29 ++++++++++++++++++++---------
1 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/screen_standard/src/views/index.vue b/screen_standard/src/views/index.vue
index 7339346..c415965 100644
--- a/screen_standard/src/views/index.vue
+++ b/screen_standard/src/views/index.vue
@@ -61,7 +61,7 @@
<div class="scroll_item_row_item_x"></div>
<span v-if="child.rate < 100">{{ child.rate.toFixed(0) }}%</span>
<img v-else src="@/assets/img/ic_complete@2x.png" alt="" />
- <span class="scroll_item_row_item_wz">{{ child.procedureName }}</span>
+ <span class="scroll_item_row_item_wz">{{ child.procedureName.substring(0, 3) }}</span>
</div>
</el-tooltip>
</div>
@@ -669,8 +669,10 @@
}
// 缁勪欢杩涜婊氬姩
scrollDom.scrollTop += 2
+ console.log(scrollDom.scrollHeight - scrollDom.clientHeight);
+ console.log(scrollDom.scrollTop);
// 鍒ゆ柇鏄惁婊氬姩鍒板簳閮�
- if (Math.floor(scrollDom.scrollTop) >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
+ if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight - 2)) {
// 鑾峰彇缁勪欢绗竴涓妭鐐�
let first = scrollDom.children[0]
// 鍒犻櫎鑺傜偣
@@ -693,9 +695,9 @@
return
}
// 缁勪欢杩涜婊氬姩
- scrollDom.scrollTop += 1
+ scrollDom.scrollTop += 2
// 鍒ゆ柇鏄惁婊氬姩鍒板簳閮�
- if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
+ if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight - 2)) {
// 鑾峰彇缁勪欢绗竴涓妭鐐�
let first = scrollDom.children[0]
// 鍒犻櫎鑺傜偣
@@ -740,12 +742,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,13 +769,16 @@
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)) {
// 鑾峰彇缁勪欢绗竴涓妭鐐�
@@ -789,6 +797,9 @@
onMounted(() => {
if (!departId.value) return;
+ window.addEventListener('resize', () => {
+ init()
+ })
timer5.value = setInterval(init(), 60000)
})
</script>
@@ -972,7 +983,7 @@
.main_container {
width: 100%;
- height: calc(100% - 35px);
+ height: calc(100% - 38px);
.scroll_container {
width: 100%;
--
Gitblit v1.9.3