From 9c6115340a7cd7e36198a0d0503068a260d30581 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期五, 03 三月 2023 16:32:25 +0800
Subject: [PATCH] 1.节拍工价、工单新增控制必须设置计件单价

---
 src/views/kb/cjsc.vue |  291 ++++++++++++++++++++++++++++++++++++----------------------
 1 files changed, 180 insertions(+), 111 deletions(-)

diff --git a/src/views/kb/cjsc.vue b/src/views/kb/cjsc.vue
index 9a72762..6c7caef 100644
--- a/src/views/kb/cjsc.vue
+++ b/src/views/kb/cjsc.vue
@@ -1,6 +1,12 @@
 <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%" />
@@ -15,7 +21,7 @@
         <div style="width: 380px;height: 969px;" class="flex_c_b">
           <div>
             <div class="smallTitle">
-              <svg-icon icon-class="eqp_name" class="svg_class" />
+              <svg-icon icon-class="cxmc" class="svg_class" />
               瑁呴厤涓�绾�
             </div>
             <div class="lineContent horn">
@@ -29,7 +35,7 @@
                 height="428"
               >
                 <el-table-column
-                  prop="xsdd"
+                  prop="saleOrderCode"
                   label="閿�鍞崟鍙�"
                   width="165"
                 />
@@ -38,9 +44,14 @@
                   prop="partname"
                   width="120"
                   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="sl"
+                  prop="good_qty"
                   label="鏁伴噺"
                   width="80"
                 />
@@ -49,7 +60,7 @@
           </div>
           <div>
             <div class="smallTitle">
-              <svg-icon icon-class="eqp_name" class="svg_class" />
+              <svg-icon icon-class="cxmc" class="svg_class" />
               瑁呴厤浜岀嚎
             </div>
             <div class="lineContent horn">
@@ -63,7 +74,7 @@
                 height="428"
               >
                 <el-table-column
-                  prop="xsdd"
+                  prop="saleOrderCode"
                   label="閿�鍞崟鍙�"
                   width="165"
                 />
@@ -72,9 +83,14 @@
                   prop="partname"
                   width="120"
                   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="sl"
+                  prop="good_qty"
                   label="鏁伴噺"
                   width="80"
                 />
@@ -99,21 +115,21 @@
               height="927"
             >
               <el-table-column
-                type="index"
+                type="RowNum"
                 label="搴忓彿"
                 width="60"
               >
-                <!--                <template slot-scope="{row}">-->
-                <!--                  <div-->
-                <!--                    :style="{color:row.eqp_name==='瑁呴厤涓�绾�'?'#FFFF77':row.eqp_name==='瑁呴厤浜岀嚎'?'#FF8888':row.eqp_name==='瑁呴厤涓夌嚎'?'#D28EFF':'#66FFFF'}"-->
-                <!--                  > {{ row.index }}-->
-                <!--                  </div>-->
-                <!--                </template>-->
+                <template slot-scope="{row}">
+                  <div
+                    :style="{color:row.eqp_name==='瑁呴厤涓�绾�'?'#FFFF77':row.eqp_name==='瑁呴厤浜岀嚎'?'#FF8888':row.eqp_name==='瑁呴厤涓夌嚎'?'#D28EFF':'#66FFFF'}"
+                  > {{ row.RowNum }}
+                  </div>
+                </template>
               </el-table-column>
               <el-table-column
                 prop="wo_code"
                 label="鍔犲伐鍗曞彿"
-                width="165"
+                width="190"
               >
                 <template slot-scope="{row}">
                   <div
@@ -141,6 +157,7 @@
               >
                 <template slot-scope="{row}">
                   <div
+                    class="ellipsis"
                     :style="{color:row.eqp_name==='瑁呴厤涓�绾�'?'#FFFF77':row.eqp_name==='瑁呴厤浜岀嚎'?'#FF8888':row.eqp_name==='瑁呴厤涓夌嚎'?'#D28EFF':'#66FFFF'}"
                   > {{ row.partname }}
                   </div>
@@ -161,34 +178,39 @@
               <el-table-column
                 prop="plan_startdate"
                 label="棰勮寮�濮�"
-                width="130"
+                width="125"
               >
                 <template slot-scope="{row}">
                   <div
