Sfoglia il codice sorgente

企业-修改职位到期时间

Xiao_123 7 mesi fa
parent
commit
09347c69f9

+ 8 - 0
src/api/position.js

@@ -242,3 +242,11 @@ export const getEnterpriseAuthDetails = async (enterpriseId) => {
     url: `/app-api/menduner/system/enterprise/get/auth?enterpriseId=${enterpriseId}`
   })
 }
+
+// 过期职位-修改过期时间
+export const updatePositionExpireTime = async (data) => {
+  return await request.post({
+    url: '/app-api/menduner/system/recruit/job-advertised/renewal',
+    data
+  })
+}

+ 8 - 0
src/components/FormUI/datePicker/index.vue

@@ -17,6 +17,7 @@
         :time-picker-inline="true"
         :show-now-button="item.showToday"
         now-button-label="今天"
+        :disabled-dates="item.disabledDates ? disabledDates : false"
         :enable-time-picker="item.enableTimePicker ?? false"
         :clearable="item.clearable ?? true"
         :day-names="['一', '二', '三', '四', '五', '六', '七']"
@@ -81,6 +82,13 @@ watch(() => props.modelValue,
   // { deep: true }
 )
 
+// 过去的日期不可选
+const disabledDates = (date) => {
+  const currentDate = new Date()
+  currentDate.setDate(currentDate.getDate() - 1)
+  return date.getTime() < currentDate.getTime()
+}
+
 const timestamp = 'timestamp' // 固定不能变
 const formatText = ref('')
 

+ 9 - 1
src/router/modules/common.js

@@ -74,10 +74,18 @@ const common = [
     path: '/recruit/personal/advertisement/introduce/:id',
     name: 'advertisementIntroduce',
     meta: {
-      title: '集团介绍'
+      title: '洲际酒店集团'
     },
     component: () => import('@/views/recruit/personal/home/components/advertisement/dynamic/intercontinental.vue')
   },
+  {
+    path: '/recruit/personal/advertisement/introduce/marriott/:id',
+    name: 'advertisementIntroduceMarriott',
+    meta: {
+      title: '万豪国际集团'
+    },
+    component: () => import('@/views/recruit/personal/home/components/advertisement/dynamic/marriott.vue')
+  },
   {
     path: '/recruit/enterprise/talentRecommendation',
     component: () => import('@/views/recruit/enterprise/talentRecommendation/index.vue'),

+ 41 - 3
src/views/recruit/enterprise/hirePosition/components/item.vue

@@ -39,9 +39,10 @@
         </div>
         <div class="d-flex align-center">
           <span v-if="(val.status-0) === 99" class="cursor-pointer color-primary" @click="toPay(val)">去支付</span>
-          <span v-if="(val.status - 0) !== 99 && val.status !== '1'" class="cursor-pointer actions" @click="handleAction(0, val)">{{ $t('common.close') }}</span>
-          <span v-if="(val.status - 0) !== 99 && val.status !== '1'" class="lines"></span>
+          <span v-if="(val.status - 0) !== 99 && val.status !== '1' && tab === 1" class="cursor-pointer actions" @click="handleAction(0, val)">{{ $t('common.close') }}</span>
+          <span v-if="(val.status - 0) !== 99 && val.status !== '1' && tab === 1" class="lines"></span>
           <span v-if="tab === 1" class="cursor-pointer" @click="handleEdit(val)">编辑</span>
+          <span v-if="tab === 3" class="cursor-pointer" @click="handleUpdateExpireTime(val)">修改到期时间</span>
         </div>
       </div>
     </div>
@@ -57,6 +58,10 @@
   ></confirmPaymentDialog>
 
   <Loading :visible="loading"></Loading>
+
+  <CtDialog :visible="showExpire" :widthType="2" titleClass="text-h6" title="修改职位到期时间" @close="showExpire = false; expireTimeId = null" @submit="handleSubmit">
+    <CtForm v-if="showExpire" ref="CtFormRef" :items="formItem" style="height: 320px;"></CtForm>
+  </CtDialog>
 </template>
 
 <script setup>
@@ -66,7 +71,7 @@ import { ref } from 'vue'
 import { useRouter } from 'vue-router'
 import { timesTampChange } from '@/utils/date'
 import { useI18n } from '@/hooks/web/useI18n'
-import { closeJobAdvertised, enableJobAdvertised } from '@/api/position'
+import { closeJobAdvertised, enableJobAdvertised, updatePositionExpireTime } from '@/api/position'
 import Snackbar from '@/plugins/snackbar'
 import confirmPaymentDialog from '@/components/pay/confirmPaymentDialog.vue'
 
@@ -97,6 +102,23 @@ const paySuccess = async () => {
   }, 1000)
 }
 
