From 31ce9a56c95000f1567cda9f5821aadb5d1e4fd0 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 30 八月 2023 16:25:02 +0800
Subject: [PATCH] 1.递交

---
 src/views/kb/cjsc.vue |  227 ++++++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 160 insertions(+), 67 deletions(-)

diff --git a/src/views/kb/cjsc.vue b/src/views/kb/cjsc.vue
index 0245b6b..55b7f22 100644
--- a/src/views/kb/cjsc.vue
+++ b/src/views/kb/cjsc.vue
@@ -3,9 +3,9 @@
     <div class="kb_dashboard">
 
       <!--    鏄熺┖鑳屾櫙-->
-      <div ref="starsRef" class="stars">
-        <div v-for="(item, index) in starsCount" :key="index" class="star"/>
-      </div>
+      <!--      <div ref="starsRef" class="stars">-->
+      <!--        <div v-for="(item, index) in starsCount" :key="index" class="star"/>-->
+      <!--      </div>-->
 
       <div class="kb_header">
         <div class="flex_c_c kb_header_text">
@@ -29,28 +29,28 @@
               <el-table
                 ref="tableDataLeftTopRef"
                 :data="tableDataLeftTop"
-                class="tableData  tableDataCell"
-                style="width: 100%;"
+                class="tableData tableDataCell"
+                style="width: 100%;overflow: hidden"
                 :header-cell-style="headerCellStyle"
                 :cell-style="cellStyle"
-                height="927"
+                height="930"
               >
                 <el-table-column
                   prop="saleOrderCode"
-                  label="閿�鍞崟鍙�"
-                  width="130"
+                  label="鐢熶骇璁㈠崟"
+                  width="170"
                 >
                   <template slot-scope="{row}">
                     <div v-if="row.saleOrderCode" style="text-align: left" class="ellipsis">{{
                         row.saleOrderCode
                       }}
                     </div>
-                    <div v-else>/</div>
+                    <div v-else></div>
                   </template>
                 </el-table-column>
                 <el-table-column
                   prop="partname"
-                  width="170"
+                  width="143"
                   label="浜у搧鍚嶇О"
                 >
                   <template slot-scope="{row}">
@@ -61,7 +61,7 @@
                 <el-table-column
                   prop="good_qty"
                   label="鏁伴噺"
-                  width="70"
+                  width="60"
                 />
               </el-table>
             </div>
@@ -123,7 +123,7 @@
               </el-table-column>
               <el-table-column
                 prop="partname"
-                width="150"
+                width="120"
                 label="浜у搧鍚嶇О"
               >
                 <template slot-scope="{row}">
@@ -177,7 +177,7 @@
               <el-table-column
                 prop="stepname"
                 label="宸ュ簭"
-                width="100"
+                width="130"
               >
                 <template slot-scope="{row}">
                   <div
@@ -190,7 +190,7 @@
               <el-table-column
                 prop="scjdxxx"
                 label="鐢熶骇杩涘害"
-                width="130"
+                width="134"
               >
                 <template slot-scope="{row}">
                   <div :id="'progress'+row.RowNum" style="width: 100%;height:30px"/>
@@ -219,8 +219,8 @@
               >
                 <el-table-column
                   prop="saleOrderCode"
-                  label="閿�鍞崟鍙�"
-                  width="130"
+                  label="鐢熶骇璁㈠崟"
+                  width="170"
                 >
                   <template slot-scope="{row}">
                     <div v-if="row.saleOrderCode" style="text-align: left" class="ellipsis">{{
@@ -232,7 +232,7 @@
                 </el-table-column>
                 <el-table-column
                   prop="partname"
-                  width="170"
+                  width="140"
                   label="浜у搧鍚嶇О"
                 >
                   <template slot-scope="{row}">
@@ -243,7 +243,7 @@
                 <el-table-column
                   prop="good_qty"
                   label="鏁伴噺"
-                  width="70"
+                  width="60"
                 />
               </el-table>
             </div>
@@ -295,7 +295,7 @@
     // 涓棿琛ㄦ牸鏁版嵁鍐呭
     this.getCenterTableDataSetInterval()
 
-    this.setStarsRef()
+    // this.setStarsRef()
   },
   methods: {
     setStarsRef() {
@@ -318,25 +318,27 @@
 
       WkshpContentData().then(res => {
         this.tableDataCenterTopTemp = res.data
-        this.tableDataCenterTop = this.tableDataCenterTopTemp.slice(startValue, startValue + scale)
+        // this.tableDataCenterTop = this.tableDataCenterTopTemp.slice(startValue, startValue + scale)
+        this.tableDataCenterTop = this.tableDataCenterTopTemp
 
-        const loop = Math.floor(this.tableDataCenterTopTemp.length / scale)// 闇�瑕佸惊鐜殑娆℃暟
-        let nowLoop = 0// 褰撳墠寰幆鐨勬鏁�
-
-        const timer = setInterval(() => {
-          startValue = startValue + scale
-          this.tableDataCenterTop = this.tableDataCenterTopTemp.slice(startValue, startValue + scale)
-          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))
-            })
-          })
-        }, 1000 * 10)
+        // const loop = Math.floor(this.tableDataCenterTopTemp.length / scale)// 闇�瑕佸惊鐜殑娆℃暟
+        // let nowLoop = 0// 褰撳墠寰幆鐨勬鏁�
+        //
+        // const timer = setInterval(() => {
+        //   startValue = startValue + scale
+        //   this.tableDataCenterTop = this.tableDataCenterTopTemp.slice(startValue, startValue + scale)
+        //   nowLoop++
+        //   if (nowLoop === loop) {
+        //     clearInterval(timer)
+        //     this.getCenterTableDataSetInterval()
+        //   }
+        //
+        //   this.$nextTick(() => {
+        //     this.tableDataCenterTop.forEach(i => {
+        //       loadEcharts('progress' + i.RowNum, progress(i.good_qty, i.plan_qty))
+        //     })
+        //   })
+        // }, 1000 * 10)
 
         this.$nextTick(() => {
           this.tableDataCenterTop.forEach(i => {
@@ -344,53 +346,125 @@
           })
         })
       })