+                    v-if="row.plan_startdate"
                     :style="{color:row.eqp_name==='瑁呴厤涓�绾�'?'#FFFF77':row.eqp_name==='瑁呴厤浜岀嚎'?'#FF8888':row.eqp_name==='瑁呴厤涓夌嚎'?'#D28EFF':'#66FFFF'}"
                   > {{ row.plan_startdate.substring(0, 11) }}
                   </div>
+                  <div v-else />
                 </template>
               </el-table-column>
               <el-table-column
                 prop="plan_enddate"
                 label="棰勮瀹屽伐"
-                width="130"
+                width="125"
               >
                 <template slot-scope="{row}">
                   <div
+                    v-if="row.plan_enddate"
                     :style="{color:row.eqp_name==='瑁呴厤涓�绾�'?'#FFFF77':row.eqp_name==='瑁呴厤浜岀嚎'?'#FF8888':row.eqp_name==='瑁呴厤涓夌嚎'?'#D28EFF':'#66FFFF'}"
                   > {{ row.plan_enddate.substring(0, 11) }}
                   </div>
+                  <div v-else />
                 </template>
               </el-table-column>
               <el-table-column
                 prop="stepname"
                 label="宸ュ簭"
-                width="90"
+                width="100"
               >
                 <template slot-scope="{row}">
                   <div
+                    class="ellipsis"
                     :style="{color:row.eqp_name==='瑁呴厤涓�绾�'?'#FFFF77':row.eqp_name==='瑁呴厤浜岀嚎'?'#FF8888':row.eqp_name==='瑁呴厤涓夌嚎'?'#D28EFF':'#66FFFF'}"
                   > {{ row.stepname }}
                   </div>
@@ -200,11 +222,7 @@
                 width="130"
               >
                 <template slot-scope="{row}">
-                  <!--                  <div-->
-                  <!--                    :style="{color:row.eqp_name==='瑁呴厤涓�绾�'?'#FFFF77':row.eqp_name==='瑁呴厤浜岀嚎'?'#FF8888':row.eqp_name==='瑁呴厤涓夌嚎'?'#D28EFF':'#66FFFF'}"-->
-                  <!--                  > {{ row.scjdxxx }}-->
-                  <!--                  </div>-->
-                  <!--                  <div :id="'progress'+row.xh" style="width: 100%;height:30px" />-->
+                  <div :id="'progress'+row.RowNum" style="width: 100%;height:30px" />
                 </template>
               </el-table-column>
             </el-table>
@@ -213,7 +231,7 @@
         <div style="width: 380px;height: 969px;" class="flex_c_b">
           <div>
             <div class="smallTitle">
-              <svg-icon icon-class="eqp_name" class="svg_class" />
+              <svg-icon icon-class="cxmc" class="svg_class" />
               瑁呴厤涓夌嚎
             </div>
             <div class="lineContent horn">
@@ -227,7 +245,7 @@
                 height="428"
               >
                 <el-table-column
-                  prop="xsdd"
+                  prop="saleOrderCode"
                   label="閿�鍞崟鍙�"
                   width="165"
                 />
@@ -236,9 +254,14 @@
                   prop="partname"
                   width="120"
                   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="sl"
+                  prop="good_qty"
                   label="鏁伴噺"
                   width="80"
                 />
@@ -247,7 +270,7 @@
           </div>
           <div>
             <div class="smallTitle">
-              <svg-icon icon-class="eqp_name" class="svg_class" />
+              <svg-icon icon-class="cxmc" class="svg_class" />
               瑁呴厤鍥涚嚎
             </div>
             <div class="lineContent horn">
@@ -261,7 +284,7 @@
                 height="428"
               >
                 <el-table-column
-                  prop="xsdd"
+                  prop="saleOrderCode"
                   label="閿�鍞崟鍙�"
                   width="165"
                 />
@@ -270,9 +293,14 @@
                   prop="partname"
                   width="120"
                   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="sl"
+                  prop="good_qty"
                   label="鏁伴噺"
                   width="80"
                 />
@@ -289,7 +317,8 @@
 <script>
 import './kbCommon.css'
 import { kbTop, loadEcharts, progress } from '@/utils/myEcharts'
