生产
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
// import {post} from './http.js'
|
||||
|
||||
// 仓储监控
|
||||
// export const storageMonitor = () => post('/api/cockpit/storageMonitor', {
|
||||
// })
|
||||
export const storageMonitor = () => {
|
||||
let res = {
|
||||
'productionTask': [
|
||||
{
|
||||
'point_id': '1597551506607968256',
|
||||
'point_code': 'YZJHJ04',
|
||||
'point_name': '压制机旧料盅货架04',
|
||||
'material_id': 1556534702800769024,
|
||||
'material_name': '木质花纹2cm',
|
||||
'vehicle_code': '1M3000009',
|
||||
'ivt_qty': 1000.000000,
|
||||
'ivt_weight': 800.000000,
|
||||
'instorage_time': '2023-2-27 16:07:09',
|
||||
'standing_time': 20,
|
||||
'warn_time': '5',
|
||||
'is_full': '1'
|
||||
}
|
||||
],
|
||||
'materialTask': [
|
||||
{
|
||||
'point_id': '1518061204965298176',
|
||||
'point_code': 'YZJ0904',
|
||||
'point_name': '压制机9料盅位4',
|
||||
'material_id': 1556534702800769024,
|
||||
'material_name': '木质花纹2cm',
|
||||
'vehicle_code': '1M3000009',
|
||||
'ivt_qty': 1000.000000,
|
||||
'ivt_weight': 800.000000,
|
||||
'instorage_time': '2023-2-27 16:07:09',
|
||||
'standing_time': 20,
|
||||
'standing_status': '静置完成',
|
||||
'warn_time': '5'
|
||||
}
|
||||
]
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
// 生产统计
|
||||
// export const productionStatistics = () => post(' /api/cockpit/productionStatistics', {
|
||||
// })
|
||||
export const productionStatistics = () => {
|
||||
let res = {
|
||||
'finishedTask': [
|
||||
{
|
||||
'realqty': '130',
|
||||
'planqty': '300',
|
||||
'workorder_procedure': '2'
|
||||
},
|
||||
{
|
||||
'realqty': '160',
|
||||
'planqty': '200',
|
||||
'workorder_procedure': '3'
|
||||
},
|
||||
{
|
||||
'realqty': '70',
|
||||
'planqty': '100',
|
||||
'workorder_procedure': '4'
|
||||
}
|
||||
],
|
||||
'productionTask': [
|
||||
{
|
||||
'workorder_id': '1597564588067524613',
|
||||
'label': '烧制工序',
|
||||
'device_name': '混料机3',
|
||||
'material_code': 'HW00001',
|
||||
'material_name': '木质花纹2cm',
|
||||
'cust_name': '新余钢铁',
|
||||
'plan_qty': 100,
|
||||
'real_qty': 80,
|
||||
'order_status': '5',
|
||||
'shift_type': '烧制白班',
|
||||
'realproducestart_date': '2023-2-27 12:40:00'
|
||||
}
|
||||
],
|
||||
'materialTask': [
|
||||
{
|
||||
'realqty': '360',
|
||||
'planqty': '600'
|
||||
}
|
||||
]
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<section>
|
||||
<t-header index='4'></t-header>
|
||||
<t-header index='2'></t-header>
|
||||
<section>
|
||||
<div class="con1">
|
||||
<div class="c-title c-left">
|
||||
@@ -18,7 +18,7 @@
|
||||
</div>
|
||||
<span>吨</span>
|
||||
</div>
|
||||
<div class="c-title c-right" style="marginLeft: 1rem;">
|
||||
<div class="c-title c-right" style="marginLeft: 1.5rem;">
|
||||
<span>今日成品量:</span>
|
||||
<div class="num">
|
||||
<div class="bg" v-for="item in showNum2" :key="item" :class="{dot: item === '.'}">{{item}}</div>
|
||||
@@ -64,7 +64,7 @@
|
||||
<vue-seamless-scroll :data="taskData" :class-option="classOption" class="content-block-scroll">
|
||||
<ul class="content-block-scroll-ul">
|
||||
<li v-for="(e, i) in taskData" :key="i">
|
||||
<span>{{e.workprocedure_name}}</span><span>{{e.device_name}}</span><span>{{e.material_code}}</span><span>{{e.material_name}}</span><span>{{e.factory_name}}</span><span>{{e.formula_code}}</span><span>{{e.plan_qty}}</span><span>{{e.produce_qty}}</span><span>{{e.shift_type_scode_name}}</span><span>{{e.status_name}}</span>
|
||||
<span>{{e.label}}</span><span>{{e.device_name}}</span><span>{{e.material_code}}</span><span>{{e.material_name}}</span><span>{{e.cust_name}}</span><span>{{e.plan_qty}}</span><span>{{e.real_qty}}</span><span>{{e.shift_type}}</span><span>{{e.order_status}}</span><span>{{e.realproducestart_date}}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</vue-seamless-scroll>
|
||||
@@ -76,6 +76,7 @@
|
||||
<script>
|
||||
import THeader from '@components/header.vue'
|
||||
import * as echarts from 'echarts'
|
||||
import { productionStatistics } from '@js/getData1'
|
||||
export default {
|
||||
name: 'ProdCount',
|
||||
components: {
|
||||
@@ -92,6 +93,7 @@ export default {
|
||||
myCharts05: '',
|
||||
materData: [],
|
||||
deviceData: [],
|
||||
resData: {},
|
||||
taskData: []
|
||||
}
|
||||
},
|
||||
@@ -114,53 +116,35 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
// this.initData()
|
||||
this.initData()
|
||||
// this.refresh()
|
||||
this.setEchart01()
|
||||
this.setEchart05()
|
||||
},
|
||||
beforeDestroy () {
|
||||
clearInterval(this.timer)
|
||||
},
|
||||
methods: {
|
||||
refresh () {
|
||||
this.timer = setInterval(() => {
|
||||
this.initData()
|
||||
}, this.interTime)
|
||||
},
|
||||
initData () {
|
||||
let data = {
|
||||
'_SRVNAME': 'server.jxht.screen',
|
||||
'_SRVMETHOD': 'queryProduceInfo',
|
||||
'_DATA': JSON.stringify({
|
||||
accountId: '-1'
|
||||
})
|
||||
}
|
||||
this
|
||||
.$post(data)
|
||||
.then(res => {
|
||||
if (res.code === '1') {
|
||||
this.showNum1 = (res.result.form.produce_total_qty + '').split('')
|
||||
this.showNum2 = (res.result.form.finished_total_qty + '').split('')
|
||||
this.showNum3 = res.result.form.day_qty
|
||||
this.showNum4 = res.result.form.shift_qty
|
||||
this.materData = res.result.material_rows
|
||||
this.deviceData = res.result.device_rows
|
||||
this.taskData = res.result.task_rows
|
||||
this.getEchart1()
|
||||
this.getEchart2()
|
||||
} else {
|
||||
this.toast(res.desc)
|
||||
}
|
||||
})
|
||||
// refresh () {
|
||||
// this.timer = setInterval(() => {
|
||||
// this.initData()
|
||||
// }, this.interTime)
|
||||
// },
|
||||
async initData () {
|
||||
let res = await productionStatistics()
|
||||
this.resData = res
|
||||
this.taskData = [...res.productionTask]
|
||||
this.setEchart01()
|
||||
this.setEchart05()
|
||||
},
|
||||
setEchart01 () {
|
||||
let data = [100, 50, 30, 80]
|
||||
// let data = [100, 30, 80, 50]
|
||||
let data = []
|
||||
data.push(this.resData.materialTask[0].realqty)
|
||||
data.push(this.resData.materialTask[0].planqty)
|
||||
var option = {
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
right: 0,
|
||||
data: ['未完成重量', '已经完成重量', '空闲设备', '故障设备'],
|
||||
data: ['未完成重量', '已经完成重量', '重量3', '重量4'],
|
||||
textStyle: {
|
||||
color: '#ffffff',
|
||||
fontSize: '16'
|
||||
@@ -189,6 +173,14 @@ export default {
|
||||
})
|
||||
},
|
||||
setEchart05 () {
|
||||
var data05d0 = []
|
||||
var data05d1 = []
|
||||
var data05d2 = []
|
||||
this.resData.finishedTask.map(el => {
|
||||
data05d0.push(el.workorder_procedure)
|
||||
data05d1.push(el.planqty)
|
||||
data05d2.push(el.realqty)
|
||||
})
|
||||
let option = {
|
||||
grid: {
|
||||
top: 50,
|
||||
@@ -228,8 +220,8 @@ export default {
|
||||
fontSize: 14
|
||||
}
|
||||
},
|
||||
// data: this.data05_d0
|
||||
data: ['压制', '干燥', '包装']
|
||||
data: data05d0
|
||||
// data: ['压制', '干燥', '包装']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
@@ -278,8 +270,8 @@ export default {
|
||||
])
|
||||
}
|
||||
},
|
||||
// data: this.data05_d1
|
||||
data: ['390', '390', '390']
|
||||
data: data05d1
|
||||
// data: ['390', '390', '390']
|
||||
},
|
||||
{
|
||||
name: '已完成数量',
|
||||
@@ -302,8 +294,8 @@ export default {
|
||||
])
|
||||
}
|
||||
},
|
||||
// data: this.data05_d3
|
||||
data: ['210', '210', '210']
|
||||
data: data05d2
|
||||
// data: ['210', '210', '210']
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -635,26 +627,26 @@ export default {
|
||||
position absolute
|
||||
top .3rem
|
||||
left .25rem
|
||||
font-size .24rem
|
||||
font-size .16rem
|
||||
.desc
|
||||
position absolute
|
||||
top .75rem
|
||||
top .6rem
|
||||
left .25rem
|
||||
display flex
|
||||
div
|
||||
font-size .24rem
|
||||
font-size .16rem
|
||||
margin-right .5rem
|
||||
margin-right 1.2rem
|
||||
span
|
||||
font-size .3rem
|
||||
font-size .16rem
|
||||
color #F7B502
|
||||
margin 0 .25rem
|
||||
.item_content_0
|
||||
position absolute
|
||||
top .3rem
|
||||
top .4rem
|
||||
left .25rem
|
||||
height 375px
|
||||
width 95%
|
||||
height 380px
|
||||
width 85%
|
||||
.con3
|
||||
float left
|
||||
// width 13.57rem
|
||||
@@ -668,7 +660,7 @@ export default {
|
||||
position absolute
|
||||
top .3rem
|
||||
left .25rem
|
||||
font-size .24rem
|
||||
font-size .16rem
|
||||
.item_content_1
|
||||
position absolute
|
||||
top .3rem
|
||||
|
||||
@@ -7,7 +7,7 @@ const HomePage = r => require.ensure([], () => r(require('@page/HomePage')), 'Ho
|
||||
const StorageMonitor = r => require.ensure([], () => r(require('@page/StorageMonitor')), 'StorageMonitor')
|
||||
const DeviceMonitor = r => require.ensure([], () => r(require('@page/DeviceMonitor')), 'DeviceMonitor')
|
||||
const LogisticsTech = r => require.ensure([], () => r(require('@page/LogisticsTech')), 'LogisticsTech')
|
||||
const ProdCount = r => require.ensure([], () => r(require('@page/ProdCount')), 'ProdCount')
|
||||
const ProdCount = r => require.ensure([], () => r(require('@page/ProdCount2')), 'ProdCount')
|
||||
Vue.use(Router)
|
||||
|
||||
export default new Router({
|
||||
|
||||
Reference in New Issue
Block a user