Pārlūkot izejas kodu

清除户籍地:省

lifanagju_citu 8 mēneši atpakaļ
vecāks
revīzija
b073b9b7fb

+ 5 - 1
src/views/recruit/personal/remuse/components/basicInfo.vue

@@ -109,7 +109,7 @@ import { useUserStore } from '@/store/user'
 import { uploadFile } from '@/api/common'
 import { getUserAvatar } from '@/utils/avatar'
 import { useI18n } from '@/hooks/web/useI18n'
-import { ref } from 'vue';
+import { nextTick, ref } from 'vue';
 defineOptions({name: 'resume-components-basicInfo'})
 
 const { t } = useI18n()
@@ -388,7 +388,9 @@ const handleSave = async () => {
   const { valid } = await CtFormRef.value.formRef.validate()
   if (!valid) return
   const obj = {}
+  let clearRegProvinceId = false
   items.value.options.forEach(e => {
+    if (e.key === 'regId' && !obj[e.key]) clearRegProvinceId = true
     if (e.type === 'datepicker') obj[e.key] = getTimeStamp(e.value)
     else obj[e.key] = e.value
   })
@@ -399,6 +401,8 @@ const handleSave = async () => {
   // if (baseInfo.value.userId) await userStore.getUserBaseInfos(baseInfo.value.userId)
   await userStore.getUserBaseInfos(baseInfo.value.userId || null)
   getBasicInfo()
+  // 清除户籍地:省
+  if (clearRegProvinceId) items.value.options.forEach(e => { if (e.key === 'regProvinceId') e.value = null })
 }
 
 // 获取字典内容