agv调整
This commit is contained in:
@@ -64,4 +64,24 @@ export function getAgvPosition(query) {
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
/*
|
||||
7 生成agv任务
|
||||
|
||||
*/
|
||||
export function goTask(data) {
|
||||
return request({
|
||||
url: '/mes/wm/agv/generate_agv_task',
|
||||
method: 'get',
|
||||
params: data,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function Stoptask(data) {
|
||||
return request({
|
||||
url: '/mes/wm/agv/cancel_agv_task',
|
||||
method: 'get',
|
||||
params: data,
|
||||
})
|
||||
}
|
||||
@@ -73,7 +73,8 @@
|
||||
return {
|
||||
loading: false,
|
||||
orderInfo: {},
|
||||
list: []
|
||||
list: [],
|
||||
flag:1
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
@@ -144,12 +145,72 @@
|
||||
|
||||
},
|
||||
handlerStart1() {
|
||||
this.flag=1;
|
||||
// 上料
|
||||
const queryData = {
|
||||
workorder_id: this.orderInfo.id,
|
||||
flag:this.flag
|
||||
}
|
||||
AgvApi.goTask(queryData).then(res => {
|
||||
if (res.code === 200) {
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
title: res.data.message
|
||||
});
|
||||
|
||||
}else{
|
||||
uni.showToast({
|
||||
icon: 'error',
|
||||
title: res.data
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
handlerStart2() {
|
||||
this.flag=2;
|
||||
// 反程
|
||||
const queryData = {
|
||||
workorder_id: this.orderInfo.id,
|
||||
flag:2
|
||||
}
|
||||
AgvApi.goTask(queryData).then(res => {
|
||||
if (res.code === 200) {
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
title: res.data.message
|
||||
});
|
||||
|
||||
|
||||
}else{
|
||||
uni.showToast({
|
||||
icon: 'error',
|
||||
title: res.data
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
handlerStop() {
|
||||
const queryData = {
|
||||
workorder_id: this.orderInfo.id,
|
||||
flag:this.flag
|
||||
}
|
||||
AgvApi.Stoptask(queryData).then(res => {
|
||||
if (res.code === 200) {
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
title: res.data.message
|
||||
});
|
||||
|
||||
|
||||
}else{
|
||||
uni.showToast({
|
||||
icon: 'error',
|
||||
title: res.data
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
actionsClick() {
|
||||
|
||||
@@ -18,9 +18,9 @@ import {
|
||||
let timeout = 10000
|
||||
const request = config => {
|
||||
// 浏览器测试用
|
||||
// const storageBaseUrl = 'http://' + getBaseUrl() + '/api';
|
||||
const storageBaseUrl = 'http://' + getBaseUrl() + '/api';
|
||||
// 真机测试以及部署用
|
||||
const storageBaseUrl = 'http://' + getBaseUrl();
|
||||
//const storageBaseUrl = 'http://' + getBaseUrl();
|
||||
// 是否需要设置 token
|
||||
const isToken = (config.headers || {}).isToken === false
|
||||
config.header = config.header || {}
|
||||
|
||||
Reference in New Issue
Block a user