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 +++++++-------
src/views/kb/cjzl.vue | 207 ++++++---------
src/views/kb/zhkb.vue | 287 ++++++++++++++--------
src/utils/myEcharts.js | 59 ++--
4 files changed, 384 insertions(+), 364 deletions(-)
diff --git a/src/utils/myEcharts.js b/src/utils/myEcharts.js
index b39a267..de20de6 100644
--- a/src/utils/myEcharts.js
+++ b/src/utils/myEcharts.js
@@ -375,6 +375,7 @@
// const myColor = ['#7af5f5', '#00FFFF', '#00FFFF', '#00FFFF', '#00FFFF']
const myColor = ['rgba(122,245,245,1)', 'rgba(122,245,245,0.95)', 'rgba(122,245,245,0.9)', 'rgba(122,245,245,0.85)', 'rgba(122,245,245,0.8)']
const option = {
+ animation: false,
backgroundColor: 'transparent',
title: {
show: false,
@@ -801,6 +802,7 @@
var max = Math.ceil(255 / 10) * 10
const option = {
+ animation: false,
backgroundColor: 'transparent',
grid: {
left: '0%',
@@ -901,8 +903,9 @@
}
// 杞﹂棿璐ㄩ噺宸︿笅鍛ㄤ笉鑹�
-export function line02() {
+export function line02(dataX, dataY) {
return {
+ animation: false,
backgroundColor: 'transparent',
tooltip: {},
// title: {
@@ -961,7 +964,7 @@
axisTick: {
show: false
},
- data: ['鍛ㄤ竴', '鍛ㄤ簩', '鍛ㄤ笁', '鍛ㄥ洓', '鍛ㄤ簲', '鍛ㄥ叚', '鍛ㄦ棩']
+ data: dataX
}],
yAxis: [
{
@@ -1046,7 +1049,7 @@
shadowBlur: 20 // shadowBlur璁惧浘褰㈤槾褰辩殑妯$硦澶у皬銆傞厤鍚坰hadowColor,shadowOffsetX/Y, 璁剧疆鍥惧舰鐨勯槾褰辨晥鏋溿��
}
},
- data: [393, 438, 485, 631, 689, 824, 700]
+ data: dataY
// data: [600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100), 600 + Math.floor(Math.random() * 100)]
}
// {
@@ -1091,23 +1094,25 @@
}
// 杞﹂棿璐ㄩ噺鍙充笂 鏃ヤ笉鑹�
-export function bar04() {
+export function bar04(resValueArr) {
+ // let data = resValueArr.map(({ eqp_name, cont }) => ({ name: eqp_name, value: cont }))//鏇挎崲鏁扮粍瀵硅薄涓殑閿悕
+
const data = [
{
- name: '浜х嚎涓�',
- value: 100
+ name: '瑁呴厤涓�绾�',
+ value: resValueArr.find(i => i.eqp_name === '瑁呴厤涓�绾�') ? resValueArr.find(i => i.eqp_name === '瑁呴厤涓�绾�').cont : 0
},
{
- name: '浜х嚎浜�',
- value: 200
+ name: '瑁呴厤浜岀嚎',
+ value: resValueArr.find(i => i.eqp_name === '瑁呴厤浜岀嚎') ? resValueArr.find(i => i.eqp_name === '瑁呴厤浜岀嚎').cont : 0
},
{
- name: '浜х嚎涓�',
- value: 64
+ name: '瑁呴厤涓夌嚎',
+ value: resValueArr.find(i => i.eqp_name === '瑁呴厤涓夌嚎') ? resValueArr.find(i => i.eqp_name === '瑁呴厤涓夌嚎').cont : 0
},
{
- name: '浜х嚎鍥�',
- value: 44
+ name: '瑁呴厤鍥涚嚎',
+ value: resValueArr.find(i => i.eqp_name === '瑁呴厤鍥涚嚎') ? resValueArr.find(i => i.eqp_name === '瑁呴厤鍥涚嚎').cont : 0
}
]
const getSymbolData = (data) => {
@@ -1122,6 +1127,7 @@
}
const option = {
+ animation: false,
backgroundColor: 'transparent',
grid: {
top: '0%',
@@ -1198,7 +1204,10 @@
name: 'XXX',
type: 'pictorialBar',
symbol: 'image://data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAMAAADWZboaAAAAZlBMVEUAAABe3uVe3+Vf3uVf3+Zf3uVg3+Zg3+Zf3+Vi4OZh4OZg3+Z86/Bh3+Zi4Odj4Odi4OZ86/B76/B86/Bj4ed56+9x5+xn4umB7/N87PB36e+A7/N+7fF/7vJ/7vJ+7fGA7/OB7/PReX+lAAAAIXRSTlMABQkVDREmIhk3MR10LEFFPHh7cUprXE35h2XnqMLAp+mHAG9cAAAB5ElEQVRIx83WjU7CMBQFYIoiKMqU/XUboHv/l/Tce7t2XamDNSacETEmX86tlK2rx4py150o+MstMBLwWRfHKo6JCVxLnvmFGBjFQ58oF1//sUZhGy/ClSTWObgnL4O+bkeN4nY2okfNMbkRt9/vtxz8InoTsWplJSCzFxPmO8+GpSIByX3YQAuGDWtRKhKjCnxDXhF6Z4yxnZ20Wgko7BMRDmxtSGVaI4kdTIgb+zTYoJQlIMlDlmUFgrcDWWC201qSayqlTkiCddWWeV62VU0YlnpRi9VOKaSUsiyq/N0krwq2Ugt7lVpZl5BfHNiytjagMi+XYp0kCR45hMlivVQrE/uU5pXSrCB5bM6d1t2lOZItMqmliT3q5uVxqxzyW/ccfYLNKx7ZTeykMvNyac2yt2Fbc61MHLSC0rwoxbiNdlQ3GBm1NLHQsHUrtEXppR/ljNpW6DbSCoqlFiVoN6YdaFlgsSFVPs1BdT8OaB5QyQzVcaqWDows/zepxR8ObLglTrdtCRVuRNj4Rrxh+//0ke2f8KVL+Kon3GCSbmsJN9OUW3j6g0Ns+LgCij2u0h+Sghc8mlMPBMgdx5DFh59VmOVHrvmDnoNxCz3J7MFWsMuaLyR089xz/xhlfijvwutR8gv3zk6BLUUeCgAAAABJRU5ErkJggg==',
- symbolSize: [50, 50],
+ // symbolSize: [50, 50],
+ symbolSize: function(params) {
+ return params === 0 ? [0, 0] : [50, 50]
+ },
symbolOffset: [20, 0],
z: 12,
itemStyle: {
@@ -1245,29 +1254,11 @@
}
// 杞﹂棿璐ㄩ噺鍙充笅 鍛ㄤ笉鑹�
-export function pie02() {
+export function pie02(resValueArr) {
const bgColor = 'transparent'
const title = '鎬讳笉鑹暟'
const color = ['#0E7CE2', '#FF8352', '#E271DE', '#F8456B', '#00FFFF', '#4AEAB0']
- const echartData = [
- {
- name: '浜х嚎涓�',
- value: '456'
- },
- {
- name: '浜х嚎浜�',
- value: '123'
- },
- {
- name: '浜х嚎涓�',
- value: '312'
- },
- {
- name: '浜х嚎鍥�',
- value: '222'
- }
- ]
-
+ const echartData = resValueArr.map(({ eqp_name, cont }) => ({ name: eqp_name, value: cont }))// 鏇挎崲鏁扮粍瀵硅薄涓殑閿悕
const formatNumber = function(num) {
const reg = /(?=(\B)(\d{3})+$)/g
return num.toString().replace(reg, ',')
@@ -1277,6 +1268,7 @@
}, 0)
const option = {
+ animation: false,
backgroundColor: bgColor,
color: color,
// tooltip: {
@@ -1416,6 +1408,7 @@
// }
var option = {
+ animation: false,
// animation: false, // 鍙栨秷鍔ㄧ敾
// animationDuration: 5000,
grid: {
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
diff --git a/src/views/kb/cjzl.vue b/src/views/kb/cjzl.vue
index 429e00f..4eb0e90 100644
--- a/src/views/kb/cjzl.vue
+++ b/src/views/kb/cjzl.vue
@@ -51,10 +51,19 @@
height="927"
>
<el-table-column
- prop="rq"
+ prop="lm_date"
label="鏃ユ湡"
width="115"
- />
+ >
+ <template slot-scope="{row}">
+ <div
+ v-if="row.lm_date"
+ >
+ {{ row.lm_date.substring(0,11) }}
+ </div>
+ <div v-else />
+ </template>
+ </el-table-column>
<el-table-column
prop="cxmc"
width="95"
@@ -65,12 +74,12 @@
</template>
</el-table-column>
<el-table-column
- prop="jgdh"
+ prop="wo_code"
label="鐢熶骇鍗曞彿"
- width="165"
+ width="188"
>
<template slot-scope="{row}">
- <div style="color: #00FFFF">{{ row.jgdh }}</div>
+ <div style="color: #00FFFF">{{ row.wo_code }}</div>
</template>
</el-table-column>
@@ -84,45 +93,33 @@
</template>
</el-table-column>
<el-table-column
- prop="blyy"
+ prop="defect_name"
label="涓嶈壇鍘熷洜"
width="120"
>
<template slot-scope="{row}">
- <div style="color:#ff0000;width: 120px" class="ellipsis">{{ row.blyy }}</div>
+ <div style="color:#ff0000;" class="ellipsis">{{ row.defect_name }}</div>
</template>
</el-table-column>
<el-table-column
- prop="scsl"
+ prop="ng_qty"
label="涓嶈壇鏁伴噺"
- width="95"
+ width="92"
/>
<el-table-column
- prop="bgsl"
+ prop="report_qty"
label="鎶ュ伐鏁伴噺"
- width="95"
+ width="92"
/>
<el-table-column
- prop="blzb"
label="涓嶈壇鍗犳瘮"
- width="95"
- />
- <!-- <el-table-column-->
- <!-- prop="yjks"-->
- <!-- label="棰勮寮�濮�"-->
- <!-- width="150"-->
- <!-- />-->
- <!-- <el-table-column-->
- <!-- prop="yjwg"-->
- <!-- label="棰勮瀹屽伐"-->
- <!-- width="150"-->
- <!-- />-->
+ width="92"
+ >
+ <template slot-scope="{row}">
+ <div>{{ parseFloat((row.ng_qty*100/(row.ng_qty+row.report_qty)).toFixed(2)) }}%</div>
+ </template>
+ </el-table-column>
- <!-- <el-table-column-->
- <!-- prop="scjd"-->
- <!-- label="鐢熶骇杩涘害"-->
- <!-- width="90"-->
- <!-- />-->
</el-table>
</div>
</div>
@@ -156,69 +153,16 @@
<script>
import './kbCommon.css'
import { bar02, bar04, kbTop, line02, loadEcharts, pie02 } from '@/utils/myEcharts'
+import { BadContManger, BadDayDistriBute, BadTop5, BadWeek, BadWeekDistriBute } from '@/api/dzkb'
export default {
name: 'Cjsc',
data() {
return {
headTime: '',
- tableDataLeftTop: [],
- tableDataLeftTopTemp: [
- { xsdd: 'MO-2022111501', cpmc: '鐢垫睜鍖�', sl: '100' },
- { xsdd: 'MO-2022111502', cpmc: '浜у搧鍚嶇О2', sl: '100' },
- { xsdd: 'MO-2022111503', cpmc: '浜у搧鍚嶇О3', sl: '100' },
- { xsdd: 'MO-2022111504', cpmc: '浜у搧鍚嶇О4', sl: '100' },
- { xsdd: 'MO-2022111505', cpmc: '浜у搧鍚嶇О5', sl: '100' },
- { xsdd: 'MO-2022111506', cpmc: '浜у搧鍚嶇О6', sl: '100' },
- { xsdd: 'MO-2022111507', cpmc: '浜у搧鍚嶇О7', sl: '100' },
- { xsdd: 'MO-2022111508', cpmc: '浜у搧鍚嶇О8', sl: '100' },
- { xsdd: 'MO-2022111509', cpmc: '浜у搧鍚嶇О9', sl: '100' },
- { xsdd: 'MO-2022111510', cpmc: '浜у搧鍚嶇О10', sl: '100' },
- { xsdd: 'MO-2022111511', cpmc: '浜у搧鍚嶇О11', sl: '100' },
- { xsdd: 'MO-2022111512', cpmc: '浜у搧鍚嶇О12', sl: '100' },
- { xsdd: 'MO-2022111513', cpmc: '浜у搧鍚嶇О13', sl: '100' },
- { xsdd: 'MO-2022111514', cpmc: '浜у搧鍚嶇О14', sl: '100' },
- { xsdd: 'MO-2022111515', cpmc: '浜у搧鍚嶇О15', sl: '100' },
- { xsdd: 'MO-2022111516', cpmc: '浜у搧鍚嶇О16', sl: '100' },
- { xsdd: 'MO-2022111517', cpmc: '浜у搧鍚嶇О17', sl: '100' },
- { xsdd: 'MO-2022111518', cpmc: '浜у搧鍚嶇О18', sl: '100' },
- { xsdd: 'MO-2022111519', cpmc: '浜у搧鍚嶇О19', sl: '100' },
- { xsdd: 'MO-2022111520', cpmc: '浜у搧鍚嶇О20', sl: '100' },
- { xsdd: 'MO-2022111521', cpmc: '浜у搧鍚嶇О21', sl: '100' },
- { xsdd: 'MO-2022111522', cpmc: '浜у搧鍚嶇О22', sl: '100' },
- { xsdd: 'MO-2022111523', cpmc: '浜у搧鍚嶇О23', sl: '100' },
- { xsdd: 'MO-2022111524', cpmc: '浜у搧鍚嶇О24', sl: '100' }
- ],
+
tableDataCenterTop: [],
- tableDataCenterTopTemp: [
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '灏哄銆佽壊绯汇�佹瘺鍒�', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '灏哄銆佹瘺鍒�', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '灏哄銆佽壊绯�', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '灏哄銆佹瘺鍒�', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '鑹茬郴銆佹瘺鍒�', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '灏哄銆佽壊绯�', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '灏哄銆佽壊绯汇�佹瘺鍒�', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '灏哄銆佹瘺鍒�', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '灏哄銆佽壊绯汇�佹瘺鍒�', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '姣涘埡', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '灏哄', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '灏哄銆佽壊绯汇�佹瘺鍒�', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '灏哄銆佽壊绯汇�佹瘺鍒�', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '灏哄銆佽壊绯汇�佹瘺鍒�', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '灏哄銆佽壊绯汇�佹瘺鍒�', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '灏哄銆佽壊绯汇�佹瘺鍒�', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '灏哄銆佽壊绯汇�佹瘺鍒�', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '灏哄銆佽壊绯汇�佹瘺鍒�', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '灏哄銆佽壊绯汇�佹瘺鍒�', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '灏哄銆佽壊绯汇�佹瘺鍒�', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '灏哄銆佽壊绯汇�佹瘺鍒�', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '灏哄銆佽壊绯汇�佹瘺鍒�', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '灏哄銆佽壊绯汇�佹瘺鍒�', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '灏哄銆佽壊绯汇�佹瘺鍒�', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '灏哄銆佽壊绯汇�佹瘺鍒�', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '灏哄銆佽壊绯汇�佹瘺鍒�', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' },
- { blzb: '50%', rq: '2022-11-30', bgsl: 200, blyy: '灏哄銆佽壊绯汇�佹瘺鍒�', jgdh: 'MO-2022-1115-01', cxmc: '瑁呴厤涓�绾�', cpmc: '鐢垫睜鍖�', scsl: '100', yjks: '2022-10-01', yjwg: '2022-10-10', gx: '宸ュ簭涓�', scjd: '10/20' }
- ]
+ tableDataCenterTopTemp: []
}
},
created() {
@@ -231,7 +175,7 @@
},
mounted() {
this.getTopBar()
- this.getTableDataSetInterval()
+
this.getCenterTableDataSetInterval()
this.getEcharts()
@@ -239,55 +183,72 @@
methods: {
// 鑾峰彇Echarts
getEcharts() {
- const dataArr = [30, 20, 20, 18, 10]
- const titlenameArr = ['棰滆壊', '灏哄', '姘斿懗', '姣涘埡', '瑁傜棔']
- loadEcharts('bar01', bar02(dataArr, titlenameArr))
+ this.getLeftTopEcharts()
+ setInterval(() => {
+ this.getLeftTopEcharts()
+ }, 1000 * 10)
- loadEcharts('line01', line02())
+ this.getLeftBottomEcharts()
+ setInterval(() => {
+ this.getLeftBottomEcharts()
+ }, 1000 * 10)
- loadEcharts('bar02', bar04())
+ this.getRightTopEcharts()
+ setInterval(() => {
+ this.getRightTopEcharts()
+ }, 1000 * 10)
- loadEcharts('pie01', pie02())
+ this.getRightBottomEcharts()
+ setInterval(() => {
+ this.getRightBottomEcharts()
+ }, 1000 * 10)
+ },
+ getLeftTopEcharts() {
+ BadTop5({ StepCode: 'Step02' }).then(res => {
+ const dataArr = res.data.map(i => i.cont)
+ const titlenameArr = res.data.map(i => i.name)
+ loadEcharts('bar01', bar02(dataArr, titlenameArr))
+ })
+ },
+ getLeftBottomEcharts() {
+ BadWeek({ StepCode: 'Step02' }).then(res => {
+ const dataX = res.data.map(i => i.click_date)
+ const dataY = res.data.map(i => i.count)
+ loadEcharts('line01', line02(dataX, dataY))
+ })
+ },
+ getRightTopEcharts() {
+ BadDayDistriBute({ StepCode: 'Step02' }).then(res => {
+ loadEcharts('bar02', bar04(res.data))
+ })
+ },
+ getRightBottomEcharts() {
+ BadWeekDistriBute({ StepCode: 'Step02' }).then(res => {
+ loadEcharts('pie01', pie02(res.data))
+ })
},
// 涓棿閮ㄥ垎鐨勮〃鏍�
getCenterTableDataSetInterval() {
let startValue = 0 // 鍒濆鍊�
const scale = 23// 鍒诲害
-
- this.tableDataCenterTop = this.tableDataCenterTopTemp.slice(startValue, startValue + scale)
-
- const loop = Math.floor(this.tableDataCenterTopTemp.length / scale)// 闇�瑕佸惊鐜殑娆℃暟
- let nowLoop = 0// 褰撳墠寰幆鐨勬鏁�
-
- setInterval(() => {
- startValue = startValue + scale
+ BadContManger({ StepCode: 'Step02' }).then(res => {
+ this.tableDataCenterTopTemp = res.data
this.tableDataCenterTop = this.tableDataCenterTopTemp.slice(startValue, startValue + scale)
- if (nowLoop === loop) {
- this.getCenterTableDataSetInterval()
- }
- nowLoop++
- }, 5000)
- },
+ const loop = Math.floor(this.tableDataCenterTopTemp.length / scale)// 闇�瑕佸惊鐜殑娆℃暟
+ let nowLoop = 0// 褰撳墠寰幆鐨勬鏁�
- // 瀹氭椂鍒锋柊琛ㄦ牸鏁版嵁
- getTableDataSetInterval() {
- let startValue = 0 // 鍒濆鍊�
- const scale = 10// 鍒诲害
+ const timer = setInterval(() => {
+ startValue = startValue + scale
+ this.tableDataCenterTop = this.tableDataCenterTopTemp.slice(startValue, startValue + scale)
+ if (nowLoop === loop) {
+ clearInterval(timer)
+ this.getCenterTableDataSetInterval()
+ }
- this.tableDataLeftTop = this.tableDataLeftTopTemp.slice(startValue, startValue + scale)
-
- const loop = Math.floor(this.tableDataLeftTopTemp.length / scale)// 闇�瑕佸惊鐜殑娆℃暟
- let nowLoop = 0// 褰撳墠寰幆鐨勬鏁�
-
- setInterval(() => {
- startValue = startValue + scale
- this.tableDataLeftTop = this.tableDataLeftTopTemp.slice(startValue, startValue + scale)
- if (nowLoop === loop) {
- this.getTableDataSetInterval()
- }
- nowLoop++
- }, 5000)
+ nowLoop++
+ }, 1000 * 10)
+ })
},
// 鑾峰彇topEcharts
diff --git a/src/views/kb/zhkb.vue b/src/views/kb/zhkb.vue
index 6bb0ca2..eee8119 100644
--- a/src/views/kb/zhkb.vue
+++ b/src/views/kb/zhkb.vue
@@ -108,58 +108,97 @@
height="428"
>
<el-table-column
- prop="xh"
+ prop="RowNum"
label="搴忓彿"
width="60"
/>
<el-table-column
- prop="zt"
- width="100"
+ prop="status"
+ width="70"
label="鐘舵��"
- />
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.status==='ALLO'">宸叉淳鍙�</div>
+ <div v-if="row.status==='START'">寮�宸�</div>
+ <div v-if="row.status==='NEW'">鏂板伐鍗�</div>
+ </template>
+ </el-table-column>
<el-table-column
- prop="pfsj"
+ prop="lm_date"
label="娲惧彂鏃堕棿"
- width="140"
+ width="120"
+ >
+ <template slot-scope="{row}">
+ <div>{{ row.lm_date.substring(0, 10) }}</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="saleOrderCode"
+ label="閿�鍞鍗曞彿"
+ width="170"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.saleOrderCode">{{ row.saleOrderCode }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="wo_code"
+ label="鍔犲伐鍗曞彿"
+ width="190"
/>
<el-table-column
- prop=""
- label="閿�鍞鍗曞彿"
- width="160"
- /> <el-table-column
- prop=""
- label="鍔犲伐鍗曞彿"
- width="160"
- /> <el-table-column
- prop=""
+ prop="partname"
label="浜у搧鍚嶇О"
width="100"
- /> <el-table-column
- prop=""
+ >
+ <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="plan_qty"
label="浠诲姟鏁伴噺"
width="100"
- /> <el-table-column
- prop=""
+ />
+ <el-table-column
+ prop="good_qty"
label="瀹屽伐鏁伴噺"
width="100"
- /> <el-table-column
- prop=""
+ />
+ <el-table-column
+ prop="ng_qty"
label="涓嶈壇鏁伴噺"
width="100"
- /> <el-table-column
- prop=""
+ />
+ <el-table-column
label="瀹屾垚鐜�"
- width="80"
- /> <el-table-column
- prop=""
+ width="100"
+ >
+ <template slot-scope="{row}">
+ <div>{{ parseFloat((row.good_qty * 100 / row.plan_qty).toFixed(2)) }}%</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+
label="棰勮寮�濮�"
width="140"
- /> <el-table-column
+ >
+ <template slot-scope="{row}">
+ <div>{{ row.planstartdate.substring(0, 10) }}</div>
+ </template>
+ </el-table-column>
+ <el-table-column
prop=""
label="棰勮缁撴潫"
width="140"
- />
+ >
+ <template slot-scope="{row}">
+ <div>{{ row.planenddate.substring(0, 10) }}</div>
+ </template>
+ </el-table-column>
</el-table>
</div>
@@ -183,25 +222,29 @@
height="428"
>
<el-table-column
- prop="xh"
+ type="index"
label="搴忓彿"
width="60"
/>
<el-table-column
- prop="cx"
+ prop="linename"
width="165"
label="浜х嚎"
/>
<el-table-column
- prop="cp"
+ prop="partname"
width="120"
label="浜у搧"
/>
<el-table-column
- prop="sl"
+ prop="good_qty"
label="鏁伴噺"
width="90"
- />
+ >
+ <template slot-scope="{row}">
+ <div>{{ parseFloat(row.good_qty) }}</div>
+ </template>
+ </el-table-column>
</el-table>
</div>
@@ -225,34 +268,24 @@
<script>
import './kbCommon.css'
import { bar02, kbTop, loadEcharts } from '@/utils/myEcharts'
-import { LineSearchTopLeftData, ShopSearch } from '@/api/dzkb'
+import {
+ LineSearchBottomLeftData,
+ LineSearchBottomRightData,
+ LineSearchTopLeftData,
+ LineSearchTopRightData,
+ ShopSearch
+} from '@/api/dzkb'
+import { parseTime } from '@/utils'
export default {
name: 'Cjsc',
data() {
return {
headTime: '',
-
tableDataRightTop: [],
- tableDataRightTopTemp: [
- { xh: 1, cx: '瑁呴厤涓�绾�', cp: '娌欐哗妞�', sl: 2000 },
- { xh: 2, cx: '瑁呴厤涓�绾�', cp: '娌欐哗妞�', sl: 2000 },
- { xh: 3, cx: '瑁呴厤涓�绾�', cp: '娌欐哗妞�', sl: 2000 },
- { xh: 4, cx: '瑁呴厤涓�绾�', cp: '娌欐哗妞�', sl: 2000 },
- { xh: 5, cx: '瑁呴厤涓�绾�', cp: '娌欐哗妞�', sl: 2000 },
- { xh: 6, cx: '瑁呴厤涓�绾�', cp: '娌欐哗妞�', sl: 2000 },
- { xh: 7, cx: '瑁呴厤涓�绾�', cp: '娌欐哗妞�', sl: 2000 },
- { xh: 8, cx: '瑁呴厤涓�绾�', cp: '娌欐哗妞�', sl: 2000 },
- { xh: 9, cx: '瑁呴厤涓�绾�', cp: '娌欐哗妞�', sl: 2000 },
- { xh: 10, cx: '瑁呴厤涓�绾�', cp: '娌欐哗妞�', sl: 2000 },
- { xh: 11, cx: '瑁呴厤涓�绾�', cp: '娌欐哗妞�', sl: 2000 },
- { xh: 12, cx: '瑁呴厤涓�绾�', cp: '娌欐哗妞�', sl: 2000 },
- { xh: 13, cx: '瑁呴厤涓�绾�', cp: '娌欐哗妞�', sl: 2000 }
- ],
+ tableDataRightTopTemp: [],
tableDataLeftBottom: [],
- tableDataLeftBottomTemp: [
- {}
- ],
+ tableDataLeftBottomTemp: [],
lineContent3: [],
ShopArr: [] // 杞﹂棿缂栫爜鏁扮粍
@@ -269,9 +302,6 @@
mounted() {
this.getTopBar()
- this.getEcharts()
- this.getRightRightData()
-
this.getShopSearch()
},
methods: {
@@ -284,17 +314,20 @@
this.ShopArr.push(item.org_code)
})
this.getShopSearchLine()
+ this.getRightRightData()
+ this.getLeftBottomData()
+ this.getEcharts()
}
- // setInterval(() => {
- // this.ShopSearchTask = ShopSearch().then(res1 => {
- // if (res1.code === '200') {
- // this.ShopArr = []
- // res1.data.forEach(item => {
- // this.ShopArr.push(item.org_code)
- // })
- // }
- // })
- // }, 1000 * 30)
+ setInterval(() => {
+ this.ShopSearchTask = ShopSearch().then(res1 => {
+ if (res1.code === '200') {
+ this.ShopArr = []
+ res1.data.forEach(item => {
+ this.ShopArr.push(item.org_code)
+ })
+ }
+ })
+ }, 1000 * 60)
},
// 浜х嚎鍔犲伐涓换鍔�
getShopSearchLine() {
@@ -307,51 +340,94 @@
this.number1 = this.lineContent.length
})
- // let start = 0
- // this.ShopSearchLineTask = setInterval(() => {
- // if (Math.floor(start / 3) === count && count !== 0) {
- // start = 0
- // LineSearchTopLeftData({ shopcode: this.ShopArr.join(',') }).then(res => {
- // this.lineContent = res.data
- // length = this.lineContent.length
- // count = Math.ceil(length / 3) // 闇�瑕佽疆鎾殑缁勬暟 3涓负涓�缁�
- // this.lineContent3 = this.lineContent.slice(0, 3)
- //
- // this.number1 = this.lineContent.length
- // })
- // } else if (count === 0) {
- // clearInterval(this.ShopSearchLineTask)
- // this.getShopSearchLine()
- // }
- // this.lineContent3 = this.lineContent.slice(start, start + 3)
- // start = start + 3
- // }, 1000 * 5)
+ let start = 0
+ const timer = setInterval(() => {
+ if (Math.floor(start / 3) === count && count !== 0) {
+ start = 0
+ LineSearchTopLeftData({ shopcode: this.ShopArr.join(',') }).then(res => {
+ this.lineContent = res.data
+ length = this.lineContent.length
+ count = Math.ceil(length / 3) // 闇�瑕佽疆鎾殑缁勬暟 3涓负涓�缁�
+ this.lineContent3 = this.lineContent.slice(0, 3)
+
+ this.number1 = this.lineContent.length
+ })
+ } else if (count === 0) {
+ clearInterval(timer)
+ this.getShopSearchLine()
+ }
+ this.lineContent3 = this.lineContent.slice(start, start + 3)
+ start = start + 3
+ }, 1000 * 10)
},
- // 鑾峰彇鍙充笂鏁版嵁
+ // 鑾峰彇鍙充笂鏁版嵁 褰撴棩瀹屽伐浜у搧鏁伴噺鎺掕
getRightRightData() {
let startValue = 0 // 鍒濆鍊�
const scale = 10// 鍒诲害
- this.tableDataRightTop = this.tableDataRightTopTemp.slice(startValue, startValue + scale)
+ LineSearchTopRightData({ shopcode: this.ShopArr.join(',') }).then(res => {
+ this.tableDataRightTopTemp = res.data
- const loop = Math.floor(this.tableDataRightTopTemp.length / scale)// 闇�瑕佸惊鐜殑娆℃暟
- let nowLoop = 0// 褰撳墠寰幆鐨勬鏁�
+ this.tableDataRightTop = this.tableDataRightTopTemp.slice(startValue, startValue + scale)
+
+ 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.getRightRightData()
+ }
+
+ nowLoop++
+ }, 1000 * 10)
+ })
+ },
+ // 浜х嚎鍔犲伐浠诲姟 宸︿笅鏁版嵁
+ getLeftBottomData() {
+ let startValue = 0 // 鍒濆鍊�
+ const scale = 10// 鍒诲害
+
+ LineSearchBottomLeftData({ shopcode: this.ShopArr.join(',') }).then(res => {
+ this.tableDataLeftBottomTemp = res.data
+
+ this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale)
+
+ 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.getLeftBottomData()
+ }
+
+ nowLoop++
+ }, 1000 * 10)
+ })
+ },
+
+ getEcharts() {
+ let dataArr = [30, 20, 20, 18, 10]
+ let titlenameArr = ['棰滆壊', '灏哄', '姘斿懗', '姣涘埡', '瑁傜棔']
+ LineSearchBottomRightData({ shopcode: this.ShopArr.join(',') }).then(res => {
+ dataArr = res.data.map(i => i.cont)
+ titlenameArr = res.data.map(i => i.name)
+ loadEcharts('bar01', bar02(dataArr, titlenameArr))
+ })
setInterval(() => {
- startValue = startValue + scale
- this.tableDataRightTop = this.tableDataRightTopTemp.slice(startValue, startValue + scale)
- if (nowLoop === loop) {
- this.getRightRightData()
- }
-
- nowLoop++
- }, 5000)
- },
- getEcharts() {
- const dataArr = [30, 20, 20, 18, 10]
- const titlenameArr = ['棰滆壊', '灏哄', '姘斿懗', '姣涘埡', '瑁傜棔']
- loadEcharts('bar01', bar02(dataArr, titlenameArr))
+ LineSearchBottomRightData({ shopcode: this.ShopArr.join(',') }).then(res => {
+ dataArr = res.data.map(i => i.cont)
+ titlenameArr = res.data.map(i => i.name)
+ loadEcharts('bar01', bar02(dataArr, titlenameArr))
+ })
+ }, 1000 * 10)
},
// 鑾峰彇topEcharts
getTopBar() {
@@ -407,7 +483,7 @@
background: #000;
}
-.el-table::before{
+.el-table::before {
height: 0;
}
@@ -435,7 +511,7 @@
font-size: 16px;
display: flex;
flex-direction: column;
- border-radius: 5px;
+ border-radius: 5px;
.kb_block03_content {
border: 1px solid $main_color;
@@ -465,7 +541,7 @@
display: flex;
align-items: center;
justify-content: center;
- height: 25px;
+ height: 25px;
}
.content02_2 {
@@ -507,6 +583,7 @@
.kb_left_top_block:nth-child(3n) {
border-bottom: none !important;
}
+
.circleYellow {
width: 26px;
height: 26px;
--
Gitblit v1.9.3