|
@@ -78,11 +78,13 @@ const _sfc_main = {
|
|
|
params.grade = levelFilter;
|
|
params.grade = levelFilter;
|
|
|
const res = await api_assessment.getAssessmentList(params);
|
|
const res = await api_assessment.getAssessmentList(params);
|
|
|
if (res.code === 200 && res.rows) {
|
|
if (res.code === 200 && res.rows) {
|
|
|
- common_vendor.index.__f__("log", "at pages/assessment/assessment.vue:321", "测评API返回数据:", res.rows[0]);
|
|
|
|
|
|
|
+ common_vendor.index.__f__("log", "at pages/assessment/assessment.vue:322", "测评API返回数据:", res.rows[0]);
|
|
|
assessments.value = res.rows.filter((item) => item.status === "1").map((item) => {
|
|
assessments.value = res.rows.filter((item) => item.status === "1").map((item) => {
|
|
|
let title = item.evaluationName || item.name || item.title || "未知测评";
|
|
let title = item.evaluationName || item.name || item.title || "未知测评";
|
|
|
const desc = resolveDescription(item, "专业技能评估,助力职业发展");
|
|
const desc = resolveDescription(item, "专业技能评估,助力职业发展");
|
|
|
const hasPaid = common_vendor.index.getStorageSync(`audit_paid_${item.id}`) === true;
|
|
const hasPaid = common_vendor.index.getStorageSync(`audit_paid_${item.id}`) === true;
|
|
|
|
|
+ const postId = item.positionId;
|
|
|
|
|
+ const isApplied = postId ? common_vendor.index.getStorageSync(`candidate_applied_${postId}`) === true : false;
|
|
|
return {
|
|
return {
|
|
|
id: item.id,
|
|
id: item.id,
|
|
|
title,
|
|
title,
|
|
@@ -99,13 +101,13 @@ const _sfc_main = {
|
|
|
hasRecord: hasRecordEvaluationIds.value.has(item.id),
|
|
hasRecord: hasRecordEvaluationIds.value.has(item.id),
|
|
|
isCompleted: completedEvaluationIds.value.has(item.id),
|
|
isCompleted: completedEvaluationIds.value.has(item.id),
|
|
|
hasPaid,
|
|
hasPaid,
|
|
|
- postId: item.positionId
|
|
|
|
|
- // 将对应岗位ID存起来
|
|
|
|
|
|
|
+ postId,
|
|
|
|
|
+ isApplied
|
|
|
};
|
|
};
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
} catch (err) {
|
|
} catch (err) {
|
|
|
- common_vendor.index.__f__("error", "at pages/assessment/assessment.vue:354", "获取测评列表失败", err);
|
|
|
|
|
|
|
+ common_vendor.index.__f__("error", "at pages/assessment/assessment.vue:360", "获取测评列表失败", err);
|
|
|
common_vendor.index.showToast({ title: "加载失败,请重试", icon: "none" });
|
|
common_vendor.index.showToast({ title: "加载失败,请重试", icon: "none" });
|
|
|
} finally {
|
|
} finally {
|
|
|
loading.value = false;
|
|
loading.value = false;
|
|
@@ -135,9 +137,9 @@ const _sfc_main = {
|
|
|
params.name = searchQuery.value;
|
|
params.name = searchQuery.value;
|
|
|
const res = await api_assessment.getTrainingList(params);
|
|
const res = await api_assessment.getTrainingList(params);
|
|
|
if (res.code === 200 && res.rows) {
|
|
if (res.code === 200 && res.rows) {
|
|
|
- common_vendor.index.__f__("log", "at pages/assessment/assessment.vue:382", "培训API返回数据:", res.rows[0]);
|
|
|
|
|
|
|
+ common_vendor.index.__f__("log", "at pages/assessment/assessment.vue:388", "培训API返回数据:", res.rows[0]);
|
|
|
trainings.value = res.rows.map((item) => {
|
|
trainings.value = res.rows.map((item) => {
|
|
|
- common_vendor.index.__f__("log", "at pages/assessment/assessment.vue:384", "培训单项数据:", item);
|
|
|
|
|
|
|
+ common_vendor.index.__f__("log", "at pages/assessment/assessment.vue:390", "培训单项数据:", item);
|
|
|
let title = item.name || item.trainingName || item.title;
|
|
let title = item.name || item.trainingName || item.title;
|
|
|
if (!title || title.trim() === "" || title.startsWith("test_")) {
|
|
if (!title || title.trim() === "" || title.startsWith("test_")) {
|
|
|
const job = item.job || item.position || "专业技能";
|
|
const job = item.job || item.position || "专业技能";
|
|
@@ -180,7 +182,7 @@ const _sfc_main = {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
} catch (err) {
|
|
} catch (err) {
|
|
|
- common_vendor.index.__f__("error", "at pages/assessment/assessment.vue:439", "获取培训列表失败", err);
|
|
|
|
|
|
|
+ common_vendor.index.__f__("error", "at pages/assessment/assessment.vue:445", "获取培训列表失败", err);
|
|
|
} finally {
|
|
} finally {
|
|
|
trainingLoading.value = false;
|
|
trainingLoading.value = false;
|
|
|
}
|
|
}
|
|
@@ -230,13 +232,26 @@ const _sfc_main = {
|
|
|
common_vendor.index.hideLoading();
|
|
common_vendor.index.hideLoading();
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
|
common_vendor.index.showToast({ title: "投递成功", icon: "success" });
|
|
common_vendor.index.showToast({ title: "投递成功", icon: "success" });
|
|
|
|
|
+ item.isApplied = true;
|
|
|
|
|
+ common_vendor.index.setStorageSync(`candidate_applied_${item.postId}`, true);
|
|
|
|
|
+ } else if (res.msg && res.msg.includes("已投递")) {
|
|
|
|
|
+ item.isApplied = true;
|
|
|
|
|
+ common_vendor.index.setStorageSync(`candidate_applied_${item.postId}`, true);
|
|
|
|
|
+ common_vendor.index.showToast({ title: "您已投递过该岗位", icon: "none" });
|
|
|
} else {
|
|
} else {
|
|
|
common_vendor.index.showToast({ title: res.msg || "投递失败", icon: "none" });
|
|
common_vendor.index.showToast({ title: res.msg || "投递失败", icon: "none" });
|
|
|
}
|
|
}
|
|
|
} catch (err) {
|
|
} catch (err) {
|
|
|
common_vendor.index.hideLoading();
|
|
common_vendor.index.hideLoading();
|
|
|
- common_vendor.index.__f__("error", "at pages/assessment/assessment.vue:501", "投递失败:", err);
|
|
|
|
|
- common_vendor.index.showToast({ title: "网络错误,投递失败", icon: "none" });
|
|
|
|
|
|
|
+ common_vendor.index.__f__("error", "at pages/assessment/assessment.vue:515", "投递失败:", err);
|
|
|
|
|
+ const errMsg = String((err == null ? void 0 : err.msg) || (err == null ? void 0 : err.message) || "");
|
|
|
|
|
+ if (errMsg.includes("已投递")) {
|
|
|
|
|
+ item.isApplied = true;
|
|
|
|
|
+ common_vendor.index.setStorageSync(`candidate_applied_${item.postId}`, true);
|
|
|
|
|
+ common_vendor.index.showToast({ title: "您已投递过该岗位", icon: "none" });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ common_vendor.index.showToast({ title: "网络错误,投递失败", icon: "none" });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
const handleConsult = async (item) => {
|
|
const handleConsult = async (item) => {
|
|
@@ -276,7 +291,7 @@ const _sfc_main = {
|
|
|
}
|
|
}
|
|
|
} catch (err) {
|
|
} catch (err) {
|
|
|
common_vendor.index.hideLoading();
|
|
common_vendor.index.hideLoading();
|
|
|
- common_vendor.index.__f__("error", "at pages/assessment/assessment.vue:554", "创建会话失败:", err);
|
|
|
|
|
|
|
+ common_vendor.index.__f__("error", "at pages/assessment/assessment.vue:576", "创建会话失败:", err);
|
|
|
common_vendor.index.showToast({ title: "连接失败,请重试", icon: "none" });
|
|
common_vendor.index.showToast({ title: "连接失败,请重试", icon: "none" });
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
@@ -327,7 +342,7 @@ const _sfc_main = {
|
|
|
];
|
|
];
|
|
|
}
|
|
}
|
|
|
} catch (e) {
|
|
} catch (e) {
|
|
|
- common_vendor.index.__f__("error", "at pages/assessment/assessment.vue:610", "加载字典失败", e);
|
|
|
|
|
|
|
+ common_vendor.index.__f__("error", "at pages/assessment/assessment.vue:632", "加载字典失败", e);
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
const trainingFilterList = common_vendor.ref([
|
|
const trainingFilterList = common_vendor.ref([
|
|
@@ -424,16 +439,16 @@ const _sfc_main = {
|
|
|
}
|
|
}
|
|
|
} catch (e) {
|
|
} catch (e) {
|
|
|
}
|
|
}
|
|
|
- common_vendor.index.__f__("log", "at pages/assessment/assessment.vue:724", "assessment onMounted triggered");
|
|
|
|
|
|
|
+ common_vendor.index.__f__("log", "at pages/assessment/assessment.vue:746", "assessment onMounted triggered");
|
|
|
loadDicts();
|
|
loadDicts();
|
|
|
fetchAssessments();
|
|
fetchAssessments();
|
|
|
fetchTrainings();
|
|
fetchTrainings();
|
|
|
});
|
|
});
|
|
|
common_vendor.onLoad(() => {
|
|
common_vendor.onLoad(() => {
|
|
|
- common_vendor.index.__f__("log", "at pages/assessment/assessment.vue:731", "assessment onLoad triggered");
|
|
|
|
|
|
|
+ common_vendor.index.__f__("log", "at pages/assessment/assessment.vue:753", "assessment onLoad triggered");
|
|
|
});
|
|
});
|
|
|
common_vendor.onShow(() => {
|
|
common_vendor.onShow(() => {
|
|
|
- common_vendor.index.__f__("log", "at pages/assessment/assessment.vue:735", "assessment onShow triggered");
|
|
|
|
|
|
|
+ common_vendor.index.__f__("log", "at pages/assessment/assessment.vue:757", "assessment onShow triggered");
|
|
|
});
|
|
});
|
|
|
common_vendor.onPullDownRefresh(async () => {
|
|
common_vendor.onPullDownRefresh(async () => {
|
|
|
common_vendor.index.stopPullDownRefresh();
|
|
common_vendor.index.stopPullDownRefresh();
|
|
@@ -496,29 +511,31 @@ const _sfc_main = {
|
|
|
};
|
|
};
|
|
|
}),
|
|
}),
|
|
|
g: common_vendor.t(item.desc),
|
|
g: common_vendor.t(item.desc),
|
|
|
- h: item.isPassed
|
|
|
|
|
- }, item.isPassed ? {
|
|
|
|
|
|
|
+ h: item.isPassed && !item.isApplied
|
|
|
|
|
+ }, item.isPassed && !item.isApplied ? {
|
|
|
i: common_vendor.o(($event) => handleApply(item), index)
|
|
i: common_vendor.o(($event) => handleApply(item), index)
|
|
|
} : {}, {
|
|
} : {}, {
|
|
|
- j: item.hasRecord && !item.isPassed
|
|
|
|
|
|
|
+ j: item.isPassed && item.isApplied
|
|
|
|
|
+ }, item.isPassed && item.isApplied ? {} : {}, {
|
|
|
|
|
+ k: item.hasRecord && !item.isPassed
|
|
|
}, item.hasRecord && !item.isPassed ? {
|
|
}, item.hasRecord && !item.isPassed ? {
|
|
|
- k: !item.isCompleted ? 1 : "",
|
|
|
|
|
- l: common_vendor.o(($event) => viewAssessmentReport(item), index)
|
|
|
|
|
|
|
+ l: !item.isCompleted ? 1 : "",
|
|
|
|
|
+ m: common_vendor.o(($event) => viewAssessmentReport(item), index)
|
|
|
} : {}, {
|
|
} : {}, {
|
|
|
- m: item.hasRecord && !item.isPassed
|
|
|
|
|
|
|
+ n: item.hasRecord && !item.isPassed
|
|
|
}, item.hasRecord && !item.isPassed ? {
|
|
}, item.hasRecord && !item.isPassed ? {
|
|
|
- n: common_vendor.o(($event) => goToDetail(item), index)
|
|
|
|
|
|
|
+ o: common_vendor.o(($event) => goToDetail(item), index)
|
|
|
} : {}, {
|
|
} : {}, {
|
|
|
- o: !item.hasRecord
|
|
|
|
|
|
|
+ p: !item.hasRecord
|
|
|
}, !item.hasRecord ? {
|
|
}, !item.hasRecord ? {
|
|
|
- p: common_vendor.o(($event) => handleConsult(item), index)
|
|
|
|
|
|
|
+ q: common_vendor.o(($event) => handleConsult(item), index)
|
|
|
} : {}, {
|
|
} : {}, {
|
|
|
- q: item.hasPaid && !item.hasRecord
|
|
|
|
|
|
|
+ r: item.hasPaid && !item.hasRecord
|
|
|
}, item.hasPaid && !item.hasRecord ? {
|
|
}, item.hasPaid && !item.hasRecord ? {
|
|
|
- r: common_vendor.o(($event) => goToDetail(item), index)
|
|
|
|
|
|
|
+ s: common_vendor.o(($event) => goToDetail(item), index)
|
|
|
} : {}, {
|
|
} : {}, {
|
|
|
- s: index,
|
|
|
|
|
- t: common_vendor.o(($event) => goToDetail(item), index)
|
|
|
|
|
|
|
+ t: index,
|
|
|
|
|
+ v: common_vendor.o(($event) => goToDetail(item), index)
|
|
|
});
|
|
});
|
|
|
}),
|
|
}),
|
|
|
v: filteredAssessments.value.length === 0
|
|
v: filteredAssessments.value.length === 0
|