|
@@ -99,7 +99,23 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- 简历上传 -->
|
|
<!-- 简历上传 -->
|
|
- <File ref="uploadFile" @success="handleUploadResume"></File>
|
|
|
|
|
|
+ <CtDialog
|
|
|
|
+ :visible="showUploadDialog"
|
|
|
|
+ :widthType="2"
|
|
|
|
+ :footer="true"
|
|
|
|
+ title="附件简历上传"
|
|
|
|
+ titleClass="text-h6"
|
|
|
|
+ @close="showUploadDialog = false"
|
|
|
|
+ @submit="handleUploadSubmit"
|
|
|
|
+ >
|
|
|
|
+ <CtForm ref="CtFormRef" :items="formItems">
|
|
|
|
+ <template #uploadFile="{ item }">
|
|
|
|
+ <TextInput v-model="item.value" :item="item" @click="openFileInput"></TextInput>
|
|
|
|
+ <File ref="uploadFile" @success="handleUploadResume"></File>
|
|
|
|
+ </template>
|
|
|
|
+ </CtForm>
|
|
|
|
+ <div class="color-666" style="font-size: 13px;">* 仅支持.doc, .docx, .pdf文件</div>
|
|
|
|
+ </CtDialog>
|
|
|
|
|
|
<!-- 选择简历 -->
|
|
<!-- 选择简历 -->
|
|
<selectResumeDialog v-model="showResume" :list="resumeList" @submit="handleSubmit" @close="handleClose"></selectResumeDialog>
|
|
<selectResumeDialog v-model="showResume" :list="resumeList" @submit="handleSubmit" @close="handleClose"></selectResumeDialog>
|
|
@@ -112,7 +128,6 @@
|
|
>
|
|
>
|
|
<div>
|
|
<div>
|
|
<div class="mb-3">微信分享:保存图片分享给好友</div>
|
|
<div class="mb-3">微信分享:保存图片分享给好友</div>
|
|
- <!-- <div class="mb-3">方式一:保存图片分享给好友</div> -->
|
|
|
|
<div class="d-flex align-center flex-column">
|
|
<div class="d-flex align-center flex-column">
|
|
<v-img :src="previewSrc" width="200" height="250"></v-img>
|
|
<v-img :src="previewSrc" width="200" height="250"></v-img>
|
|
<div class="mt-5">
|
|
<div class="mt-5">
|
|
@@ -121,13 +136,6 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <!-- <div class="mt-10">
|
|
|
|
- <div class="mb-3">方式二:复制以下链接分享给好友</div>
|
|
|
|
- <div class="pa-4" style="background-color: #f0f0f0; border-radius: 8px;">{{ shareUrlTxt }}</div>
|
|
|
|
- <div class="text-center">
|
|
|
|
- <v-btn class="mt-5 ml-3" color="primary" variant="outlined" v-clipboard="() => shareUrlTxt" @click="copyText">点击复制分享链接</v-btn>
|
|
|
|
- </div>
|
|
|
|
- </div> -->
|
|
|
|
<template #footer>
|
|
<template #footer>
|
|
<v-divider></v-divider>
|
|
<v-divider></v-divider>
|
|
<div>
|
|
<div>
|
|
@@ -178,6 +186,29 @@ const loading = ref(false)
|
|
const showLogin = ref(false)
|
|
const showLogin = ref(false)
|
|
const previewSrc = ref('')
|
|
const previewSrc = ref('')
|
|
const showPreview = ref(false)
|
|
const showPreview = ref(false)
|
|
|
|
+// 附件简历上传
|
|
|
|
+const CtFormRef = ref()
|
|
|
|
+const showUploadDialog = ref(false)
|
|
|
|
+const formItems = ref({
|
|
|
|
+ options: [
|
|
|
|
+ {
|
|
|
|
+ type: 'text',
|
|
|
|
+ key: 'title',
|
|
|
|
+ value: '',
|
|
|
|
+ label: '附件简历名称 *',
|
|
|
|
+ rules: [v => !!v || '请输入附件简历名称']
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ slotName: 'uploadFile',
|
|
|
|
+ key: 'url',
|
|
|
|
+ value: '',
|
|
|
|
+ truthValue: '',
|
|
|
|
+ label: '点击上传附件简历 *',
|
|
|
|
+ outline: true,
|
|
|
|
+ rules: [v => !!v || '请上传您的附件简历']
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+})
|
|
|
|
|
|
const share = ref()
|
|
const share = ref()
|
|
// 生成图片
|
|
// 生成图片
|
|
@@ -281,15 +312,6 @@ const handleShare = async () => {
|
|
shareDialog.value = true
|
|
shareDialog.value = true
|
|
}
|
|
}
|
|
|
|
|
|
-// 复制分享链接
|
|
|
|
-// const accessUrl = import.meta.env.VITE_ACCESS_BASE_URL
|
|
|
|
-// const shareUrlTxt = computed(() => {
|
|
|
|
-// return accessUrl + shareUrl.value
|
|
|
|
-// })
|
|
|
|
-// const copyText = () => {
|
|
|
|
-// Snackbar.success('复制成功')
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
// 收藏&取消收藏职位
|
|
// 收藏&取消收藏职位
|
|
const handleCollection = async () => {
|
|
const handleCollection = async () => {
|
|
const api = isCollection.value ? getPersonJobUnfavorite : getPersonJobFavorite
|
|
const api = isCollection.value ? getPersonJobUnfavorite : getPersonJobFavorite
|
|
@@ -297,18 +319,37 @@ const handleCollection = async () => {
|
|
await getCollectionStatus()
|
|
await getCollectionStatus()
|
|
}
|
|
}
|
|
|
|
|
|
-// 投递简历时,若当前用户没有简历列表则弹窗上传简历以及投递
|
|
|
|
|
|
+// 选择文件
|
|
const uploadFile = ref()
|
|
const uploadFile = ref()
|
|
-const handleUploadResume = async (url, title) => {
|
|
|
|
- if (!url || !title) return
|
|
|
|
- // 简历上传
|
|
|
|
- await savePersonResumeCv({ title, url })
|
|
|
|
- // 简历投递
|
|
|
|
- await jobCvRelSend({ jobId: id, title, url, type: info.value.hire ? 1 : 0 })
|
|
|
|
|
|
+const openFileInput = () => {
|
|
|
|
+ uploadFile.value.trigger()
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 上传附件
|
|
|
|
+const handleUploadResume = async (url, title, filename) => {
|
|
|
|
+ const obj = formItems.value.options.find(e => e.key === 'url')
|
|
|
|
+ obj.value = filename
|
|
|
|
+ obj.truthValue = url
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 上传附件
|
|
|
|
+const handleUploadSubmit = async () => {
|
|
|
|
+ const { valid } = await CtFormRef.value.formRef.validate()
|
|
|
|
+ if (!valid) return
|
|
|
|
+ const obj = {}
|
|
|
|
+ formItems.value.options.forEach(e => {
|
|
|
|
+ obj[e.key] = e.truthValue || e.value
|
|
|
|
+ })
|
|
|
|
+ if (!obj.title || !obj.url) return
|
|
|
|
+ loading.value = true
|
|
|
|
+ await savePersonResumeCv(obj)
|
|
|
|
+ await jobCvRelSend({ jobId: id, title: obj.title, url: obj.url, type: info.value.hire ? 1 : 0 })
|
|
|
|
+ showUploadDialog.value = false
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
Snackbar.success(t('resume.deliverySuccess'))
|
|
Snackbar.success(t('resume.deliverySuccess'))
|
|
deliveryCheck()
|
|
deliveryCheck()
|
|
- }, 3000)
|
|
|
|
|
|
+ loading.value = false
|
|
|
|
+ }, 1000)
|
|
}
|
|
}
|
|
|
|
|
|
const showResume = ref(false)
|
|
const showResume = ref(false)
|
|
@@ -323,7 +364,7 @@ const handleDelivery = async () => {
|
|
// 没有上传过简历的先去上传
|
|
// 没有上传过简历的先去上传
|
|
if (!result.length) {
|
|
if (!result.length) {
|
|
Snackbar.warning('您还未上传过简历,请先上传简历')
|
|
Snackbar.warning('您还未上传过简历,请先上传简历')
|
|
- uploadFile.value.trigger()
|
|
|
|
|
|
+ showUploadDialog.value = true
|
|
return
|
|
return
|
|
}
|
|
}
|
|
showResume.value = true
|
|
showResume.value = true
|