+const showExpire = ref(false)
+const CtFormRef = ref()
+const formItem = ref({
+  options: [
+    {
+      type: 'datePicker',
+      key: 'time',
+      dateType: 'date',
+      value: null,
+      label: '到期时间 *',
+      outlined: true,
+      disabledDates: true,
+      clearable: true,
+      rules: [v => !!v || '请选择职位到期时间']
+    }
+  ]
+})
 
 const apiList = [ closeJobAdvertised, enableJobAdvertised ]
 
@@ -119,6 +141,22 @@ const router = useRouter()
 const handleEdit = (val) => {
   router.push(`/recruit/enterprise/hirePosition/edit?id=${val.id}`)
 }
+
+// 职位过期时间修改
+const expireTimeId = ref('')
+const handleUpdateExpireTime = (item) => {
+  expireTimeId.value = item.id
+  showExpire.value = true
+}
+const handleSubmit = async () => {
+  const { valid } = await CtFormRef.value.formRef.validate()
+  if (!valid) return
+  const time = formItem.value.options.find(e => e.key === 'time').value
+  await updatePositionExpireTime({ id: expireTimeId.value, time })
+  expireTimeId.value = ''
+  showExpire.value = false
+  emit('refresh')
+}
 </script>
 
 <style scoped lang="scss">

+ 0 - 1
src/views/recruit/enterprise/hirePosition/index.vue

@@ -18,7 +18,6 @@
             <PositionItem v-if="items.length" :tab="tab" :items="items" @refresh="getPositionList"></PositionItem>
           </v-window-item>
         </v-window>
-        <Empty v-if="!items.length" :message="tipsText" :elevation="false"></Empty>
         <Empty v-if="!items.length" :message="loading ? '加载中...' : tipsText" :elevation="false"></Empty>
         <CtPagination
           v-else

+ 40 - 2
src/views/recruit/enterprise/positionManagement/components/item.vue

@@ -28,7 +28,7 @@
             <span class="lines"></span>
             <span v-if="!val.payFrom && !val.payTo">面议</span>
             <span v-else>{{ val.payFrom ? val.payFrom + '-' : '' }}{{ val.payTo }}{{ val.payName ? '/' + val.payName : '' }}</span>
-            <span class="lines"></span>
+            <span class="lines" v-if="val.positionName"></span>
             <span>{{ val.positionName }}</span>
           </div>
         </div>
@@ -58,6 +58,7 @@
               <span class="lines"></span>
             </div>
             <div v-if="tab === 1" class="cursor-pointer actions" @click="handleEdit(val)">{{ $t('common.edit') }}</div>
+            <div v-if="tab === 3" class="cursor-pointer actions" @click="handleUpdateExpireTime(val)">修改到期时间</div>
           </div>
         </div>
       </div>
@@ -65,6 +66,10 @@
   </div>
 
   <Loading :visible="loading"></Loading>
+
+  <CtDialog :visible="showExpire" :widthType="2" titleClass="text-h6" title="修改职位到期时间" @close="showExpire = false; expireTimeId = null" @submit="handleSubmit">
+    <CtForm v-if="showExpire" ref="CtFormRef" :items="formItem" style="height: 320px;"></CtForm>
+  </CtDialog>
 </template>
 
 <script setup>
@@ -73,7 +78,7 @@ import { ref, watch } from 'vue'
 import { useRouter } from 'vue-router'
 import { timesTampChange } from '@/utils/date'
 import { useI18n } from '@/hooks/web/useI18n'
-import { closeJobAdvertised, enableJobAdvertised, refreshJobAdvertised, topJobAdvertised } from '@/api/position'
+import { closeJobAdvertised, enableJobAdvertised, refreshJobAdvertised, topJobAdvertised, updatePositionExpireTime } from '@/api/position'
 import Snackbar from '@/plugins/snackbar'
 
 const { t } = useI18n()
@@ -86,9 +91,26 @@ const props = defineProps({
   items: Array
 })
 
+const showExpire = ref(false)
+const CtFormRef = ref()
 const loading = ref(false)
 const selectAll = ref(false) // 全选
 const selectList = ref([]) // 选中列表
+const formItem = ref({
+  options: [
+    {
+      type: 'datePicker',
+      key: 'time',
+      dateType: 'date',
+      value: null,
+      label: '到期时间 *',
+      outlined: true,
+      disabledDates: true,
+      clearable: true,
+      rules: [v => !!v || '请选择职位到期时间']
+    }
+  ]
+})
 const dealSelect = () => {
   selectList.value = props.items.filter(e => e.select).map(k => k.id)
 }
@@ -151,6 +173,22 @@ const handleAction = async (index, type, { id }) => {
   }
 }
 
