复制斗山
This commit is contained in:
111
utils/getData2.js
Normal file
111
utils/getData2.js
Normal file
@@ -0,0 +1,111 @@
|
||||
import request from './request.js'
|
||||
|
||||
// 版本更新测试
|
||||
export const pdaUpdate = () => request({
|
||||
url:'api/pda/update'
|
||||
})
|
||||
// export const pdaUpdate = () => {
|
||||
// let res = {
|
||||
// versionName: '1.0.1',
|
||||
// url: 'https://mp-e979e0eb-882b-42b3-a4a1-923ad08ea194.cdn.bspapp.com/cloudstorage/f72ec59f-7b25-487d-a034-fead1b6654c6.apk'
|
||||
// }
|
||||
// return res
|
||||
// }
|
||||
|
||||
// 登录
|
||||
export const handLogin = (user, password) => request({
|
||||
url:'mobile/auth/login',
|
||||
data: {
|
||||
username: user,
|
||||
password: password
|
||||
}
|
||||
})
|
||||
/**
|
||||
* 站点管理
|
||||
*/
|
||||
// 1.1查询所有区域信息
|
||||
export const queryArea = () => request({
|
||||
url:'api/hand/queryArea',
|
||||
data: {}
|
||||
})
|
||||
// 1.2根据区域查询设备编号及状态
|
||||
export const queryPointByArea = (code) => request({
|
||||
url:'api/hand/queryPointByArea',
|
||||
data: {
|
||||
region_code: code
|
||||
}
|
||||
})
|
||||
// 1.3创建任务(生成任务号为-开头)
|
||||
export const callTask = (scode, ncode, type) => request({
|
||||
url:'api/hand/callTask',
|
||||
data: {
|
||||
start_device_code: scode,
|
||||
next_device_code: ncode,
|
||||
task_type: type
|
||||
}
|
||||
})
|
||||
/**
|
||||
* 指令管理
|
||||
*/
|
||||
// 1.1 查询未完成指令(生成任务号为-开头)
|
||||
export const handInsts = (key, scode, ncode) => request({
|
||||
url:'api/hand/insts',
|
||||
data: {
|
||||
keyword: key,
|
||||
start_devicecode: scode,
|
||||
next_devicecode: ncode
|
||||
}
|
||||
})
|
||||
// 1.2 指令操作
|
||||
export const handInst = (type, id) => request({
|
||||
url:'api/hand/inst',
|
||||
data: {
|
||||
type: type,
|
||||
inst_uuid: id
|
||||
}
|
||||
})
|
||||
/**
|
||||
* 任务管理
|
||||
*/
|
||||
// 1.1 1.1 查询无指令的任务(任务号为-开头)
|
||||
export const handTasks = (key, scode, ncode) => request({
|
||||
url:'api/hand/tasks',
|
||||
data: {
|
||||
keyword: key,
|
||||
start_devicecode: scode,
|
||||
next_devicecode: ncode
|
||||
}
|
||||
})
|
||||
// 1.2 任务操作
|
||||
export const handTaskoperation = (type, id) => request({
|
||||
url:'api/hand/taskoperation',
|
||||
data: {
|
||||
type: type,
|
||||
task_uuid: id
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* 放货确认
|
||||
*/
|
||||
export const updateTask = (code,type) => request({
|
||||
url:'api/wms/updateTask',
|
||||
data: {
|
||||
device_code: code,
|
||||
option: type
|
||||
}
|
||||
})
|
||||
/**
|
||||
* 充电任务
|
||||
*/
|
||||
export const taskCharge = () => request({
|
||||
url:'api/hand/taskCharge',
|
||||
data: {}
|
||||
})
|
||||
/**
|
||||
* 取消充电任务
|
||||
*/
|
||||
export const cancleTaskCharge = () => request({
|
||||
url:'api/hand/cancleTaskCharge',
|
||||
data: {}
|
||||
})
|
||||
Reference in New Issue
Block a user