|
@@ -46,14 +46,15 @@
|
|
<div class="resume-header">
|
|
<div class="resume-header">
|
|
<div class="resume-title">{{ $t('position.jobResponsibilities') }}:</div>
|
|
<div class="resume-title">{{ $t('position.jobResponsibilities') }}:</div>
|
|
</div>
|
|
</div>
|
|
- <div v-if="info.content" class="requirement" v-html="info.content.replace(/\n/g, '</br>')"></div>
|
|
|
|
|
|
+ <div v-if="info.content" class="requirement" v-html="cleanedHtml(info.content)"></div>
|
|
|
|
+ <!-- <div v-if="info.content" class="requirement" v-html="info.content.replace(/\n/g, '</br>')"></div> -->
|
|
<div v-else>暂无</div>
|
|
<div v-else>暂无</div>
|
|
</div>
|
|
</div>
|
|
<div class="mt-3">
|
|
<div class="mt-3">
|
|
<div class="resume-header">
|
|
<div class="resume-header">
|
|
<div class="resume-title">{{ $t('position.jobRequirements') }}:</div>
|
|
<div class="resume-title">{{ $t('position.jobRequirements') }}:</div>
|
|
</div>
|
|
</div>
|
|
- <div v-if="info.requirement" class="requirement" v-html="info.requirement.replace(/\n/g, '</br>')"></div>
|
|
|
|
|
|
+ <div v-if="info.requirement" class="requirement" v-html="cleanedHtml(info.requirement)"></div>
|
|
<div v-else>暂无</div>
|
|
<div v-else>暂无</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -162,31 +163,14 @@ import { ref } from 'vue'
|
|
import { useRouter } from 'vue-router'
|
|
import { useRouter } from 'vue-router'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import html2canvas from 'html2canvas'
|
|
import html2canvas from 'html2canvas'
|
|
-
|
|
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
import { prologue, defaultText } from '@/hooks/web/useIM'
|
|
import { prologue, defaultText } from '@/hooks/web/useIM'
|
|
-
|
|
|
|
import PosterPage from './poster.vue'
|
|
import PosterPage from './poster.vue'
|
|
import selectResumeDialog from './jobDetails/selectResumeDialog'
|
|
import selectResumeDialog from './jobDetails/selectResumeDialog'
|
|
import similarPositions from '@/components/Position/similarPositions.vue'
|
|
import similarPositions from '@/components/Position/similarPositions.vue'
|
|
import EnterpriseInfo from '@/components/Enterprise/info.vue'
|
|
import EnterpriseInfo from '@/components/Enterprise/info.vue'
|
|
import Dialog from '@/components/CtDialog'
|
|
import Dialog from '@/components/CtDialog'
|
|
import loginPage from '@/views/common/loginDialog.vue'
|
|
import loginPage from '@/views/common/loginDialog.vue'
|
|
-const props = defineProps({
|
|
|
|
- defaultWidth: {
|
|
|
|
- type: Boolean,
|
|
|
|
- default: true
|
|
|
|
- },
|
|
|
|
- showContentRight: {
|
|
|
|
- type: Boolean,
|
|
|
|
- default: true
|
|
|
|
- },
|
|
|
|
- propJobId: {
|
|
|
|
- type: [String, Number],
|
|
|
|
- default: ''
|
|
|
|
- },
|
|
|
|
-})
|
|
|
|
-
|
|
|
|
import {
|
|
import {
|
|
getPositionDetails,
|
|
getPositionDetails,
|
|
getSimilarPosition,
|
|
getSimilarPosition,
|
|
@@ -204,6 +188,21 @@ import { dealDictObjData, dealDictArrayData, commissionCalculation } from '@/uti
|
|
import { getToken } from '@/utils/auth'
|
|
import { getToken } from '@/utils/auth'
|
|
import { getUserAvatar } from '@/utils/avatar'
|
|
import { getUserAvatar } from '@/utils/avatar'
|
|
|
|
|
|
|
|
+const props = defineProps({
|
|
|
|
+ defaultWidth: {
|
|
|
|
+ type: Boolean,
|
|
|
|
+ default: true
|
|
|
|
+ },
|
|
|
|
+ showContentRight: {
|
|
|
|
+ type: Boolean,
|
|
|
|
+ default: true
|
|
|
|
+ },
|
|
|
|
+ propJobId: {
|
|
|
|
+ type: [String, Number],
|
|
|
|
+ default: ''
|
|
|
|
+ },
|
|
|
|
+})
|
|
|
|
+
|
|
const { t } = useI18n()
|
|
const { t } = useI18n()
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
const { id } = props.propJobId ? { id: props.propJobId } : router.currentRoute.value.params
|
|
const { id } = props.propJobId ? { id: props.propJobId } : router.currentRoute.value.params
|
|
@@ -250,6 +249,16 @@ const loginClose = () => {
|
|
Snackbar.warning(loginCloseWarningWord)
|
|
Snackbar.warning(loginCloseWarningWord)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// 富文本内容处理,去除多余的换行空格等
|
|
|
|
+const cleanedHtml = (text) => {
|
|
|
|
+ let cleaned = text.replace(/\n/g, '</br>')
|
|
|
|
+ cleaned = cleaned.replace(/\s+/g, ' ').trim()
|
|
|
|
+ cleaned = cleaned.replace(/(^|\s+)<\/p>(\s*<p>|$)/g, '</p><p>').trim()
|
|
|
|
+ cleaned = cleaned.replace(/<p>\s*(<br>)\s*<\/p>/g, '')
|
|
|
|
+ cleaned = cleaned.replace(/<p>\s*(<\/br>)\s*<\/p>/g, '')
|
|
|
|
+ return cleaned
|
|
|
|
+}
|
|
|
|
+
|
|
const share = ref()
|
|
const share = ref()
|
|
// 生成图片
|
|
// 生成图片
|
|
const generateAndDownloadImage = async () => {
|
|
const generateAndDownloadImage = async () => {
|