common.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /**
  2. * @description 公共模块
  3. */
  4. import request from '@/utils/request'
  5. // 各种类型集合
  6. export const getTypeList = () => (request({
  7. method: "POST",
  8. url: "common/get_type_list"
  9. }))
  10. // 获取前端鉴权心要字段
  11. export const getAuthentication = () => (request({
  12. method: "POST",
  13. url: ""
  14. }))
  15. /**
  16. * 导入模板路径
  17. * @param {Object} data 导入模板路径
  18. * @returns Promise
  19. */
  20. export const postImportFile = data => (request({
  21. data,
  22. method: "POST",
  23. url: "common/import"
  24. }))
  25. /**
  26. * 获取导入的模板链接
  27. * @param {Object} data 定义导入模板的module
  28. * @returns Promise
  29. */
  30. export const getImportTemplate = data => (request({
  31. data,
  32. method: "POST",
  33. url: "common/get_import_template"
  34. }))
  35. /**
  36. * 获取物业主管或者信息主管员工信息
  37. * @param {Object} data {type: [1,2]} 1=物业主管,2=信息负责人
  38. * @returns Promise
  39. */
  40. export const getMaintainData = data => (request({
  41. data,
  42. method: "POST",
  43. url: "common/get_maintain_user"
  44. }))