import {post2} from '@config/http.js' // 测试接口返回结果 export const test = () => post2('test/1', {}) // 手持登录 export const loginApi = (user, password) => post2('mobile/auth/login', { username: user, password: password }) // 手持登陆查询菜单权限 export const authority = (id) => post2('api/pda/authority', { accountId: id }) // 修改密码 export const updatePass = (Rfold, Rfnew) => post2('api/pda/updatePass', { RfoldPass: Rfold, RfnewPass: Rfnew }) /** 站点管理 */ // 1.1查询所有区域信息 // export const queryArea = () => post2('api/hand/queryArea', {}) export const queryArea = () => post2('api/hand/queryDevice', {}) // export const queryArea = () => { // let res = { // result: {regionja: [{region_code: '1', region_name: 'A1', deviceArr: [{device_code: '1', device_name: 'AA1', input_material: '1', status: '0'}, {device_code: '2', device_name: 'AA2', status: '1'}, {device_code: '3', device_name: 'AA3', status: '2'}]}]} // } // return res // } // 1.2根据区域查询设备编号及状态 export const queryPointByArea = (code) => post2('api/hand/queryPointByArea', { areaCode: code }) // export const queryPointByArea = (code) => { // let res = { // result: [{device_code: '1', device_name: 'JLDFJLLJ', input_material: '1', status: '0'}, {device_code: '2', device_name: 'fffdf', status: '1'}, {device_code: '3', device_name: 'dffsfg', status: '2'}, {device_code: '1', device_name: 'JLDFJLLJ', input_material: '1', status: '0'}, {device_code: '2', device_name: 'fffdf', status: '1'}, {device_code: '3', device_name: 'dffsfg', status: '2'}, {device_code: '1', device_name: 'JLDFJLLJ', input_material: '1', status: '0'}, {device_code: '2', device_name: 'fffdf', status: '1'}, {device_code: '3', device_name: 'dffsfg', status: '2'}, {device_code: '1', device_name: 'JLDFJLLJ', input_material: '1', status: '0'}, {device_code: '2', device_name: 'fffdf', status: '1'}, {device_code: '3', device_name: 'dffsfg', status: '2'}] // } // return res // } // 1.3查询物料 export const queryMaterial = () => post2('api/hand/queryMaterial', {}) // 1.4点位状态绑定 export const bindpoint = (code, mtype, type, status) => post2('api/hand/bindpoint', { device_codes: code, material_type: mtype, type: type, status: status }) /** 呼叫管理 */ // 1.1创建任务(确定起点) export const callTask = (scodes, code) => post2('api/hand/callTask', { start_device_codes: scodes, next_device_code: code }) /** 充电任务 */ export const createChargingTask = (type) => post2('api/hand/createChargingTask', { type: type })