|
@@ -8,22 +8,24 @@
|
|
|
</div>
|
|
|
<v-btn v-if="showContentRight" color="primary" variant="text" size="large" @click.stop="handleReturn" prepend-icon="mdi-chevron-triple-left">返回上一页</v-btn>
|
|
|
</div>
|
|
|
- <div class="text-end">
|
|
|
- <span v-if="!info.payFrom && !info.payTo" class="salary font-size-20">面议</span>
|
|
|
- <span v-else class="salary font-size-20">{{ info.payFrom ? info.payFrom + '-' : ''}}{{ info.payTo }}{{ positionInfo.payName ? '/' + positionInfo.payName : '' }}</span>
|
|
|
- </div>
|
|
|
- <div class="refresh-time text-end">{{ timesTampChange(info.updateTime) }} {{ $t('common.refresh') }} <v-icon color="primary" size="20">mdi-circle-medium</v-icon></div>
|
|
|
- <div class="banner-tags mt-4">
|
|
|
- <span v-for="k in desc" :key="k.mdi">
|
|
|
- <span v-if="positionInfo[k.value] || k.value === 'areaName'" class="mr-10">
|
|
|
- <v-icon color="var(--color-666)" size="20">{{ k.mdi }}</v-icon>
|
|
|
- <span class="ml-1">
|
|
|
- {{ k.value === 'areaName' ? !positionInfo.areaId ? '全国' : positionInfo.area?.str : positionInfo[k.value] }}
|
|
|
- <!-- {{ (k.value === 'areaName' && !positionInfo.areaId) ? '全国' : positionInfo[k.value] }} -->
|
|
|
+ <div class="d-flex mt-1 justify-space-between align-center">
|
|
|
+ <div class="banner-tags">
|
|
|
+ <span v-for="k in desc" :key="k.mdi">
|
|
|
+ <span v-if="positionInfo[k.value] || k.value === 'areaName'" class="mr-10">
|
|
|
+ <v-icon color="var(--color-666)" size="20">{{ k.mdi }}</v-icon>
|
|
|
+ <span class="ml-1">
|
|
|
+ {{ k.value === 'areaName' ? !positionInfo.areaId ? '全国' : positionInfo.area?.str : positionInfo[k.value] }}
|
|
|
+ <!-- {{ (k.value === 'areaName' && !positionInfo.areaId) ? '全国' : positionInfo[k.value] }} -->
|
|
|
+ </span>
|
|
|
</span>
|
|
|
</span>
|
|
|
- </span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span v-if="!info.payFrom && !info.payTo" class="salary font-size-20">面议</span>
|
|
|
+ <span v-else class="salary font-size-20">{{ info.payFrom ? info.payFrom + '-' : ''}}{{ info.payTo }}{{ positionInfo.payName ? '/' + positionInfo.payName : '' }}</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ <div class="refresh-time text-end">{{ timesTampChange(info.updateTime) }} {{ $t('common.refresh') }} <v-icon color="primary" size="20">mdi-circle-medium</v-icon></div>
|
|
|
<div class="banner-tools my-4">
|
|
|
<v-chip size="small" label v-for="(k, i) in info.tagList" :key="i" class="mr-1" color="primary">{{ k }}</v-chip>
|
|
|
</div>
|
|
@@ -65,7 +67,7 @@
|
|
|
<v-divider class="my-3"></v-divider>
|
|
|
<div class="contact" v-if="Object.keys(info).length">
|
|
|
<div class="float-left d-flex align-center">
|
|
|
- <v-img :src="getUserAvatar(info.contact.avatar, info.contact.sex)" rounded contain :width="45" style="height: 45px;"></v-img>
|
|
|
+ <v-img :src="getUserAvatar(info.contact.avatar, info.contact.sex)" :width="45" rounded contain style="height: 45px;"></v-img>
|
|
|
<div class="ml-2">
|
|
|
<div class="contact-name">{{ info.contact.name }}</div>
|
|
|
<div class="contact-info">
|
|
@@ -126,34 +128,11 @@
|
|
|
<!-- 选择简历 -->
|
|
|
<selectResumeDialog v-model="showResume" :list="resumeList" @submit="handleSubmit" @close="handleClose"></selectResumeDialog>
|
|
|
|
|
|
- <!-- 职位分享 -->
|
|
|
- <Dialog
|
|
|
- :visible="shareDialog" :widthType="2" :footer="false" titleClass="text-h6"
|
|
|
- :title="$t('position.rewardsShared')"
|
|
|
- @close="shareDialog = false"
|
|
|
- >
|
|
|
- <div>
|
|
|
- <div class="mb-3 text-center">微信分享:保存图片分享给好友</div>
|
|
|
- <div class="d-flex align-center flex-column">
|
|
|
- <v-img :src="previewSrc" width="200" height="250"></v-img>
|
|
|
- <div class="mt-5">
|
|
|
- <v-btn color="primary" variant="outlined" prepend-icon="mdi-eye-outline" @click="showPreview = true" style="width: 133px">预 览</v-btn>
|
|
|
- <v-btn class="ml-3" color="primary" variant="outlined" prepend-icon="mdi-arrow-down-bold-box-outline" @click="handleDownloadImage" style="width: 133px">保存到本地</v-btn>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <template #footer>
|
|
|
- <v-divider></v-divider>
|
|
|
- <div>
|
|
|
- <v-btn class="float-right ma-2" color="primary" variant="text" @click="shareDialog = false">{{ $t('common.close') }}</v-btn>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </Dialog>
|
|
|
- <PreviewImg v-if="showPreview" :list="[previewSrc]" @close="showPreview = false" @download="handleDownloadImage" :isImage="true"></PreviewImg>
|
|
|
+ <!-- 图片预览 -->
|
|
|
+ <PreviewImage v-if="showPreview" :urlList="[previewSrc]" :fileName="fileName" @close="showPreview = !showPreview" />
|
|
|
|
|
|
<Loading :visible="loading"></Loading>
|
|
|
<div v-if="Object.keys(info).length && Object.keys(positionInfo).length" style="position: absolute; left: -9999px; bottom: 0">
|
|
|
-
|
|
|
<PosterPage :id="id" :info="info" :positionInfo="positionInfo" ref="share"></PosterPage>
|
|
|
</div>
|
|
|
|
|
@@ -164,7 +143,7 @@
|
|
|
|
|
|
<script setup>
|
|
|
defineOptions({ name: 'position-details' })
|
|
|
-import { ref } from 'vue'
|
|
|
+import { ref, computed } from 'vue'
|
|
|
import { useRouter } from 'vue-router'
|
|
|
import Snackbar from '@/plugins/snackbar'
|
|
|
import html2canvas from 'html2canvas'
|
|
@@ -174,7 +153,6 @@ import PosterPage from './poster.vue'
|
|
|
import selectResumeDialog from './jobDetails/selectResumeDialog'
|
|
|
import similarPositions from '@/components/Position/similarPositions.vue'
|
|
|
import EnterpriseInfo from '@/components/Enterprise/info.vue'
|
|
|
-import Dialog from '@/components/CtDialog'
|
|
|
import loginPage from '@/views/common/loginDialog.vue'
|
|
|
import {
|
|
|
getPositionDetails,
|
|
@@ -187,7 +165,7 @@ import {
|
|
|
} from '@/api/position'
|
|
|
import { getPersonResumeCv, savePersonResumeCv } from '@/api/recruit/personal/resume'
|
|
|
|
|
|
-import { downloadBase64, DPR } from '@/utils'
|
|
|
+import { DPR } from '@/utils'
|
|
|
import { timesTampChange } from '@/utils/date'
|
|
|
import { dealDictObjData, dealDictArrayData, commissionCalculation } from '@/utils/position'
|
|
|
import { getToken } from '@/utils/auth'
|
|
@@ -196,6 +174,7 @@ import { checkPersonBaseInfo } from '@/utils/check'
|
|
|
import dialogExtend from '@/plugins/dialogExtend'
|
|
|
import { formatName } from '@/utils/getText'
|
|
|
|
|
|
+const emit = defineEmits(['preview'])
|
|
|
const props = defineProps({
|
|
|
defaultWidth: {
|
|
|
type: Boolean,
|
|
@@ -213,6 +192,11 @@ const props = defineProps({
|
|
|
type: [String, Number],
|
|
|
default: ''
|
|
|
},
|
|
|
+ // 是否为推荐职位引用
|
|
|
+ isRecommend: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
const { t } = useI18n()
|
|
@@ -281,6 +265,13 @@ const cleanedHtml = (text) => {
|
|
|
return cleaned
|
|
|
}
|
|
|
|
|
|
+// 职位详情分享图片下载文件名
|
|
|
+const fileName = computed(() => {
|
|
|
+ const { name, areaName, payFrom, payTo } = info.value
|
|
|
+ const salary = payFrom && payTo ? `${payFrom ? '_' + payFrom + '-' : ''}${payTo}` : '-面议'
|
|
|
+ return `${name}${areaName ? '_' + areaName : ''}${salary}${positionInfo.value.payName ? '-' + positionInfo.value.payName : ''}`
|
|
|
+})
|
|
|
+
|
|
|
const share = ref()
|
|
|
// 生成图片
|
|
|
const generateAndDownloadImage = async () => {
|
|
@@ -291,6 +282,10 @@ const generateAndDownloadImage = async () => {
|
|
|
const image = canvas.toDataURL().replace(/^data:image\/(png|jpg);base64,/, '')
|
|
|
previewSrc.value = `data:image/png;base64,${image}`
|
|
|
loading.value = false
|
|
|
+ if (props.isRecommend) {
|
|
|
+ emit('preview', previewSrc.value, fileName.value)
|
|
|
+ return
|
|
|
+ }
|
|
|
showPreview.value = true
|
|
|
} catch (error) {
|
|
|
console.error('Error generating image:', error)
|
|
@@ -298,16 +293,6 @@ const generateAndDownloadImage = async () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// 保存图片到本地
|
|
|
-const handleDownloadImage = () => {
|
|
|
- const { name, areaName, payFrom, payTo } = info.value
|
|
|
- const salary = payFrom && payTo ? `${payFrom ? '_' + payFrom + '-' : ''}${payTo}` : '-面议'
|
|
|
- downloadBase64(previewSrc.value, `${name}${areaName ? '_' + areaName : ''}${salary}${positionInfo.value.payName ? '-' + positionInfo.value.payName : ''}`)
|
|
|
- setTimeout(() => {
|
|
|
- Snackbar.success('下载成功')
|
|
|
- }, 500);
|
|
|
-}
|
|
|
-
|
|
|
// 相似职位
|
|
|
const similarList = ref([])
|
|
|
const getSimilarPositionList = async () => {
|
|
@@ -352,7 +337,6 @@ const getCollectionStatus = async () => {
|
|
|
getCollectionStatus()
|
|
|
|
|
|
// 分享有礼
|
|
|
-const shareDialog = ref(false)
|
|
|
const handleShare = async () => {
|
|
|
nextFunc.value = handleShare // 登录成功或强制填写个人信息成功后回调
|
|
|
if (!getToken()) {
|
|
@@ -512,4 +496,4 @@ const toDetails = async (info) => {
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
@import '@/styles/recruit/position/index.scss'
|
|
|
-</style>
|
|
|
+</style>
|