modal.ts 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. import { defHttp } from '/@/utils/http/axios';
  2. import {
  3. selectUserListParam,
  4. checkDeiceParam,
  5. addDeiceParam,
  6. checkUserParam,
  7. SubAccountUsers,
  8. selectCompanyParam,
  9. auditParam,
  10. addPointParam,
  11. } from './model';
  12. import type { Result } from '/#/axios';
  13. enum Api {
  14. addDevice = '/zfb-api/zfb/company/addDevice',
  15. checkDevice = '/zfb-api/zfb/company/checkDevice',
  16. selectUserList = '/zfb-api/zfb/company/selectUserList',
  17. addPoint = '/zfb-api/zfb/company/addPoint',
  18. checkUserAddAble = '/zfb-api/zfb/company/back/checkUserAddAble',
  19. saveSubUsers = '/zfb-api/zfb/company/saveSubUsers',
  20. selectCompanyById = '/zfb-api/zfb/company/selectCompanyById',
  21. auditCompany = '/zfb-api/zfb/company/auditCompany',
  22. }
  23. /**
  24. * @description: Get sample list value
  25. */
  26. export const AddDevice = (params: addDeiceParam) =>
  27. defHttp.post<Result>({
  28. url: Api.addDevice,
  29. params,
  30. headers: {
  31. // @ts-ignore
  32. ignoreCancelToken: true,
  33. },
  34. });
  35. export const checkDevice = (params: checkDeiceParam) =>
  36. defHttp.post<Result>({
  37. url: Api.checkDevice,
  38. params,
  39. headers: {
  40. // @ts-ignore
  41. ignoreCancelToken: true,
  42. },
  43. });
  44. export const auditCompany = (params: auditParam) =>
  45. defHttp.post<Result>({
  46. url: Api.auditCompany,
  47. params,
  48. headers: {
  49. // @ts-ignore
  50. ignoreCancelToken: true,
  51. },
  52. });
  53. export const addPoint = (params: addPointParam) =>
  54. defHttp.post<Result>({
  55. url: Api.addPoint,
  56. params,
  57. headers: {
  58. // @ts-ignore
  59. ignoreCancelToken: true,
  60. },
  61. });
  62. export const selectUserList = (params: selectUserListParam) =>
  63. defHttp.post<Result>({
  64. url: Api.selectUserList,
  65. params,
  66. headers: {
  67. // @ts-ignore
  68. ignoreCancelToken: true,
  69. },
  70. });
  71. export const checkUserAddAble = (params: checkUserParam) =>
  72. defHttp.post<Result>({
  73. url: Api.checkUserAddAble,
  74. params,
  75. headers: {
  76. // @ts-ignore
  77. ignoreCancelToken: true,
  78. },
  79. });
  80. export const selectCompanyById = (params: selectCompanyParam) =>
  81. defHttp.post<Result>({
  82. url: Api.selectCompanyById,
  83. params,
  84. headers: {
  85. // @ts-ignore
  86. ignoreCancelToken: true,
  87. },
  88. });
  89. export const saveSubUsers = (params: SubAccountUsers) =>
  90. defHttp.post<Result>({
  91. url: Api.saveSubUsers,
  92. params,
  93. headers: {
  94. // @ts-ignore
  95. ignoreCancelToken: true,
  96. },
  97. });