From d0a2c018b1612fb40d5e38f78d5180f2b90500fd Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 06 九月 2022 17:28:49 +0800
Subject: [PATCH] 1.新增车间公告页面2.新看板修改并部署

---
 src/views/kb/cgdd.vue |   61 +++++++++++++++++++++---------
 1 files changed, 43 insertions(+), 18 deletions(-)

diff --git a/src/views/kb/cgdd.vue b/src/views/kb/cgdd.vue
index 78a6f61..910ffc3 100644
--- a/src/views/kb/cgdd.vue
+++ b/src/views/kb/cgdd.vue
@@ -10,7 +10,12 @@
           <span>{{ headTime }}</span>
         </div>
       </div>
-
+      <MarqueeTips
+        :content="MarqueeTipsContent"
+        class="MarqueeTipsContentClass"
+        style="top:100px"
+        :speed="speed"
+      />
       <div class="kb_content">
         <div class="kb_left">
           <!-- 1-->
@@ -183,15 +188,16 @@
                   :header-cell-style="headerCellStyle"
                   :cell-style="cellStyle"
                   :row-class-name="tableRowClassName"
-                  height="923"
+                  height="865"
                 >
                   <el-table-column
                     type="index"
                     label="搴忓彿"
-                    width="90"
+                    width="70"
                   >
                     <template slot-scope="{row}">
                       <div>NO.{{ row.index }}</div>
+                      <!--                      <div>NO.100</div>-->
                     </template>
                   </el-table-column>
                   <!--                  <el-table-column-->
@@ -202,17 +208,21 @@
                   <el-table-column
                     prop="suppercode"
                     label="渚涘簲鍟嗙紪鐮�"
-                    width="170"
+                    width="130"
                   />
                   <el-table-column
                     prop="suppername"
-                    width="183"
+                    width="283"
                     label="渚涘簲鍟嗗悕绉�"
-                  />
+                  >
+                    <template slot-scope="{row}">
+                      <div class="ellipsis">{{ row.suppername }}</div>
+                    </template>
+                  </el-table-column>
                   <el-table-column
                     prop="cont"
-                    label="寤舵湡娆℃暟"
-                    width="90"
+                    label="娆℃暟"
+                    width="50"
                   />
                 </el-table>
               </div>
@@ -230,16 +240,23 @@
 import { bar02, loadEcharts, pie01 } from '@/utils/myEcharts'
 import * as echarts from 'echarts'
 import { PurchaseLeftBottom, PurchaseLeftTop, PurchaseRight } from '@/api/dzkb'
