From 96071d01057c4ac218f06e9e945c02cb9ed9d42c Mon Sep 17 00:00:00 2001
From: xuxin <15279969124@163.com>
Date: Thu, 28 May 2026 16:28:18 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E5=88=B6=E7=AE=80=E5=8E=86AI=E7=BC=96?=
=?UTF-8?q?=E8=BE=91=E6=92=A4=E5=9B=9E=E4=BF=AE=E6=94=B9=E6=8C=89=E9=92=AE?=
=?UTF-8?q?=E5=B1=95=E7=A4=BA=E9=80=BB=E8=BE=91=EF=BC=8C=E5=92=8C=E6=B6=88?=
=?UTF-8?q?=E6=81=AF=E9=80=9A=E7=9F=A5=E6=98=BE=E7=A4=BA=E6=97=B6=E9=97=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/JobResumeCustomDialog.vue | 56 ++++++++++++++++++++----
src/components/SideNav.vue | 6 ++-
2 files changed, 52 insertions(+), 10 deletions(-)
diff --git a/src/components/JobResumeCustomDialog.vue b/src/components/JobResumeCustomDialog.vue
index a05babf..10913a9 100644
--- a/src/components/JobResumeCustomDialog.vue
+++ b/src/components/JobResumeCustomDialog.vue
@@ -268,10 +268,19 @@
>
{{ msg.content }}
-
-
+
+
+
+
+
-
-
- 已撤销此次简历修改
-
@@ -430,11 +433,37 @@ const isLowMatch = computed(() => props.jobInfo.matchScore < 6)
/** 跳转到指定步骤 */
function goToStep(step: number) {
+ // 从步骤4返回步骤3时,清理步骤4的状态数据(避免下次进入被旧数据影响)
+ if (currentStep.value === 4 && step === 3) {
+ resetStep4State()
+ }
if (step === 3) initSkillOptions()
if (step === 4) fetchAndLoadCustomResume()
else currentStep.value = step
}
+/** 重置步骤4(预览)的所有状态数据 */
+function resetStep4State() {
+ aiMessages.value = []
+ aiInputText.value = ''
+ aiLoading.value = false
+ isShowDiff.value = false
+ previewTab.value = 'ai'
+ cachedOptimizedScore.value = 0
+ oldResumeTemplateData.value = {
+ name: '', email: '', mobileNumber: '', wechatNumber: '', summary: '',
+ educations: [], workExperiences: [], internships: [], projects: [],
+ competitions: [], skills: [], certificates: [],
+ }
+ resumeTemplateData.value = {
+ name: '', email: '', mobileNumber: '', wechatNumber: '', summary: '',
+ educations: [], workExperiences: [], internships: [], projects: [],
+ competitions: [], skills: [], certificates: [],
+ }
+ customResumeRawData.value = { resume: {} }
+ showDownloadMenu.value = false
+}
+
/** 抽屉模式下一步 */
async function handleDrawerNext() {
if (currentStep.value >= 4) return
@@ -914,6 +943,15 @@ const showRollbackConfirm = ref(false)
/** 当前要撤销的消息索引 */
const rollbackMsgIndex = ref(-1)
+/**
+ * 判断该消息是否为消息列表的最后一条
+ * 撤销按钮只在最后一条消息恰好是AI修改简历的回答时才显示
+ * @param msgIndex 消息在列表中的索引
+ */
+function isLastMessage(msgIndex: number): boolean {
+ return msgIndex === aiMessages.value.length - 1
+}
+
/**
* 点击撤销修改按钮 — 弹出确认弹窗
* @param msgIndex 消息在列表中的索引
diff --git a/src/components/SideNav.vue b/src/components/SideNav.vue
index 18565a3..ec8c0ac 100644
--- a/src/components/SideNav.vue
+++ b/src/components/SideNav.vue
@@ -64,7 +64,10 @@
{{ currentMessage.title }}
- {{ currentMessage.content }}
+
+
{{ currentMessage.content }}
+
{{timestampToLocalDateTime(currentMessage.createTime, 'returnSecond')}}
+
请选择一条消息查看
@@ -125,6 +128,7 @@ import { useStore } from 'vuex'
import SettingsDialog from '@/components/SettingsDialog.vue'
import { checkLogin } from '@/api/auth'
import { fetchMessageList, fetchUnreadCount, markMessageRead } from '@/api/message'
+import { timestampToLocalDateTime } from '@/utils/time'
import {userFeedback} from '@/api/setting'
import type { MessageDto } from '@/api/message'
import navJobsIcon from '@/assets/images/nav/nav-jobs-icon.png'