http.js 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. import request from './request'
  2. //登录
  3. export function wxLogin(params) {
  4. return new Promise((resolve, reject) => {
  5. request.post("/user/login", params).then(result => {
  6. resolve(result)
  7. }).catch(err => {
  8. reject(err)
  9. });
  10. })
  11. }
  12. //换电监控接口开始
  13. //换电信息
  14. export function swapInfo(params) {
  15. return request.post("/swap/swapInfo", params)
  16. }
  17. //已连接站控车辆列表
  18. export function CarOnline() {
  19. return request.post("/vehicle/online")
  20. }
  21. //修改车牌号
  22. export function EditPlate(params) {
  23. return request.post("/vehicle/editPlate", params)
  24. }
  25. //车辆上锁
  26. export function Updatelock(params) {
  27. return request.post("/vehicle/lock", params)
  28. }
  29. //车辆解锁
  30. export function Updateunlock(params) {
  31. return request.post("/vehicle/unlock", params)
  32. }
  33. //暂停恢复PLC
  34. export function EditSwapplc(data) {
  35. return request.post("/swap/plc", data)
  36. }
  37. //开始换电
  38. export function beginSwap(params) {
  39. return request.post("/swap/startSwap", params)
  40. }
  41. //设置选电模式(0自动、1手动)
  42. export function setMode(params) {
  43. return request.post("/swap/setMode", params)
  44. }
  45. //急停中止
  46. export function plcStop(params) {
  47. return request.post("/swap/plcStop", params)
  48. }
  49. //锁止屏蔽
  50. export function EditforbidLock(data) {
  51. return request.post("/vehicle/forbidLock", data)
  52. }
  53. //换电监控接口结束
  54. //故障告警
  55. export function alarmList(data) {
  56. return request.post("/alarm/list", data)
  57. }
  58. // 处理告警
  59. export function alarmDispose(data) {
  60. return request.post("/alarm/dispose", data)
  61. }
  62. // 确认消防换仓
  63. export function getfireProtection(data) {
  64. return request.post("/device/fireProtection", data)
  65. }
  66. //开始充电
  67. export function startCharge(params) {
  68. return request.post(`/discharge/startCharge?chargerId=${params.chargerId}&sn=${params.sn}`)
  69. }
  70. //断电
  71. export function stopCharge(params) {
  72. return request.post(`/discharge/stopCharge?chargerId=${params.chargerId}`)
  73. }
  74. // 获取充电机ID
  75. export function getChargeCode() {
  76. return request.get('/device/getChargeCode')
  77. }
  78. // 充电记录列表
  79. export function chargeList(data) {
  80. return request.post('/charge/list',data)
  81. }
  82. // 换电记录列表
  83. export function swapList(data) {
  84. return request.post('/swapRecord/list',data)
  85. }
  86. //获取用户信息
  87. export function getInfo(data) {
  88. return request.get('/user/info',data)
  89. }
  90. //车辆管理、基础数据
  91. export function vehicleList(data) {
  92. return request.post('/vehicle/list',data)
  93. }
  94. //删除车辆、基础数据
  95. export function delvehicle(data) {
  96. return request.post('/vehicle/del',data)
  97. }
  98. //添加车辆、基础数据
  99. export function addvehicle(data) {
  100. return request.post('/vehicle/save',data)
  101. }
  102. //编辑车辆、基础数据
  103. export function Editvehicle(data) {
  104. return request.post('/vehicle/edit',data)
  105. }
  106. //普通调仓
  107. export function RuleChangestorage(data) {
  108. return request.post('/device/exchangeBattery',data)
  109. }
  110. //消防调仓
  111. export function FireChangestorage(data) {
  112. return request.post('/device/fireProtection',data)
  113. }
  114. //消防告警
  115. export function getwarnList(data) {
  116. return request.post("/alarm/realList", data)
  117. }
  118. //首页数据概览
  119. export function getoverview() {
  120. return request.post("/statistics/overview")
  121. }
  122. //云端同步时间获取
  123. export function getSyncTime() {
  124. return request.post("/vehicle/getSyncTime")
  125. }
  126. //云端同步
  127. export function getSync() {
  128. return request.post("/vehicle/sync")
  129. }
  130. //侧边栏消防告警数量
  131. export function getToDayAlarm() {
  132. return request.post("/alarm/toDayAlarm")
  133. }
  134. //换电监控 车牌号刷新接口
  135. export function getRefresh() {
  136. return request.post("/vehicle/refresh")
  137. }
  138. //换电编号
  139. export function getStationCode() {
  140. return request.post("/swap/getStationCode")
  141. }
  142. //云端
  143. export function getcloudConnState() {
  144. return request.post("/alarm/toDayAlarm")
  145. }
  146. //切换仓内仓外
  147. export function gettoggleChargeWay(data) {
  148. return request.post("/discharge/toggleChargeWay",data)
  149. }
  150. //限功率
  151. export function getlimitPower(data) {
  152. return request.post("/discharge/limitPower",data)
  153. }
  154. //插枪充电
  155. export function getgunStartCharge(data) {
  156. return request.post("/discharge/gunStartCharge",data)
  157. }
  158. //停止插枪充电
  159. export function getgunStopCharge(data) {
  160. return request.post("/discharge/gunStopCharge",data)
  161. }
  162. //设备监控充电机获取设置功率
  163. export function getChargePower(data) {
  164. return request.post("/discharge/getPower",data)
  165. }
  166. //仓位管理、基础数据
  167. export function encodeList(data) {
  168. return request.post('/encode/list',data)
  169. }
  170. //删除仓位、基础数据
  171. export function delEncode(data) {
  172. return request.post('/encode/del',data)
  173. }
  174. //添加仓位、基础数据
  175. export function addEncode(data) {
  176. return request.post('/encode/add',data)
  177. }
  178. //编辑仓位、基础数据
  179. export function editEncode(data) {
  180. return request.post('/encode/edit',data)
  181. }
  182. //基础数据-站控配置中转仓相关
  183. export function setStation(data) {
  184. return request.post('/swap/setStation',data)
  185. }
  186. //基础数据-获取站控配置
  187. export function getOtherStation(data) {
  188. return request.post('/swap/other',data)
  189. }
  190. //基础数据-设置温度
  191. export function setTemp(data){
  192. return request.post(`/alarm/setTemp?temp=${data}`)
  193. }
  194. //基础-获取温度
  195. export function serchTemp(){
  196. return request.post('/alarm/queryTemp')
  197. }
  198. //电池管理、基础数据
  199. export function batteryList(data) {
  200. return request.post('/battery/list',data)
  201. }
  202. //删除电池、基础数据
  203. export function delBattery(data) {
  204. return request.post('/battery/del',data)
  205. }
  206. //添加电池、基础数据
  207. export function addBattery(data) {
  208. return request.post('/battery/add',data)
  209. }
  210. //编辑电池、基础数据
  211. export function editBattery(data) {
  212. return request.post('/battery/edit',data)
  213. }
  214. //云端连接状态
  215. export function getSwapcloudConnState() {
  216. return request.post("/swap/cloudConnState")
  217. }
  218. //绑定frid
  219. export function vehicleBind(data) {
  220. return request.post("/vehicle/bind", data)
  221. }
  222. //读取frid
  223. export function getEpc() {
  224. return request.post("/vehicle/getEpc")
  225. }