浏览代码

职位发布添加关键字

Xiao_123 10 月之前
父节点
当前提交
172e1477e6

+ 1 - 1
src/store/dict.js

@@ -10,7 +10,7 @@ const list = [
   { type: 'menduner_area_type', params: {}, apiFn: 'areaList' },
   { type: 'menduner_education_type' },
   { type: 'menduner_exp_type' },
-  { type: 'system_user_sex' },
+  { type: 'menduner_sex' },
   { type: 'menduner_job_type' },
   { type: 'menduner_job_status' },
   { type: 'menduner_marital_status' },

+ 1 - 1
src/utils/getText.js

@@ -13,7 +13,7 @@ export const getBaseInfoDictOfName = async (index = 0, baseInfo, value, addKeyNa
     { dictType: 'menduner_area_type', itemText: 'name', itemValue: 'id', saveType: 'areaList' },
     { dictType: 'menduner_education_type', itemText: 'label', itemValue: 'value' },
     { dictType: 'menduner_exp_type', itemText: 'label', itemValue: 'value' },
-    { dictType: 'system_user_sex', itemText: 'label', itemValue: 'value' },
+    { dictType: 'menduner_sex', itemText: 'label', itemValue: 'value' },
     { dictType: 'menduner_job_type', itemText: 'label', itemValue: 'value' },
     { dictType: 'menduner_job_status', itemText: 'label', itemValue: 'value' },
     { dictType: 'menduner_marital_status', itemText: 'label', itemValue: 'value' },

+ 1 - 1
src/views/recruit/enterprise/informationSetting/index.vue

@@ -60,7 +60,7 @@ const formItems = ref({
       value: '2',
       label: '性别',
       width: 90,
-      dictTypeName: 'system_user_sex',
+      dictTypeName: 'menduner_sex',
       items: []
     },
     {

+ 91 - 3
src/views/recruit/enterprise/positionManagement/components/jobRequirements.vue

@@ -1,7 +1,54 @@
 <template>
   <div style="width: 100%;">
-    <CtForm ref="formPageRef" :items="items" style="width: 600px;"></CtForm>
+    <CtForm ref="formPageRef" :items="items" style="width: 600px;">
+      <template #tagList>
+        <div>
+          <span style="color: #797474;">职位关键字:</span>
+          <v-chip class="cursor-pointer mr-2 mb-3" color="primary" variant="outlined" @click="show = true; select = tag">
+            <v-icon>mdi-plus</v-icon>
+          </v-chip>
+          <v-chip v-for="(val, index) in tag" :key="index" class="mr-2 mb-3" color="primary">
+            {{ val }}
+          </v-chip>
+        </div>
+      </template>
+    </CtForm>
   </div>
+
+  <CtDialog :visible="show" :widthType="3" titleClass="text-h6" title="职位关键字选择" :footer="true" @close="show = false" @submit="handleSubmit">
+    <div>已选中关键字:</div>
+    <div v-if="select.length">
+      <v-chip
+        v-for="(item, index) in select" :key="index"
+        class="chip mr-2 mt-4"
+        label color="#ea8d03"
+      >
+        {{ item }}
+        <v-icon size="18" color="#ea8d03" style="margin-left: 6px;" @click="handleCancelSelect(item)">mdi-close-circle</v-icon>
+      </v-chip>
+    </div>
+    <v-divider class="my-5"></v-divider>
+    <div v-for="val in tagList" :key="val.id" class="mb-8">
+      <span style="font-size: 16px;">{{ val?.nameCn || '--' }}</span>
+      <div v-if="val?.children?.length">
+        <v-chip 
+          v-for="k in val.children" 
+          :key="k.id"
+          class="mx-2 mt-4 cursor-pointer"
+          :text="k.nameCn"
+          variant="outlined"
+          color="primary"
+          :value="k.id"
+          label
+          :disabled="select.includes(k.nameCn)"
+          @click="handleSelect(k.nameCn)"
+        >
+          <v-icon icon="mdi-plus" start></v-icon>
+          {{ k?.nameCn || '--' }}
+        </v-chip>
+      </div>
+    </div>
+  </CtDialog>
 </template>
 
 <script setup>
@@ -10,6 +57,7 @@ import CtForm from '@/components/CtForm'
 import { reactive, ref, watch } from 'vue'
 import { getDict } from '@/hooks/web/useDictionaries'
 import { cityToProvince } from '@/utils/areaDeal'
+import { getTagTreeDataApi } from '@/api/enterprise'
 
 const props = defineProps({
   itemData: Object
@@ -141,10 +189,21 @@ const items = ref({
       label: '详情地址 *',
       rules: [v => !!v || '请填写详细地址'],
     },
+    {
+      slotName: 'tagList',
+      key: 'tagList',
+      value: []
+    }
   ]
 })
 
-// items.value.options.forEach(e => e.rules = []) // 测试使用
+// 招聘职位标签
+const tagList = ref([])
+const getTagList = async () => {
+  const data = await getTagTreeDataApi({ type: 2 })
+  tagList.value = data
+}
+getTagList()
 
 // 获取字典内容
 const getDictData = async () => {
@@ -183,7 +242,10 @@ const getQuery = async () => {
   const obj = {}
   items.value.options.forEach(e => {
     if (e.noParam) return
-    obj[e.key] = e.value
+    if (e.key === 'tagList') {
+      obj[e.key] = tag.value.length ? tag.value : []
+    }
+    else obj[e.key] = e.value
   })
   query = Object.assign(query, obj)
   return query
@@ -206,6 +268,9 @@ watch(
       if (e.noParam) return
       e.value = val[e.key]
       if (e.key === 'areaId' && val[e.key]) workAreaId = val[e.key]
+      if (e.key === 'tagList' && val[e.key] && val[e.key].length) {
+        tag.value = val[e.key] && val[e.key].length ? val[e.key] : []
+      }
     })
     if (workAreaId) { // 省份回显
       const province = items.value.options.find(pv => pv.key === 'workAreaProvinceId')
@@ -221,6 +286,29 @@ watch(
   { deep: true }
 )
 
+
+// 标签选择
+const show = ref(false)
+const select = ref([])
+const tag = ref([])
+
+// 选择
+const handleSelect = (nameCn) => {
+  const result = select.value.includes(nameCn)
+  if (!result) return select.value.push(nameCn)
+  else select.value = select.value.filter(e => e !== nameCn)
+}
+
+const handleSubmit = () => {
+  tag.value = select.value
+  show.value = false
+}
+
+// 取消选中
+const handleCancelSelect = (nameCn) => {
+  select.value = select.value.filter(e => e !== nameCn)
+}
+
 defineExpose({
   formPageRef,
   getQuery

+ 2 - 2
src/views/recruit/enterprise/positionManagement/index.vue

@@ -51,7 +51,7 @@ const query = ref({
   pageSize: 10,
   pageNo: 1,
   status: 0, // 0招聘中 1已关闭
-  hasExpiredData: false, // true 到期职位
+  // hasExpiredData: false, // true 到期职位
   hire: false // true 众聘岗位
 })
 
@@ -84,7 +84,7 @@ const handleAdd = async () => {
 
 // 获取职位列表
 const getPositionList = async () => {
-  query.value.hasExpiredData = tab.value === 3 ? true : false
+  // query.value.hasExpiredData = tab.value === 4 ? true : false
   query.value.hire = tab.value === 4 ? true : false
 
   if (tab.value !== 3) {

+ 1 - 1
src/views/recruit/enterprise/talentPool/components/filter.vue

@@ -56,7 +56,7 @@ const formItems = ref({
       default: 0,
       label: '性别',
       width: 90,
-      dictTypeName: 'system_user_sex',
+      dictTypeName: 'menduner_sex',
       items: [
         { label: '不限', value: '0' },
         { label: '男', value: '1' },

+ 11 - 9
src/views/recruit/personal/home/components/advertisement.vue

@@ -8,7 +8,7 @@
 
     <div no-gutters class="mt-5 d-flex flex-wrap" style="width: 100%;">
       <v-card v-for="(k, i) in list" :key="i" class="col-item" @click="handleOpen">
-        <img :src="k.url" alt="" style="width: 100%; height: 190px;border-radius: 4px;display: block;">
+        <v-img :src="k.url"/>
       </v-card>
     </div>
   </div>
@@ -18,12 +18,14 @@
 defineOptions({ name: 'advertisementPage'})
 
 const list = [
-  { url: 'https://admin.61hr.com/admin/uploads/images/ad/202407/345bf4c8ea3f439f9f8bdfee16ff5dfd.gif' },
-  { url: 'https://admin.61hr.com/admin/uploads/images/ad/202407/345bf4c8ea3f439f9f8bdfee16ff5dfd.gif' },
-  { url: 'https://admin.61hr.com/admin/uploads/images/ad/202407/345bf4c8ea3f439f9f8bdfee16ff5dfd.gif' },
+  { url: 'https://dfws-file.veimg.cn/plutus/img/finish/2021/01/1611813992000.webp' },
   { url: 'https://admin.61hr.com/admin/uploads/images/ad/202407/e684374c0ff349b4945bc0c7a4a2713f.gif' },
+  { url: 'https://dfws-file.veimg.cn/plutus/img/finish/2021/01/1611813992000.webp' },
+  { url: 'https://dfws-file.veimg.cn/plutus/img/finish/2021/01/1611813992000.webp' },
+  { url: 'https://admin.61hr.com/admin/uploads/images/ad/202407/e684374c0ff349b4945bc0c7a4a2713f.gif' },
+  { url: 'https://dfws-file.veimg.cn/plutus/img/finish/2024/08/1722492376000.webp' },
+  { url: 'https://dfws-file.veimg.cn/plutus/img/finish/2024/08/1722492376000.webp' },
   { url: 'https://admin.61hr.com/admin/uploads/images/ad/202407/e684374c0ff349b4945bc0c7a4a2713f.gif' },
-  { url: 'https://admin.61hr.com/admin/uploads/images/ad/202407/e684374c0ff349b4945bc0c7a4a2713f.gif' }
 ]
 
 const handleOpen = () => {
@@ -63,12 +65,12 @@ const handleOpen = () => {
 }
 .col-item {
   cursor: pointer;
-  width: calc((100% - 24px) / 3);
-  min-width: calc((100% - 24px) / 3);
-  max-width: calc((100% - 24px) / 3);
+  width: calc((100% - 36px) / 4);
+  min-width: calc((100% - 36px) / 4);
+  max-width: calc((100% - 36px) / 4);
   margin: 0 12px 12px 0;
   box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
-  &:nth-child(3n) {
+  &:nth-child(4n) {
     margin-right: 0;
   }
   &:hover {

+ 8 - 3
src/views/recruit/personal/position/components/details.vue

@@ -144,6 +144,8 @@
         </div>
       </template>
     </Dialog>
+
+    <Loading :visible="loading"></Loading>
   </div>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
 </template>
 
@@ -170,6 +172,7 @@ const { t } = useI18n()
 const router = useRouter()
 const { id } = router.currentRoute.value.params
 const delivery = ref(false) // 是否已投递简历
+const loading = ref(false)
 
 // 相似职位
 const similarList = ref([])
@@ -290,12 +293,14 @@ const handleSubmit = async (val) =>{
   if (!selectResume.value) return Snackbar.warning(t('resume.selectResumeToSubmit'))
   const obj = resumeList.value.find(e => e.id === selectResume.value)
   if (!obj) return Snackbar.warning(t('resume.selectedResumeNotExist'))
+  handleClose()
+  loading.value = true
   await jobCvRelSend({ jobId: id, title: obj.title, url: obj.url, type: info.value.hire ? 1 : 0 })
-  setTimeout(() => {
+  setTimeout(async () => {
     Snackbar.success(t('resume.deliverySuccess'))
+    await deliveryCheck()
+    loading.value = false
   }, 3000)
-  handleClose()
-  deliveryCheck()
 }
 
 const toDetails = async (info) => {

+ 1 - 1
src/views/recruit/personal/remuse/components/basicInfo.vue

@@ -210,7 +210,7 @@ const items = ref({
       label: '性别',
       col: 6,
       width: 70,
-      dictTypeName: 'system_user_sex',
+      dictTypeName: 'menduner_sex',
       items: [],
     },
     {