This commit is contained in:
2023-10-08 09:19:53 +08:00
parent 2243681794
commit b054d78838
2 changed files with 212 additions and 242 deletions

View File

@@ -23,228 +23,178 @@ export const errCensus = (id) => post('api/deviceScreen/errCensus', {})
/** 仓储监控 */ /** 仓储监控 */
export const storageMonitor = (id) => post('api/dashboard/warehouseMonitor', {}) export const storageMonitor = (id) => post('api/dashboard/warehouseMonitor', {})
/** 生产统计 */ /** 压制看板 */
// export const productionStatistics = (id) => post('api/dashboard/productionStatistics', {}) // export const cockpitpress = (id) => post('api/cockpit/press', {})
export const productionStatistics = () => { export const cockpitpress = () => {
let res = { let res = {
'pressProduction': { 'PersonnelMonthlyProduction': [
'dailyProductionQty': 32.25,
'equipmentProduction': [
{ {
'qty': 11000, 'operator': '小二',
'name': '压机1', 'real_qty': '1186'
'weight': 13000
}, },
{ {
'qty': 4000, 'operator': '小一',
'name': '压机2', 'real_qty': '1315'
'weight': 19000
},
{
'qty': 5000,
'name': '压机3',
'weight': 6000
},
{
'qty': 9120,
'name': '压机4',
'weight': 8010
},
{
'qty': 9000,
'name': '压机5',
'weight': 16200
},
{
'qty': 5900,
'name': '压机6',
'weight': 2000
},
{
'qty': 2220,
'name': '压机7',
'weight': 9010
},
{
'qty': 3000,
'name': '压机8',
'weight': 8200
},
{
'qty': 5000,
'name': '压机9',
'weight': 12000
},
{
'qty': 6220,
'name': '压机10',
'weight': 16010
},
{
'qty': 3900,
'name': '压机11',
'weight': 10200
},
{
'qty': 6300,
'name': '压机12',
'weight': 9200
},
{
'qty': 3020,
'name': '压机13',
'weight': 17010
},
{
'qty': 5500,
'name': '压机14',
'weight': 9500
},
{
'qty': 7200,
'name': '压机15',
'weight': 18000
} }
], ],
'dailyProductionWeight': 64.25 'ProductionTask': [
},
'workOrder': [
{ {
'planStartTime': '2023-08-18 14:02:48', 'device': '压机04',
'workOrderCode': 'DD001', 'workorder_code': '2423090628',
'equipment': '压机1', 'team': '白班',
'materialCode': 'WL01', 'material_name': '底部槽砖',
'startTime': '2023-08-18 14:02:48', 'planproducestart_date': '08:00',
'planned': '1000kg', 'plan_qty': '2000',
'completed': '827kg', 'real_qty': '123',
'endTime': '2023-08-18 14:02:48', 'unqualified_qty': '70',
'customer': '厂家1', 'qualified_rate': '2.6500',
'status': '完成' 'workorder_status': '未生产',
'operator': '小一',
'realproducestart_date': '-',
'realproduceend_date': '-'
}, },
{ {
'planStartTime': '2023-08-18 14:02:48', 'device': '压机06',
'workOrderCode': 'DD002', 'workorder_code': '230921004',
'equipment': '混料机2', 'team': '白班',
'materialCode': 'WL02', 'material_name': 'RH下部槽工作层砖宝钢',
'startTime': '2023-08-18 14:02:48', 'planproducestart_date': '2023-09-01 00:00:00',
'planned': '1000kg', 'plan_qty': '2000',
'completed': '894kg', 'real_qty': '0',
'customer': '厂家2', 'unqualified_qty': '0',
'status': '已下发' 'qualified_rate': '0.0000',
'workorder_status': '未生产',
'operator': '小二',
'realproducestart_date': '-',
'realproduceend_date': '-'
}, },
{ {
'planStartTime': '2023-08-18 14:02:48', 'device': '压机02',
'workOrderCode': 'DD003', 'workorder_code': '230916005',
'equipment': '压机3', 'team': '白班',
'materialCode': 'WL03', 'material_name': '钢包镁铝碳砖3015C221',
'planned': '3000kg', 'planproducestart_date': '2023-09-16 08:59:51',
'completed': '627kg', 'plan_qty': '2000',
'customer': '厂家3', 'real_qty': '0',
'status': '未生产' 'unqualified_qty': '0',
'qualified_rate': '40.0000',
'workorder_status': '已下发',
'operator': '小二',
'realproducestart_date': '-',
'realproduceend_date': '-'
}, },
{ {
'planStartTime': '2023-08-18 14:02:48', 'device': '压机03',
'workOrderCode': 'DD004', 'workorder_code': '230916007',
'equipment': '混料机4', 'team': '白班',
'materialCode': 'WL04', 'material_name': '钢包镁铝碳砖3015C221',
'startTime': '2023-08-18 14:02:48', 'planproducestart_date': '2023-09-16 00:00:00',
'planned': '8000kg', 'plan_qty': '2000',
'completed': '6137kg', 'real_qty': '0',
'customer': '厂家4', 'unqualified_qty': '0',
'status': '暂停' 'qualified_rate': '40.0000',
'workorder_status': '已下发',
'operator': '小二',
'realproducestart_date': '-',
'realproduceend_date': '-'
}, },
{ {
'planStartTime': '2023-08-18 14:02:48', 'device': '压机01',
'workOrderCode': 'DD005', 'workorder_code': '230916004',
'equipment': '混料机5', 'team': '白班',
'materialCode': 'WL05', 'material_name': '钢包镁铝碳砖3015C221',
'startTime': '2023-08-18 14:02:48', 'planproducestart_date': '2023-09-16 08:59:04',
'planned': '1000kg', 'plan_qty': '2000',
'completed': '894kg', 'real_qty': '776',
'customer': '厂家5', 'unqualified_qty': '0',
'status': '已下发' 'qualified_rate': '38.8000',
'workorder_status': '生产中',
'operator': '小二',
'realproducestart_date': '2023-09-16 09:02:24',
'realproduceend_date': '-'
}, },
{ {
'planStartTime': '2023-08-18 14:02:48', 'device': '压机05',
'workOrderCode': 'DD006', 'workorder_code': '230916013',
'equipment': '压机6', 'team': '白班',
'materialCode': 'WL06', 'material_name': '钢包镁铝碳砖3015C221',
'planned': '3000kg', 'planproducestart_date': '2023-09-16 09:02:08',
'completed': '627kg', 'plan_qty': '2000',
'customer': '厂家6', 'real_qty': '894',
'status': '未生产' 'unqualified_qty': '0',
'qualified_rate': '40.0000',
'workorder_status': '生产中',
'operator': '小一',
'realproducestart_date': '2023-09-16 09:03:06',
'realproduceend_date': '-'
}, },
{ {
'planStartTime': '2023-08-18 14:02:48', 'device': '压机08',
'workOrderCode': 'DD007', 'workorder_code': '230916016',
'equipment': '混料机7', 'team': '白班',
'materialCode': 'WL07', 'material_name': '钢包镁铝碳砖3015C221',
'startTime': '2023-08-18 14:02:48', 'planproducestart_date': '2023-09-16 09:36:05',
'planned': '8000kg', 'plan_qty': '2000',
'completed': '6137kg', 'real_qty': '298',
'customer': '厂家7', 'unqualified_qty': '0',
'status': '暂停' 'qualified_rate': '40.0000',
'workorder_status': '生产中',
'operator': '小一',
'realproducestart_date': '2023-09-16 09:36:44',
'realproduceend_date': '-'
}, },
{ {
'planStartTime': '2023-08-18 14:02:48', 'device': '压机07',
'workOrderCode': 'DD008', 'workorder_code': '230918019',
'equipment': '混料机8', 'team': '白班',
'materialCode': 'WL08', 'material_name': '钢包镁铝碳砖3015C221',
'startTime': '2023-08-18 14:02:48', 'planproducestart_date': '2023-09-18 10:33:09',
'planned': '1000kg', 'plan_qty': '2000',
'completed': '894kg', 'real_qty': '410',
'customer': '厂家8', 'unqualified_qty': '0',
'status': '已下发' 'qualified_rate': '0.0000',
'workorder_status': '生产中',
'operator': '小二',
'realproducestart_date': '2023-09-18 10:39:24',
'realproduceend_date': '-'
}, },
{ {
'planStartTime': '2023-08-18 14:02:48', 'device': '压机04',
'workOrderCode': 'DD009', 'workorder_code': '230916010',
'equipment': '压机9', 'team': '晚班',
'materialCode': 'WL09', 'material_name': '钢包镁铝碳砖3015C221',
'planned': '3000kg', 'planproducestart_date': '2023-09-16 09:01:28',
'completed': '627kg', 'plan_qty': '2000',
'customer': '厂家9', 'real_qty': '990',
'status': '未生产' 'unqualified_qty': '0',
'qualified_rate': '40.0000',
'workorder_status': '生产中',
'operator': '小二',
'realproducestart_date': '2023-09-16 11:12:03',
'realproduceend_date': '-'
} }
], ],
'total': { 'ShiftProductionList': [
'pressWeight': 30.25,
'dryWeight': 20.25,
'sortWeight': 16.25
},
'finishedProductCompletionRate': [
{ {
'uncompleted': 5000, 'column_name': '压机04',
'name': '物料1', 'qualified_qty': '53',
'completed': 4000 'unqualified_qty': '70',
'total_difference': '1877'
}, },
{ {
'uncompleted': 3000, 'column_name': '压机06',
'name': '物料2', 'qualified_qty': '0',
'completed': 4000 'unqualified_qty': '0',
}, 'total_difference': '2000'
{
'uncompleted': 4000,
'name': '物料3',
'completed': 3000
} }
], ],
'mixProduction': [ 'DayShift': '白班',
'DayShiftList': [
{ {
'name': '物料1', 'plan_qty': '4000',
'value': 800.25 'real_qty': '123',
}, 'unqualified_qty': '70',
{ 'qualified_qty': '53'
'name': '物料2',
'value': 800.25
},
{
'name': '物料3',
'value': 900.25
},
{
'name': '物料4',
'value': 600.25
} }
] ]
} }

View File

@@ -7,7 +7,7 @@
<div class="cbox"> <div class="cbox">
<div>当前班次</div> <div>当前班次</div>
<div class="num" style="color: #f7b502; font-size: 0.46rem; letter-spacing: 15px;"> <div class="num" style="color: #f7b502; font-size: 0.46rem; letter-spacing: 15px;">
白班 {{showText}}
</div> </div>
</div> </div>
<div class="cbox"> <div class="cbox">
@@ -53,10 +53,10 @@
<div class="list_scroll_title"> <div class="list_scroll_title">
<span>设备</span><span>工单号</span><span>班次类型</span><span>生产物料</span><span>订单客户</span><span>计划开始</span><span>计划数()</span><span>已生产()</span><span>不合格()</span><span>合格率</span><span>状态</span><span>开工人</span><span>开始时间</span><span>结束时间</span> <span>设备</span><span>工单号</span><span>班次类型</span><span>生产物料</span><span>订单客户</span><span>计划开始</span><span>计划数()</span><span>已生产()</span><span>不合格()</span><span>合格率</span><span>状态</span><span>开工人</span><span>开始时间</span><span>结束时间</span>
</div> </div>
<vue-seamless-scroll :data="workOrder" :class-option="classOption" class="content-block-scroll"> <vue-seamless-scroll :data="ProductionTask" :class-option="classOption" class="content-block-scroll">
<ul class="content-block-scroll-ul"> <ul class="content-block-scroll-ul">
<li v-for="(e, i) in workOrder" :key="i"> <li v-for="(e, i) in ProductionTask" :key="i">
<span>{{e.device_code}}</span><span>{{e.bill_code}}</span><span>{{e.bc_type}}</span><span>{{e.cust}}</span><span>{{e.plan_start}}</span><span>{{e.plan_num}}</span><span>{{e.fini_num}}</span><span>{{e.no_ok}}</span><span>{{e.ok_rate}}</span><span>{{e.status}}</span><span>{{e.work_man}}</span><span>{{e.status}}</span><span>{{e.start_time}}</span><span>{{e.fini_time}}</span> <span>{{e.device}}</span><span>{{e.workorder_code}}</span><span>{{e.team}}</span><span>{{e.material_name}}</span><span>{{e.planproducestart_date}}</span><span>{{e.planproducestart_date}}</span><span>{{e.plan_qty}}</span><span>{{e.real_qty}}</span><span>{{e.unqualified_qty}}</span><span>{{e.qualified_rate}}</span><span>{{e.workorder_status}}</span><span>{{e.operator}}</span><span>{{e.realproducestart_date}}</span><span>{{e.realproduceend_date}}</span>
</li> </li>
</ul> </ul>
</vue-seamless-scroll> </vue-seamless-scroll>
@@ -69,7 +69,7 @@
<script> <script>
import THeader from '@components/header.vue' import THeader from '@components/header.vue'
// import * as echarts from 'echarts' // import * as echarts from 'echarts'
import { productionStatistics } from '@js/getData1' import { cockpitpress } from '@js/getData1'
export default { export default {
name: 'ProdCount', name: 'ProdCount',
components: { components: {
@@ -80,33 +80,37 @@ export default {
timeOut: null, timeOut: null,
interTime: this.$store.getters.setTime, interTime: this.$store.getters.setTime,
timer: null, timer: null,
showNum1: '', showText: '',
showNum2: '', showNum1: '0',
showNum3: '', showNum2: '0',
showNum3: '0',
myCharts02: '', myCharts02: '',
myCharts01: '', myCharts01: '',
materData: [], materData: [],
deviceData: [], deviceData: [],
PersonnelMonthlyProduction: [],
ProductionTask: [],
ShiftProductionList: [],
arr2: [ arr2: [
{ {
device_fault_type: '张工', operator: '张工',
device_fault_num: '150' real_qty: '150'
}, },
{ {
device_fault_type: '李工', operator: '李工',
device_fault_num: '110' real_qty: '110'
}, },
{ {
device_fault_type: '王工', operator: '王工',
device_fault_num: '130' real_qty: '130'
}, },
{ {
device_fault_type: '赵工', operator: '赵工',
device_fault_num: '100' real_qty: '100'
}, },
{ {
device_fault_type: '刘工', operator: '刘工',
device_fault_num: '120' real_qty: '120'
} }
], ],
echartData01: [ echartData01: [
@@ -307,16 +311,20 @@ export default {
}, this.interTime) }, this.interTime)
}, },
async initData () { async initData () {
let res = await productionStatistics() let res = await cockpitpress()
clearInterval(this.timeOut) clearInterval(this.timeOut)
this.resData = res this.resData = res
// this.showNum1 = (res.total.pressWeight + '').split('')
// this.showNum2 = (res.total.dryWeight + '').split('')
// this.showNum3 = (res.total.sortWeight + '').split('')
// this.workOrder = [...res.workOrder] // this.workOrder = [...res.workOrder]
this.showNum1 = '3020' // this.showNum1 = '3020'
this.showNum2 = '3000' // this.showNum2 = '3000'
this.showNum3 = '220' // this.showNum3 = '220'
this.showText = res.DayShift
this.showNum1 = (res.DayShiftList[0].plan_qty + '').split('')
this.showNum2 = (res.DayShiftList[0].real_qty + '').split('')
this.showNum3 = (res.DayShiftList[0].unqualified_qty + '').split('')
this.PersonnelMonthlyProduction = res.PersonnelMonthlyProduction
this.ProductionTask = res.ProductionTask
this.ShiftProductionList = res.ShiftProductionList
this.setEchart01() this.setEchart01()
this.setEchart02() this.setEchart02()
}, },
@@ -325,11 +333,11 @@ export default {
let data2 = [] let data2 = []
let data3 = [] let data3 = []
let device = [] let device = []
this.echartData01.map(e => { this.ShiftProductionList.map(e => {
data1.push(e.region_in_qty) data1.push(e.qualified_qty)
data2.push(e.region_out_qty) data2.push(e.unqualified_qty)
data3.push(e.inventory_qty) data3.push(e.total_difference)
device.push(e.material_code) device.push(e.column_name)
}) })
let option = { let option = {
grid: { grid: {
@@ -480,9 +488,9 @@ export default {
}, },
setEchart02 () { setEchart02 () {
let max = 0 let max = 0
this.arr2.map(el => { this.PersonnelMonthlyProduction.map(el => {
if (Number(el.device_fault_num) >= Number(max)) { if (Number(el.real_qty) >= Number(max)) {
max = Number(el.device_fault_num) max = Number(el.real_qty)
} }
}) })
let option = { let option = {
@@ -550,7 +558,7 @@ export default {
fontSize: 14 fontSize: 14
} }
}, },
data: this.arr2.map((it) => it.device_fault_type) data: this.PersonnelMonthlyProduction.map((it) => it.operator)
}, },
series: [ series: [
{ {
@@ -579,7 +587,7 @@ export default {
], false) ], false)
} }
}, },
data: this.arr2.map((it) => it.device_fault_num) data: this.PersonnelMonthlyProduction.map((it) => it.real_qty)
} }
] ]
} }
@@ -771,10 +779,16 @@ export default {
line-height 32px line-height 32px
span span
display inline-block display inline-block
width 6.6% width 5.2%
text-align center text-align center
line-height 32px line-height 32px
font-size 14px font-size 14px
&:nth-child(4)
width 10%
&:nth-child(5)
width 10%
&:nth-child(6)
width 10%
&:nth-child(13) &:nth-child(13)
width 10% width 10%
&:nth-child(14) &:nth-child(14)
@@ -793,12 +807,18 @@ export default {
background rgba(38,47,82,0.50) background rgba(38,47,82,0.50)
span span
display inline-block display inline-block
width 6.6% width 5.2%
font-size 12px font-size 12px
// padding 0 .1rem // padding 0 .1rem
text-align center text-align center
line-height 38px line-height 38px
box-sizing border-box box-sizing border-box
&:nth-child(4)
width 10%
&:nth-child(5)
width 10%
&:nth-child(6)
width 10%
&:nth-child(13) &:nth-child(13)
width 10% width 10%
&:nth-child(14) &:nth-child(14)