|
@@ -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>
|