|
|
|
|
@ -37,7 +37,7 @@
|
|
|
|
|
type="button"
|
|
|
|
|
class="task-review__ai-score-btn"
|
|
|
|
|
title="点击查看AI评分详情"
|
|
|
|
|
@click.stop="openAiScorePopover(row, $event)"
|
|
|
|
|
@click.stop="openAiScorePopover(row)"
|
|
|
|
|
>
|
|
|
|
|
{{ formatScore(row.aiAssessmentScore) }}<span v-if="batchAiScoredIds.has(row.studentUserId)" class="task-review__ai-dot" title="AI评分完成"></span>
|
|
|
|
|
</button>
|
|
|
|
|
@ -280,15 +280,22 @@
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<transition name="ai-score-pop">
|
|
|
|
|
<div v-if="aiScoreDetailVisible" class="ai-score-popover" :style="{ top: aiScorePopoverPos.top + 'px', left: aiScorePopoverPos.left + 'px' }">
|
|
|
|
|
<div class="ai-score-popover__header">
|
|
|
|
|
<span class="ai-score-popover__title">{{ aiScoreDetailStudent ? aiScoreDetailStudent + " · AI评分结果" : "AI评分结果" }}</span>
|
|
|
|
|
<button type="button" class="ai-score-popover__close" @click="aiScoreDetailVisible = false">
|
|
|
|
|
<el-dialog v-model="aiScoreDetailVisible" width="560px" append-to-body :show-close="false" class="ai-score-detail-dialog">
|
|
|
|
|
<template #header>
|
|
|
|
|
<div class="dialog-header">
|
|
|
|
|
<div class="dialog-header-main">
|
|
|
|
|
<span class="dialog-badge">
|
|
|
|
|
<el-icon><TrendCharts /></el-icon>
|
|
|
|
|
AI评分结果
|
|
|
|
|
</span>
|
|
|
|
|
<h3 class="dialog-title">{{ aiScoreDetailStudent || "AI评分结果" }}</h3>
|
|
|
|
|
</div>
|
|
|
|
|
<button type="button" class="dialog-close" @click="aiScoreDetailVisible = false">
|
|
|
|
|
<el-icon><Close /></el-icon>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ai-score-detail">
|
|
|
|
|
</template>
|
|
|
|
|
<div class="ai-score-detail">
|
|
|
|
|
<!-- 综合评分 -->
|
|
|
|
|
<div class="ai-score-summary">
|
|
|
|
|
<div class="ai-score-summary__main">
|
|
|
|
|
@ -328,8 +335,7 @@
|
|
|
|
|
<!-- 无数据提示 -->
|
|
|
|
|
<el-empty v-if="!aiScoreDetailData.totalScore && aiScoreDetailData.dimensions.length === 0" description="暂无AI评分详情数据" :image-size="120" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</transition>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<el-dialog v-model="referenceAnswerDialogVisible" title="参考答案" width="900px" append-to-body class="reference-answer-dialog">
|
|
|
|
|
<iframe v-if="referenceAnswerSrc" :src="referenceAnswerSrc" class="reference-answer-frame" title="参考答案在线预览" />
|
|
|
|
|
@ -378,7 +384,6 @@ const PREVIEW_HEIGHT_MESSAGE = "teacher-task-review-preview-height";
|
|
|
|
|
// AI评分详情悬浮层:锚定在学生列表 AI评分 一栏,点击分数弹出该生评分结果
|
|
|
|
|
const aiScoreDetailVisible = ref(false);
|
|
|
|
|
const aiScoreDetailStudent = ref("");
|
|
|
|
|
const aiScorePopoverPos = ref({ top: 0, left: 0 });
|
|
|
|
|
const aiScoreDetailData = ref({
|
|
|
|
|
totalScore: null,
|
|
|
|
|
totalFullScore: 100,
|
|
|
|
|
@ -638,21 +643,12 @@ async function saveSingleScoreDialog() {
|
|
|
|
|
savingSingleScore.value = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// AI评分悬浮层:点击浮层与 AI评分 一栏以外区域时收起
|
|
|
|
|
function onDocMouseDownForAiScore(e) {
|
|
|
|
|
if (!aiScoreDetailVisible.value) return;
|
|
|
|
|
const target = e.target;
|
|
|
|
|
if (target.closest?.(".ai-score-popover") || target.closest?.(".task-review__ai-score-btn")) return;
|
|
|
|
|
aiScoreDetailVisible.value = false;
|
|
|
|
|
}
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
window.addEventListener("message", onPreviewMessage);
|
|
|
|
|
document.addEventListener("mousedown", onDocMouseDownForAiScore);
|
|
|
|
|
loadTeachingClasses();
|
|
|
|
|
});
|
|
|
|
|
onBeforeUnmount(() => {
|
|
|
|
|
window.removeEventListener("message", onPreviewMessage);
|
|
|
|
|
document.removeEventListener("mousedown", onDocMouseDownForAiScore);
|
|
|
|
|
clearTrainingReviewPreview(previewKey.value);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@ -763,14 +759,7 @@ async function onAiAssistEvaluation() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 点击学生列表 AI评分 一栏的分数:在分数旁悬浮展示该生的 AI 评分结果
|
|
|
|
|
async function openAiScorePopover(row, event) {
|
|
|
|
|
const rect = event.currentTarget.getBoundingClientRect();
|
|
|
|
|
const popWidth = 380;
|
|
|
|
|
const popHeight = Math.min(480, window.innerHeight - 40);
|
|
|
|
|
aiScorePopoverPos.value = {
|
|
|
|
|
top: Math.max(8, Math.min(rect.top - 8, window.innerHeight - popHeight - 8)),
|
|
|
|
|
left: Math.max(8, Math.min(rect.right + 10, window.innerWidth - popWidth - 12)),
|
|
|
|
|
};
|
|
|
|
|
async function openAiScorePopover(row) {
|
|
|
|
|
aiScoreDetailStudent.value = row.name || row.username || "";
|
|
|
|
|
aiScoreDetailVisible.value = true;
|
|
|
|
|
try {
|
|
|
|
|
@ -1374,60 +1363,22 @@ function applyAiDetail(data) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* ============================================================
|
|
|
|
|
* AI评分详情悬浮层 - 教育蓝极简风格(锚定在 AI评分 一栏,悬浮于页面)
|
|
|
|
|
* AI评分详情弹窗 - 居中弹窗展示,不受列表行数影响
|
|
|
|
|
* ============================================================ */
|
|
|
|
|
.ai-score-popover {
|
|
|
|
|
position: fixed;
|
|
|
|
|
z-index: 60;
|
|
|
|
|
width: 380px;
|
|
|
|
|
max-height: 480px;
|
|
|
|
|
padding: var(--sp-4);
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
border: 1px solid var(--border-color);
|
|
|
|
|
:deep(.ai-score-detail-dialog) {
|
|
|
|
|
border-radius: var(--r-card, 12px);
|
|
|
|
|
box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ai-score-popover__header {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
margin-bottom: var(--sp-3);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ai-score-popover__title {
|
|
|
|
|
color: var(--text-strong);
|
|
|
|
|
font-size: var(--fs-body, 14px);
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ai-score-popover__close {
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
padding: 4px;
|
|
|
|
|
color: var(--text-muted);
|
|
|
|
|
background: transparent;
|
|
|
|
|
border: 0;
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ai-score-popover__close:hover {
|
|
|
|
|
color: var(--text-strong);
|
|
|
|
|
background: var(--surface-muted, #f3f4f6);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ai-score-pop-enter-active,
|
|
|
|
|
.ai-score-pop-leave-active {
|
|
|
|
|
transition: opacity 0.18s ease, transform 0.18s ease;
|
|
|
|
|
}
|
|
|
|
|
.el-dialog__header {
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: var(--sp-4);
|
|
|
|
|
border-bottom: 1px solid var(--border-color);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ai-score-pop-enter-from,
|
|
|
|
|
.ai-score-pop-leave-to {
|
|
|
|
|
opacity: 0;
|
|
|
|
|
transform: translateY(-6px);
|
|
|
|
|
.el-dialog__body {
|
|
|
|
|
padding: var(--sp-5);
|
|
|
|
|
max-height: 62vh;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:deep(.reference-answer-dialog) {
|
|
|
|
|
|