From 19d1b4dbc9b6ee74095361a62502509661a7079d Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 02 三月 2023 09:04:29 +0800
Subject: [PATCH] 1.看板加入星空背景

---
 src/views/kb/cjsc.vue     |   60 ++++++++
 src/views/kb/cjzl.vue     |   61 ++++++++
 src/views/kb/kbCommon.css |    2 
 src/views/kb/cgdd.vue     |   61 ++++++++
 src/views/kb/ckgl.vue     |  123 ++++++++++++----
 src/views/kb/zhkb.vue     |   59 ++++++++
 6 files changed, 328 insertions(+), 38 deletions(-)

diff --git a/src/views/kb/cgdd.vue b/src/views/kb/cgdd.vue
index 5a0d588..69fe599 100644
--- a/src/views/kb/cgdd.vue
+++ b/src/views/kb/cgdd.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%" />
@@ -259,7 +265,10 @@
       tableDataRank: [],
 
       PurchaseRight: null,
-      PurchaseLeftBottom: null
+      PurchaseLeftBottom: null,
+
+      starsCount: 800, // 鏄熸槦鏁伴噺
+      distance: 900 // 闂磋窛
 
     }
   },
@@ -277,10 +286,24 @@
     this.getEcharts()
     this.getPurchaseLeftBottom()
     this.getPurchaseRight()
+
+    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})`
+      })
+    },
     // 鑾峰彇topEcharts
     getTopBar() {
       loadEcharts('topBarLeft', kbTop())
@@ -419,3 +442,37 @@
   font-size: 18px;
 }
 </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>
diff --git a/src/views/kb/cjsc.vue b/src/views/kb/cjsc.vue
index 656c761..b9022a6 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%" />
@@ -307,7 +313,10 @@
       tableDataRightBottomTemp: [],
 
       tableDataCenterTop: [],
-      tableDataCenterTopTemp: []
+      tableDataCenterTopTemp: [],
+
+      starsCount: 800, // 鏄熸槦鏁伴噺
+      distance: 900 // 闂磋窛
     }
   },
   created() {
@@ -328,8 +337,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 // 鍒濆鍊�
@@ -543,3 +567,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>
diff --git a/src/views/kb/cjzl.vue b/src/views/kb/cjzl.vue
index 09e36df..383bf9a 100644
--- a/src/views/kb/cjzl.vue
+++ b/src/views/kb/cjzl.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%" />
@@ -164,7 +170,10 @@
       tableDataCenterTop: [],
       tableDataCenterTopTemp: [],
 
-      StepCode: '02'
+      StepCode: '02',
+
+      starsCount: 800, // 鏄熸槦鏁伴噺
+      distance: 900 // 闂磋窛
     }
   },
   created() {
@@ -181,8 +190,23 @@
     this.getCenterTableDataSetInterval()
 
     this.getEcharts()
+
+    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})`
+      })
+    },
     // 鑾峰彇Echarts
     getEcharts() {
       this.getLeftTopEcharts()
@@ -336,3 +360,38 @@
   color: $main_color;
 }
 </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>
diff --git a/src/views/kb/ckgl.vue b/src/views/kb/ckgl.vue
index 843e1ac..0245e03 100644
--- a/src/views/kb/ckgl.vue
+++ b/src/views/kb/ckgl.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,8 +21,8 @@
         <div style="width: 1350px; " class="flex_c_b">
           <div style="height: 470px;">
             <div class="smallTitle">
-              <svg-icon icon-class="cpdfh" class="svg_class" />
-              浜у搧寰呭彂璐�
+              <svg-icon icon-class="cpdrk" class="svg_class" />
+              鐢熶骇寰呭叆搴�
             </div>
             <div class="lineContent horn" style="height: 435px">
               <el-table
@@ -149,8 +155,8 @@
           </div>
           <div style="height: 470px;">
             <div class="smallTitle">
-              <svg-icon icon-class="cpdrk" class="svg_class" />
-              浜у搧寰呭叆搴�
+              <svg-icon icon-class="cpdfh" class="svg_class" />
+              浜у搧寰呭彂璐�
             </div>
             <div class="lineContent horn" style="height: 435px">
               <el-table
@@ -165,7 +171,7 @@
                 <el-table-column
                   prop="voucherdate"
                   label="鍗曟嵁鏃ユ湡"
-                  width="130"
+                  width="131"
                 >
                   <template slot-scope="{row}">
                     <div v-if="row.voucherdate" class="ellipsis">{{ row.voucherdate.substring(0, 10) }}</div>
@@ -175,7 +181,7 @@
                 <el-table-column
                   prop="wo"
                   label="鍗曟嵁缂栧彿"
-                  width="195"
+                  width="205"
                 >
                   <template slot-scope="{row}">
                     <div class="ellipsis">{{ row.wo }}</div>
@@ -184,7 +190,7 @@
                 <el-table-column
                   prop="customename"
                   label="瀹㈡埛"
-                  width="226"
+                  width="388"
                 >
                   <template slot-scope="{row}">
                     <div v-if="row.customename" class="ellipsis">{{ row.customename }}</div>
@@ -201,16 +207,16 @@
                 <!--                      <div v-else>/</div>-->
                 <!--                    </template>-->
                 <!--                  </el-table-column>-->
