提交 8be9d301 authored 作者: yujiejie's avatar yujiejie

821步骤三完成

上级 2147d675
......@@ -2664,6 +2664,43 @@ function submitMentorDeployReview() {
renderContent();
}
function getMentorDeployTaskStatusIcon(status) {
if (status === '已通过') return 'check';
if (status === '待验收') return 'clock';
if (status === '已驳回' || status === '待补充') return 'x';
if (status === '验收中') return 'loader';
return 'minus';
}
function buildMentorDeployTaskTabs(selectedId) {
var activeKey = getMentorDeployTaskKey(selectedId);
return Object.keys(MENTOR_DEPLOY_TASKS).map(function(key) {
var def = MENTOR_DEPLOY_TASKS[key];
var status = getMentorDeployStudentStatus(selectedId, key);
var isActive = key === activeKey;
var tabCls = isActive
? 'bg-[#165DFF] text-white border-[#165DFF] shadow-sm'
: 'bg-white text-[#4E5969] border-[#E5E6EB] hover:border-[#165DFF] hover:text-[#165DFF]';
return '<button type="button" class="flex items-center gap-2 px-5 py-2.5 rounded-lg border text-sm font-medium transition-all ' + tabCls + '" onclick="switchMentorDeployTask(\'' + key + '\')">' +
'<span class="font-semibold">' + def.tabName + '</span>' +
'<span class="text-xs ' + (isActive ? 'text-[#B3C8FF]' : 'text-[#86909C]') + '">' + def.shortName + '</span>' +
'<span class="flex items-center gap-1 px-2 py-0.5 rounded text-xs ' + getMentorDeployStatusBadge(status) + '">' +
'<svg class="w-3 h-3" data-lucide="' + getMentorDeployTaskStatusIcon(status) + '"></svg>' + status +
'</span>' +
'</button>';
}).join('');
}
function switchMentorDeployTask(taskKey) {
if (!MENTOR_DEPLOY_TASKS[taskKey]) return;
if (mentorDeployReviewState.activeTask === taskKey) return;
// 切换任务时清理图像任务轮询定时器(步骤 10 接入轮询后生效)
if (typeof stopMentorDeployGenPolling === 'function') stopMentorDeployGenPolling();
mentorDeployReviewState.activeTask = taskKey;
mentorDeployReviewState.contentTab = 'artifact';
renderContent();
}
pageRenderers["mentor-deploy-review"] = function() {
var students = mentorState.students || [];
var selectedId = Number(mentorState.deployReviewStudentId || (students[0] && students[0].id));
......@@ -2702,6 +2739,7 @@ pageRenderers["mentor-deploy-review"] = function() {
'<span class="px-3 py-1.5 rounded-lg text-sm font-medium ' + statusClass + '">' + status + '</span>' +
'</div>' +
'</div>' +
'<div class="flex items-center gap-3 mb-6">' + buildMentorDeployTaskTabs(selectedId) + '</div>' +
'<div class="grid grid-cols-12 gap-6">' +
'<div class="col-span-3 bg-white rounded-lg border border-[#E5E6EB] p-4 self-start">' +
'<div class="flex items-center justify-between mb-3"><h3 class="font-semibold text-[#1D2129]">我的学生</h3><span class="text-xs px-2 py-0.5 rounded bg-[#F2F3F5] text-[#86909C]">' + students.length + ' 人</span></div>' +
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论