bug处理
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 105 KiB |
@@ -1156,7 +1156,6 @@
|
||||
|
||||
// 完成页占位图标
|
||||
&__complete-icon {
|
||||
width: 1.2rem;
|
||||
height: 1.2rem;
|
||||
margin-bottom: 0.32rem;
|
||||
|
||||
|
||||
@@ -1157,3 +1157,109 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ==================== 简历快照抽屉 ====================
|
||||
|
||||
/* 遮罩层 */
|
||||
.jobs-resume-drawer-mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: var(--app-height, 100vh);
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
z-index: 2000;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
/* 抽屉主体 */
|
||||
.jobs-resume-drawer {
|
||||
width: 9.6rem;
|
||||
max-width: 9.6rem;
|
||||
height: var(--app-height, 100vh);
|
||||
background: $bg-white;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-size: 0.14rem;
|
||||
box-shadow: -4px 0 20px rgba(0, 0, 0, 0.08);
|
||||
|
||||
/* 顶部标题栏 */
|
||||
&__header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0.2rem 0.24rem;
|
||||
height: 0.64rem;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid $border-color;
|
||||
}
|
||||
|
||||
&__header-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.16rem;
|
||||
}
|
||||
|
||||
/* 关闭按钮 */
|
||||
&__close {
|
||||
width: 0.24rem;
|
||||
height: 0.24rem;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
&__close-icon {
|
||||
width: 0.24rem;
|
||||
height: 0.24rem;
|
||||
color: $text-middle;
|
||||
}
|
||||
|
||||
/* 标题文字 */
|
||||
&__title {
|
||||
font-size: 0.18rem;
|
||||
font-weight: 520;
|
||||
color: $text-dark;
|
||||
line-height: 0.24rem;
|
||||
}
|
||||
|
||||
/* 加载状态 */
|
||||
&__loading {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 1rem 0;
|
||||
gap: 0.12rem;
|
||||
color: $text-light;
|
||||
font-size: 0.13rem;
|
||||
}
|
||||
|
||||
/* 内容区域(可滚动) */
|
||||
&__body {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 0.24rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* 抽屉动画 */
|
||||
.jobs-resume-drawer-enter-active,
|
||||
.jobs-resume-drawer-leave-active {
|
||||
transition: opacity 0.3s ease;
|
||||
|
||||
.jobs-resume-drawer {
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
}
|
||||
|
||||
.jobs-resume-drawer-enter-from,
|
||||
.jobs-resume-drawer-leave-to {
|
||||
opacity: 0;
|
||||
|
||||
.jobs-resume-drawer {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -345,7 +345,9 @@
|
||||
<!-- ========== 第4步:完成配置 ========== -->
|
||||
<template v-if="currentStep === 4">
|
||||
<div class="agent-page__complete">
|
||||
<div class="agent-page__complete-icon"><svg viewBox="0 0 80 80" fill="none"><rect x="8" y="8" width="64" height="64" rx="8" fill="#E8E8E8"/><circle cx="40" cy="32" r="8" fill="#BFBFBF"/><path d="M20 60 L32 44 L44 52 L56 36 L64 44 L64 64 L20 64Z" fill="#BFBFBF"/></svg></div>
|
||||
<div class="agent-page__complete-icon">
|
||||
<img class="w160 " src="@/assets/images/agent-setting/setting-success.gif" alt="">
|
||||
</div>
|
||||
<h2 class="agent-page__complete-title">恭喜!求职助手已经准备好</h2>
|
||||
<p class="agent-page__complete-desc">启用求职助手后,你可以随时调整求职偏好和简历信息</p>
|
||||
<button class="agent-page__complete-btn" @click="handleLaunchAgent">启用求职助手开始投递</button>
|
||||
|
||||
+129
-1
@@ -216,6 +216,8 @@
|
||||
</div>
|
||||
<!-- 不再显示 -->
|
||||
<span v-if="isRecommendTab" class="jobs-page__hide-btn" @click.stop="openDislikeDialog(job)">不再显示</span>
|
||||
<!-- 查看简历快照(仅已投递列表显示) -->
|
||||
<span v-if="activeTab === 'applied'" class="jobs-page__hide-btn" @click.stop="handleViewResumeSnapshot(job)">查看简历快照</span>
|
||||
</div>
|
||||
|
||||
<!-- 最右侧:匹配度 -->
|
||||
@@ -328,6 +330,35 @@
|
||||
<!-- 会员购买弹窗 -->
|
||||
<MemberDialog v-model="showMemberDialog" />
|
||||
|
||||
<!-- 简历快照预览抽屉(从右侧弹出) -->
|
||||
<Teleport to="body">
|
||||
<Transition name="jobs-resume-drawer">
|
||||
<div v-if="showResumeSnapshotDrawer" class="jobs-resume-drawer-mask" @click.self="closeResumeSnapshotDrawer">
|
||||
<div class="jobs-resume-drawer">
|
||||
<!-- 顶部标题栏 -->
|
||||
<div class="jobs-resume-drawer__header">
|
||||
<div class="jobs-resume-drawer__header-left">
|
||||
<div class="jobs-resume-drawer__close" @click="closeResumeSnapshotDrawer">
|
||||
<svg viewBox="0 0 24 24" fill="none" class="jobs-resume-drawer__close-icon">
|
||||
<path d="M18 6L6 18M6 6l12 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
<span class="jobs-resume-drawer__title">简历快照</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 简历内容 -->
|
||||
<div class="jobs-resume-drawer__body">
|
||||
<div v-if="resumeSnapshotLoading" class="jobs-resume-drawer__loading">
|
||||
<div class="jobs-page__loading-spinner"></div>
|
||||
<span>加载中...</span>
|
||||
</div>
|
||||
<JobResumeTemplate v-else-if="resumeSnapshotData" :resume-data="resumeSnapshotData" mode="preview" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Transition>
|
||||
</Teleport>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -347,13 +378,15 @@ import JobCategorySelector from '@/components/tools/JobCategorySelector.vue'
|
||||
import RegionSelector from '@/components/tools/RegionSelector.vue'
|
||||
|
||||
|
||||
import { fetchJobList, fetchFavoriteList, toggleJobFavorite, removeJobFavorite, fetchFavoriteCount, fetchApplyList, fetchApplyCount, removeJobFromList } from '@/api/jobs'
|
||||
import { fetchJobList, fetchFavoriteList, toggleJobFavorite, removeJobFavorite, fetchFavoriteCount, fetchApplyList, fetchApplyCount, removeJobFromList, fetchCustomizeResume } from '@/api/jobs'
|
||||
import type { JobListItem, JobListParams, FavoriteListParams, ApplyListParams, ApplyCountData } from '@/api/jobs'
|
||||
import { getTimeEvent, setTimeEvent, timestampToLocalDateTime } from '@/utils/time'
|
||||
import { fetchIndustryTree, fetchJobCategoryTree } from '@/api/common'
|
||||
import type { IndustryItem, JobCategoryItem } from '@/api/common'
|
||||
import { fetchAgentConfig, applyJob } from '@/api/agent'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import JobResumeTemplate from '@/components/JobResumeTemplate.vue'
|
||||
import type { ResumeTemplateData } from '@/components/JobResumeTemplate.vue'
|
||||
|
||||
|
||||
// 2. 注意:这里的字符串不需要再手动转义双引号了
|
||||
@@ -1524,4 +1557,99 @@ function openFeedbackDialog(job: JobItem) {
|
||||
feedbackDialogRef.value?.resetForm()
|
||||
showFeedbackDialog.value = true
|
||||
}
|
||||
|
||||
// ==================== 简历快照抽屉 ====================
|
||||
|
||||
/** 简历快照抽屉是否显示 */
|
||||
const showResumeSnapshotDrawer = ref(false)
|
||||
|
||||
/** 简历快照加载状态 */
|
||||
const resumeSnapshotLoading = ref(false)
|
||||
|
||||
/** 简历快照数据 */
|
||||
const resumeSnapshotData = ref<ResumeTemplateData | null>(null)
|
||||
|
||||
/** 学历文字转数字 */
|
||||
function degreeToNumber(degree?: string): number {
|
||||
const map: Record<string, number> = { '大专': 1, '本科': 2, '硕士': 3, '博士': 4 }
|
||||
return map[degree || ''] || 2
|
||||
}
|
||||
|
||||
/** 将匹配度接口返回的简历数据映射为 ResumeTemplateData */
|
||||
function mapResumeToTemplate(data: any): ResumeTemplateData {
|
||||
const r = data.resume || {}
|
||||
return {
|
||||
name: r.name || '未填写姓名',
|
||||
email: r.email || '',
|
||||
mobileNumber: r.mobileNumber || '',
|
||||
wechatNumber: r.wechatNumber || '',
|
||||
summary: r.summary || '',
|
||||
educations: (data.education || []).map((e: any) => ({
|
||||
school: e.school || '',
|
||||
major: e.major || '',
|
||||
degree: degreeToNumber(e.degree),
|
||||
startDate: e.startDate || '',
|
||||
endDate: e.endDate || '',
|
||||
description: (e.description || []).map((d: any) => ({ id: d.id, text: d.text || '' })),
|
||||
})),
|
||||
workExperiences: (data.work || []).map((w: any) => ({
|
||||
companyName: w.companyName || '',
|
||||
position: w.position || '',
|
||||
startDate: w.startDate || '',
|
||||
endDate: w.endDate || '',
|
||||
description: (w.description || []).map((d: any) => ({ id: d.id, text: d.text || '' })),
|
||||
})),
|
||||
internships: (data.internship || []).map((i: any) => ({
|
||||
companyName: i.companyName || '',
|
||||
position: i.position || '',
|
||||
startDate: i.startDate || '',
|
||||
endDate: i.endDate || '',
|
||||
description: (i.description || []).map((d: any) => ({ id: d.id, text: d.text || '' })),
|
||||
})),
|
||||
projects: (data.project || []).map((p: any) => ({
|
||||
projectName: p.projectName || '',
|
||||
companyName: p.companyName || '',
|
||||
role: p.role || '',
|
||||
startDate: p.startDate || '',
|
||||
endDate: p.endDate || '',
|
||||
description: (p.description || []).map((d: any) => ({ id: d.id, text: d.text || '' })),
|
||||
})),
|
||||
competitions: (data.competition || []).map((c: any) => ({
|
||||
competitionName: c.competitionName || '',
|
||||
award: c.award || '',
|
||||
awardDate: c.awardDate || '',
|
||||
description: (c.description || []).map((d: any) => ({ id: d.id, text: d.text || '' })),
|
||||
})),
|
||||
skills: r.skills || [],
|
||||
certificates: r.certificates || [],
|
||||
}
|
||||
}
|
||||
|
||||
/** 点击查看简历快照按钮 */
|
||||
async function handleViewResumeSnapshot(job: JobItem) {
|
||||
showResumeSnapshotDrawer.value = true
|
||||
resumeSnapshotLoading.value = true
|
||||
resumeSnapshotData.value = null
|
||||
try {
|
||||
const res = await fetchCustomizeResume(String(job.id))
|
||||
if (res.code === 0 && res.data) {
|
||||
resumeSnapshotData.value = mapResumeToTemplate(res.data)
|
||||
} else {
|
||||
ElMessage.error('获取简历快照失败')
|
||||
showResumeSnapshotDrawer.value = false
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('获取简历快照失败', e)
|
||||
ElMessage.error('获取简历快照失败')
|
||||
showResumeSnapshotDrawer.value = false
|
||||
} finally {
|
||||
resumeSnapshotLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 关闭简历快照抽屉 */
|
||||
function closeResumeSnapshotDrawer() {
|
||||
showResumeSnapshotDrawer.value = false
|
||||
resumeSnapshotData.value = null
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user