50 lines
961 B
JavaScript
50 lines
961 B
JavaScript
import request from './request.js'
|
|
|
|
// 登录
|
|
export const handLogin = (user, password) => request({
|
|
url:'mobile/auth/login',
|
|
data: {
|
|
username: user,
|
|
password: password
|
|
}
|
|
})
|
|
/**
|
|
* 指令管理
|
|
*/
|
|
// 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
|
|
}
|
|
}) |