Files
hht-tongbo-acs-two-uni/utils/getData2.js

128 lines
2.7 KiB
JavaScript
Raw Normal View History

2024-04-02 13:22:24 +08:00
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
}
})
/**
2024-04-02 15:49:38 +08:00
* 站点管理
2024-04-02 13:22:24 +08:00
*/
2024-04-02 15:49:38 +08:00
// 1.1查询所有区域信息
export const queryArea = () => request({
url:'api/hand/queryArea',
2024-04-02 13:22:24 +08:00
data: {}
})
2024-04-02 15:49:38 +08:00
// 1.2根据区域查询设备编号及状态
export const queryPointByArea = (code) => request({
url:'api/hand/queryPointByArea',
2024-04-02 13:22:24 +08:00
data: {
2024-04-02 17:43:30 +08:00
region_code: code
2024-04-02 13:22:24 +08:00
}
})
2024-04-02 15:49:38 +08:00
// 1.3创建任务(生成任务号为-开头)
export const callTask = (scode, ncode, type) => request({
url:'api/hand/callTask',
2024-04-02 13:22:24 +08:00
data: {
2024-04-02 15:49:38 +08:00
start_device_code: scode,
next_device_code: ncode,
task_type: type
2024-04-02 13:22:24 +08:00
}
})
/**
2024-04-02 15:49:38 +08:00
* 指令管理
2024-04-02 13:22:24 +08:00
*/
2024-04-02 15:49:38 +08:00
// 1.1 查询未完成指令(生成任务号为-开头)
export const handInsts = (key, scode, ncode) => request({
url:'api/hand/insts',
2024-04-02 13:22:24 +08:00
data: {
2024-04-02 15:49:38 +08:00
keyword: key,
2024-04-02 13:22:24 +08:00
start_devicecode: scode,
next_devicecode: ncode
}
})
2024-04-02 15:49:38 +08:00
// 1.2 指令操作
export const handInst = (type, id) => request({
url:'api/hand/inst',
2024-04-02 13:22:24 +08:00
data: {
type: type,
2024-04-02 15:49:38 +08:00
inst_uuid: id
2024-04-02 13:22:24 +08:00
}
})
/**
2024-04-02 15:49:38 +08:00
* 任务管理
2024-04-02 13:22:24 +08:00
*/
2024-04-02 15:49:38 +08:00
// 1.1 1.1 查询无指令的任务(任务号为-开头)
export const handTasks = (key, scode, ncode) => request({
url:'api/hand/tasks',
2024-04-02 13:22:24 +08:00
data: {
2024-04-02 15:49:38 +08:00
keyword: key,
start_devicecode: scode,
next_devicecode: ncode
2024-04-02 13:22:24 +08:00
}
})
2024-04-02 15:49:38 +08:00
// 1.2 任务操作
export const handTaskoperation = (type, id) => request({
url:'api/hand/taskoperation',
2024-04-02 13:22:24 +08:00
data: {
2024-04-02 15:49:38 +08:00
type: type,
task_uuid: id
2024-04-02 13:22:24 +08:00
}
2024-04-18 16:12:47 +08:00
})
/**
* 生箔站点管理
*/
// 1.1根据区域查询设备编号及状态
export const queryDevices = () => request({
url:'api/hands/queryDevices',
data: {}
})
// 1.3更新设备状态操作
export const updateDeviceStatus = (code, option) => request({
url:'api/hands/updateDeviceStatus',
data: {
device_code: code,
option: option
}
})
/**
* agv呼叫管理
*/
// 1.1查询所有区域信息
2024-04-19 14:40:47 +08:00
export const agvqueryArea = () => request({
2024-04-18 16:12:47 +08:00
url:'api/hands/queryArea',
data: {}
})
// 1.2根据区域查询设备编号及状态
export const agvqueryPointByArea = (code) => request({
url:'api/hands/queryPointByArea',
data: {
2024-04-19 14:40:47 +08:00
region_code: code
2024-04-18 16:12:47 +08:00
}
})
// 1.2创建任务(生成任务号为-开头)
2024-04-19 17:06:56 +08:00
export const agvcallTask = (scode1, ncode1, scode2, ncode2,type) => request({
2024-04-18 16:12:47 +08:00
url:'api/hands/callTask',
data: {
start_device_code1: scode1,
next_device_code1: ncode1,
start_device_code2: scode2,
next_device_code2: ncode2,
2024-04-19 17:06:56 +08:00
task_type: type
2024-04-18 16:12:47 +08:00
}
2024-04-02 13:22:24 +08:00
})