|
@@ -1,4 +1,4 @@
|
|
|
-<!-- -->
|
|
|
+<!-- 简历附件解析 -->
|
|
|
<template>
|
|
|
<view>
|
|
|
<!-- 选择简历 -->
|
|
@@ -10,12 +10,12 @@
|
|
|
<template v-slot:right>
|
|
|
<view v-if="item.path !== 'baseInfoEdit'" style="color: #e64340;" @click="del(item)">删除</view>
|
|
|
</template>
|
|
|
- <avatarEdit v-if="item.path === 'avatarEdit'" ref="componentRef" :id="item.id" :data="item.data" />
|
|
|
- <baseInfoEdit v-if="item.path === 'baseInfoEdit'" ref="componentRef" :id="item.id" :data="item.data" />
|
|
|
- <advantageEdit v-if="item.path === 'advantageEdit'" ref="componentRef" :id="item.id" :data="item.data" />
|
|
|
- <educationEdit v-if="item.path === 'educationEdit'" ref="componentRef" :id="item.id" :data="item.data" />
|
|
|
- <workExperienceEdit v-if="item.path === 'workExperienceEdit'" ref="componentRef" :id="item.id" :data="item.data" />
|
|
|
- <trainingExperienceEdit v-if="item.path === 'trainingExperienceEdit'" ref="componentRef" :id="item.id" :data="item.data" />
|
|
|
+ <avatarEdit v-if="item.path === 'avatarEdit'" ref="componentRef" :id="item.id" :text="item.text" :data="item.data" />
|
|
|
+ <baseInfoEdit v-if="item.path === 'baseInfoEdit'" ref="componentRef" :id="item.id" :text="item.text" :data="item.data" />
|
|
|
+ <advantageEdit v-if="item.path === 'advantageEdit'" ref="componentRef" :id="item.id" :text="item.text" :data="item.data" />
|
|
|
+ <educationEdit v-if="item.path === 'educationEdit'" ref="componentRef" :id="item.id" :text="item.text" :data="item.data" />
|
|
|
+ <workExperienceEdit v-if="item.path === 'workExperienceEdit'" ref="componentRef" :id="item.id" :text="item.text" :data="item.data" />
|
|
|
+ <trainingExperienceEdit v-if="item.path === 'trainingExperienceEdit'" ref="componentRef" :id="item.id" :text="item.text" :data="item.data" />
|
|
|
</uni-section>
|
|
|
</uni-card>
|
|
|
<!-- 保存 -->
|
|
@@ -56,7 +56,7 @@ import advantageEdit from './components/advantage.vue'
|
|
|
import educationEdit from './components/educationExp.vue'
|
|
|
import workExperienceEdit from './components/workExperience.vue'
|
|
|
import trainingExperienceEdit from './components/trainingExperience.vue'
|
|
|
-// import { data } from './testData.js'
|
|
|
+import { resumeParser2Data } from './testData.js'
|
|
|
|
|
|
const step = ref(1)
|
|
|
|
|
@@ -136,11 +136,10 @@ const handleAnalysis = async (url) => {
|
|
|
if (!url) return
|
|
|
loading.value = true
|
|
|
step.value = 3
|
|
|
- // const baseUrl = envObj.previewUrl
|
|
|
- // fileUrl.value = !url.includes('.pdf') ? `${baseUrl}/onlinePreview?url=${encodeURIComponent(Base64.encode(url))}` : url
|
|
|
try {
|
|
|
- const res = await resumeParser2({ fileUrl: url })
|
|
|
- result.value = res?.data || {}
|
|
|
+ // const res = await resumeParser2({ fileUrl: url })
|
|
|
+ // result.value = res?.data || {}
|
|
|
+ result.value = resumeParser2Data
|
|
|
await transformToLIst(result.value)
|
|
|
step.value = 2
|
|
|
} catch (error) {
|
|
@@ -160,7 +159,7 @@ const handleResumeAnalysis = (url) => {
|
|
|
|
|
|
const componentRef = ref()
|
|
|
const getValue = async () => {
|
|
|
- let id = ''
|
|
|
+ let text = ''
|
|
|
let data = {}
|
|
|
for (let index = 0; index < componentRef.value.length; index++) {
|
|
|
const e = componentRef.value[index]
|
|
@@ -168,12 +167,11 @@ const getValue = async () => {
|
|
|
if (query && query.data) {
|
|
|
data[query.id] = query.data
|
|
|
} else {
|
|
|
- id = id ? id : query.id
|
|
|
+ if (!text) text = query.text
|
|
|
}
|
|
|
}
|
|
|
- console.log('id:', id)
|
|
|
- if (id) {
|
|
|
- uni.showToast({ icon: 'none', title: '请填写完整后提交!' })
|
|
|
+ if (text) {
|
|
|
+ uni.showToast({ icon: 'none', title: `请完整填写 ${text} 后提交!` })
|
|
|
return
|
|
|
}
|
|
|
// 处理data
|