1
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
@back="handleBack"
|
||||
>
|
||||
<template #header-right>
|
||||
<Button type="info" @click="handleSyncOnline" :loading="syncing" style="margin-right: 8px;">同步在线简历</Button>
|
||||
<Button type="primary" @click="handleAnalyzeAI" :loading="analyzing">AI 分析</Button>
|
||||
</template>
|
||||
|
||||
@@ -272,6 +273,7 @@ export default {
|
||||
return {
|
||||
loading: false,
|
||||
analyzing: false,
|
||||
syncing: false,
|
||||
resumeData: null,
|
||||
skillTags: [],
|
||||
workExperience: [],
|
||||
@@ -317,6 +319,32 @@ export default {
|
||||
}
|
||||
return field
|
||||
},
|
||||
async handleSyncOnline() {
|
||||
if (!this.resumeData || !this.resumeData.resumeId) {
|
||||
this.$Message.warning('简历ID不存在')
|
||||
return
|
||||
}
|
||||
|
||||
if (!this.resumeData.sn_code) {
|
||||
this.$Message.warning('该简历未绑定设备,无法同步在线简历')
|
||||
return
|
||||
}
|
||||
|
||||
this.syncing = true
|
||||
try {
|
||||
const res = await resumeInfoServer.syncOnline(this.resumeData.resumeId)
|
||||
this.$Message.success(res.message || '同步在线简历成功')
|
||||
// 重新加载数据
|
||||
await this.loadResumeData(this.resumeData.resumeId)
|
||||
} catch (error) {
|
||||
console.error('同步在线简历失败:', error)
|
||||
// 优先从 error.response.data.message 获取,然后是 error.message
|
||||
const errorMsg = error.response?.data?.message || error.message || '请稍后重试'
|
||||
this.$Message.error(errorMsg)
|
||||
} finally {
|
||||
this.syncing = false
|
||||
}
|
||||
},
|
||||
async handleAnalyzeAI() {
|
||||
if (!this.resumeData || !this.resumeData.resumeId) {
|
||||
this.$Message.warning('简历ID不存在')
|
||||
|
||||
Reference in New Issue
Block a user