|
@@ -62,7 +62,7 @@ import { uploadFile } from '@/api/common'
|
|
|
import Snackbar from '@/plugins/snackbar'
|
|
|
import { useI18n } from '@/hooks/web/useI18n'; const { t } = useI18n()
|
|
|
import uploadForm from './upload.vue'
|
|
|
-import { analyzeTestData } from './analyzeTestData.js'
|
|
|
+// import { analyzeTestData } from './analyzeTestData.js'
|
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
@@ -77,12 +77,10 @@ let query = reactive({})
|
|
|
|
|
|
// 企业名称下拉列表
|
|
|
let enterpriseName = null
|
|
|
-// const enterpriseNameInput = ref('')
|
|
|
const getEnterpriseData = async (name) => {
|
|
|
const item = items.value.options.find(e => e.key === 'enterpriseId')
|
|
|
if (!item) return
|
|
|
if (item.items?.length && (enterpriseName === name)) return // 防抖
|
|
|
- // item[item.itemTextName] =
|
|
|
enterpriseName = name
|
|
|
if (name === null || name === '') { item.items = [] }
|
|
|
else {
|
|
@@ -288,7 +286,6 @@ const openFileInput = () => {
|
|
|
// 上传头像
|
|
|
const accept = ['jpg', 'png', 'jpeg']
|
|
|
const handleUploadFile = async (e) => {
|
|
|
- console.log('handleUploadFile:', e)
|
|
|
const file = e.target.files[0]
|
|
|
if (!file) return
|
|
|
|
|
@@ -333,7 +330,6 @@ const getDictData = async (dictTypeName, key) => {
|
|
|
const apiType = dictTypeName === 'positionSecondData' ? 'positionSecondData' : 'dict'
|
|
|
const { data } = await getDict(dictTypeName, apiType === 'dict' ? null : {}, apiType)
|
|
|
item.items = data
|
|
|
- // console.log(dictTypeName, '字典内容', data)
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -341,8 +337,8 @@ const userInfo = ref(localStorage.getItem('userInfo') ? JSON.parse(localStorage.
|
|
|
const baseInfo = ref(localStorage.getItem('baseInfo') ? JSON.parse(localStorage.getItem('baseInfo')) : {})
|
|
|
items.value.options.forEach((e) => {
|
|
|
if (e.dictTypeName) getDictData(e.dictTypeName, e.key) // 查字典set options
|
|
|
- if (baseInfo.value && baseInfo.value[e.key]) e.value = baseInfo.value[e.key] // 人才信息回显
|
|
|
if (userInfo.value && userInfo.value[e.key]) e.value = userInfo.value[e.key] // 人才信息回显
|
|
|
+ if (baseInfo.value && baseInfo.value[e.key]) e.value = baseInfo.value[e.key] // 人才信息回显
|
|
|
if (e.key === 'sex' && e.value === '0') e.value = e.default
|
|
|
if (setInfo.value[e.key]) e.value = setInfo.value[e.key]
|
|
|
})
|
|
@@ -389,17 +385,15 @@ const getQuery = async () => {
|
|
|
|
|
|
// 填充
|
|
|
const handleAnalyzeFill = (data) => {
|
|
|
- const person = data?.person || null
|
|
|
- if (!person && !Object.keys(person).length) return Snackbar.warning('无可用内容!')
|
|
|
+ const person = data?.person || {}
|
|
|
+ if (!Object.keys(person).length) return Snackbar.warning('无可用内容!')
|
|
|
if (data.lastEmployed) {
|
|
|
if (data.lastEmployed.enterpriseName) person.enterpriseId = person.enterpriseName = data.lastEmployed.enterpriseName
|
|
|
if (data.lastEmployed.positionName) person.positionId = person.positionName = positionName = data.lastEmployed.positionName
|
|
|
- // console.log('person', person)
|
|
|
}
|
|
|
if (data.lastPositionId) person.interestedPositionList = [data.lastPositionId]
|
|
|
items.value.options.forEach((e) => {
|
|
|
- console.log(e.key, person[e.key])
|
|
|
- if (person[e.key]) e.value = person[e.key]
|
|
|
+ if (e.key && person[e.key]) e.value = person[e.key]
|
|
|
})
|
|
|
}
|
|
|
|