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