2023-09-15 10:02:00 +08:00
|
|
|
import {post} from '@config/http.js'
|
|
|
|
|
|
|
|
|
|
// 手持登录
|
|
|
|
|
export const loginApi = (user, password) => post('api/pda/login', {
|
|
|
|
|
username: user,
|
|
|
|
|
password: password
|
|
|
|
|
})
|
|
|
|
|
// export const loginApi = (user, password) => {
|
|
|
|
|
// let res = {
|
|
|
|
|
// 'result': {
|
|
|
|
|
// 'user': {
|
|
|
|
|
// 'user': {
|
|
|
|
|
// 'createBy': null,
|
|
|
|
|
// 'updatedBy': 'System',
|
|
|
|
|
// 'createTime': 1534986716000,
|
|
|
|
|
// 'updateTime': 1683368236000,
|
|
|
|
|
// 'id': '1',
|
|
|
|
|
// 'roles': [
|
|
|
|
|
// {
|
|
|
|
|
// 'id': 1,
|
|
|
|
|
// 'name': '超级管理员',
|
|
|
|
|
// 'level': 1,
|
|
|
|
|
// 'dataScope': '全部'
|
|
|
|
|
// }
|
|
|
|
|
// ],
|
|
|
|
|
// 'dept': {
|
|
|
|
|
// 'id': 18,
|
|
|
|
|
// 'code': null,
|
|
|
|
|
// 'name': '系统'
|
|
|
|
|
// },
|
|
|
|
|
// 'deptId': null,
|
|
|
|
|
// 'username': 'admin',
|
|
|
|
|
// 'nickName': '管理员',
|
|
|
|
|
// 'email': '',
|
|
|
|
|
// 'phone': '',
|
|
|
|
|
// 'gender': '男',
|
|
|
|
|
// 'avatarName': 'avatar-20200806032259161.png',
|
|
|
|
|
// 'avatarPath': '/Users/jie/Documents/work/me/admin/eladmin/~/avatar/avatar-20200806032259161.png',
|
|
|
|
|
// 'extId': null,
|
|
|
|
|
// 'extuserId': null,
|
|
|
|
|
// 'enabled': true,
|
|
|
|
|
// 'pwdResetTime': 1588495111000
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// 'token': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOjEsInJuU3RyIjoiMWo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ZW51OmRlbCIsImRlcHQ6YWRkIiwiZGVwdDplZGl0IiwiZGVwdDpkZWwiLCJkaWN0OmFkZCIsImRpY3Q6ZWRpdCIsImRpY3Q6ZGVsIiwidGltaW5nOmFkZCIsInRpbWluZzplZGl0IiwidGltaW5nOmRlbCIsIm1vbml0b3I6bGlzdCIsImdlbkNvZGU6bGlzdCIsImdlbkNvZGU6YWRkIiwiZ2VuQ29kZTpkZWwiLCJnZW5Db2RlOmVkaXQiLCI5OTkiLCJzdG9yYWdlOmxpc3QiLCJzdG9yYWdlOmFkZCIsInN0b3JhZ2U6ZWRpdCIsInN0b3JhZ2U6ZGVsIl19fQ.q7PzhQbg_3FY-4TkL4S6Iy_Qx05YBGz2BI5mSkRl2AU'
|
|
|
|
|
// },
|
|
|
|
|
// 'code': '1',
|
|
|
|
|
// 'desc': '操作成功!'
|
|
|
|
|
// }
|
|
|
|
|
// return res
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// 手持登陆查询菜单权限
|
|
|
|
|
export const authority = (id) => post('api/pda/authority', {
|
|
|
|
|
accountId: id
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 查询区域
|
|
|
|
|
export const pdaRegion = (func) => post('api/pda/region', {
|
|
|
|
|
func: func
|
|
|
|
|
})
|
|
|
|
|
// export const pdaRegion = (func) => {
|
|
|
|
|
// let res = {
|
|
|
|
|
// code: '1',
|
|
|
|
|
// result: [{region_code: '1', region_name: 'aa'}, {region_code: '2', region_name: 'bb'}, {region_code: '3', region_name: 'cc'}]
|
|
|
|
|
// }
|
|
|
|
|
// return res
|
|
|
|
|
// }
|
|
|
|
|
// 根据区域查询点位
|
|
|
|
|
export const pdaPoint = (func, code) => post('api/pda/point', {
|
|
|
|
|
func: func,
|
|
|
|
|
region_code: code
|
|
|
|
|
})
|
|
|
|
|
// export const pdaPoint = (func, code) => {
|
|
|
|
|
// let res = {
|
|
|
|
|
// code: '1',
|
|
|
|
|
// result: [{point_code: '1', point_name: 'aa'}, {point_code: '2', point_name: 'bb'}, {point_code: '3', point_name: 'cc'}]
|
|
|
|
|
// }
|
|
|
|
|
// return res
|
|
|
|
|
// }
|
|
|
|
|
// 查询设备
|
|
|
|
|
export const pdaDevice = (func) => post('api/pda/device', {
|
|
|
|
|
func: func
|
|
|
|
|
})
|
|
|
|
|
// export const pdaDevice = (func) => {
|
|
|
|
|
// let res = {
|
|
|
|
|
// code: '1',
|
|
|
|
|
// result: [{device_code: '1', device_name: 'aa'}, {device_code: '2', device_name: 'bb'}, {device_code: '3', device_name: 'cc'}]
|
|
|
|
|
// }
|
|
|
|
|
// return res
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// 查询载具类型
|
|
|
|
|
export const pdavehicleType = (func) => post('api/pda/vehicleType', {
|
|
|
|
|
func: func
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 不合格品上报
|
|
|
|
|
export const pdaReport = (code, qty) => post('api/pda/report', {
|
|
|
|
|
device_code: code,
|
|
|
|
|
unqualified_qty: qty
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 送料
|
2023-09-16 21:14:24 +08:00
|
|
|
export const sendMaterial = (code, vcode, qty, weight) => post('api/pda/sendMaterial', {
|
2023-09-15 10:02:00 +08:00
|
|
|
point_code: code,
|
|
|
|
|
vehicle_code: vcode,
|
|
|
|
|
qty: qty,
|
2023-09-16 21:14:24 +08:00
|
|
|
weight: weight
|
2023-09-15 10:02:00 +08:00
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 叫料
|
|
|
|
|
export const callMaterial = (code) => post('api/pda/callMaterial', {
|
|
|
|
|
point_code: code
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 送空
|
|
|
|
|
export const sendEmpty = (code, vcode) => post('api/pda/sendEmpty', {
|
|
|
|
|
point_code: code,
|
|
|
|
|
vehicle_code: vcode
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 叫空
|
|
|
|
|
export const callEmpty = (code) => post('api/pda/callEmpty', {
|
|
|
|
|
point_code: code
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 困料管理
|
|
|
|
|
export const standStatus = (vcode, type) => post('api/pda/standStatus', {
|
|
|
|
|
vehicle_code: vcode,
|
|
|
|
|
type: type
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 入窑管理
|
|
|
|
|
export const inKiln = (vcode, type) => post('api/pda/inKiln', {
|
|
|
|
|
vehicle_code: vcode,
|
|
|
|
|
type: type
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 载具绑定
|
|
|
|
|
export const vehicleBind = (code, vtype, vcode) => post('api/pda/vehicleBind', {
|
|
|
|
|
point_code: code,
|
|
|
|
|
vehicle_type: vtype,
|
|
|
|
|
vehicle_code: vcode
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 载具解绑
|
|
|
|
|
export const vehicleUnbind = (code) => post('api/pda/vehicleUnbind', {
|
|
|
|
|
point_code: code
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 呼叫次品料
|
|
|
|
|
export const callDefective = (code) => post('api/pda/callDefective', {
|
|
|
|
|
device_code: code
|
|
|
|
|
})
|
2023-09-15 16:52:36 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 人工拆垛
|
|
|
|
|
*/
|
|
|
|
|
// 查询人工拆垛起点终点
|
|
|
|
|
export const fjPoint = () => post('api/pda/fjPoint', {})
|
|
|
|
|
|
|
|
|
|
// 人工拆垛创建任务
|
|
|
|
|
export const createTask = (scode, ecode) => post('api/pda/createTask', {
|
|
|
|
|
start_point_code: scode,
|
|
|
|
|
end_point_code: ecode
|
|
|
|
|
})
|