/*
|
* Copyright (c) 2018-2025, ztt All rights reserved.
|
*
|
* Redistribution and use in source and binary forms, with or without
|
* modification, are permitted provided that the following conditions are met:
|
*
|
* Redistributions of source code must retain the above copyright notice,
|
* this list of conditions and the following disclaimer.
|
* Redistributions in binary form must reproduce the above copyright
|
* notice, this list of conditions and the following disclaimer in the
|
* documentation and/or other materials provided with the distribution.
|
* Neither the name of the pig4cloud.com developer nor the names of its
|
* contributors may be used to endorse or promote products derived from
|
* this software without specific prior written permission.
|
* Author: ztt
|
*/
|
|
import request from '@/router/axios'
|
|
export function fetchList(query) {
|
return request({
|
url: '/mes/routing/page',
|
method: 'get',
|
params: query
|
})
|
}
|
|
export function addObj(obj) {
|
return request({
|
url: '/mes/routing',
|
method: 'post',
|
data: obj
|
})
|
}
|
|
export function getObj(id) {
|
return request({
|
url: '/mes/routing/' + id,
|
method: 'get'
|
})
|
}
|
|
// export function delObj(id) {
|
// return request({
|
// url: '/mes/routing/' + id,
|
// method: 'delete'
|
// })
|
// }
|
|
export function delObj(ids, event) {
|
return request({
|
url: '/mes/routing',
|
method: 'delete',
|
data: ids
|
})
|
}
|
|
export function putObj(obj) {
|
return request({
|
url: '/mes/routing',
|
method: 'put',
|
data: obj
|
})
|
}
|
|
export function putParam(obj, id, id1) {
|
return request({
|
url: '/mes/routing/param/' + id + '/' + id1,
|
method: 'post',
|
data: obj
|
})
|
}
|
export function getParam(query, id, id1) {
|
return request({
|
url: '/mes/routing/param/' + id + '/' + id1,
|
method: 'get',
|
params: query
|
})
|
}
|
export function changeState(id, event) {
|
return request({
|
url: '/mes/routing/state/' + id + '/' + event,
|
method: 'post'
|
})
|
}
|
|
export function getOperationDetail(query) {
|
return request({
|
url: '/mes/routing/operationDetail',
|
method: 'get',
|
params: query
|
})
|
}
|
export function copyRoutingSave(obj) {
|
return request({
|
url: '/mes/routing/copy',
|
method: 'post',
|
data: obj
|
})
|
}
|
|
export function getRoutingTemplate(query) {
|
return request({
|
url: '/mes/routing/routingTemplate',
|
method: 'get',
|
params: query
|
})
|
}
|
|
export function getRoutingOperationTemplatePage(query) {
|
return request({
|
url: '/mes/routing/routingOperationTemplate/page',
|
method: 'get',
|
params: query
|
})
|
}
|
|
export function getRoutingTemplateParam(query) {
|
return request({
|
url: '/mes/routing/routingTemplateParam',
|
method: 'get',
|
params: query
|
})
|
}
|
|
export function addRoutingTemplate(obj) {
|
return request({
|
url: '/mes/routing/addRoutingTemplate',
|
method: 'post',
|
data: obj
|
})
|
}
|
|
export function deleteRoutingTemplate(id) {
|
return request({
|
url: '/mes/routing/deleteRoutingTemplate/' + id,
|
method: 'delete'
|
})
|
}
|
|
export function addRoutingTemplateParamLed(obj) {
|
return request({
|
url: '/mes/routing/addRoutingTemplateParam',
|
method: 'post',
|
data: obj
|
})
|
}
|
|
export function deleteRoutingTemplateParam(id) {
|
return request({
|
url: '/mes/routing/deleteRoutingTemplateParam/' + id,
|
method: 'delete'
|
})
|
}
|
|
export function putRoutingTemplateParam(obj) {
|
return request({
|
url: '/mes/routing/routingTemplateParam',
|
method: 'put',
|
data: obj
|
})
|
}
|
|
export function routingOperationChange(obj) {
|
return request({
|
url: '/mes/routing/routingOperationChange',
|
method: 'post',
|
data: obj
|
})
|
}
|
|
export function exportRoutingTemplate() {
|
return request({
|
url: '/mes/routing/exportModel',
|
method: 'get',
|
responseType: 'blob'
|
})
|
}
|
|
export function changeStateBatch(ids, event) {
|
return request({
|
url: '/mes/routing/state/' + event,
|
method: 'post',
|
data: ids
|
})
|
}
|
|
export function routingIfsSync(obj) {
|
return request({
|
url: '/mes/routing/routingIfsSync',
|
method: 'post',
|
data: obj
|
})
|
}
|
|
export function routingIfsCal(obj) {
|
return request({
|
url: '/mes/routing/routingIfsCal',
|
method: 'post',
|
data: obj
|
})
|
}
|
|
export function getRoutingByDocumentIdAndOperationId(query) {
|
return request({
|
url: '/mes/routing/getRoutingByDocumentIdAndOperationId',
|
method: 'get',
|
params: query
|
})
|
}
|