提交 85dd0574 authored 作者: yujiejie's avatar yujiejie

导师端日志包已修改

上级 bdbe6b7c
......@@ -1508,8 +1508,15 @@ function buildMentorDeploySubmissionPanel(sub) {
'<div class="p-3 rounded-lg bg-[#F7F8FA]"><div class="text-xs text-[#86909C]">API Key</div><div class="text-sm font-medium mt-1">' + maskMentorDeployApiKey(a.apiKey) + '</div></div>' +
'</div></div>';
var logHtml = '<div class="bg-white rounded-lg border border-[#E5E6EB] p-5 mb-4">' +
'<div class="flex items-center justify-between mb-3"><h3 class="font-semibold text-[#1D2129]">实操日志</h3><span class="text-xs text-[#86909C]">' + mentorDeployReviewEsc(lg.fileName || a.fileName || '未提交') + '</span></div>' +
'<pre class="bg-[#1D2129] text-emerald-300 rounded-lg p-4 text-xs overflow-auto max-h-52 leading-relaxed">' + mentorDeployReviewEsc(lg.content || '暂无日志内容') + '</pre></div>';
'<div class="flex items-center justify-between mb-3"><h3 class="font-semibold text-[#1D2129]">实操日志</h3><span class="text-xs px-2 py-1 rounded bg-[#F2F3F5] text-[#86909C]">附件</span></div>' +
'<div class="flex items-center justify-between p-4 rounded-lg bg-[#F7F8FA] border border-[#E5E6EB]">' +
'<div class="flex items-center gap-3 min-w-0">' +
'<div class="w-10 h-10 rounded-lg bg-[#E8F3FF] flex items-center justify-center flex-shrink-0"><svg class="w-5 h-5 text-[#165DFF]" data-lucide="file-archive"></svg></div>' +
'<div class="min-w-0"><div class="text-sm font-medium text-[#1D2129] truncate">' + mentorDeployReviewEsc(lg.fileName || a.fileName || '未提交') + '</div>' +
'<div class="text-xs text-[#86909C]">' + (lg.content ? '点击查看日志内容' : '暂无日志内容') + '</div></div>' +
'</div>' +
(lg.content ? '<button class="btn-outline text-xs py-1.5 px-3 flex-shrink-0" onclick="viewMentorDeployLogModal(\'' + encodeURIComponent(lg.fileName || 'log') + '\',\'' + encodeURIComponent(lg.content) + '\')">查看</button>' : '') +
'</div></div>';
var reportHtml = '<div class="bg-white rounded-lg border border-[#E5E6EB] p-5">' +
'<div class="flex items-center justify-between mb-3"><h3 class="font-semibold text-[#1D2129]">实操报告</h3><span class="text-xs px-2 py-1 rounded bg-[#F2F3F5] text-[#86909C]">只读</span></div>' +
'<div class="space-y-3 text-sm">' +
......@@ -1522,6 +1529,31 @@ function buildMentorDeploySubmissionPanel(sub) {
return artifactHtml + logHtml + reportHtml;
}
function viewMentorDeployLogModal(nameEncoded, contentEncoded) {
closeStudentFlowModal();
var name = decodeURIComponent(nameEncoded || 'log');
var content = decodeURIComponent(contentEncoded || '');
var wrap = document.createElement('div');
wrap.id = 'studentFlowModal';
wrap.className = 'fixed inset-0 z-50';
wrap.innerHTML =
'<div class="absolute inset-0 bg-black/50" onclick="closeStudentFlowModal()"></div>' +
'<div class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-full max-w-2xl">' +
'<div class="bg-white rounded-lg border border-[#E5E6EB] shadow-sm overflow-hidden">' +
'<div class="flex items-center justify-between px-6 py-4 border-b border-[#E5E6EB]">' +
'<div class="flex items-center gap-2 min-w-0">' +
'<svg class="w-5 h-5 text-[#165DFF] flex-shrink-0" data-lucide="file-text"></svg>' +
'<h3 class="font-bold text-[#1D2129] truncate">实操日志 - ' + mentorDeployReviewEsc(name) + '</h3>' +
'</div>' +
'<button class="text-[#86909C] hover:text-[#1D2129] flex-shrink-0" onclick="closeStudentFlowModal()"><svg class="w-5 h-5" data-lucide="x"></svg></button>' +
'</div>' +
'<pre class="bg-[#1D2129] text-emerald-300 p-5 text-xs leading-relaxed overflow-auto max-h-[60vh] whitespace-pre-wrap break-words">' + mentorDeployReviewEsc(content || '暂无日志内容') + '</pre>' +
'</div>' +
'</div>';
document.body.appendChild(wrap);
if (window.lucide) lucide.createIcons();
}
function buildMentorDeployCompletenessNotice(sub) {
if (!sub) return '';
var missing = [];
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论