fix(aihr): hide demo records during initial load
This commit is contained in:
@@ -118,7 +118,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="title" label="标题" min-width="180" />
|
||||
<el-table-column prop="type" label="类型" width="120" />
|
||||
<el-table-column prop="status" label="状态" width="120" />
|
||||
@@ -188,7 +188,7 @@ const apiSummary = ref<CaseSummaryItem[]>([]);
|
||||
const apiTags = ref<CaseTag[]>([]);
|
||||
const apiRecord = ref<CaseRecord | null>(null);
|
||||
const apiSampleHint = ref('');
|
||||
const recordsLoading = ref(false);
|
||||
const recordsLoading = ref(true);
|
||||
const recordsFallback = ref(false);
|
||||
const detailVisible = ref(false);
|
||||
const caseDetail = ref<CaseDetailResponse | null>(null);
|
||||
@@ -279,7 +279,7 @@ const baseRecords = [
|
||||
}
|
||||
];
|
||||
|
||||
const records = ref([...baseRecords]);
|
||||
const records = ref<CaseRecord[]>([]);
|
||||
|
||||
async function loadCaseRecords() {
|
||||
recordsLoading.value = true;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -199,7 +199,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="trainee" label="学员" width="120" />
|
||||
<el-table-column prop="scene" label="场景" min-width="150" />
|
||||
@@ -485,8 +485,9 @@ const sopHelp = ref<SopSearchResponse | null>(null);
|
||||
const sopHelpLoading = ref(false);
|
||||
const sopHelpMessage = ref('');
|
||||
const conversation = ref<ChatTurn[]>([]);
|
||||
const records = ref([...baseRecords]);
|
||||
const recordsFallback = ref(true);
|
||||
const records = ref<Array<(typeof baseRecords)[number]>>([]);
|
||||
const recordsLoading = ref(true);
|
||||
const recordsFallback = ref(false);
|
||||
const promptTemplates = ref<PromptTemplateResponse[]>([]);
|
||||
const promptLoading = ref(false);
|
||||
const promptSaving = ref(false);
|
||||
@@ -655,6 +656,7 @@ const loadScenarioOptions = async () => {
|
||||
};
|
||||
|
||||
const loadRecentRecords = async () => {
|
||||
recordsLoading.value = true;
|
||||
try {
|
||||
const { data } = await listPracticeReviews({ limit: 10 });
|
||||
records.value = (data || []).map((item) => ({
|
||||
@@ -669,6 +671,8 @@ const loadRecentRecords = async () => {
|
||||
} catch {
|
||||
records.value = [...baseRecords];
|
||||
recordsFallback.value = true;
|
||||
} finally {
|
||||
recordsLoading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user