fix(aihr): hide demo records during initial load
This commit is contained in:
@@ -179,7 +179,7 @@
|
||||
<el-icon><Tickets /></el-icon>
|
||||
<h2>面试记录</h2>
|
||||
</div>
|
||||
<el-table :data="records" size="small" class="record-table">
|
||||
<el-table v-loading="recordsLoading" :data="records" size="small" class="record-table">
|
||||
<el-table-column prop="time" label="时间" width="128" />
|
||||
<el-table-column prop="candidate" label="候选人" width="120" />
|
||||
<el-table-column prop="position" label="岗位" min-width="150" />
|
||||
@@ -481,7 +481,8 @@ const apiMode = ref<'idle' | 'api' | 'fallback'>('idle');
|
||||
const apiQuestions = ref<InterviewQuestion[]>([]);
|
||||
const apiScoreResult = ref<CandidateSeed['scoreResult'] | null>(null);
|
||||
const answers = reactive<Record<string, string>>({});
|
||||
const records = ref<InterviewRecord[]>([...baseRecords]);
|
||||
const records = ref<InterviewRecord[]>([]);
|
||||
const recordsLoading = ref(true);
|
||||
const recordsFallback = ref(false);
|
||||
const interviewReviewVisible = ref(false);
|
||||
const interviewReviewSaving = ref(false);
|
||||
@@ -680,6 +681,7 @@ const questionPillClass = (question: InterviewQuestion) => {
|
||||
};
|
||||
|
||||
const loadInterviewRecords = async () => {
|
||||
recordsLoading.value = true;
|
||||
try {
|
||||
const { data } = await listInterviewRecords(20);
|
||||
records.value = data ?? [];
|
||||
@@ -687,6 +689,8 @@ const loadInterviewRecords = async () => {
|
||||
} catch {
|
||||
records.value = [...baseRecords];
|
||||
recordsFallback.value = true;
|
||||
} finally {
|
||||
recordsLoading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user