From 886190e340964bb409bd15d62644f33fdb08f98e Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 26 四月 2023 13:13:44 +0800
Subject: [PATCH] 1.提交
---
src/views/kb/zhkb.vue | 61 ++++++++++++++++++++++--------
1 files changed, 45 insertions(+), 16 deletions(-)
diff --git a/src/views/kb/zhkb.vue b/src/views/kb/zhkb.vue
index 1694ba1..c6e29ee 100644
--- a/src/views/kb/zhkb.vue
+++ b/src/views/kb/zhkb.vue
@@ -151,7 +151,7 @@
<el-table-column
prop="wo_code"
label="鍔犲伐鍗曞彿"
- width="190"
+ width="194"
/>
<el-table-column
prop="partname"
@@ -420,26 +420,51 @@
},
// 浜х嚎鍔犲伐浠诲姟 宸︿笅鏁版嵁
getLeftBottomData() {
- let startValue = 0 // 鍒濆鍊�
- const scale = 10// 鍒诲害
+ // let startValue = 0 // 鍒濆鍊�
+ // const scale = 10// 鍒诲害
+ //
+ // LineSearchBottomLeftData({ shopcode: this.ShopArr.join(',') }).then(res => {
+ // this.tableDataLeftBottomTemp = res.data
+ // this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale)
+ //
+ // const loop = Math.floor(this.tableDataLeftBottomTemp.length / scale)// 闇�瑕佸惊鐜殑娆℃暟
+ // let nowLoop = 0// 褰撳墠寰幆鐨勬鏁�
+ //
+ // const timer = setInterval(() => {
+ // startValue = startValue + scale
+ // this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale)
+ // if (nowLoop === loop) {
+ // clearInterval(timer)
+ // this.getLeftBottomData()
+ // }
+ //
+ // nowLoop++
+ // }, 1000 * 10)
+ // })
LineSearchBottomLeftData({ shopcode: this.ShopArr.join(',') }).then(res => {
- this.tableDataLeftBottomTemp = res.data
- this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale)
+ this.tableDataLeftBottom = res.data
- const loop = Math.floor(this.tableDataLeftBottomTemp.length / scale)// 闇�瑕佸惊鐜殑娆℃暟
- let nowLoop = 0// 褰撳墠寰幆鐨勬鏁�
+ const divData = this.$refs.tableDataLeftBottomRef.bodyWrapper
+ // 鎷垮埌鍏冪礌鍚庯紝瀵瑰厓绱犺繘琛屽畾鏃跺鍔犺窛绂婚《閮ㄨ窛绂伙紝瀹炵幇婊氬姩鏁堟灉(姝ら厤缃负姣�100姣绉诲姩1鍍忕礌)
+ const aaa = setInterval(() => {
+ // 鍏冪礌鑷璺濈椤堕儴1鍍忕礌
+ divData.scrollTop += 1
+ // divData.scrollTop += divData.scrollHeight / this.tableData.length
+ // 鍒ゆ柇鍏冪礌鏄惁婊氬姩鍒板簳閮�(鍙楂樺害+璺濈椤堕儴=鏁翠釜楂樺害)
+ if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {
+ // 閲嶇疆table璺濈椤堕儴璺濈
+ divData.scrollTop = 0
+ LineSearchBottomLeftData({ shopcode: this.ShopArr.join(',') }).then(res => {
+ this.tableDataLeftBottom = res.data
- const timer = setInterval(() => {
- startValue = startValue + scale
- this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale)
- if (nowLoop === loop) {
- clearInterval(timer)
- this.getLeftBottomData()
+ if (this.tableDataLeftBottom.length > 10) {
+ clearInterval(aaa)
+ this.getLeftBottomData()
+ }
+ })
}
-
- nowLoop++
- }, 1000 * 10)
+ }, this.tableDataLeftBottom.length <= 10 ? 1000 * 5 : 100)
})
},
@@ -622,6 +647,10 @@
border-radius: 50%;
}
+::v-deep .el-table__body-wrapper{
+ overflow: hidden !important;
+}
+
</style>
<!--鏄熺┖-->
--
Gitblit v1.9.3