candidate.ts 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. import request from '@/utils/request';
  2. import { AxiosPromise } from 'axios';
  3. export interface PostCandidateQuery extends PageQuery {
  4. postId?: string | number;
  5. keyword?: string;
  6. status?: string;
  7. }
  8. export interface PostCandidateVO {
  9. id: string | number;
  10. postId?: string | number;
  11. studentId?: string | number;
  12. evaluationId?: string | number;
  13. name?: string;
  14. gender?: string;
  15. phone?: string;
  16. status?: string;
  17. statusText?: string;
  18. statusType?: string;
  19. evaluateTime?: string;
  20. resumeFile?: string | number;
  21. remark?: string;
  22. }
  23. export interface PostCandidateHireForm {
  24. id: string | number;
  25. remark?: string;
  26. offerAttachment: string;
  27. }
  28. export interface PostCandidateStatusForm {
  29. id: string | number;
  30. status: string;
  31. remark?: string;
  32. }
  33. export function listPostCandidates(query: PostCandidateQuery): AxiosPromise<PostCandidateVO[]> {
  34. return request({
  35. url: '/main/postCandidate/list',
  36. method: 'get',
  37. params: query
  38. });
  39. }
  40. export function updatePostCandidateStatus(data: PostCandidateStatusForm) {
  41. return request({
  42. url: '/main/postCandidate/status',
  43. method: 'put',
  44. data
  45. });
  46. }
  47. export function hirePostCandidate(data: PostCandidateHireForm) {
  48. return request({
  49. url: '/main/postCandidate/hire',
  50. method: 'post',
  51. data
  52. });
  53. }
  54. export function downloadCandidateResume(candidateId: string | number) {
  55. return import('@/utils/request').then(({ default: req }) => {
  56. return req({
  57. url: `/main/postCandidate/resume/${candidateId}`,
  58. method: 'get',
  59. responseType: 'blob'
  60. });
  61. });
  62. }