Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
studyweb_Prototype
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
yujiejie
studyweb_Prototype
Commits
bef3cabc
提交
bef3cabc
authored
8月 20, 2026
作者:
yujiejie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
验收评分卡
上级
cdc562e6
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
92 行增加
和
2 行删除
+92
-2
pages-mentor.js
pages-mentor.js
+92
-2
没有找到文件。
pages-mentor.js
浏览文件 @
bef3cabc
...
...
@@ -1525,7 +1525,8 @@ function buildMentorDeployCompletenessNotice(sub) {
// ===== 导师部署验收台:验收参数与测试状态(按学生索引,临时值不改学生原始提交) =====
var
mentorDeployReviewState
=
{
params
:
{},
tests
:
{}
tests
:
{},
scores
:
{}
};
function
getMentorDeployReviewParams
(
studentId
)
{
...
...
@@ -2065,6 +2066,95 @@ function buildMentorDeployImageGenItems(sid) {
'</div>'
;
}
// ===== 导师部署验收台:验收评分(5 项评分,总分最高 100 分,按学生索引) =====
var
MENTOR_DEPLOY_SCORE_ITEMS
=
[
{
key
:
'api'
,
label
:
'API 可用性'
,
max
:
40
},
{
key
:
'deployment'
,
label
:
'部署规范性'
,
max
:
20
},
{
key
:
'logs'
,
label
:
'实操日志完整度'
,
max
:
15
},
{
key
:
'report'
,
label
:
'实操报告质量'
,
max
:
15
},
{
key
:
'reflection'
,
label
:
'问题排查与总结'
,
max
:
10
}
];
function
getMentorDeployScoreItem
(
key
)
{
for
(
var
i
=
0
;
i
<
MENTOR_DEPLOY_SCORE_ITEMS
.
length
;
i
++
)
{
if
(
MENTOR_DEPLOY_SCORE_ITEMS
[
i
].
key
===
key
)
return
MENTOR_DEPLOY_SCORE_ITEMS
[
i
];
}
return
null
;
}
function
getMentorDeployReviewScores
(
studentId
)
{
var
sid
=
Number
(
studentId
);
var
sub
=
getMentorDeploySubmission
(
sid
);
var
reviewScore
=
(
sub
&&
sub
.
review
&&
sub
.
review
.
score
)
||
{};
var
saved
=
mentorDeployReviewState
.
scores
[
sid
]
||
{};
var
scores
=
{};
var
total
=
0
;
MENTOR_DEPLOY_SCORE_ITEMS
.
forEach
(
function
(
item
)
{
var
raw
=
saved
[
item
.
key
]
!=
null
?
saved
[
item
.
key
]
:
reviewScore
[
item
.
key
];
var
v
=
0
;
if
(
raw
!=
null
)
{
v
=
parseInt
(
raw
,
10
);
if
(
isNaN
(
v
))
v
=
0
;
v
=
Math
.
max
(
0
,
Math
.
min
(
item
.
max
,
v
));
}
scores
[
item
.
key
]
=
v
;
total
+=
v
;
});
scores
.
total
=
total
;
return
scores
;
}
function
setMentorDeployReviewScore
(
field
,
value
)
{
var
sid
=
Number
(
mentorState
.
deployReviewStudentId
);
if
(
!
mentorDeployReviewState
.
scores
[
sid
])
mentorDeployReviewState
.
scores
[
sid
]
=
{};
var
item
=
getMentorDeployScoreItem
(
field
);
if
(
!
item
)
return
;
var
num
=
parseInt
(
value
,
10
);
if
(
isNaN
(
num
))
num
=
0
;
mentorDeployReviewState
.
scores
[
sid
][
field
]
=
Math
.
max
(
0
,
Math
.
min
(
item
.
max
,
num
));
updateMentorDeployScoreTotal
();
}
function
normalizeMentorDeployScoreInput
(
field
)
{
var
sid
=
Number
(
mentorState
.
deployReviewStudentId
);
var
s
=
getMentorDeployReviewScores
(
sid
);
var
input
=
document
.
getElementById
(
'mentorDeployScore_'
+
field
);
if
(
input
&&
String
(
input
.
value
)
!==
String
(
s
[
field
]))
input
.
value
=
s
[
field
];
}
function
updateMentorDeployScoreTotal
()
{
var
sid
=
Number
(
mentorState
.
deployReviewStudentId
);
var
s
=
getMentorDeployReviewScores
(
sid
);
var
el
=
document
.
getElementById
(
'mentorDeployScoreTotal'
);
if
(
el
)
el
.
textContent
=
s
.
total
;
}
function
buildMentorDeployScoreCard
(
sid
)
{
var
s
=
getMentorDeployReviewScores
(
sid
);
var
rows
=
MENTOR_DEPLOY_SCORE_ITEMS
.
map
(
function
(
item
)
{
return
'<div class="flex items-center justify-between py-2">'
+
'<span class="text-sm text-[#4E5969]">'
+
item
.
label
+
'</span>'
+
'<div class="flex items-center gap-1.5">'
+
'<input id="mentorDeployScore_'
+
item
.
key
+
'" type="number" min="0" max="'
+
item
.
max
+
'" class="w-16 input-field text-sm text-center font-mono" value="'
+
s
[
item
.
key
]
+
'" oninput="setMentorDeployReviewScore(
\'
'
+
item
.
key
+
'
\'
, this.value)" onblur="normalizeMentorDeployScoreInput(
\'
'
+
item
.
key
+
'
\'
)">'
+
'<span class="text-xs text-[#86909C]">/ '
+
item
.
max
+
' 分</span>'
+
'</div>'
+
'</div>'
;
}).
join
(
''
);
return
'<div class="bg-white rounded-lg border border-[#E5E6EB] p-4 mb-4">'
+
'<div class="flex items-center justify-between mb-1"><h3 class="font-semibold text-[#1D2129]">验收评分</h3><span class="text-xs px-2 py-1 rounded bg-[#E8F3FF] text-[#165DFF]">'
+
s
.
total
+
'/100 分</span></div>'
+
'<p class="text-xs text-[#86909C] mb-1">按五项维度给分,总分自动计算,最高 100 分。</p>'
+
'<div class="divide-y divide-[#F2F3F5]">'
+
rows
+
'</div>'
+
'<div class="flex items-center justify-between mt-2 pt-3 border-t border-[#E5E6EB]">'
+
'<span class="text-sm font-medium text-[#1D2129]">总分</span>'
+
'<div class="flex items-baseline gap-1">'
+
'<span id="mentorDeployScoreTotal" class="text-xl font-bold '
+
(
s
.
total
>=
100
?
'text-emerald-600'
:
'text-[#165DFF]'
)
+
'">'
+
s
.
total
+
'</span>'
+
'<span class="text-sm text-[#86909C]">/ 100 分</span>'
+
'</div>'
+
'</div>'
+
'</div>'
;
}
function
buildMentorDeployConclusionPanel
()
{
return
'<div class="bg-white rounded-lg border border-[#E5E6EB] p-4">'
+
'<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>'
+
...
...
@@ -2078,7 +2168,7 @@ function buildMentorDeployReviewPanel(student) {
var
sub
=
getMentorDeploySubmission
(
sid
);
var
taskType
=
(
sub
&&
sub
.
taskType
===
'image-gen'
)
?
'image-gen'
:
'text-model'
;
var
itemsHtml
=
taskType
===
'image-gen'
?
buildMentorDeployImageGenItems
(
sid
)
:
buildMentorDeployTextModelItems
(
sid
);
return
buildMentorDeployParamsPanel
(
sid
)
+
itemsHtml
+
buildMentorDeployConclusionPanel
();
return
buildMentorDeployParamsPanel
(
sid
)
+
itemsHtml
+
buildMentorDeploy
ScoreCard
(
sid
)
+
buildMentorDeploy
ConclusionPanel
();
}
function
reviewDeployArtifact
(
passed
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论