|
@@ -27,8 +27,9 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
+ <Loading :visible="loading"></Loading>
|
|
<selectResumeDialog v-model="showAttachment" title="请选择已有的简历导入" :list="attachmentList" @submit="handleAttachmentSubmit" @close="showAttachment = false" />
|
|
<selectResumeDialog v-model="showAttachment" title="请选择已有的简历导入" :list="attachmentList" @submit="handleAttachmentSubmit" @close="showAttachment = false" />
|
|
- <resumeAnalysis v-model="showAnalysis" :url="selectAttachment" @submit="handleResumeAnalysisSubmit" @close="showAnalysis = false" />
|
|
|
|
|
|
+ <resumeAnalysis v-model="showAnalysis" :data="result" :url="selectAttachment" @submit="handleResumeAnalysisSubmit" @close="showAnalysis = false" />
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
@@ -43,7 +44,7 @@ import educationExp from './components/educationExp.vue'
|
|
import workExperience from './components/workExperience.vue'
|
|
import workExperience from './components/workExperience.vue'
|
|
// import projectExperience from './components/projectExperience.vue'
|
|
// import projectExperience from './components/projectExperience.vue'
|
|
import vocationalSkills from './components/vocationalSkills.vue'
|
|
import vocationalSkills from './components/vocationalSkills.vue'
|
|
-import { resumePersonFillAll, getPersonResumeCv } from '@/api/recruit/personal/resume'
|
|
|
|
|
|
+import { resumePersonFillAll, getPersonResumeCv, resumeParser } from '@/api/recruit/personal/resume'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import { useRouter } from 'vue-router'
|
|
import { useRouter } from 'vue-router'
|
|
import selectResumeDialog from '@/views/recruit/personal/position/components/jobDetails/selectResumeDialog.vue'
|
|
import selectResumeDialog from '@/views/recruit/personal/position/components/jobDetails/selectResumeDialog.vue'
|
|
@@ -53,6 +54,7 @@ const router = useRouter()
|
|
const { t } = useI18n()
|
|
const { t } = useI18n()
|
|
const scrollBox = ref()
|
|
const scrollBox = ref()
|
|
const tab = ref(0)
|
|
const tab = ref(0)
|
|
|
|
+const loading = ref(false)
|
|
const paths = [basicInfo, selfEvaluation, jobIntention, educationExp, workExperience, vocationalSkills, trainingExperience]
|
|
const paths = [basicInfo, selfEvaluation, jobIntention, educationExp, workExperience, vocationalSkills, trainingExperience]
|
|
const items = ref([
|
|
const items = ref([
|
|
{ text: t('resume.basicInfo'), id: 'basicInfo', status: false },
|
|
{ text: t('resume.basicInfo'), id: 'basicInfo', status: false },
|
|
@@ -125,13 +127,26 @@ const handleImportAttachment = () => {
|
|
showAttachment.value = true
|
|
showAttachment.value = true
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const result = ref({})
|
|
|
|
+// const fileUrl = 'https://minio.menduner.com/test/person/1/attachment/7cde29dc69c1403649be55d4c2bfd3d8304c088dc79ab25afe9c4bf55d3b382f.docx'
|
|
|
|
+// const fileUrl = 'https://minio.menduner.com/dev/person/546458957531713536/attachment/a71eeef077f41bb9edc9eae904f6cc8337c01431435c319612c7ce5d9258a808.pdf'
|
|
|
|
+const fileUrl = 'https://minio.menduner.com/dev/person/744285421114101760/attachment/8908069ceead39d55852f126c0a46dc5f338c1c9aae5c8e7b6838cddf2d57deb.pdf'
|
|
const selectAttachment = ref('')
|
|
const selectAttachment = ref('')
|
|
const showAnalysis = ref(false)
|
|
const showAnalysis = ref(false)
|
|
-const handleAttachmentSubmit = (val) => {
|
|
|
|
|
|
+const handleAttachmentSubmit = async (val) => {
|
|
if (!val) return
|
|
if (!val) return
|
|
selectAttachment.value = attachmentList.value.find(e => e.id === val).url
|
|
selectAttachment.value = attachmentList.value.find(e => e.id === val).url
|
|
showAttachment.value = false
|
|
showAttachment.value = false
|
|
- showAnalysis.value = true
|
|
|
|
|
|
+ loading.value = true
|
|
|
|
+ try {
|
|
|
|
+ const data = await resumeParser({ fileUrl })
|
|
|
|
+ result.value = data.result
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.log(error)
|
|
|
|
+ } finally {
|
|
|
|
+ loading.value = false
|
|
|
|
+ showAnalysis.value = true
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
const handleResumeAnalysisSubmit = () => {}
|
|
const handleResumeAnalysisSubmit = () => {}
|