|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<view>
|
|
<view>
|
|
- <scroll-view class="scrollBox" style="position:relative;">
|
|
|
|
|
|
+ <scroll-view class="scrollBox" style="position:relative;" @touchmove.stop.prevent="">
|
|
<view class="box">
|
|
<view class="box">
|
|
<view v-if="loading" class="vertical80-center">{{ loadingText }}</view>
|
|
<view v-if="loading" class="vertical80-center">{{ loadingText }}</view>
|
|
<view v-else>
|
|
<view v-else>
|
|
@@ -30,19 +30,10 @@
|
|
class="mr"
|
|
class="mr"
|
|
size="25"
|
|
size="25"
|
|
></uni-icons>
|
|
></uni-icons>
|
|
- <!-- <span style="color: #fc6d5e">{{ isCollection ? '取消收藏' : '收藏职位' }}</span> -->
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 标签 -->
|
|
<!-- 标签 -->
|
|
<view class="tagList mt">
|
|
<view class="tagList mt">
|
|
- <!-- <view class="tagListItem" v-for="(tag,i) in info?.tagList || []" :key="'tagList' + i">
|
|
|
|
- <uni-tag
|
|
|
|
- :text="tag"
|
|
|
|
- inverted="false"
|
|
|
|
- size="small"
|
|
|
|
- custom-style="background-color: #e2f0ef; color:#00897B; border-color:#e2f0ef;"
|
|
|
|
- />
|
|
|
|
- </view> -->
|
|
|
|
<view class="tag" v-for="(tag,i) in info?.tagList || []" :key="'tagList' + i">
|
|
<view class="tag" v-for="(tag,i) in info?.tagList || []" :key="'tagList' + i">
|
|
{{ tag }}
|
|
{{ tag }}
|
|
</view>
|
|
</view>
|
|
@@ -57,7 +48,6 @@
|
|
<view class="fs15 w-600 my5">岗位职责</view>
|
|
<view class="fs15 w-600 my5">岗位职责</view>
|
|
<view v-if="!info.content">暂无</view>
|
|
<view v-if="!info.content">暂无</view>
|
|
<rich-text v-else class="htmlCss" :nodes="info.content"></rich-text>
|
|
<rich-text v-else class="htmlCss" :nodes="info.content"></rich-text>
|
|
- <!-- <view class="html fs14" v-html="info.content"></view> -->
|
|
|
|
</view>
|
|
</view>
|
|
<!-- 岗位要求 -->
|
|
<!-- 岗位要求 -->
|
|
<view class="topLine mt-5">
|
|
<view class="topLine mt-5">
|
|
@@ -65,6 +55,7 @@
|
|
<view v-if="!info.requirement">暂无</view>
|
|
<view v-if="!info.requirement">暂无</view>
|
|
<rich-text v-else class="htmlCss" :nodes="info.requirement"></rich-text>
|
|
<rich-text v-else class="htmlCss" :nodes="info.requirement"></rich-text>
|
|
</view>
|
|
</view>
|
|
|
|
+ <!-- 企业信息 -->
|
|
<view class="topLine mt-5 d-flex">
|
|
<view class="topLine mt-5 d-flex">
|
|
<view class="avatarBox">
|
|
<view class="avatarBox">
|
|
<image class="avatar" :src="info.contact?.avatar || 'https://minio.citupro.com/dev/menduner/7.png'"></image>
|
|
<image class="avatar" :src="info.contact?.avatar || 'https://minio.citupro.com/dev/menduner/7.png'"></image>
|
|
@@ -74,6 +65,7 @@
|
|
<view class="contact-info">{{ info.enterprise?.name }} · {{ info.contact?.postNameCn }}</view>
|
|
<view class="contact-info">{{ info.enterprise?.name }} · {{ info.contact?.postNameCn }}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <!-- 工作地址 -->
|
|
<view class="topLine mt-5">
|
|
<view class="topLine mt-5">
|
|
<view class="fs15 w-600 my5">工作地址</view>
|
|
<view class="fs15 w-600 my5">工作地址</view>
|
|
<view class="my10">
|
|
<view class="my10">
|
|
@@ -89,6 +81,7 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</scroll-view>
|
|
|
|
+ <!-- 分享 投递 -->
|
|
<view class="bottom-sticky" v-if="!loading && jobId">
|
|
<view class="bottom-sticky" v-if="!loading && jobId">
|
|
<view style="display: flex;justify-content: space-evenly;align-items: center;width: 100%;margin: 20rpx 0;">
|
|
<view style="display: flex;justify-content: space-evenly;align-items: center;width: 100%;margin: 20rpx 0;">
|
|
<view @click="null" style="display: flex;justify-content: center;flex-direction: column;align-items: center;">
|
|
<view @click="null" style="display: flex;justify-content: center;flex-direction: column;align-items: center;">
|
|
@@ -99,14 +92,15 @@
|
|
<button v-else class="buttons" @click="handleDelivery">我要投递</button>
|
|
<button v-else class="buttons" @click="handleDelivery">我要投递</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <uni-popup ref="popup" background-color="#fff">
|
|
|
|
|
|
+ <!-- 选择简历 -->
|
|
|
|
+ <uni-popup ref="popup" background-color="#fff" :mask-click="false" >
|
|
<view class="dialogBox" style="width: 86vw;">
|
|
<view class="dialogBox" style="width: 86vw;">
|
|
<view class="dialog-title">
|
|
<view class="dialog-title">
|
|
<view class="title">选择简历</view>
|
|
<view class="title">选择简历</view>
|
|
<uni-icons type="close" color="grey" size="26" @click="popupClose" />
|
|
<uni-icons type="close" color="grey" size="26" @click="popupClose" />
|
|
</view>
|
|
</view>
|
|
- <view style="height: 1px; margin: 0 10rpx; background-color: #dedede;"></view>
|
|
|
|
- <view class="dialog-content" style="max-height: 50vh;">
|
|
|
|
|
|
+ <view style="height: 1px; margin: 0 20rpx; background-color: #dedede;"></view>
|
|
|
|
+ <scroll-view class="dialog-content" scroll-y="true" style="max-height: 50vh; width: auto;">
|
|
<uni-card
|
|
<uni-card
|
|
v-for="(item, index) in resumeList"
|
|
v-for="(item, index) in resumeList"
|
|
:key="index"
|
|
:key="index"
|
|
@@ -130,20 +124,31 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</uni-card>
|
|
</uni-card>
|
|
- </view>
|
|
|
|
- <view class="dialog-bottom" @click="handleSubmit">确认投递</view>
|
|
|
|
|
|
+ <view class="selectOnline" @click="handleUpload">选取微信聊天文件</view>
|
|
|
|
+ </scroll-view>
|
|
|
|
+ <view class="dialog-bottom" @click="deliverySubmit()">确认投递</view>
|
|
</view>
|
|
</view>
|
|
</uni-popup>
|
|
</uni-popup>
|
|
|
|
+ <!-- 上传简历 -->
|
|
|
|
+ <uni-popup ref="uploadPopup" type="dialog">
|
|
|
|
+ <uni-popup-dialog
|
|
|
|
+ type="warn"
|
|
|
|
+ cancelText="取消"
|
|
|
|
+ confirmText="确定"
|
|
|
|
+ title="系统提示"
|
|
|
|
+ content="您还未上传过简历,是否选取微信聊天文件投递?"
|
|
|
|
+ @confirm="handleUpload"
|
|
|
|
+ @close="uploadPopup.close()"
|
|
|
|
+ ></uni-popup-dialog>
|
|
|
|
+ </uni-popup>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
<script setup>
|
|
<script setup>
|
|
import { commissionCalculation } from '@/utils/position'
|
|
import { commissionCalculation } from '@/utils/position'
|
|
import { timesTampChange } from '@/utils/date'
|
|
import { timesTampChange } from '@/utils/date'
|
|
import { preview } from '@/utils/preview'
|
|
import { preview } from '@/utils/preview'
|
|
-// import loginPage from '@/views/common/loginDialog.vue'
|
|
|
|
-// import simplePage from './sendResume/simple.vue'
|
|
|
|
-// import selectPage from './sendResume/select.vue'
|
|
|
|
-import { reactive, ref } from 'vue';
|
|
|
|
|
|
+import { uploadFileTest } from '@/api/file'
|
|
|
|
+import { ref } from 'vue';
|
|
import {
|
|
import {
|
|
jobCvRelSend,
|
|
jobCvRelSend,
|
|
getPositionDetails,
|
|
getPositionDetails,
|
|
@@ -154,7 +159,6 @@ import {
|
|
} from '@/api/position'
|
|
} from '@/api/position'
|
|
import { getPersonResumeCv, saveResume } from '@/api/user'
|
|
import { getPersonResumeCv, saveResume } from '@/api/user'
|
|
import { dealDictObjData } from '@/utils/position'
|
|
import { dealDictObjData } from '@/utils/position'
|
|
-// import Snackbar from '@/plugins/snackbar'
|
|
|
|
import { getAccessToken } from '@/utils/request'
|
|
import { getAccessToken } from '@/utils/request'
|
|
import { onLoad } from '@dcloudio/uni-app';
|
|
import { onLoad } from '@dcloudio/uni-app';
|
|
|
|
|
|
@@ -203,28 +207,28 @@ const deliveryCheck = async () => {
|
|
}
|
|
}
|
|
|
|
|
|
const popup = ref()
|
|
const popup = ref()
|
|
|
|
+const uploadPopup = ref()
|
|
const resumeList = ref([])
|
|
const resumeList = ref([])
|
|
const selectIndex = ref(null)
|
|
const selectIndex = ref(null)
|
|
const handleDelivery = async () => {
|
|
const handleDelivery = async () => {
|
|
|
|
+ // 未登录
|
|
if (!getAccessToken()) {
|
|
if (!getAccessToken()) {
|
|
uni.showToast({ title: '您还未上传过简历,请先上传简历', icon: 'none', duration: 2000, })
|
|
uni.showToast({ title: '您还未上传过简历,请先上传简历', icon: 'none', duration: 2000, })
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ // 已投递
|
|
if (delivery.value) {
|
|
if (delivery.value) {
|
|
uni.showToast({ title: '您已投递过该职位!', icon: 'none', duration: 2000, })
|
|
uni.showToast({ title: '您已投递过该职位!', icon: 'none', duration: 2000, })
|
|
return
|
|
return
|
|
}
|
|
}
|
|
const { data } = await getPersonResumeCv()
|
|
const { data } = await getPersonResumeCv()
|
|
resumeList.value = data
|
|
resumeList.value = data
|
|
- if (!resumeList.value?.length) {
|
|
|
|
- uni.showToast({ title: '您还未上传过简历,请先上传简历', icon: 'none', duration: 2000, })
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- // show.value = true
|
|
|
|
|
|
+ // 未上传简历
|
|
|
|
+ if (!resumeList.value?.length) return uploadPopup.value.open()
|
|
popup.value.open()
|
|
popup.value.open()
|
|
}
|
|
}
|
|
-const handleSubmit = async () => {
|
|
|
|
- const resume = resumeList.value[selectIndex.value]
|
|
|
|
|
|
+const deliverySubmit = async (uploadFile) => {
|
|
|
|
+ const resume = uploadFile ? uploadFile : resumeList.value[selectIndex.value]
|
|
if (!resume) {
|
|
if (!resume) {
|
|
selectIndex.value = null
|
|
selectIndex.value = null
|
|
uni.showToast({ title: '请选择简历', icon: 'none', duration: 2000, })
|
|
uni.showToast({ title: '请选择简历', icon: 'none', duration: 2000, })
|
|
@@ -235,8 +239,10 @@ const handleSubmit = async () => {
|
|
deliveryCheck()
|
|
deliveryCheck()
|
|
popup.value.close()
|
|
popup.value.close()
|
|
}
|
|
}
|
|
|
|
+
|
|
const popupClose = () => {
|
|
const popupClose = () => {
|
|
selectIndex.value = null
|
|
selectIndex.value = null
|
|
|
|
+ popup.value.close()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -250,13 +256,49 @@ const getCollectionStatus = async () => {
|
|
|
|
|
|
// 操作 收藏&取消收藏职位
|
|
// 操作 收藏&取消收藏职位
|
|
const handleCollection = async () => {
|
|
const handleCollection = async () => {
|
|
- // if (!getAccessToken()) return
|
|
|
|
- console.log('1', 1)
|
|
|
|
const api = isCollection.value ? getPersonJobUnfavorite : getPersonJobFavorite
|
|
const api = isCollection.value ? getPersonJobUnfavorite : getPersonJobFavorite
|
|
await api(isCollection.value ? jobId : { jobId })
|
|
await api(isCollection.value ? jobId : { jobId })
|
|
await getCollectionStatus()
|
|
await getCollectionStatus()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// 选取微信聊天文件
|
|
|
|
+// 上传附件
|
|
|
|
+const handleUpload = () => {
|
|
|
|
+ wx.chooseMessageFile({
|
|
|
|
+ count: 1,
|
|
|
|
+ type: 'file',
|
|
|
|
+ success (res) {
|
|
|
|
+ const title = res.tempFiles[0].name
|
|
|
|
+ const path = res.tempFiles[0].path
|
|
|
|
+ //效验是否为支持的文件格式
|
|
|
|
+ if(/\.(pdf|docx|doc)$/.test(title)){
|
|
|
|
+ uploadFileTest(path).then(async (res) => {
|
|
|
|
+ if (!res.data) {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '上传失败',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ await saveResume({ title, url: res.data })
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '上传成功',
|
|
|
|
+ icon: 'success'
|
|
|
|
+ })
|
|
|
|
+ deliverySubmit({ title, url: res.data })
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ uni.showToast({
|
|
|
|
+ icon: 'none',
|
|
|
|
+ title: '请上传pdf、word类型的文件',
|
|
|
|
+ duration: 2000
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
</script>
|
|
</script>
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
.mb5 { margin-bottom: 5px; }
|
|
.mb5 { margin-bottom: 5px; }
|
|
@@ -411,7 +453,7 @@ const handleCollection = async () => {
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
}
|
|
}
|
|
-.show-more{
|
|
|
|
|
|
+.showPopup-more{
|
|
width: 26vw;
|
|
width: 26vw;
|
|
white-space: nowrap;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
@@ -436,7 +478,8 @@ const handleCollection = async () => {
|
|
color:#767a82;
|
|
color:#767a82;
|
|
padding: 20rpx;
|
|
padding: 20rpx;
|
|
.title {
|
|
.title {
|
|
- font-weight:bold;
|
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ margin-left: 10rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.dialog-content{
|
|
.dialog-content{
|
|
@@ -446,6 +489,12 @@ const handleCollection = async () => {
|
|
background-color: #00897b !important;
|
|
background-color: #00897b !important;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .selectOnline {
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ color: #00897b;
|
|
|
|
+ text-align: center;
|
|
|
|
+ margin-top: 10rpx;
|
|
|
|
+ }
|
|
.dialog-bottom{
|
|
.dialog-bottom{
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 44px;
|
|
height: 44px;
|