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 |  178 ++++++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 134 insertions(+), 44 deletions(-)

diff --git a/src/views/kb/zhkb.vue b/src/views/kb/zhkb.vue
index 71306e9..c6e29ee 100644
--- a/src/views/kb/zhkb.vue
+++ b/src/views/kb/zhkb.vue
@@ -1,6 +1,11 @@
 <template>
   <div>
     <div class="kb_dashboard">
+      <!--    鏄熺┖鑳屾櫙-->
+      <!--      <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">
           <div id="topBarLeft" style="width:600px;height:100%" />
@@ -115,7 +120,7 @@
 
                 <el-table-column
                   prop="status"
-                  width="70"
+                  width="80"
                   label="鐘舵��"
                 >
                   <template slot-scope="{row}">
@@ -146,12 +151,12 @@
                 <el-table-column
                   prop="wo_code"
                   label="鍔犲伐鍗曞彿"
-                  width="190"
+                  width="194"
                 />
                 <el-table-column
                   prop="partname"
                   label="浜у搧鍚嶇О"
-                  width="100"
+                  width="350"
                 >
                   <template slot-scope="{row}">
                     <div v-if="row.partname" class="ellipsis">{{ row.partname }}</div>
@@ -161,44 +166,44 @@
                 <el-table-column
                   prop="plan_qty"
                   label="浠诲姟鏁伴噺"
-                  width="100"
+                  width="105"
                 />
                 <el-table-column
                   prop="good_qty"
                   label="瀹屽伐鏁伴噺"
-                  width="100"
+                  width="105"
                 />
                 <el-table-column
                   prop="ng_qty"
                   label="涓嶈壇鏁伴噺"
-                  width="100"
+                  width="105"
                 />
                 <el-table-column
                   label="瀹屾垚鐜�"
-                  width="100"
+                  width="105"
                 >
                   <template slot-scope="{row}">
                     <div>{{ parseFloat((row.good_qty * 100 / row.plan_qty).toFixed(2)) }}%</div>
                   </template>
                 </el-table-column>
-                <el-table-column
+                <!--                <el-table-column-->
 
-                  label="棰勮寮�濮�"
-                  width="140"
-                >
-                  <template slot-scope="{row}">
-                    <div>{{ row.planstartdate.substring(0, 10) }}</div>
-                  </template>
-                </el-table-column>
-                <el-table-column
-                  prop=""
-                  label="棰勮缁撴潫"
-                  width="140"
-                >
-                  <template slot-scope="{row}">
-                    <div>{{ row.planenddate.substring(0, 10) }}</div>
-                  </template>
-                </el-table-column>
+                <!--                  label="棰勮寮�濮�"-->
+                <!--                  width="140"-->
+                <!--                >-->
+                <!--                  <template slot-scope="{row}">-->
+                <!--                    <div>{{ row.planstartdate.substring(0, 10) }}</div>-->
+                <!--                  </template>-->
+                <!--                </el-table-column>-->
+                <!--                <el-table-column-->
+                <!--                  prop=""-->
+                <!--                  label="棰勮缁撴潫"-->
+                <!--                  width="140"-->
+                <!--                >-->
+                <!--                  <template slot-scope="{row}">-->
+                <!--                    <div>{{ row.planenddate.substring(0, 10) }}</div>-->
+                <!--                  </template>-->
+                <!--                </el-table-column>-->
               </el-table>
             </div>
 
@@ -228,14 +233,19 @@
                 />
                 <el-table-column
                   prop="linename"
-                  width="165"
+                  width="125"
                   label="浜х嚎"
                 />
                 <el-table-column
                   prop="partname"
-                  width="120"
+                  width="160"
                   label="浜у搧"
-                />
+                >
+                  <template slot-scope="{row}">
+                    <div v-if="row.partname" class="ellipsis">{{ row.partname }}</div>
+                    <div v-else>/</div>
+                  </template>
+                </el-table-column>
                 <el-table-column
                   prop="good_qty"
                   label="鏁伴噺"
@@ -287,7 +297,10 @@
       tableDataLeftBottom: [],
       tableDataLeftBottomTemp: [],
       lineContent3: [],
-      ShopArr: [] // 杞﹂棿缂栫爜鏁扮粍
+      ShopArr: [], // 杞﹂棿缂栫爜鏁扮粍
+
+      starsCount: 800, // 鏄熸槦鏁伴噺
+      distance: 900 // 闂磋窛
 
     }
   },
@@ -303,8 +316,22 @@
     this.getTopBar()
 
     this.getShopSearch()
+    // this.setStarsRef()
   },
   methods: {
+    setStarsRef() {
+      const starNodes = Array.from(this.$refs.starsRef.children)
+      starNodes.forEach(item => {
+        const speed = 0.2 + Math.random() * 1
+        const thisDistance = this.distance + Math.random() * 300
+        item.style.transformOrigin = `0 0 ${thisDistance}px`
+        item.style.transform = `
+        translate3d(0,0,-${thisDistance}px)
+        rotateY(${Math.random() * 360}deg)
+        rotateX(${Math.random() * -50}deg)
+        scale(${speed},${speed})`
+      })
+    },
     // 鑾峰彇杞﹂棿缂栫爜
     async getShopSearch() {
       const res1 = await ShopSearch()
@@ -393,27 +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 = res.data
 
-        this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale)
+        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 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()
+              if (this.tableDataLeftBottom.length > 10) {
+                clearInterval(aaa)
+                this.getLeftBottomData()
+              }
+            })
           }
-
-          nowLoop++
-        }, 1000 * 10)
+        }, this.tableDataLeftBottom.length <= 10 ? 1000 * 5 : 100)
       })
     },
 
@@ -596,4 +647,43 @@
   border-radius: 50%;
 }
 
+::v-deep .el-table__body-wrapper{
+  overflow: hidden !important;
+}
+
+</style>
+
+<!--鏄熺┖-->
+<style lang="css" scoped>
+@keyframes rotate {
+  0% {
+    transform: perspective(400px) rotateZ(20deg) rotateX(-40deg) rotateY(0);
+  }
+  100% {
+    transform: perspective(400px) rotateZ(20deg) rotateX(-40deg) rotateY(-360deg);
+  }
+}
+
+.stars {
+  transform: perspective(500px);
+  transform-style: preserve-3d;
+  position: absolute;
+  perspective-origin: 50% 100%;
+  left: 45%;
+  animation: rotate 90s infinite linear;
+  bottom: 0;
+  z-index: 102;
+}
+
+.star {
+  width: 2px;
+  height: 2px;
+  /*background: #f7f7b6;*/
+  background: #8edffc;
+  position: absolute;
+  left: 0;
+  top: 0;
+  backface-visibility: hidden;
+  z-index: 102;
+}
 </style>

--
Gitblit v1.9.3