import request from './request' //登录 export function wxLogin(params) { return new Promise((resolve, reject) => { request.post("/user/login", params).then(result => { resolve(result) }).catch(err => { reject(err) }); }) } //换电监控接口开始 //换电信息 export function swapInfo(params) { return request.post("/swap/swapInfo", params) } //已连接站控车辆列表 export function CarOnline() { return request.post("/vehicle/online") } //修改车牌号 export function EditPlate(params) { return request.post("/vehicle/editPlate", params) } //车辆上锁 export function Updatelock(params) { return request.post("/vehicle/lock", params) } //车辆解锁 export function Updateunlock(params) { return request.post("/vehicle/unlock", params) } //暂停恢复PLC export function EditSwapplc(data) { return request.post("/swap/plc", data) } //开始换电 export function beginSwap(params) { return request.post("/swap/startSwap", params) } //设置选电模式(0自动、1手动) export function setMode(params) { return request.post("/swap/setMode", params) } //急停中止 export function plcStop(params) { return request.post("/swap/plcStop", params) } //锁止屏蔽 export function EditforbidLock(data) { return request.post("/vehicle/forbidLock", data) } //换电监控接口结束 //故障告警 export function alarmList(data) { return request.post("/alarm/list", data) } // 处理告警 export function alarmDispose(data) { return request.post("/alarm/dispose", data) } // 确认消防换仓 export function getfireProtection(data) { return request.post("/device/fireProtection", data) } //开始充电 export function startCharge(params) { return request.post(`/discharge/startCharge?chargerId=${params.chargerId}&sn=${params.sn}`) } //断电 export function stopCharge(params) { return request.post(`/discharge/stopCharge?chargerId=${params.chargerId}`) } // 获取充电机ID export function getChargeCode() { return request.get('/device/getChargeCode') } // 充电记录列表 export function chargeList(data) { return request.post('/charge/list',data) } // 换电记录列表 export function swapList(data) { return request.post('/swapRecord/list',data) } //获取用户信息 export function getInfo(data) { return request.get('/user/info',data) } //车辆管理、基础数据 export function vehicleList(data) { return request.post('/vehicle/list',data) } //删除车辆、基础数据 export function delvehicle(data) { return request.post('/vehicle/del',data) } //添加车辆、基础数据 export function addvehicle(data) { return request.post('/vehicle/save',data) } //编辑车辆、基础数据 export function Editvehicle(data) { return request.post('/vehicle/edit',data) } //普通调仓 export function RuleChangestorage(data) { return request.post('/device/exchangeBattery',data) } //消防调仓 export function FireChangestorage(data) { return request.post('/device/fireProtection',data) } //消防告警 export function getwarnList(data) { return request.post("/alarm/realList", data) } //首页数据概览 export function getoverview() { return request.post("/statistics/overview") } //云端同步时间获取 export function getSyncTime() { return request.post("/vehicle/getSyncTime") } //云端同步 export function getSync() { return request.post("/vehicle/sync") } //侧边栏消防告警数量 export function getToDayAlarm() { return request.post("/alarm/toDayAlarm") } //换电监控 车牌号刷新接口 export function getRefresh() { return request.post("/vehicle/refresh") } //换电编号 export function getStationCode() { return request.post("/swap/getStationCode") } //云端 export function getcloudConnState() { return request.post("/alarm/toDayAlarm") } //切换仓内仓外 export function gettoggleChargeWay(data) { return request.post("/discharge/toggleChargeWay",data) } //限功率 export function getlimitPower(data) { return request.post("/discharge/limitPower",data) } //插枪充电 export function getgunStartCharge(data) { return request.post("/discharge/gunStartCharge",data) } //停止插枪充电 export function getgunStopCharge(data) { return request.post("/discharge/gunStopCharge",data) } //设备监控充电机获取设置功率 export function getChargePower(data) { return request.post("/discharge/getPower",data) } //仓位管理、基础数据 export function encodeList(data) { return request.post('/encode/list',data) } //删除仓位、基础数据 export function delEncode(data) { return request.post('/encode/del',data) } //添加仓位、基础数据 export function addEncode(data) { return request.post('/encode/add',data) } //编辑仓位、基础数据 export function editEncode(data) { return request.post('/encode/edit',data) } //基础数据-站控配置中转仓相关 export function setStation(data) { return request.post('/swap/setStation',data) } //基础数据-获取站控配置 export function getOtherStation(data) { return request.post('/swap/other',data) } //基础数据-设置温度 export function setTemp(data){ return request.post(`/alarm/setTemp?temp=${data}`) } //基础-获取温度 export function serchTemp(){ return request.post('/alarm/queryTemp') } //电池管理、基础数据 export function batteryList(data) { return request.post('/battery/list',data) } //删除电池、基础数据 export function delBattery(data) { return request.post('/battery/del',data) } //添加电池、基础数据 export function addBattery(data) { return request.post('/battery/add',data) } //编辑电池、基础数据 export function editBattery(data) { return request.post('/battery/edit',data) } //云端连接状态 export function getSwapcloudConnState() { return request.post("/swap/cloudConnState") } //绑定frid export function vehicleBind(data) { return request.post("/vehicle/bind", data) } //读取frid export function getEpc() { return request.post("/vehicle/getEpc") } //冻结、解冻 export function batteryfreeze(data) { return request.post("/swap/freeze", data) }