labeling.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import request from '@/config/axios'
  2. export const talentLabelingApi = {
  3. // 获取所有名片列表
  4. getCardList: async () => {
  5. return await request.get({
  6. url: `/api/parse/get-business-cards`,
  7. baseURL: import.meta.env.VITE_BASE_URL
  8. })
  9. },
  10. // 根据人才id获取关联的标签列表
  11. getTalentTagById: async (talent_id: number) => {
  12. return await request.get({
  13. url: `/api/parse/talent-get-tags/${talent_id}`,
  14. baseURL: import.meta.env.VITE_BASE_URL
  15. })
  16. },
  17. // 更新人才关联标签
  18. updateTalentTags: async (data: any) => {
  19. return await request.post({
  20. url: `/api/parse/talent-update-tags`,
  21. data,
  22. baseURL: import.meta.env.VITE_BASE_URL
  23. })
  24. },
  25. // 人才启用/禁用
  26. updateTalentStatus: async (talent_id: number, data: any) => {
  27. return await request.put({
  28. url: `/api/parse/update-business-cards/${talent_id}/status`,
  29. data,
  30. baseURL: import.meta.env.VITE_BASE_URL
  31. })
  32. },
  33. // 获取人才名片
  34. getTalentCardByImagePath: async (image_path: string) => {
  35. return await request.download({
  36. url: `/api/parse/business-cards/image/${image_path}`,
  37. baseURL: import.meta.env.VITE_BASE_URL
  38. })
  39. },
  40. // 非结构化数据源 名片解析
  41. businessCardParse: async (data: any) => {
  42. return await request.upload({
  43. url: `/api/parse/business-card-parse`,
  44. baseURL: import.meta.env.VITE_BASE_URL,
  45. data
  46. })
  47. },
  48. }