简历上传,pdf简历下载
This commit is contained in:
@@ -0,0 +1,372 @@
|
||||
import request from '@/utils/request'
|
||||
import type { ApiResult } from '@/api/auth'
|
||||
|
||||
// ==================== 简历列表相关 ====================
|
||||
|
||||
/** 时间戳结构(Instant) */
|
||||
export interface InstantTime {
|
||||
/** 秒级时间戳 */
|
||||
seconds?: number
|
||||
/** 纳秒部分 */
|
||||
nanos?: number
|
||||
}
|
||||
|
||||
/** 简历列表项 */
|
||||
export interface ResumeListItem {
|
||||
/** 简历 ID(字符串,避免大整数精度丢失) */
|
||||
id?: string
|
||||
/** 简历名称 */
|
||||
resumeName?: string
|
||||
/** 目标岗位 */
|
||||
targetPosition?: string
|
||||
/** 是否默认简历 0=否 1=是 */
|
||||
isDefault?: number
|
||||
/** 简历修改时间 */
|
||||
updateTime?: InstantTime
|
||||
/** 简历创建时间 */
|
||||
createTime?: InstantTime
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取简历列表
|
||||
* GET /resume/list
|
||||
*/
|
||||
export function fetchResumeList() {
|
||||
return request.get<any, ApiResult<ResumeListItem[]>>('/resume/list')
|
||||
}
|
||||
|
||||
// ==================== 描述段落(通用) ====================
|
||||
|
||||
/** 描述段落 */
|
||||
export interface DescriptionParagraph {
|
||||
/** 段落标识,前端生成的短ID */
|
||||
id?: string
|
||||
/** 段落文本内容 */
|
||||
text?: string
|
||||
}
|
||||
|
||||
// ==================== 简历主表 ====================
|
||||
|
||||
/** 简历主表数据 */
|
||||
export interface ResumeMainData {
|
||||
/** 简历 ID(字符串,避免大整数精度丢失) */
|
||||
id?: string
|
||||
/** 简历名称 */
|
||||
resumeName?: string
|
||||
/** 目标岗位 */
|
||||
targetPosition?: string
|
||||
/** 是否默认简历 0=否 1=是 */
|
||||
isDefault?: number
|
||||
/** 头像URL */
|
||||
avatarUrl?: string
|
||||
/** 真实姓名 */
|
||||
name?: string
|
||||
/** 邮箱 */
|
||||
email?: string
|
||||
/** 手机号码 */
|
||||
mobileNumber?: string
|
||||
/** 所在城市 */
|
||||
city?: string
|
||||
/** 微信号 */
|
||||
wechatNumber?: string
|
||||
/** 作品集链接 */
|
||||
portfolioUrl?: string
|
||||
/** 技能标签列表 */
|
||||
skills?: string[]
|
||||
/** 证书标签列表 */
|
||||
certificates?: string[]
|
||||
/** 个人概述 */
|
||||
summary?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询简历主表
|
||||
* GET /resume?resumeId=xxx
|
||||
*/
|
||||
export function fetchResumeMain(resumeId: string) {
|
||||
return request.get<any, ApiResult<ResumeMainData>>('/resume', {
|
||||
params: { resumeId },
|
||||
})
|
||||
}
|
||||
|
||||
// ==================== 教育经历 ====================
|
||||
|
||||
/** 教育经历项 */
|
||||
export interface ResumeEducation {
|
||||
/** ID(字符串,避免大整数精度丢失) */
|
||||
id?: string
|
||||
/** 学校名称 */
|
||||
school?: string
|
||||
/** 专业 */
|
||||
major?: string
|
||||
/** 学历:大专/本科/硕士/博士 */
|
||||
degree?: string
|
||||
/** 学习形式:全日制/非全日制 */
|
||||
studyType?: string
|
||||
/** 开始时间,格式:2023.09 */
|
||||
startDate?: string
|
||||
/** 结束时间,格式:2024.06 */
|
||||
endDate?: string
|
||||
/** 描述段落 */
|
||||
description?: DescriptionParagraph[]
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询简历的教育经历列表
|
||||
* GET /resume/education?resumeId=xxx
|
||||
*/
|
||||
export function fetchResumeEducation(resumeId: string) {
|
||||
return request.get<any, ApiResult<ResumeEducation[]>>('/resume/education', {
|
||||
params: { resumeId },
|
||||
})
|
||||
}
|
||||
|
||||
// ==================== 工作经历 ====================
|
||||
|
||||
/** 工作经历项 */
|
||||
export interface ResumeWork {
|
||||
/** ID(字符串,避免大整数精度丢失) */
|
||||
id?: string
|
||||
/** 公司名称 */
|
||||
companyName?: string
|
||||
/** 职位 */
|
||||
position?: string
|
||||
/** 开始时间 */
|
||||
startDate?: string
|
||||
/** 结束时间 */
|
||||
endDate?: string
|
||||
/** 描述段落 */
|
||||
description?: DescriptionParagraph[]
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询简历的工作经历列表
|
||||
* GET /resume/work?resumeId=xxx
|
||||
*/
|
||||
export function fetchResumeWork(resumeId: string) {
|
||||
return request.get<any, ApiResult<ResumeWork[]>>('/resume/work', {
|
||||
params: { resumeId },
|
||||
})
|
||||
}
|
||||
|
||||
// ==================== 实习经历 ====================
|
||||
|
||||
/** 实习经历项 */
|
||||
export interface ResumeInternship {
|
||||
/** ID(字符串,避免大整数精度丢失) */
|
||||
id?: string
|
||||
/** 公司名称 */
|
||||
companyName?: string
|
||||
/** 职位 */
|
||||
position?: string
|
||||
/** 开始时间 */
|
||||
startDate?: string
|
||||
/** 结束时间 */
|
||||
endDate?: string
|
||||
/** 描述段落 */
|
||||
description?: DescriptionParagraph[]
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询简历的实习经历列表
|
||||
* GET /resume/internship?resumeId=xxx
|
||||
*/
|
||||
export function fetchResumeInternship(resumeId: string) {
|
||||
return request.get<any, ApiResult<ResumeInternship[]>>('/resume/internship', {
|
||||
params: { resumeId },
|
||||
})
|
||||
}
|
||||
|
||||
// ==================== 项目经历 ====================
|
||||
|
||||
/** 项目经历项 */
|
||||
export interface ResumeProject {
|
||||
/** ID(字符串,避免大整数精度丢失) */
|
||||
id?: string
|
||||
/** 所属公司 */
|
||||
companyName?: string
|
||||
/** 项目名称 */
|
||||
projectName?: string
|
||||
/** 担任角色 */
|
||||
role?: string
|
||||
/** 开始时间 */
|
||||
startDate?: string
|
||||
/** 结束时间 */
|
||||
endDate?: string
|
||||
/** 描述段落 */
|
||||
description?: DescriptionParagraph[]
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询简历的项目经历列表
|
||||
* GET /resume/project?resumeId=xxx
|
||||
*/
|
||||
export function fetchResumeProject(resumeId: string) {
|
||||
return request.get<any, ApiResult<ResumeProject[]>>('/resume/project', {
|
||||
params: { resumeId },
|
||||
})
|
||||
}
|
||||
|
||||
// ==================== 竞赛经历 ====================
|
||||
|
||||
/** 竞赛经历项 */
|
||||
export interface ResumeCompetition {
|
||||
/** ID(字符串,避免大整数精度丢失) */
|
||||
id?: string
|
||||
/** 竞赛名称 */
|
||||
competitionName?: string
|
||||
/** 获奖情况 */
|
||||
award?: string
|
||||
/** 获奖时间,格式:2023.07 */
|
||||
awardDate?: string
|
||||
/** 描述段落 */
|
||||
description?: DescriptionParagraph[]
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询简历的竞赛经历列表
|
||||
* GET /resume/competition?resumeId=xxx
|
||||
*/
|
||||
export function fetchResumeCompetition(resumeId: string) {
|
||||
return request.get<any, ApiResult<ResumeCompetition[]>>('/resume/competition', {
|
||||
params: { resumeId },
|
||||
})
|
||||
}
|
||||
|
||||
// ==================== 简历保存相关 ====================
|
||||
|
||||
/** 保存简历主表参数 */
|
||||
export interface SaveResumeMainParams {
|
||||
/** 简历 ID */
|
||||
resumeId: string
|
||||
/** 简历名称 */
|
||||
resumeName?: string
|
||||
/** 目标岗位 */
|
||||
targetPosition?: string
|
||||
/** 真实姓名 */
|
||||
name?: string
|
||||
/** 邮箱 */
|
||||
email?: string
|
||||
/** 手机号码 */
|
||||
mobileNumber?: string
|
||||
/** 所在城市 */
|
||||
city?: string
|
||||
/** 微信号 */
|
||||
wechatNumber?: string
|
||||
/** 作品集链接 */
|
||||
portfolioUrl?: string
|
||||
/** 技能标签列表 */
|
||||
skills?: string[]
|
||||
/** 证书标签列表 */
|
||||
certificates?: string[]
|
||||
/** 个人概述 */
|
||||
summary?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存/更新简历主表信息
|
||||
* POST /resume
|
||||
*/
|
||||
export function saveResumeMain(data: SaveResumeMainParams) {
|
||||
return request.post<any, ApiResult>('/resume', data)
|
||||
}
|
||||
|
||||
/** 保存简历教育经历参数(单条) */
|
||||
export interface SaveResumeEducationItem {
|
||||
/** 学校名称 */
|
||||
school?: string
|
||||
/** 专业 */
|
||||
major?: string
|
||||
/** 学历 */
|
||||
degree?: string
|
||||
/** 学习形式 */
|
||||
studyType?: string
|
||||
/** 开始时间 */
|
||||
startDate?: string
|
||||
/** 结束时间 */
|
||||
endDate?: string
|
||||
/** 描述段落 */
|
||||
description?: DescriptionParagraph[]
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存简历教育经历(全量覆盖)
|
||||
* POST /resume/education
|
||||
*/
|
||||
export function saveResumeEducation(resumeId: string, data: SaveResumeEducationItem[]) {
|
||||
return request.post<any, ApiResult>('/resume/education', { resumeId, items: data })
|
||||
}
|
||||
|
||||
/** 保存简历工作经历参数(单条) */
|
||||
export interface SaveResumeWorkItem {
|
||||
/** 公司名称 */
|
||||
companyName?: string
|
||||
/** 职位 */
|
||||
position?: string
|
||||
/** 开始时间 */
|
||||
startDate?: string
|
||||
/** 结束时间 */
|
||||
endDate?: string
|
||||
/** 描述段落 */
|
||||
description?: DescriptionParagraph[]
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存简历工作经历(全量覆盖)
|
||||
* POST /resume/work
|
||||
*/
|
||||
export function saveResumeWork(resumeId: string, data: SaveResumeWorkItem[]) {
|
||||
return request.post<any, ApiResult>('/resume/work', { resumeId, items: data })
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存简历实习经历(全量覆盖)
|
||||
* POST /resume/internship
|
||||
*/
|
||||
export function saveResumeInternship(resumeId: string, data: SaveResumeWorkItem[]) {
|
||||
return request.post<any, ApiResult>('/resume/internship', { resumeId, items: data })
|
||||
}
|
||||
|
||||
/** 保存简历项目经历参数(单条) */
|
||||
export interface SaveResumeProjectItem {
|
||||
/** 项目名称 */
|
||||
projectName?: string
|
||||
/** 所属公司 */
|
||||
companyName?: string
|
||||
/** 担任角色 */
|
||||
role?: string
|
||||
/** 开始时间 */
|
||||
startDate?: string
|
||||
/** 结束时间 */
|
||||
endDate?: string
|
||||
/** 描述段落 */
|
||||
description?: DescriptionParagraph[]
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存简历项目经历(全量覆盖)
|
||||
* POST /resume/project
|
||||
*/
|
||||
export function saveResumeProject(resumeId: string, data: SaveResumeProjectItem[]) {
|
||||
return request.post<any, ApiResult>('/resume/project', { resumeId, items: data })
|
||||
}
|
||||
|
||||
/** 保存简历竞赛经历参数(单条) */
|
||||
export interface SaveResumeCompetitionItem {
|
||||
/** 竞赛名称 */
|
||||
competitionName?: string
|
||||
/** 获奖情况 */
|
||||
award?: string
|
||||
/** 获奖时间 */
|
||||
awardDate?: string
|
||||
/** 描述段落 */
|
||||
description?: DescriptionParagraph[]
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存简历竞赛经历(全量覆盖)
|
||||
* POST /resume/competition
|
||||
*/
|
||||
export function saveResumeCompetition(resumeId: string, data: SaveResumeCompetitionItem[]) {
|
||||
return request.post<any, ApiResult>('/resume/competition', { resumeId, items: data })
|
||||
}
|
||||
Reference in New Issue
Block a user