+import MarqueeTips from 'vue-marquee-tips'
 
 export default {
   name: 'Index2',
+  components: {
+    MarqueeTips
+  },
   data() {
     return {
       headTime: '',
 
       purchaseLeftTopData: [],
       tableData: [],
-      tableDataRank: []
+      tableDataRank: [],
+
+      MarqueeTipsContent: '', // 鍏憡
+      speed: 100// 鍏憡鎾斁鐨勯�熷害
 
     }
   },
@@ -251,9 +268,17 @@
     this.getPurchaseLeftTop()
     this.getPurchaseLeftBottom()
     this.getPurchaseRight()
+
+    this.getMarqueeTipsContent()
   },
   methods: {
-
+    // 鑾峰彇鍏憡
+    getMarqueeTipsContent() {
+      this.MarqueeTipsContent = '鍚勪綅鍛樺伐浠細鏍规嵁涓婄骇鐨勯�氱煡锛岀粨鍚堟垜浼佸疄闄呮儏鍐碉紝鐜板皢20xx骞寸殑鍏冩棪鏀惧亣閫氱煡濡備笅锛氫竴銆�1鏈�1鏃ヨ嚦1鏈�3鏃ユ斁鍋囪皟浼戯紝鍏�3澶┿��1鏈�4鏃ユ寮忎笂鐝�備簩銆佽妭鍋囨棩鏈熼棿锛屽悇鐝粍瑕佷弗鏍艰惤瀹炰笂绾х殑閲嶈鎸囩ず绮剧锛屾寜鐓т笂绾х殑鍏蜂綋瑕佹眰锛岃鐪熸姄濂借惤瀹炶妭鏃ユ湡闂村�肩彮澶囧嫟宸ヤ綔锛岀‘淇濊妭鏃ユ湡闂翠紒涓氬悇椤瑰伐浣滄甯歌繍杞�倄x浼佷笟20xx骞�12鏈�28鏃�'
+      const spance = ' '.padStart(this.MarqueeTipsContent.length * 2, ' ')
+      this.MarqueeTipsContent = this.MarqueeTipsContent + spance
+      this.speed = this.MarqueeTipsContent.length / 10
+    },
     getPurchaseLeftTop() {
       PurchaseLeftTop().then(res => {
         this.purchaseLeftTopData = res.data[0]
@@ -274,7 +299,6 @@
         // 鎷垮埌鍏冪礌鍚庯紝瀵瑰厓绱犺繘琛屽畾鏃跺鍔犺窛绂婚《閮ㄨ窛绂伙紝瀹炵幇婊氬姩鏁堟灉(姝ら厤缃负姣�100姣绉诲姩1鍍忕礌)
         const task = setInterval(() => {
           // 鍏冪礌鑷璺濈椤堕儴1鍍忕礌
-          // divData.scrollTop += divData.scrollHeight / this.tableDataRank.length
           divData.scrollTop += 1
           // 鍒ゆ柇鍏冪礌鏄惁婊氬姩鍒板簳閮�(鍙楂樺害+璺濈椤堕儴=鏁翠釜楂樺害)
           if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {
@@ -295,12 +319,10 @@
     getPurchaseRight() {
       PurchaseRight().then(res => {
         this.tableDataRank = res.data
-
         const divData = this.$refs.tableDataRank.bodyWrapper
         // 鎷垮埌鍏冪礌鍚庯紝瀵瑰厓绱犺繘琛屽畾鏃跺鍔犺窛绂婚《閮ㄨ窛绂伙紝瀹炵幇婊氬姩鏁堟灉(姝ら厤缃负姣�100姣绉诲姩1鍍忕礌)
         const task = setInterval(() => {
           // 鍏冪礌鑷璺濈椤堕儴1鍍忕礌
-          // divData.scrollTop += divData.scrollHeight / this.tableDataRank.length
           divData.scrollTop += 1
           // 鍒ゆ柇鍏冪礌鏄惁婊氬姩鍒板簳閮�(鍙楂樺害+璺濈椤堕儴=鏁翠釜楂樺害)
           if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {
@@ -308,13 +330,13 @@
             divData.scrollTop = 0
             PurchaseRight().then(res => {
               this.tableDataRank = res.data
-              if (this.tableDataRank.length > 22) {
+              if (this.tableDataRank.length > 21) {
                 clearInterval(task)
                 this.getPurchaseRight()
               }
             })
           }
-        }, this.tableDataRank.length <= 22 ? 1000 * 3 : 100)
+        }, this.tableDataRank.length <= 21 ? 1000 * 3 : 100)
       })
     },
 
@@ -391,11 +413,12 @@
       height: 345px;
       display: flex;
       flex-direction: column;
-      justify-content: space-around;
+      //justify-content: space-around;
+      justify-content: flex-end;
 
       .kb_left_top_block {
         width: 100%;
-        height: 267px;
+        height: 237px;
         display: flex;
         //border: 1px solid rgba(255, 255, 255, 0.6);
         justify-content: space-around;
@@ -459,7 +482,8 @@
     height: 100%;
 
     .kb_right_top {
-      height: 964px;
+      height: 906px;
+      margin-top: 58px;
       width: 100%;
 
       .kb_right_top_content {
@@ -500,4 +524,5 @@
 ::v-deep .cell {
   padding: 0 !important;
 }
+
 </style>

--
Gitblit v1.9.3