= 职业规划推荐
This commit is contained in:
@@ -16,15 +16,17 @@ export function getJobPathPage(params) {
|
|||||||
|
|
||||||
// 根据职业路径ID获取详情
|
// 根据职业路径ID获取详情
|
||||||
export function getJobPathDetail(params) {
|
export function getJobPathDetail(params) {
|
||||||
|
const {startJobId, endJobId} = params;
|
||||||
const requestParams = {};
|
const requestParams = {};
|
||||||
if (params?.jobPathId !== undefined && params?.jobPathId !== null && params?.jobPathId !== '') {
|
if (startJobId !== undefined && startJobId !== null && startJobId !== '') {
|
||||||
requestParams.id = params.jobPathId;
|
requestParams.startJobId = startJobId;
|
||||||
} else if (params?.id !== undefined && params?.id !== null && params?.id !== '') {
|
}
|
||||||
requestParams.id = params.id;
|
if (endJobId !== undefined && endJobId !== null && endJobId !== '') {
|
||||||
|
requestParams.endJobId = endJobId;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!requestParams.id) {
|
if (!startJobId || !endJobId) {
|
||||||
return Promise.reject('缺少必需的 id 参数');
|
return Promise.reject('缺少必需的 startJobId 和 endJobId 参数');
|
||||||
}
|
}
|
||||||
|
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "ks-app",
|
"name": "ks-app-employment-service",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
|
|||||||
@@ -188,7 +188,9 @@ async function fetchTargetCareerOptions(keyword = '') {
|
|||||||
value: item.id,
|
value: item.id,
|
||||||
startJob: item.startJob,
|
startJob: item.startJob,
|
||||||
endJob: item.endJob,
|
endJob: item.endJob,
|
||||||
jobOrder: item.jobOrder
|
jobOrder: item.jobOrder,
|
||||||
|
startJobId: item.startJobId,
|
||||||
|
endJobId: item.endJobId
|
||||||
}));
|
}));
|
||||||
|
|
||||||
if (targetCareerOptions.value.length === 0) {
|
if (targetCareerOptions.value.length === 0) {
|
||||||
@@ -215,8 +217,8 @@ async function fetchPathCount() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function loadPathDetail(jobPathId) {
|
async function loadPathDetail(startJobId, endJobId) {
|
||||||
if (!jobPathId || jobPathId === null || jobPathId === undefined || jobPathId === '') {
|
if (startJobId === null || startJobId === undefined || startJobId === '' || endJobId === null || endJobId === undefined || endJobId === '') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '职业路径ID无效',
|
title: '职业路径ID无效',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
@@ -227,7 +229,8 @@ async function loadPathDetail(jobPathId) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const requestParams = {
|
const requestParams = {
|
||||||
jobPathId: jobPathId
|
startJobId,
|
||||||
|
endJobId
|
||||||
};
|
};
|
||||||
|
|
||||||
const response = await getJobPathDetail(requestParams);
|
const response = await getJobPathDetail(requestParams);
|
||||||
@@ -264,6 +267,7 @@ async function loadPathDetail(jobPathId) {
|
|||||||
targetCareer: targetCareerOptions.value[selectedTargetIndex.value]?.label || ''
|
targetCareer: targetCareerOptions.value[selectedTargetIndex.value]?.label || ''
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.warn(error, 22222);
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '获取路径详情失败',
|
title: '获取路径详情失败',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
@@ -301,16 +305,16 @@ async function handleQuery() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let jobPathId = option.value;
|
|
||||||
|
|
||||||
isLoadingPath.value = true;
|
isLoadingPath.value = true;
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '加载中...',
|
title: '加载中...',
|
||||||
mask: true
|
mask: true
|
||||||
});
|
});
|
||||||
|
console.log(option);
|
||||||
try {
|
try {
|
||||||
if (!jobPathId) {
|
let { value: jobPathId, startJobId, endJobId } = option;
|
||||||
|
/*if (!jobPathId) {
|
||||||
const response = await getJobPathPage({
|
const response = await getJobPathPage({
|
||||||
jobName: option.label,
|
jobName: option.label,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
@@ -326,11 +330,12 @@ async function handleQuery() {
|
|||||||
});
|
});
|
||||||
resetPathData();
|
resetPathData();
|
||||||
return;
|
return;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
selectedJobPathId.value = jobPathId;
|
// selectedJobPathId.value = jobPathId;
|
||||||
await loadPathDetail(jobPathId);
|
await loadPathDetail(startJobId, endJobId);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.warn(error, 11111);
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '查询失败,请重试',
|
title: '查询失败,请重试',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
|
|||||||
Reference in New Issue
Block a user