Browse Source

Merge branch 'dev' of https://git.citupro.com/zhengnaiwen_citu/menduner into dev

Xiao_123 7 tháng trước cách đây
mục cha
commit
b2b092d5bf

+ 13 - 12
src/layout/personal/navBar.vue

@@ -163,17 +163,18 @@ const paths = [ // 有选中样式-路由列表
 ]
 
 const navList = [
-  {
-    title: '直聘',
-    children: [
-      {
-        title: '门墩儿直聘',
-        appList: [
-          [{ title: '职位', path: paths[1] }, { title: '公司', path: paths[2] }]
-        ]
-      }
-    ]
-  },
+  // {
+  //   title: '直聘',
+  //   children: [
+  //     {
+  //       title: '门墩儿直聘',
+  //       appList: [
+  //         [{ title: '职位', path: paths[1] }, { title: '公司', path: paths[2] }]
+  //       ]
+  //     }
+  //   ]
+  // },
+  { title: '直聘', path: '/recruit/personal/position', noLeaving: true },
   { title: '甄选', path: '/mall' },
   { title: '猎寻', path: '/headhunting' },
   { title: '火苗儿' },
@@ -184,7 +185,7 @@ const navList = [
 
 const handleClick = (e, status) => {
   if (!e.path) return
-  if (status) window.open(e.path)
+  if (status && !e.noLeaving) window.open(e.path)
   else router.push(e.path)
 }
 

+ 5 - 1
src/views/recruit/personal/company/index.vue

@@ -1,6 +1,9 @@
 <template>
   <div class="default-width">
-    <div class="white-bgc py-3">
+    <div style=" background-color: #fff">
+      <buttons mr="491"></buttons>
+    </div>
+    <div class="white-bgc pb-3">
       <headSearch placeholder="搜索公司" tipsText="公司关键字搜索" @handleSearch="val => handleSearch(val, 'name')"></headSearch>
       <div class="px-5 mt-3 clear-parent">
         <areaType :isClear="clear" @handleClick="handleSearch"></areaType>
@@ -25,6 +28,7 @@
 
 <script setup>
 defineOptions({name: 'retrieval-company-page'})
+import buttons from '@/views/recruit/personal/components/buttons.vue'
 import { ref } from 'vue'
 import { useRoute, useRouter } from 'vue-router'
 import { getEnterpriseSearch } from '@/api/enterprise'

+ 60 - 0
src/views/recruit/personal/components/buttons.vue

@@ -0,0 +1,60 @@
+<!--  -->
+<template>
+  <div v-if="list?.length" class="btnBox" :style="`margin-right: ${props.mr}px;`">
+    <div
+      v-for="(item, index) in list" :key="item.title"
+      :class="{'rl': !index, 'rr': index === list.length-1, 'active': item.path === route?.path}"
+      @click="handleUpdate(item)"
+    >
+      {{ item.title }}
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { useRoute } from 'vue-router'
+const route = useRoute()
+defineOptions({name: 'defineOptions-buttons'})
+const props = defineProps({
+  mr: {
+    type: [String],
+    default: '413'
+  }
+})
+
+const list = [
+  { title: '职位', path:'/recruit/personal/position' },
+  { title: '推荐', path:'' },
+  { title: '公司', path:'/recruit/personal/company' },
+]
+const handleUpdate = (item) => {
+  // if (item.path) router.push(item.path)
+  if (item.path) window.open(item.path)
+}
+</script>
+<style lang="scss" scoped>
+.btnBox {
+  display: flex;
+  justify-content: center;
+  padding-top: 12px;
+  border-radius: 5px 5px 0 0;
+  div {
+    cursor: pointer;
+    padding: 6px 20px;
+    color: #004e46;
+    background: linear-gradient(to right, rgba(18, 235, 177, 0.2), rgb(47 139 119 / 15%));
+    &:hover {
+      // color: #004e46;
+      color: #004e46;
+      background: linear-gradient(to right, rgba(18, 235, 177, 0.742), rgb(47 139 119 / 32%));
+    }
+  }
+}
+.rl { border-radius: 5px 0 0 0; border: none; }
+.rr { border-radius: 0 5px 0 0; }
+.active {
+  font-weight: 500 !important;
+  color: #004e46 !important;
+  background: linear-gradient(to right, rgba(18, 235, 177, 0.742), rgb(47 139 119 / 32%)) !important;
+}
+</style>

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

@@ -14,7 +14,7 @@
           >{{ item.name }}</span>
         </span>
         <!-- 其他 -->
-        <span v-if="list?.length > num" class="mx-3" style="line-height: 32px;" @click="handleShowOther({ list, index: levelIndex })">{{ $t('common.other') }}</span>
+        <span v-if="list?.length > num" class="mx-3" :class="{'act': otherIsAct[levelIndex]}" style="line-height: 32px;" @click="handleShowOther({ list, index: levelIndex })">{{ $t('common.other') }}</span>
       </div>
       <!-- 多选级别 -->
       <div v-else class="embedded">
@@ -40,7 +40,7 @@
         @change="areaSearchChange"
       ></textUI>
       <div class="otherAreaBox d-flex flex-wrap">
-        <div v-for="item in otherAreaList" :key="item.id" @click="handleOtherClick(item)">{{ item.name }}</div>
+        <div v-for="(item, index) in otherAreaList" :class="{'act': calcAct(item.id, otherIndex)}" :key="item.id" @click="handleOtherClick(item, index)">{{ item.name }}</div>
       </div>
     </div>
   </CtDialog>
@@ -145,6 +145,7 @@ const handleNext = ({ item, index, expand = true, updateSearch = true }) => {
   } else {
     treeList.value.splice(index + 1, treeList.value.length)
   }
+  otherIsAct.value.splice(index + 1, treeList.value.length)
 }
 
 // 选中样式判断
@@ -168,8 +169,10 @@ const clear = (list, levelIndex) => {
 const showDialog = ref(false)
 const dialogData = ref({})
 const otherAreaList = ref([])
+let otherIndex = null
 // const keyWord = ref('')
 const handleShowOther = ({ list, index }) => {
+  otherIndex = index
   dialogData.value = { list, index }
   otherAreaList.value = [...dialogData.value.list]
   showDialog.value = true
@@ -178,7 +181,9 @@ const areaSearchChange = (val) => {
   if (val) otherAreaList.value = dialogData.value.list.filter(e => e.name.includes(val))
   else otherAreaList.value = [...dialogData.value.list]
 }
-const handleOtherClick = (item) => {
+const otherIsAct = ref([])
+const handleOtherClick = (item, index) => {
+  if (index >=0) otherIsAct.value[index] = true
   handleNext({ item, index: dialogData.value.index })
   showDialog.value = false
 }

+ 5 - 1
src/views/recruit/personal/position/index.vue

@@ -1,7 +1,10 @@
 <!-- 检索列表页 - 职位检索 -->
 <template>
   <div class="default-width">
-    <div class="py-3" style="z-index: 998; background-color: #fff">
+    <div style=" background-color: #fff">
+      <buttons></buttons>
+    </div>
+    <div class="pb-3" style="z-index: 998; background-color: #fff">
       <div class="stickyBox mb-5">
         <headSearch
           tipsText="职位/公司关键字搜索"
@@ -32,6 +35,7 @@
 </template>
 
 <script setup>
+import buttons from '@/views/recruit/personal/components/buttons.vue'
 import rightRecommend from './components/rightRecommend'
 import cityFilter from './components/cityFilter'
 import conditionFilter from './components/conditionFilter'