|
@@ -63,8 +63,10 @@
|
|
|
// import { getPositionTreeClick } from '@/api/common/index'
|
|
|
import { getDict } from '@/hooks/web/useDictionaries'
|
|
|
import { reactive, ref, defineEmits } from 'vue';
|
|
|
-
|
|
|
+import { useRoute, useRouter } from 'vue-router'
|
|
|
defineOptions({ name:'common-components-jobTypeCard'})
|
|
|
+
|
|
|
+const route = useRoute(); const router = useRouter()
|
|
|
const emits = defineEmits(['handleJobClick'])// 定义一个或多个自定义事件
|
|
|
|
|
|
const props = defineProps({
|
|
@@ -77,7 +79,9 @@ const isPage = props.page
|
|
|
|
|
|
// 职位点击
|
|
|
const handleJobClick = async (val) => {
|
|
|
- emits('jobClick', val)
|
|
|
+ const path = '/recruit/position'
|
|
|
+ if (path === route.path) emits('jobClick', val)
|
|
|
+ else router.push({ path, query: { ...val, jumpType: 1 } })
|
|
|
// await getPositionTreeClick({ id: val.id })
|
|
|
}
|
|
|
|