+// 职位过期时间修改
+const expireTimeId = ref('')
+const handleUpdateExpireTime = (item) => {
+  expireTimeId.value = item.id
+  showExpire.value = true
+}
+const handleSubmit = async () => {
+  const { valid } = await CtFormRef.value.formRef.validate()
+  if (!valid) return
+  const time = formItem.value.options.find(e => e.key === 'time').value
+  await updatePositionExpireTime({ id: expireTimeId.value, time })
+  expireTimeId.value = ''
+  showExpire.value = false
+  emit('refresh')
+}
+
 const router = useRouter()
 // 职位编辑
 const handleEdit = (val) => {

+ 1 - 2
src/views/recruit/personal/home/components/advertisement/dynamic/intercontinental.vue

@@ -5,8 +5,7 @@
       <v-carousel show-arrows="hover" cycle>
         <v-carousel-item v-for="(k, i) in carouselList" :key="i" :lazy-src="k" :src="k" cover></v-carousel-item>
       </v-carousel>
-      <!-- <v-img class="logo-png" src="/src/assets/logo.png" width="120" height="55"></v-img> -->
-      <v-img class="logo-png" src="https://minio.citupro.com/dev/menduner/poster.png" width="120" height="55"></v-img>
+      <v-img class="logo-png" src="https://minio.citupro.com/dev/menduner/preferredGroup/IHG-logo.png" width="152" height="72"></v-img>
     </div>
     <!-- 集团简介 -->
     <div class="brief-introduction">

+ 202 - 0
src/views/recruit/personal/home/components/advertisement/dynamic/marriott.vue

@@ -0,0 +1,202 @@
+<template>
+  <div class="default-width" style="position: relative;">
+    <!-- 轮播图、logo -->
+    <div style="position: relative;">
+      <v-carousel show-arrows="hover" cycle>
+        <v-carousel-item v-for="(k, i) in carouselList" :key="i" :lazy-src="k" :src="k" cover></v-carousel-item>
+      </v-carousel>
+      <v-img class="logo-png" src="https://minio.citupro.com/dev/menduner/marriott/logo.png" width="193" height="59"></v-img>
+    </div>
+    <!-- 集团简介 -->
+    <div class="brief-introduction">
+      <h2>集团简介</h2>
+      <div class="desc">
+        <p v-for="(k, i) in briefIntroduction" :key="i" class="mb-5" v-html="k"></p>
+      </div>
+      <div class="culture">
+        <div v-for="(k, i) in cultureList" :key="i" class="culture-item">
+          <v-img :src="k" width="350" height="230" contain></v-img>
+        </div>
+      </div>
+      <div class="mt-15 text-center">
+        <img src="https://minio.citupro.com/dev/menduner/marriott/brand.png" alt="" style="width: 100%; height: 549px;">
+      </div>
+    </div>
+    <!-- 招聘职位 -->
+    <div class="recruit-position">
+      <h2>招聘职位</h2>
+      <div>
+        <div class="position-item d-flex align-center" v-for="k in recruitPosition" :key="k.job.id">
+          <div class="job-name">
+            {{ k.job.name }}
+            <br>
+            {{ k.enterprise.name }}
+          </div>
+          <div class="job-place">
+            <div class="job-title">地点</div>
+            <p class="font-size-14">{{ k.job.areaName || '未填写' }}</p>
+          </div>
+          <div class="job-class">
+            <div class="job-title">工作经验</div>
+            <p class="font-size-14">{{ k.job.expName }}</p>
+          </div>
+          <div class="job-class">
+            <div class="job-title">职位更新</div>
+            <p class="font-size-14">{{ timesTampChange(k.job.updateTime) }}</p>
+          </div>
+          <div class="font-size-14 cursor-pointer view-detail" @click="handlePosition(k)">点击查看详情
+            <v-icon>mdi-pan-right</v-icon>
+          </div>
+        </div>
+        <CtPagination
+        :total="total"
+        :page="queryParams.pageNo"
+        :limit="queryParams.pageSize"
+        @handleChange="handleChangePage"
+      ></CtPagination>
+      </div>
+    </div>
+    <v-btn icon="mdi-chevron-up" size="large" color="primary" class="up-btn" @click="handleToTop"></v-btn>
+  </div>
+</template>
+
+<script setup>
+defineOptions({ name: 'advertisement-marriott'})
+import { useRouter } from 'vue-router'
+import { ref } from 'vue'
+import { getJobAdvertisedSearch } from '@/api/position'
+import { dealDictObjData } from '@/utils/position'
+import { timesTampChange } from '@/utils/date'
+
+const router = useRouter()
+const { id } = router.currentRoute.value.params
+
+const total = ref(0)
+const queryParams = ref({
+  pageNo: 1,
+  pageSize: 10,
+  enterpriseId: id
+})
+// banner
+const carouselList = [
+  'https://minio.citupro.com/dev/menduner/marriott/banner-bg.jpg',
+  // 'https://minio.citupro.com/dev/menduner/marriott/culture1.jpg',
+  'https://minio.citupro.com/dev/menduner/marriott/culture2.jpg'
+]
+
+// 集团简介
+const briefIntroduction = [
+  '万豪国际集团是全球领先的酒店管理公司,旗下拥有超过<strong>30个</strong>热门酒店品牌,近<strong>8,900家</strong>酒店及度假酒店,足迹遍布全球<strong>141个</strong>国家和地区。',
+  '万豪国际集团深耕中国市场<strong>50周年</strong>,致力于在本地提供更多非凡机遇。万豪国际集团在华140多个</strong>城市和目的地运营近<strong>540家</strong>酒店,拥有超过<strong>9万名</strong>员工。',
+  'As the leader in hospitality worldwide, Marriott International has <strong>9,000+</strong> hotel properties and <strong>30+</strong> top hotel brands. We’re in <strong>140+</strong> countries and territories, and we’re still growing. Unmatched opportunities await you! The next step in your career could lead to your greatest adventure.'
+]
+const cultureList = [
+  'https://minio.citupro.com/dev/menduner/marriott/culture3.jpg',
+  'https://minio.citupro.com/dev/menduner/marriott/culture4.jpg',
+  'https://minio.citupro.com/dev/menduner/marriott/culture5.jpg'
+]
+
+// 招聘职位
+const recruitPosition = ref([])
+const getRecruitPositionList = async () => {
+  const { list, total: number } = await getJobAdvertisedSearch(queryParams.value)
+  if (!list.length) {
+    total.value = 0
+    recruitPosition.value = []
+    return
+  }
+  recruitPosition.value = list.map(e => {
+    e.job = { ...e.job, ...dealDictObjData({}, e.job) }
+    return e
+  })
+  total.value = number
+}
+getRecruitPositionList()
+
+const handleChangePage = (e) => {
+  queryParams.value.pageNo = e
+  getRecruitPositionList()
+}
+
+// 职位详情
+const handlePosition = (val) => {
+  window.open(`/recruit/personal/position/details/${val.job.id}`)
+}
+
+const handleToTop = () => {
+  window.scrollTo({ top: 0, behavior: 'smooth' })
+}
+</script>
+
+<style scoped lang="scss">
+.logo-png {
+  position: absolute;
+  top: 30px;
+  left: 5%;
+}
+h2 {
+  font-size: 32px;
+  color: #666;
+  line-height: 44px;
+  text-align: center;
+  margin-bottom: 26px;
+  font-weight: 600;
+}
+.brief-introduction {
+  margin: 100px 0;
+  .desc {
+    color: #666;
+    margin-bottom: 65px;
+  }
+}
+.recruit-position {
+  margin-top: 100px;
+  .position-item {
+    background-color: #f9f9f9;
+    margin-bottom: 15px;
+    padding: 20px 0 20px 32px;
+    .job-name {
+      width: 20.5%;
+      overflow: hidden;
+      margin-right: 5%;
+      // color: #333;
+      font-size: 15px;
+      font-weight: 600;
+    }
+    .job-place {
+      width: 17%;
+      margin-right: 5%;
+    }
+    .job-class {
+      width: 15%;
+      margin-right: 5%;
+    }
+    .job-title {
+      font-size: 13px;
+      color: #8c8c8c;
+      line-height: 26px;
+    }
+  }
+}
+.view-detail:hover {
+  text-decoration: underline;
+}
+.up-btn {
+  position: fixed;
+  bottom: 20px;
+  right: 20px;
+}
+.culture {
+  width: 100%;
+  display: flex;
+  &-item {
+    width: 33.3%;
+  }
+}
+.content-width {
+  width: 1048px;
+  margin: 0 auto;
+  max-width: 1048px;
+  min-width: 1048px
+}
+</style>

+ 1 - 1
src/views/recruit/personal/home/components/advertisement/index.vue

@@ -20,7 +20,7 @@
 defineOptions({ name: 'advertisementPage'})
 
 const list = [
-  { url: 'https://minio.citupro.com/dev/menduner/preferredGroup/MARRIOTT.jpg' },
+  { url: 'https://minio.citupro.com/dev/menduner/preferredGroup/MARRIOTT.jpg', path: '/recruit/personal/advertisement/introduce/marriott/734173233779183616' },
   { url: 'https://minio.citupro.com/dev/menduner/preferredGroup/IHG.jpg', path: '/recruit/personal/advertisement/introduce/582610176201330688' },
   { url: 'https://minio.citupro.com/dev/menduner/preferredGroup/Yifei.jpg', path: '/recruit/personal/company/details/277182701256183808?key=briefIntroduction' }
 ]