-import { WkshpContentData } from '@/api/dzkb'
+import { WkshpContentData, WkshpLineData } from '@/api/dzkb'
+import clearAllChildren from '@/utils/global'
 
 export default {
   name: 'Cjsc',
@@ -303,35 +332,13 @@
       tableDataRightTop: [],
       tableDataRightTopTemp: [],
       tableDataRightBottom: [],
-      tableDataRightBottomTemp: [
-        { xsdd: 'MO-2022111501', partname: '浜у搧鍚嶇О1', sl: '100' },
-        { xsdd: 'MO-2022111502', partname: '浜у搧鍚嶇О2', sl: '100' },
-        { xsdd: 'MO-2022111503', partname: '浜у搧鍚嶇О3', sl: '100' },
-        { xsdd: 'MO-2022111504', partname: '浜у搧鍚嶇О4', sl: '100' },
-        { xsdd: 'MO-2022111505', partname: '浜у搧鍚嶇О5', sl: '100' },
-        { xsdd: 'MO-2022111506', partname: '浜у搧鍚嶇О6', sl: '100' },
-        { xsdd: 'MO-2022111507', partname: '浜у搧鍚嶇О7', sl: '100' },
-        { xsdd: 'MO-2022111508', partname: '浜у搧鍚嶇О8', sl: '100' },
-        { xsdd: 'MO-2022111509', partname: '浜у搧鍚嶇О9', sl: '100' },
-        { xsdd: 'MO-2022111510', partname: '浜у搧鍚嶇О10', sl: '100' },
-        { xsdd: 'MO-2022111511', partname: '浜у搧鍚嶇О11', sl: '100' },
-        { xsdd: 'MO-2022111512', partname: '浜у搧鍚嶇О12', sl: '100' },
-        { xsdd: 'MO-2022111513', partname: '浜у搧鍚嶇О13', sl: '100' },
-        { xsdd: 'MO-2022111514', partname: '浜у搧鍚嶇О14', sl: '100' },
-        { xsdd: 'MO-2022111515', partname: '浜у搧鍚嶇О15', sl: '100' },
-        { xsdd: 'MO-2022111516', partname: '浜у搧鍚嶇О16', sl: '100' },
-        { xsdd: 'MO-2022111517', partname: '浜у搧鍚嶇О17', sl: '100' },
-        { xsdd: 'MO-2022111518', partname: '浜у搧鍚嶇О18', sl: '100' },
-        { xsdd: 'MO-2022111519', partname: '浜у搧鍚嶇О19', sl: '100' },
-        { xsdd: 'MO-2022111520', partname: '浜у搧鍚嶇О20', sl: '100' },
-        { xsdd: 'MO-2022111521', partname: '浜у搧鍚嶇О21', sl: '100' },
-        { xsdd: 'MO-2022111522', partname: '浜у搧鍚嶇О22', sl: '100' },
-        { xsdd: 'MO-2022111523', partname: '浜у搧鍚嶇О23', sl: '100' },
-        { xsdd: 'MO-2022111524', partname: '浜у搧鍚嶇О24', sl: '100' }
-      ],
+      tableDataRightBottomTemp: [],
 
       tableDataCenterTop: [],
-      tableDataCenterTopTemp: []
+      tableDataCenterTopTemp: [],
+
+      starsCount: 800, // 鏄熸槦鏁伴噺
+      distance: 900 // 闂磋窛
     }
   },
   created() {
@@ -352,8 +359,23 @@
 
     // 涓棿琛ㄦ牸鏁版嵁鍐呭
     this.getCenterTableDataSetInterval()
+
+    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})`
+      })
+    },
     // 涓棿閮ㄥ垎鐨勮〃鏍�
     getCenterTableDataSetInterval() {
       let startValue = 0 // 鍒濆鍊�
@@ -361,7 +383,6 @@
 
       WkshpContentData().then(res => {
         this.tableDataCenterTopTemp = res.data
-
         this.tableDataCenterTop = this.tableDataCenterTopTemp.slice(startValue, startValue + scale)
 
         const loop = Math.floor(this.tableDataCenterTopTemp.length / scale)// 闇�瑕佸惊鐜殑娆℃暟
@@ -377,14 +398,14 @@
           nowLoop++
           this.$nextTick(() => {
             this.tableDataCenterTop.forEach(i => {
-              loadEcharts('progress' + i.xh, progress(i.good_qty, i.scjd2))
+              loadEcharts('progress' + i.RowNum, progress(i.good_qty, i.plan_qty))
             })
           })
         }, 1000 * 10)
 
         this.$nextTick(() => {
           this.tableDataCenterTop.forEach(i => {
-            loadEcharts('progress' + i.xh, progress(i.good_qty, i.scjd2))
+            loadEcharts('progress' + i.RowNum, progress(i.good_qty, i.plan_qty))
           })
         })
       })
@@ -395,76 +416,90 @@
       let startValue = 0 // 鍒濆鍊�
       const scale = 10// 鍒诲害
 
-      this.tableDataLeftTop = this.tableDataLeftTopTemp.slice(startValue, startValue + scale)
-
-      const loop = Math.floor(this.tableDataLeftTopTemp.length / scale)// 闇�瑕佸惊鐜殑娆℃暟
-      let nowLoop = 0// 褰撳墠寰幆鐨勬鏁�
-
-      setInterval(() => {
-        startValue = startValue + scale
+      WkshpLineData({ LineCode: '001' }).then(res => {
+        this.tableDataLeftTopTemp = res.data
         this.tableDataLeftTop = this.tableDataLeftTopTemp.slice(startValue, startValue + scale)
-        if (nowLoop === loop) {
-          this.getLeftTopTableDataSetInterval()
-        }
-        nowLoop++
-      }, 1000 * 5)
+
+        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)
+      })
     },
     // 鑾峰彇宸︿笅鏁版嵁骞跺畾鏃跺埛鏂�
     getLeftBottomTableDataSetInterval() {
       let startValue = 0 // 鍒濆鍊�
       const scale = 10// 鍒诲害
 
-      this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale)
-
-      const loop = Math.floor(this.tableDataLeftBottomTemp.length / scale)// 闇�瑕佸惊鐜殑娆℃暟
-      let nowLoop = 0// 褰撳墠寰幆鐨勬鏁�
-
-      setInterval(() => {
-        startValue = startValue + scale
+      WkshpLineData({ LineCode: '002' }).then(res => {
+        this.tableDataLeftBottomTemp = res.data
         this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale)
-        if (nowLoop === loop) {
-          this.getLeftBottomTableDataSetInterval()
-        }
-        nowLoop++
-      }, 1000 * 5)
+
+        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)
+      })
     },
     // 鑾峰彇鍙充笂鏁版嵁骞跺畾鏃跺埛鏂�
     getRightTopTableDataSetInterval() {
       let startValue = 0 // 鍒濆鍊�
       const scale = 10// 鍒诲害
 
-      this.tableDataRightTop = this.tableDataRightTopTemp.slice(startValue, startValue + scale)
-
-      const loop = Math.floor(this.tableDataRightTopTemp.length / scale)// 闇�瑕佸惊鐜殑娆℃暟
-      let nowLoop = 0// 褰撳墠寰幆鐨勬鏁�
-
-      setInterval(() => {
-        startValue = startValue + scale
+      WkshpLineData({ LineCode: '003' }).then(res => {
         this.tableDataRightTop = this.tableDataRightTopTemp.slice(startValue, startValue + scale)
-        if (nowLoop === loop) {
-          this.getRightTopTableDataSetInterval()
-        }
-        nowLoop++
-      }, 1000 * 5)
+
+        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)
+      })
     },
     // 鑾峰彇鍙充笅鏁版嵁骞跺畾鏃跺埛鏂�
     getRightBottomTableDataSetInterval() {
       let startValue = 0 // 鍒濆鍊�
       const scale = 10// 鍒诲害
 
-      this.tableDataRightBottom = this.tableDataRightBottomTemp.slice(startValue, startValue + scale)
-
-      const loop = Math.floor(this.tableDataRightBottomTemp.length / scale)// 闇�瑕佸惊鐜殑娆℃暟
-      let nowLoop = 0// 褰撳墠寰幆鐨勬鏁�
-
-      setInterval(() => {
-        startValue = startValue + scale
+      WkshpLineData({ LineCode: '004' }).then(res => {
         this.tableDataRightBottom = this.tableDataRightBottomTemp.slice(startValue, startValue + scale)
-        if (nowLoop === loop) {
-          this.getRightBottomTableDataSetInterval()
-        }
-        nowLoop++
-      }, 1000 * 5)
+
+        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)
+      })
     },
 
     // 鑾峰彇topEcharts
@@ -554,3 +589,37 @@
 }
 
 </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