Pārlūkot izejas kodu

招聘会职位跳转详情

Xiao_123 1 mēnesi atpakaļ
vecāks
revīzija
1a88678f05

+ 13 - 0
api/position.js

@@ -7,6 +7,7 @@ export const getPositionDetails = (params) => {
     method: 'GET',
     params,
     custom: {
+      openEncryption: true,
       showLoading: false,
       auth: false
     }
@@ -25,3 +26,15 @@ export const getShareDetail = (params) => {
     }
   })
 }
+
+// 获取企业发布职位类型权限
+export const getEnterprisePubJobTypePermission = () => {
+  return request({
+    url: '/app-api/menduner/system/recruit/enterprise/get/pub-job-type-perm',
+    method: 'GET',
+    custom: {
+      showLoading: false,
+      auth: true
+    }
+  })
+}

+ 1 - 1
components/PositionList/index.vue

@@ -191,7 +191,7 @@ const handleEdit = async (val) => {
 // 职位详情
 const handleDetail = (item) => {
   if (!item.id) return
-  let url = `/pagesB/positionDetail/index?id=${item.id}&area=${item.areaName}`
+  let url = `/pagesB/positionDetail/index?jobId=${item.id}&isEdit=${item.edit}`
   uni.navigateTo({ url })
 }
 

+ 1 - 0
pages/index/position.vue

@@ -64,6 +64,7 @@ const positionListData = ref([])
 const query = ref({
   pageSize: 5, 
   pageNo: 1,
+  hire: false,
   name: '',
 })
 const more = ref('more')

+ 23 - 22
pagesB/jobFair/jobItem.vue

@@ -3,26 +3,28 @@
     <view v-if="list?.length" class="ss-p-b-30 ss-p-t-20">
       <view v-for="(item, index) in list" :key="index" class="mList">
         <view class="list-shape" style="border-radius: 12px;">
-          <view class="titleBox" @tap.stop="handleToDetail(item)">
-            <view style="display: flex;align-items: center;">
-							<image src="/static/svg/jobFair.svg" class=" ss-m-r-10" style="width: 20px; height: 20px;"></image>
-              <rich-text v-if="item.name?.indexOf('style') !== -1" class="job-name" :nodes="item.name"></rich-text>
-              <view v-else class="job-name">{{ formatName(item.name) }}</view>
-            </view>
-          </view>
-          <view class="d-flex align-center justify-space-between ss-m-t-20" @tap.stop="handleToDetail(item)">
-            <view class="font-size-13 ellipsis" style="flex: 1;">
-              <span class="tag-gap" style="color: #808080;">
-                <span>{{item.area?.str ?? '全国' }}</span>
-                <span class="divider-mx" v-if="item.eduName">|</span>
-                <span>{{item.eduName }}</span>
-                <span class="divider-mx" v-if="item.expName">|</span>
-                <span>{{item.expName }}</span>
-                <span class="divider-mx">|</span>
-                <span>{{!item.payFrom && !item.payTo ? '面议' : `${item.payFrom}-${item.payTo}${item.payName ? '/' + item.payName : ''}` }}</span>
-              </span>
-            </view>
-          </view>
+          <view @tap.stop="handleToDetail(item)">
+						<view class="titleBox">
+							<view style="display: flex;align-items: center;">
+								<image src="/static/svg/jobFair.svg" class=" ss-m-r-10" style="width: 20px; height: 20px;"></image>
+								<rich-text v-if="item.name?.indexOf('style') !== -1" class="job-name" :nodes="item.name"></rich-text>
+								<view v-else class="job-name">{{ formatName(item.name) }}</view>
+							</view>
+						</view>
+						<view class="d-flex align-center justify-space-between ss-m-t-20">
+							<view class="font-size-13 ellipsis" style="flex: 1;">
+								<span class="tag-gap" style="color: #808080;">
+									<span>{{item.area?.str ?? '全国' }}</span>
+									<span class="divider-mx" v-if="item.eduName">|</span>
+									<span>{{item.eduName }}</span>
+									<span class="divider-mx" v-if="item.expName">|</span>
+									<span>{{item.expName }}</span>
+									<span class="divider-mx">|</span>
+									<span>{{!item.payFrom && !item.payTo ? '面议' : `${item.payFrom}-${item.payTo}${item.payName ? '/' + item.payName : ''}` }}</span>
+								</span>
+							</view>
+						</view>
+					</view>
           <view class="sub-li-bottom">
 						<view class="sub-li-bottom-item color-primary" @tap.stop="handleToResume(item)">{{ item.count || 0 }} 已投递简历</view>
 						<view class="sub-li-bottom-item color-error" @tap.stop="handleRemove(item)">移出招聘会</view>
@@ -58,9 +60,8 @@ const props = defineProps({
 
 // 查看职位详情
 const handleToDetail = (val) => {
-	console.log(val, '查看职位详情')
 	uni.navigateTo({
-		url: `pagesB/positionDetail/index?jobId=${val.id}&jobFairId=${props.jobFairId}`
+		url: `/pagesB/positionDetail/index?jobId=${val.id}&jobFairId=${props.jobFairId}&isEdit=${val.edit}`
 	})
 }
 

+ 29 - 77
pagesB/positionDetail/index.vue

@@ -80,8 +80,7 @@
     </scroll-view>
     <view class="bottom-sticky" v-if="!loading && jobId">
       <view class="bottom-content">
-        <!-- <button class="btnStyle bgButtons" type="primary" plain="true" @tap="handleSend">立即沟通</button> -->
-        <button class="buttons btnStyle" type="primary" @click="handleEdit">编辑职位</button>
+        <button class="buttons btnStyle ss-m-l-15" type="primary" @click="handleEdit">编辑职位</button>
       </view>
     </view>
   </layout-page>
@@ -92,7 +91,7 @@ import { commissionCalculation } from '@/utils/position'
 import { timesTampChange } from '@/utils/date'
 import layoutPage from '@/layout'
 import { ref, watch } from 'vue';
-import { getPositionDetails } from '@/api/position'
+import { getPositionDetails, getEnterprisePubJobTypePermission } from '@/api/position'
 import { dealDictObjData } from '@/utils/position'
 import { onLoad } from '@dcloudio/uni-app'
 import { userStore } from '@/store/user'
@@ -113,11 +112,17 @@ watch(() => useUserStore.refreshToken, (newVal) => {
 }, { immediate: true }, { deep: true })
 
 let jobId = ''
-const isJobFair = ref(false) // 是否是通过招聘会进入的岗位
+const isJobFair = ref(false)
 let obj = {}
+const isEdit = ref(false)
 onLoad(async (options) => {
   jobId = options?.id || options?.jobId || obj?.jobId || ''
+  
+  // 招聘会进入的岗位
   if (options?.jobFairId) isJobFair.value = true
+  // 职位是否可编辑
+  if (options?.isEdit && options?.isEdit === 'true') isEdit.value = true
+
   if (jobId) {
     loading.value = true
     loadingText.value = '加载中 . . . '
@@ -151,22 +156,30 @@ async function getPositionDetail () {
   }
 }
 
-const handleEdit = () => {}
+// 职位编辑
+const handleEdit = async () => {
+  if (!isEdit.value) {
+    uni.showToast({ title: '职位发布时间超过24小时的不支持编辑', icon: 'none', duration: 2000 })
+    return
+  }
+  uni.showLoading({ title: '加载中 . . . ' })
+  try {
+    const { data } = await getEnterprisePubJobTypePermission()
+    if (!data || !data.length) {
+      uni.showToast({ title: '没有该操作权限,请联系平台管理员升级后再试', icon: 'none', duration: 2000 })
+      return
+    }
+    uni.hideLoading()
+    // 跳转编辑页面
+  } catch {
+    uni.hideLoading()
+  }
+}
 
 </script>
 
 <style scoped lang="scss">
 @import '../../static/style/position/index.scss';
-.hideCanvasView{
-	position: relative;
-}
-.shareCanvas {
-	position: fixed;
-	top: -99999upx;
-	left: -99999upx;
-	z-index: -99999;
-}
-
 .bottom-content {
   display: flex;
   justify-content: space-evenly;
@@ -175,68 +188,7 @@ const handleEdit = () => {}
   margin: 20rpx 0;
   .btnStyle {
     flex: 1;
-    margin-right: 20rpx;
-  }
-  .bgButtons {
-    border: 2rpx solid #00B760;
-    color: #00B760;
-    // background: #FFF;
-    border-radius: 50rpx;
-  }
-  .shareButtonCss {
-    font-size: 16px;
-    background: unset;
-    &::after{
-      border:none !important;
-    }
-  }
-  &-tool {
-    width: 160rpx;
-    display: flex;
-    justify-content: center;
-    flex-direction: column;
-    align-items: center;
-  }
-}
-.share-pop {
-    width: 100%;
-    // height:300rpx;
-    display: flex;
-    justify-content: center;
-    .f-straight {
-      margin: 40rpx;
-      background: unset;
-      &::after{
-        border:none !important;
-      }
-    }
-    .share-round {
-      border-radius:50%;
-      height:100rpx;
-      width:100rpx;
-      display: flex;
-      align-items: center;
-      justify-content: center;
-    }
-    .share-round-1 {
-        background-color:#22a039;
-    }
-    .share-round-2 {
-        background-color:#3693cd;
-    }
-}
-.preview {
-  position: fixed;
-  z-index: 9;
-  height: 100vh;
-  width: 100vw;
-  left: 0;
-  top: 0;
-  .image {
-    position: absolute;
-    width: 80%;
-    left: 10%;
-    top: 100rpx;
+    margin: 0 20rpx;
   }
 }
 </style>