agriculturalMachines.js 597 B

1234567891011121314151617181920212223
  1. /* 农机管理相关API */
  2. import {
  3. http,
  4. Method
  5. } from '@/utils/request.js';
  6. import storage from "@/utils/storage.js";
  7. import api from "@/config/api.js";
  8. import config from "@/config/config.js";
  9. const userInfo = storage.getUserInfo()
  10. /**
  11. * 获取所有设备列表
  12. * @returns {Promise} 设备列表
  13. */
  14. export function machinesDeviceList(params = {}) {
  15. console.log("userInfo",userInfo);
  16. if (userInfo.sysUser.deptId) params.deptIdList = userInfo.sysUser.deptId;
  17. return http.request({
  18. url: 'base/machines/list',
  19. method: Method.GET,
  20. needToken: true,
  21. params: params
  22. });
  23. }