Commit 1b8f3ddd authored by 李文光's avatar 李文光

fix: 修复删除岗位无效及岗位/简历指标不实时更新

parent 4d0c90f4
......@@ -85,12 +85,12 @@ const scopes = [
const departmentOptions = computed(() => [...new Set(jobs.value.map((job) => job.department).filter(Boolean))])
const statusOptions = ['全部状态', ...JOB_STATUS_OPTIONS]
const metrics = [
const metrics = computed(() => [
{ label: '招聘中岗位', value: activeJobs.value, hint: `${pendingJd.value} 个 JD 待处理`, color: 'var(--blue)' },
{ label: '招聘目标', value: totalHeadcount.value, hint: `已入职 ${totalHired.value}`, color: 'var(--green)' },
{ label: '候选人关联', value: linkedCandidates.value, hint: '关联到岗位的候选人', color: 'var(--cyan)' },
{ label: '高优先级', value: highPriority.value, hint: '需重点推进', color: 'var(--rose)' },
]
])
const jobActions = (job) => jobActionFor(job)
......@@ -162,7 +162,8 @@ const deleteJob = async (job) => {
} catch {
return
}
store.jobs = store.jobs.filter((item) => item.id !== job.id)
const index = store.jobs.findIndex((item) => item.id === job.id)
if (index !== -1) store.jobs.splice(index, 1)
store.candidates.forEach((candidate) => {
if (candidate.jobId === job.id) candidate.jobId = ''
})
......
......@@ -195,7 +195,7 @@ const importBatch = () => {
batch: true,
})
})
store.candidates = [...created, ...store.candidates]
store.candidates.unshift(...created)
store.reconcile()
store.candidateBatchOpen = false
store.candidateBatchEntries = []
......
......@@ -35,12 +35,12 @@ const needParseReview = computed(
() => store.candidates.filter((candidate) => candidate.parseWarning || !candidate.resumeText).length
)
const metrics = [
const metrics = computed(() => [
{ label: '简历总数', value: store.candidates.length, hint: '候选人主数据', color: 'var(--blue)' },
{ label: '高匹配', value: highMatch.value, hint: '匹配度 85 分以上', color: 'var(--green)' },
{ label: '待 AI 评估', value: pendingAnalysis.value, hint: '需生成决策报告', color: 'var(--violet)' },
{ label: '待补全', value: needParseReview.value, hint: '解析字段或正文缺失', color: 'var(--yellow)' },
]
])
const scoreTag = (score) => ({
text: score,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment