添加招聘分类筛选功能
This commit is contained in:
@@ -288,6 +288,7 @@
|
||||
import { ref, reactive, computed, nextTick, onMounted } from 'vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import { useStore } from 'vuex'
|
||||
import { formatEmploymentType } from '@/stores/index'
|
||||
import SideNav from '@/components/SideNav.vue'
|
||||
import AiChat from '@/components/AiChat.vue'
|
||||
import JobPageHeader from '@/components/JobPageHeader.vue'
|
||||
@@ -311,11 +312,7 @@ const jobId = route.params.id as string
|
||||
|
||||
// ==================== 工具函数 ====================
|
||||
|
||||
/** 工作类型映射:数字 → 中文 */
|
||||
function formatEmploymentType(type: number | undefined): string {
|
||||
const map: Record<number, string> = { 0: '全职', 1: '兼职' }
|
||||
return map[type ?? -1] ?? '未知'
|
||||
}
|
||||
/** 工作类型映射:使用全局统一的 formatEmploymentType */
|
||||
|
||||
/** 学历要求映射:数字 → 中文 */
|
||||
function formatEducation(edu: number | undefined): string {
|
||||
|
||||
+3
-5
@@ -285,6 +285,7 @@
|
||||
import { ref, watch, onMounted, onBeforeUnmount, nextTick, computed } from 'vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import { useStore } from 'vuex'
|
||||
import { JOB_TYPE_OPTIONS } from '@/stores/index'
|
||||
import SideNav from '@/components/SideNav.vue'
|
||||
import AiChat from '@/components/AiChat.vue'
|
||||
import JobPageHeader from '@/components/JobPageHeader.vue'
|
||||
@@ -449,11 +450,8 @@ const filters = ref<FilterItem[]>([
|
||||
{ label: '工作类型', key: 'jobType', selected: '' },
|
||||
])
|
||||
|
||||
/** 工作类型选项映射:label → 接口参数 employmentType(0=全职 1=实习) */
|
||||
const jobTypeOptions: { label: string; value: number }[] = [
|
||||
{ label: '全职', value: 0 },
|
||||
{ label: '实习', value: 1 },
|
||||
]
|
||||
/** 工作类型选项映射:从全局 store 常量统一引入 */
|
||||
const jobTypeOptions = JOB_TYPE_OPTIONS
|
||||
|
||||
/** 工作类型下拉菜单是否显示 */
|
||||
const showJobTypeDropdown = ref(false)
|
||||
|
||||
Reference in New Issue
Block a user