企业用户bug修复

This commit is contained in:
冯辉
2025-11-13 19:28:00 +08:00
parent 1863cd8f62
commit 4ab0bc2f6e
8 changed files with 221 additions and 47 deletions

View File

@@ -153,7 +153,7 @@ const percent = ref('0%');
const state = reactive({
educationText: '',
politicalAffiliationText: '',
skills: [], // 新的技能数据结构
skills: [], // 新的技能数据结构包含id字段
currentEditingSkillIndex: -1 // 当前正在编辑的技能索引
});
const fromValue = reactive({
@@ -244,13 +244,14 @@ function initLoad() {
fromValue.politicalAffiliation = currentUserInfo.politicalAffiliation || '';
fromValue.idCard = currentUserInfo.idCard || '';
// 初始化技能数据 - 从appSkillsList获取
// 初始化技能数据 - 从appSkillsList获取保留原始id
if (currentUserInfo.appSkillsList && Array.isArray(currentUserInfo.appSkillsList)) {
// 过滤掉name为空的技能项
const validSkills = currentUserInfo.appSkillsList.filter(item => item.name && item.name.trim() !== '');
if (validSkills.length > 0) {
// 将appSkillsList转换为新的技能数据结构
// 将appSkillsList转换为新的技能数据结构保留原始id
state.skills = validSkills.map(skill => ({
id: skill.id, // 保留服务器返回的原始id
name: skill.name,
level: skill.levels || ''
}));
@@ -350,10 +351,11 @@ const confirm = () => {
return $api.msg('请输入正确手机号');
}
// 构建appSkillsList数据结构 - 使用新的技能数据结构
// 构建appSkillsList数据结构 - 使用新的技能数据结构包含id字段
const appSkillsList = state.skills
.filter(skill => skill.name && skill.name.trim() !== '')
.map(skill => ({
id: skill.id, // 包含技能id用于更新操作
name: skill.name,
levels: skill.level || ''
}));
@@ -379,7 +381,7 @@ function addSkill() {
return;
}
// 添加新的技能对象
// 添加新的技能对象新增技能不需要id后端会自动生成
state.skills.push({
name: '',
level: ''

View File

@@ -35,10 +35,13 @@
<dict-Label dictType="education" :value="jobInfo.education"></dict-Label>
</view>
</view>
<view class="position-source">
<text>来源&nbsp;</text>
{{ jobInfo.dataSource }}
</view>
<view class="position-source">
<text>来源&nbsp;</text>
{{ jobInfo.dataSource }}
</view>
<view class="publish-time" v-if="jobInfo.postingDate">
{{ formatPublishTime(jobInfo.postingDate) }}
</view>
</view>
</view>
<view class="ai-explain" v-if="jobInfo.isExplain">