fix(aihr): clarify review and SOP data provenance
This commit is contained in:
@@ -22,9 +22,18 @@
|
||||
</el-select>
|
||||
</section>
|
||||
|
||||
<el-alert
|
||||
v-if="reviewsFallback || metricsFallback"
|
||||
class="data-warning"
|
||||
type="warning"
|
||||
:closable="false"
|
||||
show-icon
|
||||
title="部分真实数据接口暂不可用;当前页面不展示演示复盘记录或猜测性试点指标。"
|
||||
/>
|
||||
|
||||
<section class="metric-grid">
|
||||
<div class="metric-card">
|
||||
<span>校准样本</span><strong>{{ metrics.calibrationCount }} / 20</strong>
|
||||
<span>校准样本</span><strong>{{ calibrationMetric }}</strong>
|
||||
</div>
|
||||
<div class="metric-card">
|
||||
<span>分档一致率</span><strong>{{ metrics.consistency }}</strong>
|
||||
@@ -169,9 +178,11 @@ const selectedProjectCode = ref('');
|
||||
const selectedExtPartyId = ref('');
|
||||
const selectedPosition = ref('生活顾问');
|
||||
const exporting = ref(false);
|
||||
const reviewsFallback = ref(false);
|
||||
const metricsFallback = ref(false);
|
||||
const startDate = ref('2026-07-01');
|
||||
const endDate = ref('2026-07-31');
|
||||
const metrics = reactive({ calibrationCount: 0, consistency: '--', sopUsable: '--', ready: false });
|
||||
const metrics = reactive({ calibrationCount: null as number | null, consistency: '--', sopUsable: '--', ready: false });
|
||||
const audioSources = ref<Record<string, string>>({});
|
||||
const audioLoading = ref<Record<string, boolean>>({});
|
||||
const audioErrors = ref<Record<string, string>>({});
|
||||
@@ -189,6 +200,7 @@ const reviewForm = reactive({
|
||||
|
||||
const orgPeople = computed(() => orgSnapshot.value?.rows || []);
|
||||
const visibleReviews = computed(() => reviews.value);
|
||||
const calibrationMetric = computed(() => (metrics.calibrationCount === null ? '--' : `${metrics.calibrationCount} / 20`));
|
||||
type ReviewDialogueTurn = ReviewDetail['dialogue'][number];
|
||||
|
||||
const audioKey = (index: number) => `${detail.value?.id || 'review'}-${index}`;
|
||||
@@ -251,8 +263,13 @@ const loadReviews = async () => {
|
||||
limit: 50
|
||||
});
|
||||
reviews.value = result.data || [];
|
||||
reviewsFallback.value = false;
|
||||
await selectFirstVisibleReview();
|
||||
} catch (error) {
|
||||
reviews.value = [];
|
||||
detail.value = null;
|
||||
releaseAudioSources();
|
||||
reviewsFallback.value = true;
|
||||
ElMessage.error('待复盘列表加载失败');
|
||||
} finally {
|
||||
loading.value = false;
|
||||
@@ -262,10 +279,11 @@ const loadReviews = async () => {
|
||||
const loadMetrics = async () => {
|
||||
const dateWindow = pilotDateWindow.value;
|
||||
if (!dateWindow) {
|
||||
metrics.calibrationCount = 0;
|
||||
metrics.calibrationCount = null;
|
||||
metrics.consistency = '--';
|
||||
metrics.sopUsable = '--';
|
||||
metrics.ready = false;
|
||||
metricsFallback.value = false;
|
||||
return;
|
||||
}
|
||||
try {
|
||||
@@ -276,11 +294,13 @@ const loadMetrics = async () => {
|
||||
metrics.consistency = value('ai_human_band_consistency_rate') || '--';
|
||||
metrics.sopUsable = value('sop_answer_usable_rate') || '--';
|
||||
metrics.ready = value('pilot_metric_ready') === 'true';
|
||||
metricsFallback.value = false;
|
||||
} catch {
|
||||
metrics.calibrationCount = reviews.value.length;
|
||||
metrics.calibrationCount = null;
|
||||
metrics.consistency = '--';
|
||||
metrics.sopUsable = '--';
|
||||
metrics.ready = false;
|
||||
metricsFallback.value = true;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user