|
@@ -1,99 +1,103 @@
|
|
|
<template>
|
|
|
- <scroll-view class="scrollBox" scroll-y="true" style="position:relative;">
|
|
|
- <view class="box">
|
|
|
- <view v-if="loading" class="vertical80-center">{{ loadingText }}</view>
|
|
|
- <view v-else>
|
|
|
- <!-- 职位名称 + 薪资 -->
|
|
|
- <view class="d-flex justify-space-between">
|
|
|
- <uni-icons class="icon-a-1_zhaopin" custom-prefix="iconfont" color="#e03506" size="30"/>
|
|
|
- <h2 class="JobName ellipsis">
|
|
|
- {{ info.name }}
|
|
|
- </h2>
|
|
|
- <span class="salary w-600">{{ info.payFrom }}-{{ info.payTo }}/{{ positionInfo.payName }}</span>
|
|
|
- </view>
|
|
|
- <!-- 职位地区 收藏职位 -->
|
|
|
- <view class="d-flex justify-space-between mt-5">
|
|
|
- <view class="bold" style="font-size: 14px;">
|
|
|
- <span>
|
|
|
- <span>{{positionInfo?.areaName }}</span>
|
|
|
- <span class="viewider-mx">|</span>
|
|
|
- <span>{{positionInfo?.eduName }}</span>
|
|
|
- <span class="viewider-mx">|</span>
|
|
|
- <span>{{positionInfo?.expName }}</span>
|
|
|
- </span>
|
|
|
+ <view>
|
|
|
+ <scroll-view class="scrollBox" scroll-y="true" style="position:relative;">
|
|
|
+ <view class="box">
|
|
|
+ <view v-if="loading" class="vertical80-center">{{ loadingText }}</view>
|
|
|
+ <view v-else>
|
|
|
+ <!-- 职位名称 + 薪资 -->
|
|
|
+ <view class="d-flex justify-space-between">
|
|
|
+ <h2 class="JobName ellipsis">
|
|
|
+ {{ info.name }}
|
|
|
+ </h2>
|
|
|
+ <span class="salary w-600">{{ info.payFrom }}-{{ info.payTo }}/{{ positionInfo.payName }}</span>
|
|
|
</view>
|
|
|
- <!-- 收藏职位 -->
|
|
|
- <view @click="handleCollection">
|
|
|
- <uni-icons
|
|
|
- :type="isCollection ? 'heart-filled' : 'heart'"
|
|
|
- color="#fc6d5e"
|
|
|
- class="mr"
|
|
|
- size="25"
|
|
|
- ></uni-icons>
|
|
|
- <!-- <span style="color: #fc6d5e">{{ isCollection ? '取消收藏' : '收藏职位' }}</span> -->
|
|
|
+ <!-- 职位地区 收藏职位 -->
|
|
|
+ <view class="d-flex justify-space-between mt-5">
|
|
|
+ <view class="bold" style="font-size: 14px;">
|
|
|
+ <span>
|
|
|
+ <span>{{positionInfo?.areaName }}</span>
|
|
|
+ <span class="viewider-mx">|</span>
|
|
|
+ <span>{{positionInfo?.eduName }}</span>
|
|
|
+ <span class="viewider-mx">|</span>
|
|
|
+ <span>{{positionInfo?.expName }}</span>
|
|
|
+ </span>
|
|
|
+ </view>
|
|
|
+ <!-- 收藏职位 -->
|
|
|
+ <view @click="handleCollection">
|
|
|
+ <uni-icons
|
|
|
+ :type="isCollection ? 'heart-filled' : 'heart'"
|
|
|
+ color="#fc6d5e"
|
|
|
+ class="mr"
|
|
|
+ size="25"
|
|
|
+ ></uni-icons>
|
|
|
+ <!-- <span style="color: #fc6d5e">{{ isCollection ? '取消收藏' : '收藏职位' }}</span> -->
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <!-- 标签 -->
|
|
|
- <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">
|
|
|
- {{ tag }}
|
|
|
+ <!-- 标签 -->
|
|
|
+ <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">
|
|
|
+ {{ tag }}
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <!-- 赏金 -->
|
|
|
- <view class="topLine mt-5" style="display: flex; align-items: center;">
|
|
|
- <view class="hirePrice">{{ `赏金:${commissionCalculation(2000, 1)}元` }}</view>
|
|
|
- </view>
|
|
|
- <!-- 岗位职责 + -->
|
|
|
- <view class="topLine fs14 mt-5">
|
|
|
- <view class="fs15 w-600 my5">岗位职责</view>
|
|
|
- <view v-if="info.content" class="requirement fs14" v-html="info.content?.replace(/\n/g, '</br>')"></view>
|
|
|
- <view v-else>暂无</view>
|
|
|
- </view>
|
|
|
- <view class="topLine mt-5">
|
|
|
- <view class="fs15 w-600 my5">岗位要求</view>
|
|
|
- <view v-if="info.requirement" class="requirement fs14" v-html="info.requirement?.replace(/\n/g, '</br>')"></view>
|
|
|
- <view v-else>暂无</view>
|
|
|
- </view>
|
|
|
- <view class="topLine mt-5 d-flex">
|
|
|
- <view class="avatarBox">
|
|
|
- <image class="avatar" :src="info.contact?.avatar || 'https://minio.citupro.com/dev/menduner/7.png'"></image>
|
|
|
+ <!-- 赏金 -->
|
|
|
+ <view class="topLine mt-5" style="display: flex; align-items: center;">
|
|
|
+ <uni-icons class="icon-a-1_zhaopin" custom-prefix="iconfont" color="#e03506"/>
|
|
|
+ <view class="hirePrice">{{ `赏金:${commissionCalculation(2000, 1)}元` }}</view>
|
|
|
</view>
|
|
|
- <view >
|
|
|
- <view class="contact-name">{{ info.contact?.name }}</view>
|
|
|
- <view class="contact-info">{{ info.enterprise?.name }} · {{ info.contact?.postNameCn }}</view>
|
|
|
+ <!-- 岗位职责 -->
|
|
|
+ <view class="topLine fs14 mt-5">
|
|
|
+ <view class="fs15 w-600 my5">岗位职责</view>
|
|
|
+ <view v-if="!info.content">暂无</view>
|
|
|
+ <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="fs15 w-600 my5">工作地址</view>
|
|
|
- <view class="my10">
|
|
|
- <uni-icons
|
|
|
- type="map-pin-ellipse"
|
|
|
- color="#00897B"
|
|
|
- class="mr"
|
|
|
- size="25"
|
|
|
- ></uni-icons>
|
|
|
- <span style="color: var(--color-666);font-size: 15px;line-height: 26px;">{{ info.address }}</span>
|
|
|
+ <!-- 岗位要求 -->
|
|
|
+ <view class="topLine mt-5">
|
|
|
+ <view class="fs15 w-600 my5">岗位要求</view>
|
|
|
+ <view v-if="!info.requirement">暂无</view>
|
|
|
+ <rich-text v-else class="htmlCss" :nodes="info.requirement"></rich-text>
|
|
|
+ </view>
|
|
|
+ <view class="topLine mt-5 d-flex">
|
|
|
+ <view class="avatarBox">
|
|
|
+ <image class="avatar" :src="info.contact?.avatar || 'https://minio.citupro.com/dev/menduner/7.png'"></image>
|
|
|
+ </view>
|
|
|
+ <view >
|
|
|
+ <view class="contact-name">{{ info.contact?.name }}</view>
|
|
|
+ <view class="contact-info">{{ info.enterprise?.name }} · {{ info.contact?.postNameCn }}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="topLine mt-5">
|
|
|
+ <view class="fs15 w-600 my5">工作地址</view>
|
|
|
+ <view class="my10">
|
|
|
+ <uni-icons
|
|
|
+ type="map-pin-ellipse"
|
|
|
+ color="#00897B"
|
|
|
+ class="mr"
|
|
|
+ size="25"
|
|
|
+ ></uni-icons>
|
|
|
+ <span style="color: var(--color-666);font-size: 15px;line-height: 26px;">{{ info.address }}</span>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- </scroll-view>
|
|
|
- <view class="bottom-sticky">
|
|
|
- <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;">
|
|
|
- <uni-icons type="redo-filled" size="24" color="#00897B"/>
|
|
|
- <span style="color:#00897B;font-weight:bold;">分享</span>
|
|
|
+ </scroll-view>
|
|
|
+ <view class="bottom-sticky" v-if="showBtn">
|
|
|
+ <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;">
|
|
|
+ <uni-icons type="redo-filled" size="24" color="#00897B"/>
|
|
|
+ <span style="color:#00897B;font-weight:bold;">分享</span>
|
|
|
+ </view>
|
|
|
+ <button v-if="delivery" :disabled="true" class="buttons">我已投递</button>
|
|
|
+ <button v-else class="buttons" @click="handleDelivery">我要投递</button>
|
|
|
</view>
|
|
|
- <button v-if="alreadySendBtn" type="primary" size="default" class="buttons" style="background-color:grey;">已投简历</button>
|
|
|
- <button v-else type="primary" size="default" class="buttons" @click="null">投个简历</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -105,14 +109,14 @@ import { commissionCalculation } from '@/utils/position'
|
|
|
import { reactive, ref } from 'vue';
|
|
|
import {
|
|
|
getPositionDetails,
|
|
|
- // jobCvRelCheckSend,
|
|
|
- // getPersonJobUnfavorite,
|
|
|
- // getPersonJobFavorite,
|
|
|
- // getJobFavoriteCheck
|
|
|
+ jobCvRelCheckSend,
|
|
|
+ getPersonJobUnfavorite, // 取消收藏
|
|
|
+ getPersonJobFavorite, // 收藏
|
|
|
+ getJobFavoriteCheck
|
|
|
} from '@/api/position'
|
|
|
import { dealDictObjData } from '@/utils/position'
|
|
|
-// import { getToken } from '@/utils/auth'
|
|
|
// import Snackbar from '@/plugins/snackbar'
|
|
|
+import { getAccessToken } from '@/utils/request'
|
|
|
import { onLoad } from '@dcloudio/uni-app';
|
|
|
|
|
|
const loading = ref(false)
|
|
@@ -136,18 +140,60 @@ onLoad((options) => {
|
|
|
if (jobId) {
|
|
|
loading.value = true
|
|
|
loadingText.value = '加载中 . . . '
|
|
|
+ deliveryCheck()
|
|
|
+ getCollectionStatus()
|
|
|
getPositionDetail()
|
|
|
} else {
|
|
|
loadingText.value = '加载失败 . . . '
|
|
|
}
|
|
|
})
|
|
|
|
|
|
-const desc = [
|
|
|
- { mdi: 'mdi-map-marker-outline', value: 'areaName' },
|
|
|
- { mdi: 'mdi-school-outline', value: 'eduName' },
|
|
|
- { mdi: 'mdi-clock-time-ten-outline', value: 'expName' }
|
|
|
-]
|
|
|
|
|
|
+// const resumeList = ref([])
|
|
|
+// const selectResume = ref()
|
|
|
+const handleDelivery = async () => {
|
|
|
+ // if (delivery.value) return Snackbar.warning(t('resume.alreadyResume'))
|
|
|
+ // const result = await getPersonResumeCv()
|
|
|
+ // resumeList.value = result
|
|
|
+ // // 没有上传过简历的先去上传
|
|
|
+ // if (!result.length) {
|
|
|
+ // Snackbar.warning('您还未上传过简历,请先上传简历')
|
|
|
+ // uploadFile.value.trigger()
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // showResume.value = true
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+// 效验是否有投递过简历
|
|
|
+const delivery = ref(true) // 是否已投递简历
|
|
|
+const showBtn = ref(false)
|
|
|
+const deliveryCheck = async () => {
|
|
|
+ try {
|
|
|
+ if (!getAccessToken()) return delivery.value = false
|
|
|
+ const { data } = await jobCvRelCheckSend({ jobId })
|
|
|
+ delivery.value = data
|
|
|
+ } finally {
|
|
|
+ showBtn.value = true
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+// 效验求职者是否有收藏该职位
|
|
|
+const isCollection = ref(true)
|
|
|
+const getCollectionStatus = async () => {
|
|
|
+ if (!getAccessToken()) return isCollection.value = false
|
|
|
+ const { data } = await getJobFavoriteCheck({ jobId })
|
|
|
+ isCollection.value = data
|
|
|
+}
|
|
|
+
|
|
|
+// 操作 收藏&取消收藏职位
|
|
|
+const handleCollection = async () => {
|
|
|
+ // if (!getAccessToken()) return
|
|
|
+ const api = isCollection.value ? getPersonJobUnfavorite : getPersonJobFavorite
|
|
|
+ await api(isCollection.value ? id : { jobId, })
|
|
|
+ await getCollectionStatus()
|
|
|
+}
|
|
|
|
|
|
</script>
|
|
|
<style scoped lang="scss">
|
|
@@ -198,10 +244,11 @@ const desc = [
|
|
|
color: #ff250e;
|
|
|
border-radius: 5px;
|
|
|
font-size: 14px;
|
|
|
+ margin-left: 8px;
|
|
|
margin-top: 4px;
|
|
|
}
|
|
|
|
|
|
-.requirement {
|
|
|
+.htmlCss {
|
|
|
white-space: pre-wrap;
|
|
|
word-break: break-all;
|
|
|
line-height: 28px;
|
|
@@ -225,8 +272,9 @@ const desc = [
|
|
|
width: 60vw;
|
|
|
height: 44px;
|
|
|
border-radius: 25px;
|
|
|
- background-color: var(--v-primary-base);
|
|
|
margin: 0;
|
|
|
+ color: #fff;
|
|
|
+ background-color: #00897b !important;
|
|
|
}
|
|
|
|
|
|
.noMore{
|