From 3dbeddcb8f51ba28e8bfe62248246df95d20dca9 Mon Sep 17 00:00:00 2001
From: xuxin <15279969124@163.com>
Date: Thu, 28 May 2026 11:23:48 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B1=82=E8=81=8C=E5=8A=A9=E6=89=8B=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/agent-setting-panel.scss | 126 +++++++++-
src/components/AgentSettingPanel.vue | 220 ++++++++++++++++++
2 files changed, 345 insertions(+), 1 deletion(-)
diff --git a/src/assets/styles/components/agent-setting-panel.scss b/src/assets/styles/components/agent-setting-panel.scss
index 9b52c1b..a23694f 100644
--- a/src/assets/styles/components/agent-setting-panel.scss
+++ b/src/assets/styles/components/agent-setting-panel.scss
@@ -69,7 +69,7 @@
/* 区块标题 */
&__section-title {
- font-size: 0.15rem;
+ font-size: 0.18rem;
font-weight: 600;
color: $text-dark;
}
@@ -199,4 +199,128 @@
object-fit: contain;
}
}
+
+ /* ========== 求职助手配置表单 ========== */
+ &__config-group {
+ margin-top: 0.16rem;
+ }
+
+ &__config-label {
+ font-size: 0.13rem;
+ font-weight: 600;
+ color: $text-dark;
+ margin-bottom: 0.08rem;
+ }
+
+ &__config-sub {
+ font-size: 0.12rem;
+ color: $text-middle;
+ margin-bottom: 0.06rem;
+ }
+
+ &__config-options {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 0.08rem;
+ }
+
+ &__config-btn {
+ padding: 0.07rem 0.16rem;
+ background: $bg-white;
+ border: 1px solid $border-color;
+ border-radius: 0.2rem;
+ font-size: 0.12rem;
+ color: $text-dark;
+ cursor: pointer;
+ transition: border-color 0.2s, background 0.2s;
+
+ &:hover {
+ border-color: $accent;
+ }
+
+ &--active {
+ border-color: $accent;
+ background: $theme-color;
+ color: $accent;
+ }
+ }
+
+ &__config-selects {
+ display: flex;
+ gap: 0.1rem;
+ }
+
+ &__config-select {
+ min-width: 1.2rem;
+
+ &--full {
+ flex: 1;
+ }
+ }
+
+ /* 简历选择行 */
+ &__resume-row {
+ display: flex;
+ align-items: center;
+ gap: 0.08rem;
+ }
+
+ &__resume-icon {
+ width: 0.18rem;
+ height: 0.18rem;
+ color: $text-middle;
+ flex-shrink: 0;
+ }
+
+ /* 开关行 */
+ &__switch-row {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.1rem;
+ }
+
+ &__switch-text {
+ font-size: 0.12rem;
+ color: $text-dark;
+ line-height: 1.6;
+ }
+
+ &__switch-sub {
+ font-size: 0.11rem;
+ color: $text-light;
+ }
+
+ &__tip {
+ font-size: 0.12rem;
+ color: $text-light;
+ cursor: help;
+ margin-left: 0.04rem;
+ }
+
+ /* 提交按钮 */
+ &__submit-wrap {
+ margin-top: 0.24rem;
+ text-align: center;
+ }
+
+ &__submit-btn {
+ padding: 0.1rem 0.5rem;
+ background: $gradient-bg;
+ color: $bg-white;
+ border: none;
+ border-radius: 0.24rem;
+ font-size: 0.14rem;
+ cursor: pointer;
+ transition: opacity 0.2s;
+
+ &:hover {
+ opacity: 0.9;
+ }
+
+ &:disabled {
+ opacity: 0.6;
+ cursor: not-allowed;
+ }
+ }
}
diff --git a/src/components/AgentSettingPanel.vue b/src/components/AgentSettingPanel.vue
index a1f21f4..0a71d37 100644
--- a/src/components/AgentSettingPanel.vue
+++ b/src/components/AgentSettingPanel.vue
@@ -95,6 +95,114 @@
+
+
+
+
是否愿意接受部门调剂?
+
+
+
+
+
+
+
+
是否接受地点调剂?
+
+
+
+
+
+
+
+
可以参加面试的方式?
+
+
+
+
+
+
+
+
你的语言能力?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 简历设置
+
+ ⓘ
+
+
+
设置默认简历
+
+
+
+
+
+
+
+ 在投递时帮我针对岗位自动优化简历
+
+ ⓘ
+
+
+ (MVP只补充缺少技能)
+
+
+
+
+
+
+
+
+
@@ -137,6 +245,9 @@ import type { SaveEducationItem, SaveWorkItem, SaveProjectItem, SaveCompetitionI
import { resolveRegionName } from '@/utils/region'
import { resolveIndustryName } from '@/utils/industry'
import { resolveJobCategoryName } from '@/utils/jobCategory'
+import { fetchResumeList } from '@/api/resume'
+import type { ResumeListItem } from '@/api/resume'
+import { fetchAgentConfig, saveAgentConfig } from '@/api/agent'
/** 事件 */
const emit = defineEmits<{
@@ -221,6 +332,113 @@ function downloadExtension() {
window.open(extensionDownloadUrl, '_blank')
}
+// ==================== 求职助手配置 ====================
+
+/** 是否为实习类型 */
+const isInternship = computed(() => store.state.jobIntention?.employmentType === 1)
+
+/** 配置表单数据 */
+const configForm = ref({
+ acceptDeptTransfer: '',
+ acceptLocationTransfer: '',
+ interviewType: [] as string[],
+ languages: [{ language: '', proficiency: '' }] as Array<{ language: string; proficiency: string }>,
+ availableDate: '',
+ internDaysPerWeek: '',
+ internDuration: '',
+})
+
+/** 语种选项 */
+const languageOptions = ['英语', '日语', '法语', '德语', '韩语', '西班牙语', '俄语']
+
+/** 掌握程度选项 */
+const proficiencyOptions = ['入门', '日常会话', '商务会话', '无障碍沟通', '母语']
+
+/** 到岗时间选项 */
+const availableDateOptions = ['一周以内', '两周以内', '一个月以内', '一个月以上']
+
+/** 实习天数选项 */
+const internDaysOptions = ['3天及以上', '4天及以上', '5天及以上']
+
+/** 实习时长选项 */
+const internDurationOptions = ['3个月', '4个月', '5个月', '6个月及以上']
+
+/** 切换面试方式(多选) */
+function toggleInterviewType(type: string) {
+ const idx = configForm.value.interviewType.indexOf(type)
+ idx >= 0 ? configForm.value.interviewType.splice(idx, 1) : configForm.value.interviewType.push(type)
+}
+
+/** 简历列表 */
+const resumeList = ref([])
+
+/** 当前选中的简历 ID */
+const selectedResumeId = ref('')
+
+/** 自动优化简历开关 */
+const autoOptimizeSwitch = ref(true)
+
+/** 保存中状态 */
+const configSaving = ref(false)
+
+/** 加载简历列表 */
+async function loadResumeList() {
+ try {
+ const res = await fetchResumeList()
+ if (res.code === '0' && res.data) {
+ resumeList.value = res.data
+ const defaultResume = res.data.find(r => r.isDefault === 1)
+ if (defaultResume && defaultResume.id) {
+ selectedResumeId.value = defaultResume.id
+ } else if (res.data.length > 0 && res.data[0].id) {
+ selectedResumeId.value = res.data[0].id
+ }
+ }
+ } catch { console.error('[AgentSettingPanel] 加载简历列表失败') }
+}
+
+/** 加载已有的求职助手配置 — 填充表单 */
+async function loadAgentConfig() {
+ try {
+ const res = await fetchAgentConfig()
+ if (res.code === '0' && res.data) {
+ const cfg = res.data
+ configForm.value.acceptDeptTransfer = cfg.acceptDeptTransfer || ''
+ configForm.value.acceptLocationTransfer = cfg.acceptLocationTransfer || ''
+ configForm.value.interviewType = cfg.interviewType ? [...cfg.interviewType] : []
+ configForm.value.languages = cfg.languages?.length
+ ? cfg.languages.map(l => ({ language: l.language || '', proficiency: l.proficiency || '' }))
+ : [{ language: '', proficiency: '' }]
+ configForm.value.availableDate = cfg.availableDate || ''
+ configForm.value.internDaysPerWeek = cfg.internDaysPerWeek || ''
+ configForm.value.internDuration = cfg.internDuration || ''
+ if (cfg.autoOptimizeResume !== undefined) autoOptimizeSwitch.value = cfg.autoOptimizeResume === 1
+ }
+ } catch { console.error('[AgentSettingPanel] 加载求职助手配置失败') }
+}
+
+/** 提交设置 — 调用 saveAgentConfig 接口 */
+async function handleSubmitConfig() {
+ configSaving.value = true
+ try {
+ await saveAgentConfig({
+ acceptDeptTransfer: configForm.value.acceptDeptTransfer,
+ acceptLocationTransfer: configForm.value.acceptLocationTransfer,
+ interviewType: configForm.value.interviewType,
+ languages: configForm.value.languages.filter(l => l.language),
+ availableDate: configForm.value.availableDate,
+ internDaysPerWeek: configForm.value.internDaysPerWeek,
+ internDuration: configForm.value.internDuration,
+ autoOptimizeResume: autoOptimizeSwitch.value ? 1 : 0,
+ })
+ ElMessage.success('设置保存成功')
+ } catch {
+ ElMessage.error('设置保存失败,请重试')
+ } finally {
+ configSaving.value = false
+ }
+}
+
// ==================== 个人资料数据 ====================
/** 个人档案响应式数据 */
@@ -245,6 +463,8 @@ onMounted(async () => {
await loadInternship()
await loadProject()
await loadCompetition()
+ await loadResumeList()
+ await loadAgentConfig()
})
/** 加载基本信息 */