From 0587a1eab55c688ccb9c69c768c5fd247adb407c Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 01 十二月 2022 17:08:08 +0800
Subject: [PATCH] 1.看板接入
---
src/views/kb/cjsc.vue | 195 +++++++++++++++++++++++-------------------------
1 files changed, 92 insertions(+), 103 deletions(-)
diff --git a/src/views/kb/cjsc.vue b/src/views/kb/cjsc.vue
index 9a72762..55518ac 100644
--- a/src/views/kb/cjsc.vue
+++ b/src/views/kb/cjsc.vue
@@ -15,7 +15,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 +29,7 @@
height="428"
>
<el-table-column
- prop="xsdd"
+ prop="saleOrderCode"
label="閿�鍞崟鍙�"
width="165"
/>
@@ -40,7 +40,7 @@
label="浜у搧鍚嶇О"
/>
<el-table-column
- prop="sl"
+ prop="good_qty"
label="鏁伴噺"
width="80"
/>
@@ -49,7 +49,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 +63,7 @@
height="428"
>
<el-table-column
- prop="xsdd"
+ prop="saleOrderCode"
label="閿�鍞崟鍙�"
width="165"
/>
@@ -74,7 +74,7 @@
label="浜у搧鍚嶇О"
/>
<el-table-column
- prop="sl"
+ prop="good_qty"
label="鏁伴噺"
width="80"
/>
@@ -99,21 +99,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
@@ -165,9 +165,11 @@
>
<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
@@ -177,9 +179,11 @@
>
<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
@@ -200,11 +204,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 +213,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 +227,7 @@
height="428"
>
<el-table-column
- prop="xsdd"
+ prop="saleOrderCode"
label="閿�鍞崟鍙�"
width="165"
/>
@@ -238,7 +238,7 @@
label="浜у搧鍚嶇О"
/>
<el-table-column
- prop="sl"
+ prop="good_qty"
label="鏁伴噺"
width="80"
/>
@@ -247,7 +247,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 +261,7 @@
height="428"
>
<el-table-column
- prop="xsdd"
+ prop="saleOrderCode"
label="閿�鍞崟鍙�"
width="165"
/>
@@ -272,7 +272,7 @@
label="浜у搧鍚嶇О"
/>
<el-table-column
- prop="sl"
+ prop="good_qty"
label="鏁伴噺"
width="80"
/>
@@ -289,7 +289,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,32 +304,7 @@
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: []
@@ -361,7 +337,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 +352,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 +370,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: 'DEV06' }).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: 'DEV02' }).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: 'DEV03' }).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: 'DEV04' }).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
--
Gitblit v1.9.3