merge: 合并 CareerMap 分支到 main

This commit is contained in:
2025-11-12 19:33:53 +08:00
26 changed files with 8307 additions and 937 deletions

46
apiRc/jobPath.js Normal file
View File

@@ -0,0 +1,46 @@
/*
* @Date: 2025-11-12
* @Description: 职业路径相关接口
*/
import request from '@/utilsRc/request'
// 根据职业名称获取路径列表
export function getJobPathPage(params) {
return request({
url: '/jobPath/getJobPathPage',
method: 'get',
params,
baseUrlType: 'zytp'
})
}
// 根据职业路径ID获取详情
export function getJobPathDetail(params) {
const requestParams = {};
if (params?.jobPathId !== undefined && params?.jobPathId !== null && params?.jobPathId !== '') {
requestParams.id = params.jobPathId;
} else if (params?.id !== undefined && params?.id !== null && params?.id !== '') {
requestParams.id = params.id;
}
if (!requestParams.id) {
return Promise.reject('缺少必需的 id 参数');
}
return request({
url: '/jobPath/getJobPathById',
method: 'get',
params: requestParams,
baseUrlType: 'zytp'
})
}
// 获取职业路径数量
export function getJobPathNum() {
return request({
url: '/jobPath/getJobPathNum',
method: 'get',
baseUrlType: 'zytp'
})
}

33
apiRc/jobRecommend.js Normal file
View File

@@ -0,0 +1,33 @@
/*
* @Date: 2025-11-12
* @Description: 职业推荐相关接口
*/
import request from '@/utilsRc/request'
function createFormData(payload = {}) {
if (typeof FormData !== 'undefined') {
const formData = new FormData()
Object.keys(payload).forEach(key => {
const value = payload[key]
if (value !== undefined && value !== null && value !== '') {
formData.append(key, value)
}
})
return formData
}
return payload
}
export function recommendJob(data) {
const params = {};
if (data?.jobName !== undefined && data?.jobName !== null && data?.jobName !== '') {
params.jobName = String(data.jobName);
}
return request({
url: '/job/recommendJobByJobName',
method: 'get',
params: params,
baseUrlType: 'zytp'
})
}

45
apiRc/jobSkill.js Normal file
View File

@@ -0,0 +1,45 @@
/*
* @Date: 2025-11-12
* @Description: 职业技能相关接口
*/
import request from '@/utilsRc/request'
export function getJobSkillDetail(params) {
return request({
url: '/jobSkillDet/getJobSkillDet',
method: 'get',
params,
baseUrlType: 'zytp'
})
}
// 暂未使用 - 如果需要在 CareerPath.vue 中点击路径职位查看详细技能信息时使用
// 使用场景:获取职业路径中某个职位的详细技能信息(包含技能分数、类型等)
// export function getJobPathSkill(data) {
// let formData
// if (typeof FormData !== 'undefined') {
// formData = new FormData()
// if (data?.pathId !== undefined && data?.pathId !== null) {
// formData.append('pathId', data.pathId)
// }
// if (data?.currentJobName !== undefined && data?.currentJobName !== null) {
// formData.append('currentJobName', data.currentJobName)
// }
// } else {
// formData = {
// pathId: data?.pathId ?? '',
// currentJobName: data?.currentJobName ?? ''
// }
// }
// return request({
// url: '/jobSkillDet/getJobPathSkill',
// method: 'post',
// data: formData,
// baseUrlType: 'zytp',
// header: {
// 'content-type': 'multipart/form-data'
// }
// })
// }

14
apiRc/user/user.js Normal file
View File

@@ -0,0 +1,14 @@
/*
* @Date: 2025-01-XX
* @LastEditors:
* @LastEditTime:
*/
import request from '@/utilsRc/request'
// 获取用户信息(职业规划推荐用)
export function appUserInfo() {
return request({
url: '/app/user/appUserInfo',
method: 'get'
})
}