个人资料和岗位列表联调,简历优化部分页面

This commit is contained in:
2026-04-01 11:41:51 +08:00
parent 0468339d23
commit 821a950df2
42 changed files with 5935 additions and 748 deletions
+29
View File
@@ -96,6 +96,7 @@ async function loadProfile() {
profile.value.wechat = d.wechatNumber || ''
profile.value.skills = d.skills || []
profile.value.certificates = d.certificates || []
profile.value.portfolioUrl = d.portfolioUrl || ''
}
} catch {
console.error('[Profile] 加载个人资料失败')
@@ -239,6 +240,8 @@ const profile = ref({
skills: [] as string[],
/** 证书标签列表 — 接口字段 certificates */
certificates: [] as string[],
/** 作品集链接 — 接口字段 portfolioUrl */
portfolioUrl: '',
/** 教育经历 — 对应数据库 bg_user_profile_education */
education: [] as Array<{
school: string
@@ -349,6 +352,10 @@ function handleEdit(section: string) {
description: comp.description.map(d => ({ ...d })),
})),
}
} else if (section === 'portfolio') {
editInitialData.value = {
portfolioUrl: profile.value.portfolioUrl,
}
} else if (section === 'skills') {
editInitialData.value = {
skills: [...profile.value.skills],
@@ -524,6 +531,28 @@ async function handleSaveEdit(data: Record<string, any>) {
} finally {
saving.value = false
}
} else if (editModule.value === 'portfolio') {
// ---- 作品集:调用主表接口保存,需要传递完整的个人信息数据 ----
try {
saving.value = true
await saveProfile({
name: profile.value.name,
email: profile.value.email,
mobileNumber: profile.value.phone,
idCard: profile.value.idNumber,
regionCode: profile.value.regionCode,
wechatNumber: profile.value.wechat,
skills: profile.value.skills,
certificates: profile.value.certificates,
portfolioUrl: data.portfolioUrl,
})
profile.value.portfolioUrl = data.portfolioUrl
ElMessage.success('作品集保存成功')
} catch {
ElMessage.error('作品集保存失败,请重试')
} finally {
saving.value = false
}
} else if (editModule.value === 'skills') {
// ---- 技能:调用主表接口保存,需要传递完整的个人信息数据 ----
try {