|
|
@@ -122,11 +122,12 @@
|
|
|
v-model="form.postName"
|
|
|
placeholder="请输入岗位"
|
|
|
/> -->
|
|
|
+ <!-- postIdDisplay:字典匹配不上的历史 id 不回显裸 id,form.postId 保持原值不受影响 -->
|
|
|
<DictSelection
|
|
|
dictName="岗位"
|
|
|
clearable
|
|
|
filterable
|
|
|
- v-model="form.postId"
|
|
|
+ v-model="postIdDisplay"
|
|
|
multiple
|
|
|
>
|
|
|
</DictSelection>
|
|
|
@@ -1337,6 +1338,20 @@
|
|
|
styleResponsive() {
|
|
|
return this.$store.state.theme.styleResponsive;
|
|
|
},
|
|
|
+ // 岗位显示值:详情里的 postId 若在「岗位」字典中匹配不到(历史数据),
|
|
|
+ // 不回显裸 id,显示为空;form.postId 保持原值,保存逻辑不受影响
|
|
|
+ postIdDisplay: {
|
|
|
+ get() {
|
|
|
+ if (!Array.isArray(this.form.postId)) return this.form.postId;
|
|
|
+ const codes = (this.dict[this.dictEnum['岗位']] || []).map((item) =>
|
|
|
+ String(item.dictCode)
|
|
|
+ );
|
|
|
+ return this.form.postId.filter((id) => codes.includes(String(id)));
|
|
|
+ },
|
|
|
+ set(val) {
|
|
|
+ this.form.postId = val;
|
|
|
+ }
|
|
|
+ },
|
|
|
organization() {
|
|
|
return this.setList(this.organizationList);
|
|
|
},
|
|
|
@@ -2072,11 +2087,13 @@
|
|
|
this.form.educationExperienceList.push(legacyEducation);
|
|
|
}
|
|
|
}
|
|
|
+ // 直属上级姓名取详情接口的 managerUserName;
|
|
|
+ // 未返回时不做兜底,label 用空格占位避免组件回退显示裸 id
|
|
|
this.managerOptions = this.form.managerUserId
|
|
|
? [
|
|
|
{
|
|
|
id: this.form.managerUserId,
|
|
|
- name: this.form.managerName || '当前直属上级',
|
|
|
+ name: this.form.managerUserName || ' ',
|
|
|
jobNumber: ''
|
|
|
}
|
|
|
]
|