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

View File

@@ -7,7 +7,7 @@
<div class="cbox">
<div>当前班次</div>
<div class="num" style="color: #f7b502; font-size: 0.46rem; letter-spacing: 15px;">
白班
{{showText}}
</div>
</div>
<div class="cbox">
@@ -53,10 +53,10 @@
<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>
</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">
<li v-for="(e, i) in workOrder" :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>
<li v-for="(e, i) in ProductionTask" :key="i">
<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>
</ul>
</vue-seamless-scroll>
@@ -69,7 +69,7 @@
<script>
import THeader from '@components/header.vue'
// import * as echarts from 'echarts'
import { productionStatistics } from '@js/getData1'
import { cockpitpress } from '@js/getData1'
export default {
name: 'ProdCount',
components: {
@@ -80,33 +80,37 @@ export default {
timeOut: null,
interTime: this.$store.getters.setTime,
timer: null,
showNum1: '',
showNum2: '',
showNum3: '',
showText: '',
showNum1: '0',
showNum2: '0',
showNum3: '0',
myCharts02: '',
myCharts01: '',
materData: [],
deviceData: [],
PersonnelMonthlyProduction: [],
ProductionTask: [],
ShiftProductionList: [],
arr2: [
{
device_fault_type: '张工',
device_fault_num: '150'
operator: '张工',
real_qty: '150'
},
{
device_fault_type: '李工',
device_fault_num: '110'
operator: '李工',
real_qty: '110'
},
{
device_fault_type: '王工',
device_fault_num: '130'
operator: '王工',
real_qty: '130'
},
{
device_fault_type: '赵工',
device_fault_num: '100'
operator: '赵工',
real_qty: '100'
},
{
device_fault_type: '刘工',
device_fault_num: '120'
operator: '刘工',
real_qty: '120'
}
],
echartData01: [
@@ -307,16 +311,20 @@ export default {
}, this.interTime)
},
async initData () {
let res = await productionStatistics()
let res = await cockpitpress()
clearInterval(this.timeOut)
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.showNum1 = '3020'
this.showNum2 = '3000'
this.showNum3 = '220'
// this.showNum1 = '3020'
// this.showNum2 = '3000'
// 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.setEchart02()
},
@@ -325,11 +333,11 @@ export default {
let data2 = []
let data3 = []
let device = []
this.echartData01.map(e => {
data1.push(e.region_in_qty)
data2.push(e.region_out_qty)
data3.push(e.inventory_qty)
device.push(e.material_code)
this.ShiftProductionList.map(e => {
data1.push(e.qualified_qty)
data2.push(e.unqualified_qty)
data3.push(e.total_difference)
device.push(e.column_name)
})
let option = {
grid: {
@@ -480,9 +488,9 @@ export default {
},
setEchart02 () {
let max = 0
this.arr2.map(el => {
if (Number(el.device_fault_num) >= Number(max)) {
max = Number(el.device_fault_num)
this.PersonnelMonthlyProduction.map(el => {
if (Number(el.real_qty) >= Number(max)) {
max = Number(el.real_qty)
}
})
let option = {
@@ -550,7 +558,7 @@ export default {
fontSize: 14
}
},
data: this.arr2.map((it) => it.device_fault_type)
data: this.PersonnelMonthlyProduction.map((it) => it.operator)
},
series: [
{
@@ -579,7 +587,7 @@ export default {
], 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
span
display inline-block
width 6.6%
width 5.2%
text-align center
line-height 32px
font-size 14px
&:nth-child(4)
width 10%
&:nth-child(5)
width 10%
&:nth-child(6)
width 10%
&:nth-child(13)
width 10%
&:nth-child(14)
@@ -793,12 +807,18 @@ export default {
background rgba(38,47,82,0.50)
span
display inline-block
width 6.6%
width 5.2%
font-size 12px
// padding 0 .1rem
text-align center
line-height 38px
box-sizing border-box
&:nth-child(4)
width 10%
&:nth-child(5)
width 10%
&:nth-child(6)
width 10%
&:nth-child(13)
width 10%
&:nth-child(14)