Commit 0e40e7ce authored by 李文光's avatar 李文光

fix(resumes): 修复批量上传简历状态不刷新导致确认入库按钮置灰

entry 以普通对象 push 进响应式数组后直接改 status,绕过 Vue 代理
set 陷阱,界面停留在解析中且 canImport 不重算。改为 reactive() 包裹
后所有字段变更正常触发更新。
parent 3485580a
<script setup> <script setup>
import { computed, ref } from 'vue' import { computed, reactive, ref } from 'vue'
import { useRecruitmentStore } from '@/stores/recruitment' import { useRecruitmentStore } from '@/stores/recruitment'
import { uid } from '@/utils/normalize' import { uid } from '@/utils/normalize'
...@@ -62,7 +62,7 @@ const setBatchSource = (source) => { ...@@ -62,7 +62,7 @@ const setBatchSource = (source) => {
const handleFiles = async (uploadFile) => { const handleFiles = async (uploadFile) => {
const file = uploadFile.raw const file = uploadFile.raw
if (!file || !store.candidateBatchOpen) return if (!file || !store.candidateBatchOpen) return
const entry = { const entry = reactive({
id: uid('batch-resume'), id: uid('batch-resume'),
file, file,
status: 'parsing', status: 'parsing',
...@@ -75,7 +75,7 @@ const handleFiles = async (uploadFile) => { ...@@ -75,7 +75,7 @@ const handleFiles = async (uploadFile) => {
parseWarning: '', parseWarning: '',
resumeFileDataUrl: '', resumeFileDataUrl: '',
resumeFilePreviewWarning: '', resumeFilePreviewWarning: '',
} })
store.candidateBatchEntries.push(entry) store.candidateBatchEntries.push(entry)
store.candidateBatchParsing = true store.candidateBatchParsing = true
parsing.value = true parsing.value = true
......
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