-                <el-table-column
-                  prop="SourceVoucherCode"
-                  label="鏉ユ簮鍗曞彿"
-                  width="185"
-                >
-                  <template slot-scope="{row}">
-                    <div v-if="row.SourceVoucherCode" class="ellipsis">{{ row.SourceVoucherCode }}</div>
-                    <div v-else>/</div>
-                  </template>
-                </el-table-column>
+                <!--                <el-table-column-->
+                <!--                  prop="SourceVoucherCode"-->
+                <!--                  label="鏉ユ簮鍗曞彿"-->
+                <!--                  width="185"-->
+                <!--                >-->
+                <!--                  <template slot-scope="{row}">-->
+                <!--                    <div v-if="row.SourceVoucherCode" class="ellipsis">{{ row.SourceVoucherCode }}</div>-->
+                <!--                    <div v-else>/</div>-->
+                <!--                  </template>-->
+                <!--                </el-table-column>-->
                 <!--                  <el-table-column-->
                 <!--                    prop="materiel_code"-->
                 <!--                    label="浜у搧缂栧彿"-->
@@ -219,7 +225,7 @@
                 <el-table-column
                   prop="materiel_name"
                   label="浜у搧鍚嶇О"
-                  width="170"
+                  width="200"
                 >
                   <template slot-scope="{row}">
                     <div v-if="row.materiel_name" class="ellipsis">{{ row.materiel_name }}</div>
@@ -238,7 +244,7 @@
                 <el-table-column
                   prop="quantity"
                   label="鏁伴噺"
-                  width="87"
+                  width="100"
                 >
                   <template slot-scope="{row}">
                     <div class="ellipsis">{{ row.quantity }}</div>
@@ -247,23 +253,23 @@
                 <el-table-column
                   prop="saleOutQuantity"
                   label="宸插彂璐ф暟閲�"
-                  width="100"
+                  width="120"
                 >
                   <template slot-scope="{row}">
                     <div v-if="row.saleOutQuantity" class="ellipsis">{{ row.saleOutQuantity }}</div>
                     <div v-else>0</div>
                   </template>
                 </el-table-column>
-                <el-table-column
-                  prop="priuserdefnvc1"
-                  label="妫�楠屾柟寮�"
-                  width="110"
-                >
-                  <template slot-scope="{row}">
-                    <div v-if="row.priuserdefnvc1">{{ row.priuserdefnvc1 }}</div>
-                    <div v-else>/</div>
-                  </template>
-                </el-table-column>
+                <!--                <el-table-column-->
+                <!--                  prop="priuserdefnvc1"-->
+                <!--                  label="妫�楠屾柟寮�"-->
+                <!--                  width="110"-->
+                <!--                >-->
+                <!--                  <template slot-scope="{row}">-->
+                <!--                    <div v-if="row.priuserdefnvc1">{{ row.priuserdefnvc1 }}</div>-->
+                <!--                    <div v-else>/</div>-->
+                <!--                  </template>-->
+                <!--                </el-table-column>-->
                 <!--                <el-table-column-->
                 <!--                  prop="priuserdefnvc2"-->
                 <!--                  label="妫�楠屼汉鍛�"-->
@@ -277,7 +283,7 @@
                 <el-table-column
                   prop="deliveryDate"
                   label="棰勮浜よ揣鏃ユ湡"
-                  width="141"
+                  width="200"
                 >
                   <template slot-scope="{row}">
                     <div v-if="row.deliveryDate">{{ row.deliveryDate.substring(0,10) }}</div>
@@ -324,7 +330,6 @@
   WareHouseTopBottomData,
   WareHouseTopLeftData
 } from '@/api/dzkb'
-import MarqueeTips from 'vue-marquee-tips'
 
 export default {
   name: 'Index2',
@@ -342,7 +347,10 @@
       tableTopTask: null,
       tableBottomTask: null,
       echartsRightTop: null,
-      echartsRightBottom: null
+      echartsRightBottom: null,
+
+      starsCount: 800, // 鏄熸槦鏁伴噺
+      distance: 900 // 闂磋窛
 
     }
   },
@@ -361,9 +369,23 @@
     this.getWareHouseTopLeftData()
     this.getWareHouseTopBottomData()
     this.getEcharts()
+    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})`
+      })
+    },
     // 鑾峰彇topEcharts
     getTopBar() {
       loadEcharts('topBarLeft', kbTop())
@@ -515,3 +537,38 @@
   font-size: 18px;
 }
 </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>
diff --git a/src/views/kb/kbCommon.css b/src/views/kb/kbCommon.css
index 957770e..c6b66c0 100644
--- a/src/views/kb/kbCommon.css
+++ b/src/views/kb/kbCommon.css
@@ -10,6 +10,8 @@
   color: #fff;
   background-size: 1920px 1080px;
   /*background: url("../../assets/images/kb_bg.png") no-repeat;*/
+
+  overflow: hidden;
 }
 
 .kb_header {
diff --git a/src/views/kb/zhkb.vue b/src/views/kb/zhkb.vue
index 71306e9..9279921 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%" />
@@ -287,7 +292,10 @@
       tableDataLeftBottom: [],
       tableDataLeftBottomTemp: [],
       lineContent3: [],
-      ShopArr: [] // 杞﹂棿缂栫爜鏁扮粍
+      ShopArr: [], // 杞﹂棿缂栫爜鏁扮粍
+
+      starsCount: 800, // 鏄熸槦鏁伴噺
+      distance: 900 // 闂磋窛
 
     }
   },
@@ -303,8 +311,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()
@@ -597,3 +619,38 @@
 }
 
 </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