Browse Source

职位置顶标识、取消置顶

Xiao_123 7 months ago
parent
commit
27424ac676

+ 7 - 0
src/api/position.js

@@ -236,6 +236,13 @@ export const topJobAdvertised = async (ids) => {
   })
 }
 
+// 招聘端-取消置顶职位
+export const topJobAdvertisedCancel = async (ids) => {
+  return await request.post({
+    url: `/app-api/menduner/system/recruit/job-advertised/un-top?ids=${ids}`
+  })
+}
+
 // 招聘端-职位详情-认证情况
 export const getEnterpriseAuthDetails = async (enterpriseId) => {
   return await request.get({

File diff suppressed because it is too large
+ 1 - 0
src/assets/svg/top.svg


+ 9 - 7
src/views/recruit/enterprise/positionManagement/components/item.vue

@@ -5,17 +5,21 @@
       <div v-if="tab === 1" class="ml-8">
         <v-btn :disabled="!selectAll" color="primary" variant="tonal" size="small" @click="handleAction(2, 'batch', {})">{{ $t('common.refresh') }}</v-btn>
         <v-btn class="mx-3" :disabled="!selectAll" color="primary" variant="tonal" size="small" @click="handleAction(3, 'top', {})">{{ $t('common.topping') }}</v-btn>
+        <v-btn class="mr-3" :disabled="!selectAll" color="primary" variant="tonal" size="small" @click="handleAction(4, 'top', {})">取消置顶</v-btn>
         <v-btn :disabled="!selectAll" color="primary" variant="tonal" size="small" @click="handleAction(0, 'close', {})">{{ $t('common.close') }}</v-btn>
       </div>
       <v-btn v-if="tab === 2" class="ml-8" :disabled="!selectAll" color="primary" variant="tonal" size="small" @click="handleAction(1, 'activation', {})">{{ $t('common.activation') }}</v-btn>
     </div>
     <div v-for="val in items" :key="val.id" class="itemBox mb-3" style="height: 134px;">
+      <div v-if="val.top && tab === 1" style="position: absolute;">
+        <svg-icon name="top" size="50"></svg-icon>
+      </div>
       <div class="d-flex justify-space-between" style="padding: 10px 20px;">
         <div class="position">
-          <div class="item-select" v-if="tab !== 3">
+          <div class="item-select ml-5" v-if="tab !== 3">
             <v-checkbox v-model="val.select" hide-details color="primary" @update:model-value="handleChangeSelect"></v-checkbox>
           </div>
-          <div class="d-flex align-center" :class="{'cursor-pointer': tab === 1, 'ml-10': tab !== 3}" @click="handleEdit(val)">
+          <div class="d-flex align-center" :class="{'cursor-pointer': tab === 1, 'ml-15': tab !== 3}" @click="handleEdit(val)">
             <span v-if="val.name.indexOf('style')" v-html="val.name" class="position-name"></span>
             <span v-else class="position-name">{{ val.name }}</span>
           </div>
@@ -52,7 +56,7 @@
         <div class="d-flex">
           <div class="ml-10 d-flex">
             <div v-if="tab === 1">
-              <span class="cursor-pointer actions" @click="handleAction(3, '', val)">{{ $t('common.topping') }}</span>
+              <span class="cursor-pointer actions" @click="handleAction(val.top ? 4 : 3, '', val)">{{ val.top ? '取消置顶' : $t('common.topping') }}</span>
               <span class="lines"></span>
               <span class="cursor-pointer actions" @click="handleAction(0, '', val)">{{ $t('common.close') }}</span>
               <span class="lines"></span>
@@ -78,7 +82,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, updatePositionExpireTime } from '@/api/position'
+import { closeJobAdvertised, enableJobAdvertised, refreshJobAdvertised, topJobAdvertised, updatePositionExpireTime, topJobAdvertisedCancel } from '@/api/position'
 import Snackbar from '@/plugins/snackbar'
 
 const { t } = useI18n()
@@ -152,7 +156,7 @@ watch(
   { deep: true }
 )
 
-const apiList = [ closeJobAdvertised, enableJobAdvertised, refreshJobAdvertised, topJobAdvertised ]
+const apiList = [closeJobAdvertised, enableJobAdvertised, refreshJobAdvertised, topJobAdvertised, topJobAdvertisedCancel]
 
 // 职位关闭、激活、刷新、置顶
 const handleAction = async (index, type, { id }) => {
@@ -178,8 +182,6 @@ const handleUpdateExpireTime = (item) => {
   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
   if (!time) return Snackbar.warning('请选择职位到期时间')
   await updatePositionExpireTime({ id: expireTimeId.value, time })

+ 4 - 4
src/views/recruit/personal/PersonalCenter/resume/online/components/educationExp.vue

@@ -170,11 +170,11 @@ const formItems = ref({
       key: 'startTime',
       mode: 'month', // 时间类型 year month date time
       value: null,
-      default: '2000-01',
+      default: '2014-01',
       format: 'YYYY/MM',
       labelWidth: 120,
       label: '开始时间 *',
-      defaultValue: new Date(2000, 1),
+      defaultValue: new Date(2014, 1),
       disabledFutureDates: true,
       col: 6,
       rules: [v => !!v || '请选择起始时间']
@@ -184,9 +184,9 @@ const formItems = ref({
       key: 'endTime',
       mode: 'month', // 时间类型 year month date time
       value: null,
-      default: '2004-01',
+      default: '2018-01',
       format: 'YYYY/MM',
-      defaultValue: new Date(2004, 1),
+      defaultValue: new Date(2018, 1),
       disabledFutureDates: true,
       labelWidth: 120,
       label: '结束时间 *',

Some files were not shown because too many files changed in this diff