59 lines
1.4 KiB
JavaScript
59 lines
1.4 KiB
JavaScript
/*
|
|
* @Author: lb
|
|
* @Date: 2022-06-22 14:00:17
|
|
* @LastEditors: lb
|
|
* @LastEditTime: 2022-06-22 14:00:17
|
|
* @Description: 实时数据接口
|
|
*/
|
|
import request from '@/utils/request'
|
|
|
|
function getOrderRealtimeData() { // 订单生产实时数据
|
|
return request({
|
|
url: '/team/production-monitoring/orderProductionRealTimeData',
|
|
method: 'POST'
|
|
})
|
|
}
|
|
|
|
function getLineRealtimeData() { // 产线生产实时数据
|
|
return request({
|
|
url: '/team/production-monitoring/lineProductionRealTimeData',
|
|
method: 'POST'
|
|
})
|
|
}
|
|
|
|
function getEquipmentRealtimeData() { // 设备生产实时数据
|
|
return request({
|
|
url: '/team/production-monitoring/equipmentProductionRealTimeData',
|
|
method: 'POST'
|
|
})
|
|
}
|
|
|
|
function getTeamRealtimeData() { // 班组生产实时数据
|
|
return request({
|
|
url: '/team/production-monitoring/teamProductionRealTimeData',
|
|
method: 'POST'
|
|
})
|
|
}
|
|
|
|
function getQualityRealtimeData() { // 质量检查实时数据
|
|
return request({
|
|
url: '/team/production-monitoring/qualityInspectionRealTimeData',
|
|
method: 'POST'
|
|
})
|
|
}
|
|
|
|
export default function(type) {
|
|
switch (type) {
|
|
case 'order':
|
|
return getOrderRealtimeData()
|
|
case 'line':
|
|
return getLineRealtimeData()
|
|
case 'equipment':
|
|
return getEquipmentRealtimeData()
|
|
case 'team':
|
|
return getTeamRealtimeData()
|
|
case 'quality':
|
|
return getQualityRealtimeData()
|
|
}
|
|
}
|