From 11da32de75cc1f04691676349ff17853b42f8722 Mon Sep 17 00:00:00 2001
From: Mr.Zhang <710666463@qq.com>
Date: 星期三, 23 八月 2023 19:27:52 +0800
Subject: [PATCH] 大屏
---
screen_standard/src/views/index.vue | 64 +++++++++++++++++++------------
1 files changed, 39 insertions(+), 25 deletions(-)
diff --git a/screen_standard/src/views/index.vue b/screen_standard/src/views/index.vue
index 98a72b4..989120a 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>
@@ -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)
@@ -379,8 +379,7 @@
}
function setBottomHeight(){
const pageHeight = window.innerHeight;
- bottomAuthHeight = pageHeight -700;
- // bottom1.style.height=bottomAuthHeight;
+ bottomAuthHeight = pageHeight - 700;
}
/**
@@ -662,15 +661,18 @@
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
+ // console.log(scrollDom.scrollHeight - scrollDom.clientHeight);
+ // console.log(scrollDom.scrollTop);
// 鍒ゆ柇鏄惁婊氬姩鍒板簳閮�
- if (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]
// 鍒犻櫎鑺傜偣
@@ -718,11 +720,11 @@
return
}
// 缁勪欢杩涜婊氬姩
- scrollDom.scrollTop += 1
+ scrollDom.scrollTop += 2
// 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.scrollHeight - scrollDom.clientHeight - 2)) {
// 鑾峰彇缁勪欢绗竴涓妭鐐�
let first = scrollDom.children[0]
// 鍒犻櫎鑺傜偣
@@ -740,14 +742,17 @@
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)) {
+ if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight -2)) {
// 鑾峰彇缁勪欢绗竴涓妭鐐�
let first = scrollDom.children[0]
// 鍒犻櫎鑺傜偣
@@ -764,15 +769,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 >= (scrollDom.scrollHeight - scrollDom.clientHeight - 2)) {
// 鑾峰彇缁勪欢绗竴涓妭鐐�
let first = scrollDom.children[0]
// 鍒犻櫎鑺傜偣
@@ -789,11 +797,16 @@
onMounted(() => {
if (!departId.value) return;
+ window.addEventListener('resize', () => {
+ init()
+ })
timer5.value = setInterval(init(), 60000)
})
</script>
<style lang="scss" scoped>
+
+$fixed-height: 690px;
.content1 {
flex: 1;
width: 100%;
@@ -807,7 +820,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 +845,7 @@
.content_left_item1_content {
width: 100%;
- height: 246px;
+ height: calc(100% - 36px);
padding: 20px;
overflow: hidden;
box-sizing: border-box;
@@ -843,7 +856,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 +983,7 @@
.main_container {
width: 100%;
- height: calc(100% - 35px);
+ height: calc(100% - 38px);
.scroll_container {
width: 100%;
@@ -1281,7 +1295,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 +1481,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