From c588a47c9c7fbcbe6e0a479cfb081ffa4db2a94c Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 11 五月 2023 17:35:44 +0800
Subject: [PATCH] 1.生产进度报表提交
---
src/views/kb/cjsc.vue | 211 +++++++++++++++++++++++++++++++++++++---------------
1 files changed, 150 insertions(+), 61 deletions(-)
diff --git a/src/views/kb/cjsc.vue b/src/views/kb/cjsc.vue
index b0720e9..b715e21 100644
--- a/src/views/kb/cjsc.vue
+++ b/src/views/kb/cjsc.vue
@@ -408,11 +408,12 @@
const timer = setInterval(() => {
startValue = startValue + scale
this.tableDataCenterTop = this.tableDataCenterTopTemp.slice(startValue, startValue + scale)
+ nowLoop++
if (nowLoop === loop) {
clearInterval(timer)
this.getCenterTableDataSetInterval()
}
- nowLoop++
+
this.$nextTick(() => {
this.tableDataCenterTop.forEach(i => {
loadEcharts('progress' + i.RowNum, progress(i.good_qty, i.plan_qty))
@@ -430,94 +431,182 @@
// 鑾峰彇宸︿笂鏁版嵁骞跺畾鏃跺埛鏂�
getLeftTopTableDataSetInterval() {
- let startValue = 0 // 鍒濆鍊�
- const scale = 10// 鍒诲害
+ // let startValue = 0 // 鍒濆鍊�
+ // const scale = 10// 鍒诲害
+ //
+ // WkshpLineData({ LineCode: '001' }).then(res => {
+ // this.tableDataLeftTopTemp = res.data
+ // this.tableDataLeftTop = this.tableDataLeftTopTemp.slice(startValue, startValue + scale)
+ //
+ // const loop = Math.floor(this.tableDataLeftTopTemp.length / scale)// 闇�瑕佸惊鐜殑娆℃暟
+ // let nowLoop = 0// 褰撳墠寰幆鐨勬鏁�
+ //
+ // const timer = setInterval(() => {
+ // startValue = startValue + scale
+ // this.tableDataLeftTop = this.tableDataLeftTopTemp.slice(startValue, startValue + scale)
+ // if (nowLoop === loop) {
+ // clearInterval(timer)
+ // this.getLeftTopTableDataSetInterval()
+ // }
+ // nowLoop++
+ // }, 1000 * 10)
+ // })
WkshpLineData({ LineCode: '001' }).then(res => {
- this.tableDataLeftTopTemp = res.data
- this.tableDataLeftTop = this.tableDataLeftTopTemp.slice(startValue, startValue + scale)
-
- const loop = Math.floor(this.tableDataLeftTopTemp.length / scale)// 闇�瑕佸惊鐜殑娆℃暟
- let nowLoop = 0// 褰撳墠寰幆鐨勬鏁�
-
+ this.tableDataLeftTop = res.data
+ const divData = this.$refs.tableDataLeftTopRef.bodyWrapper
+ // 鎷垮埌鍏冪礌鍚庯紝瀵瑰厓绱犺繘琛屽畾鏃跺鍔犺窛绂婚《閮ㄨ窛绂伙紝瀹炵幇婊氬姩鏁堟灉(姝ら厤缃负姣�100姣绉诲姩1鍍忕礌)
const timer = setInterval(() => {
- startValue = startValue + scale
- this.tableDataLeftTop = this.tableDataLeftTopTemp.slice(startValue, startValue + scale)
- if (nowLoop === loop) {
- clearInterval(timer)
- this.getLeftTopTableDataSetInterval()
+ // 鍏冪礌鑷璺濈椤堕儴1鍍忕礌
+ divData.scrollTop += 1
+ // 鍒ゆ柇鍏冪礌鏄惁婊氬姩鍒板簳閮�(鍙楂樺害+璺濈椤堕儴=鏁翠釜楂樺害)
+ if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {
+ // 閲嶇疆table璺濈椤堕儴璺濈
+ divData.scrollTop = 0
+ WkshpLineData({ LineCode: '001' }).then(res => {
+ this.tableDataLeftTop = res.data
+ if (this.tableDataLeftTop.length > 10) {
+ clearInterval(timer)
+ this.getLeftTopTableDataSetInterval()
+ }
+ })
}
- nowLoop++
- }, 1000 * 10)
+ }, this.tableDataLeftTop.length <= 10 ? 1000 * 20 : 100)
})
},
// 鑾峰彇宸︿笅鏁版嵁骞跺畾鏃跺埛鏂�
getLeftBottomTableDataSetInterval() {
- let startValue = 0 // 鍒濆鍊�
- const scale = 10// 鍒诲害
+ // let startValue = 0 // 鍒濆鍊�
+ // const scale = 10// 鍒诲害
+ //
+ // WkshpLineData({ LineCode: '002' }).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.getLeftBottomTableDataSetInterval()
+ // }
+ // nowLoop++
+ // }, 1000 * 10)
+ // })
WkshpLineData({ LineCode: '002' }).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// 褰撳墠寰幆鐨勬鏁�
-
+ this.tableDataLeftBottom = res.data
+ const divData = this.$refs.tableDataLeftBottomRef.bodyWrapper
+ // 鎷垮埌鍏冪礌鍚庯紝瀵瑰厓绱犺繘琛屽畾鏃跺鍔犺窛绂婚《閮ㄨ窛绂伙紝瀹炵幇婊氬姩鏁堟灉(姝ら厤缃负姣�100姣绉诲姩1鍍忕礌)
const timer = setInterval(() => {
- startValue = startValue + scale
- this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale)
- if (nowLoop === loop) {
- clearInterval(timer)
- this.getLeftBottomTableDataSetInterval()
+ // 鍏冪礌鑷璺濈椤堕儴1鍍忕礌
+ divData.scrollTop += 1
+ // 鍒ゆ柇鍏冪礌鏄惁婊氬姩鍒板簳閮�(鍙楂樺害+璺濈椤堕儴=鏁翠釜楂樺害)
+ if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {
+ // 閲嶇疆table璺濈椤堕儴璺濈
+ divData.scrollTop = 0
+ WkshpLineData({ LineCode: '002' }).then(res => {
+ this.tableDataLeftBottom = res.data
+ if (this.tableDataLeftBottom.length > 10) {
+ clearInterval(timer)
+ this.getLeftBottomTableDataSetInterval()
+ }
+ })
}
- nowLoop++
- }, 1000 * 10)
+ }, this.tableDataLeftBottom.length <= 10 ? 1000 * 20 : 100)
})
},
// 鑾峰彇鍙充笂鏁版嵁骞跺畾鏃跺埛鏂�
getRightTopTableDataSetInterval() {
- let startValue = 0 // 鍒濆鍊�
- const scale = 10// 鍒诲害
+ // let startValue = 0 // 鍒濆鍊�
+ // const scale = 10// 鍒诲害
+ //
+ // WkshpLineData({ LineCode: '003' }).then(res => {
+ // this.tableDataRightTopTemp = res.data
+ // this.tableDataRightTop = this.tableDataRightTopTemp.slice(startValue, startValue + scale)
+ //
+ // const loop = Math.floor(this.tableDataRightTopTemp.length / scale)// 闇�瑕佸惊鐜殑娆℃暟
+ // let nowLoop = 0// 褰撳墠寰幆鐨勬鏁�
+ //
+ // const timer = setInterval(() => {
+ // startValue = startValue + scale
+ // this.tableDataRightTop = this.tableDataRightTopTemp.slice(startValue, startValue + scale)
+ // if (nowLoop === loop) {
+ // clearInterval(timer)
+ // this.getRightTopTableDataSetInterval()
+ // }
+ // nowLoop++
+ // }, 1000 * 10)
+ // })
WkshpLineData({ LineCode: '003' }).then(res => {
- this.tableDataRightTopTemp = res.data
- this.tableDataRightTop = this.tableDataRightTopTemp.slice(startValue, startValue + scale)
-
- const loop = Math.floor(this.tableDataRightTopTemp.length / scale)// 闇�瑕佸惊鐜殑娆℃暟
- let nowLoop = 0// 褰撳墠寰幆鐨勬鏁�
-
+ this.tableDataRightTop = res.data
+ const divData = this.$refs.tableDataRightTopRef.bodyWrapper
+ // 鎷垮埌鍏冪礌鍚庯紝瀵瑰厓绱犺繘琛屽畾鏃跺鍔犺窛绂婚《閮ㄨ窛绂伙紝瀹炵幇婊氬姩鏁堟灉(姝ら厤缃负姣�100姣绉诲姩1鍍忕礌)
const timer = setInterval(() => {
- startValue = startValue + scale
- this.tableDataRightTop = this.tableDataRightTopTemp.slice(startValue, startValue + scale)
- if (nowLoop === loop) {
- clearInterval(timer)
- this.getRightTopTableDataSetInterval()
+ // 鍏冪礌鑷璺濈椤堕儴1鍍忕礌
+ divData.scrollTop += 1
+ // 鍒ゆ柇鍏冪礌鏄惁婊氬姩鍒板簳閮�(鍙楂樺害+璺濈椤堕儴=鏁翠釜楂樺害)
+ if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {
+ // 閲嶇疆table璺濈椤堕儴璺濈
+ divData.scrollTop = 0
+ WkshpLineData({ LineCode: '003' }).then(res => {
+ this.tableDataRightTop = res.data
+ if (this.tableDataRightTop.length > 10) {
+ clearInterval(timer)
+ this.getRightTopTableDataSetInterval()
+ }
+ })
}
- nowLoop++
- }, 1000 * 10)
+ }, this.tableDataRightTop.length <= 10 ? 1000 * 20 : 100)
})
},
// 鑾峰彇鍙充笅鏁版嵁骞跺畾鏃跺埛鏂�
getRightBottomTableDataSetInterval() {
- let startValue = 0 // 鍒濆鍊�
- const scale = 10// 鍒诲害
+ // let startValue = 0 // 鍒濆鍊�
+ // const scale = 10// 鍒诲害
+ //
+ // WkshpLineData({ LineCode: '004' }).then(res => {
+ // this.tableDataRightBottomTemp = res.data
+ // this.tableDataRightBottom = this.tableDataRightBottomTemp.slice(startValue, startValue + scale)
+ //
+ // const loop = Math.floor(this.tableDataRightBottomTemp.length / scale)// 闇�瑕佸惊鐜殑娆℃暟
+ // let nowLoop = 0// 褰撳墠寰幆鐨勬鏁�
+ //
+ // const timer = setInterval(() => {
+ // startValue = startValue + scale
+ // this.tableDataRightBottom = this.tableDataRightBottomTemp.slice(startValue, startValue + scale)
+ // if (nowLoop === loop) {
+ // clearInterval(timer)
+ // this.getRightBottomTableDataSetInterval()
+ // }
+ // nowLoop++
+ // }, 1000 * 10)
+ // })
WkshpLineData({ LineCode: '004' }).then(res => {
- this.tableDataRightBottomTemp = res.data
- this.tableDataRightBottom = this.tableDataRightBottomTemp.slice(startValue, startValue + scale)
-
- const loop = Math.floor(this.tableDataRightBottomTemp.length / scale)// 闇�瑕佸惊鐜殑娆℃暟
- let nowLoop = 0// 褰撳墠寰幆鐨勬鏁�
-
+ this.tableDataRightBottom = res.data
+ const divData = this.$refs.tableDataRightBottomRef.bodyWrapper
+ // 鎷垮埌鍏冪礌鍚庯紝瀵瑰厓绱犺繘琛屽畾鏃跺鍔犺窛绂婚《閮ㄨ窛绂伙紝瀹炵幇婊氬姩鏁堟灉(姝ら厤缃负姣�100姣绉诲姩1鍍忕礌)
const timer = setInterval(() => {
- startValue = startValue + scale
- this.tableDataRightBottom = this.tableDataRightBottomTemp.slice(startValue, startValue + scale)
- if (nowLoop === loop) {
- clearInterval(timer)
- this.getRightBottomTableDataSetInterval()
+ // 鍏冪礌鑷璺濈椤堕儴1鍍忕礌
+ divData.scrollTop += 1
+ // 鍒ゆ柇鍏冪礌鏄惁婊氬姩鍒板簳閮�(鍙楂樺害+璺濈椤堕儴=鏁翠釜楂樺害)
+ if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {
+ // 閲嶇疆table璺濈椤堕儴璺濈
+ divData.scrollTop = 0
+ WkshpLineData({ LineCode: '004' }).then(res => {
+ this.tableDataRightBottom = res.data
+ if (this.tableDataRightBottom.length > 10) {
+ clearInterval(timer)
+ this.getRightBottomTableDataSetInterval()
+ }
+ })
}
- nowLoop++
- }, 1000 * 10)
+ }, this.tableDataRightBottom.length <= 10 ? 1000 * 20 : 100)
})
},
--
Gitblit v1.9.3