Explorar el Código

查看文本信息

lifanagju_citu hace 5 meses
padre
commit
19421ab607

+ 21 - 1
src/views/recruit/personal/PersonalCenter/resume/online/resumeAnalysis.vue

@@ -12,7 +12,24 @@
     <div class="d-flex" style="height: calc(90vh - 160px); overflow: hidden; position: relative;">
       <!-- 简历附件回显 -->
       <div class="mr-5" style="width: 60%; height: 100%">
-        <IFrame :src="decodeURIComponent(props.fileUrl)" initHeight="100%"></IFrame>
+        <v-tabs v-model="tab" align-tabs="start" color="primary" bg-color="#f7f8fa">
+          <v-tab :value="1">查看附件简历</v-tab>
+          <v-tab :value="2">查看文本信息</v-tab>
+        </v-tabs>
+        <div class="mt-5" style="width: 100%; height: 100%">
+          <div v-show="tab === 1" style="width: 100%; height: 100%">
+            <IFrame :src="decodeURIComponent(props.fileUrl)" initHeight="100%"></IFrame>
+          </div>
+          <div v-show="tab === 2">
+            <template v-if="resumeTxt?.length">
+              简历解析(可复制文本使用)
+              <p v-for="(text, index) in resumeTxt" :key="text + index">{{ text }}</p>
+            </template>
+            <template v-else>
+              无简历解析文本可用
+            </template>
+          </div>
+        </div>
       </div>
       <!-- 解析内容 -->
       <v-card class="elevation-2 pa-3" style="flex: 1; height: 100%; overflow: auto;" >
@@ -66,6 +83,7 @@ const props = defineProps({
   }
 })
 
+const tab = ref(1)
 const exampleList = {
   avatar: { text: t('resume.avatar'), id: 'avatar', path: avatar },
   person: { text: t('resume.basicInfo'), id: 'person', path: basicInfo },
@@ -146,12 +164,14 @@ const show = computed(() => {
   return props.modelValue
 })
 
+const resumeTxt = ref([]) // 查看文本信息
 const paths = shallowRef([])
 watch(
   () => props.data,
   (newVal) => {
     paths.value = []
     if (newVal && Object.keys(newVal)) {
+      if (newVal.resume?.rawText) resumeTxt.value = newVal.resume.rawText.split('\n') || []
       if (newVal.person?.advantage) newVal.advantage = newVal.person.advantage
       if (newVal.person?.avatar) newVal.avatar = newVal.person.avatar
       // obj