+
+      // WkshpContentData().then(res => {
+      //   this.tableDataCenterTop = res.data
+      //   const divData = this.$refs.tableDataLeftCenterRef.bodyWrapper
+      //   // 鎷垮埌鍏冪礌鍚庯紝瀵瑰厓绱犺繘琛屽畾鏃跺鍔犺窛绂婚《閮ㄨ窛绂伙紝瀹炵幇婊氬姩鏁堟灉(姝ら厤缃负姣�100姣绉诲姩1鍍忕礌)
+      //   const timer = setInterval(() => {
+      //     // 鍏冪礌鑷璺濈椤堕儴1鍍忕礌
+      //     divData.scrollTop += 1
+      //     // 鍒ゆ柇鍏冪礌鏄惁婊氬姩鍒板簳閮�(鍙楂樺害+璺濈椤堕儴=鏁翠釜楂樺害)
+      //     if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {
+      //       // 閲嶇疆table璺濈椤堕儴璺濈
+      //       divData.scrollTop = 0
+      //       WkshpContentData().then(res => {
+      //         this.tableDataCenterTop = res.data
+      //         if (this.tableDataCenterTop.length > 20) {
+      //           clearInterval(timer)
+      //           this.getCenterTableDataSetInterval()
+      //         }
+      //       })
+      //     }
+      //       this.$nextTick(() => {
+      //         this.tableDataCenterTop.forEach(i => {
+      //           loadEcharts('progress' + i.RowNum, progress(i.good_qty, i.plan_qty))
+      //         })
+      //       })
+      //   }, this.tableDataCenterTop.length <= 20 ? 1000 * 15 : 10)
+      // })
+
     },
 
     // 鑾峰彇宸︿笂鏁版嵁骞跺畾鏃跺埛鏂�
     getLeftTopTableDataSetInterval() {
-      let startValue = 0 // 鍒濆鍊�
-      const scale = 10// 鍒诲害
+      // let startValue = 0 // 鍒濆鍊�
+      // const scale = 24// 鍒诲害
+      //
+      // 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 > 24) {
+                clearInterval(timer)
+                this.getLeftTopTableDataSetInterval()
+              }
+            })
           }
-          nowLoop++
-        }, 1000 * 10)
+        }, this.tableDataLeftTop.length <= 24 ? 1000 * 10 : 100)
       })
     },
 
     // 鑾峰彇鍙充笂鏁版嵁骞跺畾鏃跺埛鏂�
     getRightTopTableDataSetInterval() {
-      let startValue = 0 // 鍒濆鍊�
-      const scale = 10// 鍒诲害
+      // let startValue = 0 // 鍒濆鍊�
+      // const scale = 24// 鍒诲害
+      //
+      // WkshpLineData({ LineCode: '002' }).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: '002' }).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: '002' }).then(res => {
+              this.tableDataRightTop = res.data
+              if (this.tableDataRightTop.length > 24) {
+                clearInterval(timer)
+                this.getRightTopTableDataSetInterval()
+              }
+            })
           }
-          nowLoop++
-        }, 1000 * 10)
+        }, this.tableDataRightTop.length <= 24 ? 1000 * 10 : 100)
       })
     },
 
@@ -486,6 +560,23 @@
   color: $main_color;
 }
 
+::v-deep .el-table__body-wrapper {
+  overflow: hidden !important;
+}
+
+::v-deep .el-table th.gutter {
+  display: none;
+  width: 0
+}
+
+//::v-deep .el-table colgroup col[name='gutter']{
+//  display: none;
+//  width: 0;
+//}
+//::v-deep .el-table__body{
+//  width: 100% !important;
+//}
+
 </style>
 <!--鏄熺┖-->
 <style lang="css" scoped>
@@ -520,4 +611,6 @@
   backface-visibility: hidden;
   z-index: 102;
 }
+
+
 </style>

--
Gitblit v1.9.3