导师相关接口换offer派接口,职位列表和职位详情,Nova聊天侧边栏UI重写

This commit is contained in:
2026-07-03 19:55:53 +08:00
parent a1a27073e4
commit f90c8be2a9
26 changed files with 896 additions and 1129 deletions
+40 -24
View File
@@ -1,5 +1,5 @@
<template>
<div class="jobs-page dflex">
<div class="jobs-page">
<SideNav />
<div class="jobs-page__content">
@@ -16,25 +16,7 @@
<!-- 页面标题 + Tab 切换 -->
<JobPageHeader v-model:activeTab="activeTab" :favoriteCount="favoriteTotal" :applyCount="applyTotal" />
<!-- 收藏统计栏 -->
<div v-if="activeTab === 'collected'" class="jobs-page__filters-bar">
<div class="jobs-page__fav-stats">
<span class="jobs-page__fav-stats-item">有效{{ favoriteValidCount }}</span>
<span class="jobs-page__fav-stats-item">失效{{ favoriteInvalidCount }}</span>
</div>
</div>
<!-- 投递状态筛选栏 -->
<div v-if="activeTab === 'applied'" class="jobs-page__filters-bar">
<div class="jobs-page__fav-stats">
<span
v-for="tab in applyStatusTabs"
:key="tab.status"
class="jobs-page__fav-stats-item"
:class="{ 'jobs-page__fav-stats-item--active': applyStatusFilter === tab.status }"
@click="switchApplyStatus(tab.status)"
>{{ tab.label }}{{ tab.count }}</span>
</div>
</div>
<!-- 筛选条件 -->
<div v-if="isRecommendTab" class="jobs-page__filters-bar">
<div class="jobs-page__filters">
@@ -47,6 +29,9 @@
:regionCodes="selectedRegionCodes"
:level="2"
:maxSelect="3"
:triggerStyle="selectorTriggerStyle"
:hoverStyle="selectorHoverStyle"
:displayStyle="selectorDisplayStyle"
@update:regionCodes="onRegionChange"
/>
<!-- 岗位筛选使用岗位选择组件 -->
@@ -56,6 +41,9 @@
:maxSelect="3"
:level="3"
:allowParentSelect="true"
:triggerStyle="selectorTriggerStyle"
:hoverStyle="selectorHoverStyle"
:displayStyle="selectorDisplayStyle"
@update:categoryIds="onCategoryChange"
/>
<!-- 行业筛选使用行业选择组件 -->
@@ -65,6 +53,9 @@
:maxSelect="3"
:level="2"
:allowParentSelect="true"
:triggerStyle="selectorTriggerStyle"
:hoverStyle="selectorHoverStyle"
:displayStyle="selectorDisplayStyle"
@update:industryIds="onIndustryChange"
/>
<!-- 其他筛选条件 -->
@@ -75,7 +66,7 @@
>
<span>{{ filter.selected || filter.label }}</span>
<svg class="jobs-page__filter-arrow-icon" viewBox="0 0 12 12" fill="none">
<path d="M3 4.5L6 7.5L9 4.5" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M3 4.5L6 7.5L9 4.5" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
<!-- 工作类型下拉菜单 -->
<div
@@ -112,7 +103,7 @@
</div>
<!-- 职位列表 -->
<div ref="jobListRef" class="jobs-page__list pr5" :style="restoring ? { visibility: 'hidden' } : {}" @scroll="onListScroll">
<div ref="jobListRef" class="jobs-page__list pr5 scrollbar-thin" :style="restoring ? { visibility: 'hidden' } : {}" @scroll="onListScroll">
<div
v-for="(job, index) in jobList"
:key="index"
@@ -151,7 +142,7 @@
</svg>
{{ job.regionName }}
</span>
<span class="jobs-page__meta-edu">本科</span>
<span v-if="formatEducation(job.education)" class="jobs-page__meta-edu">{{ formatEducation(job.education) }}</span>
<span v-if="formatEmploymentType(job.recruitCategory)" class="jobs-page__meta-recruit">{{ formatEmploymentType(job.recruitCategory) }}</span>
</div>
</div>
@@ -267,7 +258,7 @@
import { ref, watch, onMounted, onBeforeUnmount, nextTick, computed } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import { useStore } from 'vuex'
import { JOB_TYPE_OPTIONS, formatEmploymentType } from '@/stores/index'
import { JOB_TYPE_OPTIONS, formatEmploymentType, formatEducation } from '@/stores/index'
import SideNav from '@/components/SideNav.vue'
import AiChat from '@/components/AiChat.vue'
import JobPageHeader from '@/components/JobPageHeader.vue'
@@ -340,6 +331,31 @@ function askAssistant(job: JobItem) {
currentAskJobId.value = job.id
}
/** 选择器触发按钮的自定义样式,适配弹窗内布局(参考 ProfileEditDrawer 中 regionTriggerStyle */
const selectorTriggerStyle: Record<string, string> = {
width: '100%',
'box-sizing': 'border-box',
padding: '0.08rem 0.12rem',
'font-size': '0.13rem',
color: '#666',
background: '#fff',
border: '1px solid transparent',
'border-radius': '0.08rem',
'max-width': 'none',
'justify-content': 'space-between',
}
/** 选择器显示文字的自定义样式,覆盖默认 max-width: 1.6rem */
const selectorDisplayStyle: Record<string, string> = {
'max-width': 'none',
}
/** 选择器触发按钮 hover 时的样式 */
const selectorHoverStyle: Record<string, string> = {
background: '#12C7BE',
color: '#fff',
}
// ==================== 收藏统计 ====================
/** 收藏总数(用于 Tab 标签显示) */