index.ts 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. import {request} from "@/utils/request";
  2. //根据驿站查询公司
  3. export function getCompanyBySiteID(siteID: any) {
  4. return request<any>(
  5. {
  6. url: "companyService/company/getCompanyBySiteIDList",
  7. method: 'get',
  8. params: {siteID:siteID},
  9. },
  10. {
  11. isNew: true,
  12. },
  13. );
  14. }
  15. //获取所属驿站
  16. export function getSiteList(params: any) {
  17. return request<any>(
  18. {
  19. url: "companyService/company/getSiteList",
  20. method: 'get',
  21. params: params,
  22. },
  23. {
  24. isNew: true,
  25. },
  26. );
  27. }
  28. //获取县区
  29. export function getRegionList(params: any) {
  30. return request<any>(
  31. {
  32. url: "system/area/getCityList",
  33. method: 'get',
  34. params: params,
  35. },
  36. {
  37. isNew: true,
  38. },
  39. );
  40. }
  41. //获取街道
  42. export function getStreeList(params: any) {
  43. return request<any>(
  44. {
  45. url: "system/area/getAreaList",
  46. method: 'get',
  47. params: params,
  48. },
  49. {
  50. isNew: true,
  51. },
  52. );
  53. }
  54. //提交添加
  55. export function saveCompanyPost(data:any){
  56. return request(
  57. {
  58. url:'companyService/company/saveAppCompanyPost',
  59. method:'post',
  60. data
  61. }
  62. )
  63. }
  64. //获取企业信息
  65. export function getCompanyList(params:any){
  66. return request({
  67. url:'companyService/company/getList',
  68. method:'get',
  69. params
  70. },{
  71. isNew:true
  72. })
  73. }
  74. //获取企业岗位信息
  75. export function getCompanyPostList(params:any){
  76. return request({
  77. url:'companyService/post/getList',
  78. method:'get',
  79. params: params,
  80. },{
  81. isNew:true
  82. })
  83. }
  84. export function getCompanyById(id: string) {
  85. return request({
  86. url: 'companyService/company/getCompanyByID',
  87. method: 'get',
  88. params: {id}
  89. }, {
  90. isNew: true
  91. })
  92. }
  93. export function saveCompanyInfo(data: any) {
  94. return request<object>({
  95. url: 'companyService/company/save',
  96. method: 'post',
  97. data: data
  98. }, {
  99. isNew: true,
  100. })
  101. }
  102. export function getCurrentDate() {
  103. const now = new Date();
  104. const year = now.getFullYear();
  105. const month = (now.getMonth() + 1).toString().padStart(2, '0');
  106. const day = now.getDate().toString().padStart(2, '0');
  107. const currentDate = `${year}-${month}-${day}`;
  108. return currentDate;
  109. }