|
@@ -115,7 +115,6 @@
|
|
|
import CtForm from '@/components/CtForm'
|
|
|
import Snackbar from '@/plugins/snackbar'
|
|
|
import { getDict } from '@/hooks/web/useDictionaries'
|
|
|
-// import { timesTampChange } from '@/utils/date'
|
|
|
import { updatePersonAvatar, saveResumeBasicInfo } from '@/api/recruit/personal/resume'
|
|
|
import { useUserStore } from '@/store/user'
|
|
|
import { uploadFile } from '@/api/common'
|
|
@@ -123,7 +122,7 @@ import { getUserAvatar } from '@/utils/avatar'
|
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
|
import portrait from './portrait.vue'
|
|
|
import { checkEmail } from '@/utils/validate'
|
|
|
-import { ref } from 'vue';
|
|
|
+import { ref } from 'vue'
|
|
|
defineOptions({name: 'resume-components-basicInfo'})
|
|
|
const emit = defineEmits(['complete'])
|
|
|
|
|
@@ -394,7 +393,6 @@ const handleSave = async () => {
|
|
|
if (!valid) return
|
|
|
const obj = {}
|
|
|
items.value.options.forEach(e => {
|
|
|
- // if (e.type === 'datepicker') obj[e.key] = getTimeStamp(e.value)
|
|
|
obj[e.key] = e.value
|
|
|
})
|
|
|
if (!obj.sex) return Snackbar.warning('请先选择您的性别')
|
|
@@ -407,26 +405,16 @@ const handleSave = async () => {
|
|
|
|
|
|
}
|
|
|
|
|
|
-// 获取字典内容
|
|
|
-const getDictData = async (dictTypeName) => {
|
|
|
- const item = items.value.options.find(e => e.dictTypeName === dictTypeName)
|
|
|
- if (item) {
|
|
|
- const { data } = await getDict(dictTypeName)
|
|
|
- item.items = data
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-items.value.options.forEach((e, index) => {
|
|
|
+items.value.options.forEach(async (e, index) => {
|
|
|
if ((index + 2) % 2 === 0) e.flexStyle = 'mr-3'
|
|
|
- if (e.dictTypeName) getDictData(e.dictTypeName) // 查字典set options
|
|
|
+ if (e.dictTypeName) {
|
|
|
+ const { data } = await getDict(e.dictTypeName)
|
|
|
+ e.items = data
|
|
|
+ }
|
|
|
const infoExist = baseInfo.value && Object.keys(baseInfo.value).length
|
|
|
if (infoExist && baseInfo.value[e.key]) e.value = baseInfo.value[e.key]
|
|
|
- // 日期相关
|
|
|
- // if (e.type === 'datepicker') e.value = timesTampChange(e.value, 'Y-M-D')
|
|
|
if (e.value === undefined || e.value === null || e.value === '') completeStatus = false
|
|
|
})
|
|
|
-// 完成度展示
|
|
|
-
|
|
|
getDict('areaTreeData', null, 'areaTreeData').then(({ data }) => {
|
|
|
data = data?.length && data || []
|
|
|
if (!data?.length) return console.error('areaTreeData获取失败!')
|