Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
studyweb_Prototype
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
yujiejie
studyweb_Prototype
Commits
7c6cd020
提交
7c6cd020
authored
8月 21, 2026
作者:
yujiejie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
学生端驳回通知链接一半没有完善
上级
716fbe6c
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
303 行增加
和
37 行删除
+303
-37
index.html
index.html
+20
-3
pages-mentor.js
pages-mentor.js
+138
-22
pages-student.js
pages-student.js
+145
-12
没有找到文件。
index.html
浏览文件 @
7c6cd020
...
...
@@ -306,8 +306,17 @@
<div
id=
"studentLayout"
class=
"flex flex-col h-screen"
style=
"display:none"
>
<div
class=
"student-header"
>
<div
class=
"flex items-center gap-3"
><div
class=
"w-8 h-8 rounded-lg bg-gradient-to-br from-indigo-500 to-violet-600 flex items-center justify-center text-white text-xs font-bold"
>
T
</div><span
class=
"font-bold text-sm"
>
实习生训练平台
</span></div>
<div
class=
"relative"
id=
"stuAvatarMenu"
><div
class=
"w-8 h-8 rounded-full bg-indigo-100 text-indigo-600 flex items-center justify-center font-bold text-sm cursor-pointer"
onclick=
"toggleMenu('stuAvatarMenu')"
>
张
</div>
<div
class=
"avatar-menu"
><a
onclick=
"switchPage('profile')"
>
个人中心
</a><div
class=
"divider"
></div><a
onclick=
"doLogout()"
style=
"color:#EF4444"
>
退出登录
</a></div></div>
<div
class=
"flex items-center gap-4"
>
<div
class=
"relative"
id=
"stuNtfMenu"
>
<button
class=
"relative p-1.5 rounded-lg hover:bg-black/5 transition-colors"
onclick=
"toggleStudentNotifications()"
>
<svg
class=
"w-5 h-5 text-gray-500"
data-lucide=
"bell"
></svg>
<span
id=
"stuNtfBadge"
class=
"absolute -top-0.5 -right-0.5 w-4 h-4 bg-red-500 text-white text-[9px] rounded-full items-center justify-center font-medium hidden"
>
0
</span>
</button>
<div
class=
"notif-menu"
id=
"stuNtfList"
onclick=
"event.stopPropagation()"
></div>
</div>
<div
class=
"relative"
id=
"stuAvatarMenu"
><div
class=
"w-8 h-8 rounded-full bg-indigo-100 text-indigo-600 flex items-center justify-center font-bold text-sm cursor-pointer"
onclick=
"toggleMenu('stuAvatarMenu')"
>
张
</div>
<div
class=
"avatar-menu"
><a
onclick=
"switchPage('profile')"
>
个人中心
</a><div
class=
"divider"
></div><a
onclick=
"doLogout()"
style=
"color:#EF4444"
>
退出登录
</a></div></div>
</div>
</div>
<div
class=
"flex-1 overflow-y-auto p-6"
id=
"studentContent"
></div>
</div>
...
...
@@ -342,6 +351,8 @@ function renderContent() {
}
// Re-initialize Lucide icons for new content
if
(
window
.
lucide
)
lucide
.
createIcons
();
// 更新学生通知铃铛角标
if
(
typeof
updateStudentNotificationBadge
===
'function'
)
updateStudentNotificationBadge
();
// 初始化雷达图
setTimeout
(
initRadarChart
,
150
);
}
...
...
@@ -501,13 +512,19 @@ var studentState = {
deployPassed
:
false
,
deployReviewStatus
:
'待提交'
,
deployReviewComment
:
''
,
deployReviewScore
:
null
,
// { api, deployment, logs, report, reflection, total }
deployReviewUpdatedAt
:
''
,
// 导师验收提交时间
deployReviewRound
:
1
,
// 导师验收轮次
deployReviewNotifiedAt
:
''
,
// 导师验收通知时间
deployReviewRound
:
1
,
// 当前验收轮次
deployReviewNotifiedAt
:
''
,
// 导师验收通知时间
deployLogName
:
''
,
deployLogContent
:
''
,
deployApiUrl
:
''
,
deployApiPath
:
''
,
deployApiPort
:
''
,
deployRejected
:
false
,
deployReviewComment
:
''
,
notifications
:
[],
// 通知列表(含部署验收通知),未读展示在学生端首页
deployArtifact
:
{
fileName
:
''
,
apiUrl
:
''
,
apiPath
:
''
,
port
:
''
,
modelName
:
''
,
apiKey
:
''
},
deployArtifactSaved
:
false
,
deployArtifactSubmitted
:
false
,
...
...
pages-mentor.js
浏览文件 @
7c6cd020
...
...
@@ -137,9 +137,11 @@ var mentorState = {
summary
:
'部署失败,需要排查显存配置并重新部署。'
},
review
:
{
round
:
1
,
status
:
'已驳回'
,
comment
:
'服务未能成功启动,日志显示 CUDA 显存不足导致模型加载中断。请检查实例配置,调整 gpu-memory-utilization 参数或更换更高显存实例后重新部署并提交。'
,
reviewedAt
:
'2026-07-20 17:40'
reviewedAt
:
'2026-07-20 17:40'
,
notifiedAt
:
'2026-07-20 17:40'
}
},
3
:
{
...
...
@@ -1429,6 +1431,11 @@ function getMentorDeployStudentStatus(studentId) {
return
'未提交'
;
}
function
isMentorDeployReviewLocked
(
studentId
)
{
var
sub
=
getMentorDeploySubmission
(
studentId
);
return
!!
(
sub
&&
sub
.
review
&&
sub
.
review
.
status
);
}
function
getMentorDeployStatusBadge
(
status
)
{
var
map
=
{
'已通过'
:
'bg-emerald-100 text-emerald-700'
,
...
...
@@ -1958,19 +1965,22 @@ function buildMentorDeployTestSummary(tests, keys) {
}
function
buildMentorDeployParamsPanel
(
sid
)
{
var
locked
=
isMentorDeployReviewLocked
(
sid
);
var
p
=
getMentorDeployReviewParams
(
sid
);
var
disabled
=
locked
?
' disabled'
:
''
;
var
readonlyClass
=
locked
?
' bg-[#F7F8FA] text-[#86909C] cursor-not-allowed'
:
''
;
return
'<div class="bg-white rounded-lg border border-[#E5E6EB] p-4 mb-4">'
+
'<div class="flex items-center justify-between mb-2"><h3 class="font-semibold text-[#1D2129]">验收参数</h3>
<span class="text-xs px-2 py-1 rounded bg-[#E8F3FF] text-[#165DFF]">临时调整</span>
</div>'
+
'<div class="flex items-center justify-between mb-2"><h3 class="font-semibold text-[#1D2129]">验收参数</h3>
'
+
(
locked
?
'<span class="text-xs px-2 py-1 rounded bg-rose-100 text-rose-700">提交后只读</span>'
:
'<span class="text-xs px-2 py-1 rounded bg-[#E8F3FF] text-[#165DFF]">临时调整</span>'
)
+
'
</div>'
+
'<p class="text-xs text-[#86909C] mb-3">已带入学生提交值,以下调整仅用于本次验收,不会修改学生原始提交内容。</p>'
+
'<div class="space-y-2.5">'
+
'<div><label class="text-xs font-medium text-[#4E5969] block mb-1">API 地址</label><input class="input-field text-sm font-mono
" value="'
+
mentorDeployReviewEsc
(
p
.
apiUrl
)
+
'" placeholder="http://IP:端口" oninput="setMentorDeployReviewParam(
\'
apiUrl
\'
, this.value)"
></div>'
+
'<div><label class="text-xs font-medium text-[#4E5969] block mb-1">API Key</label><input class="input-field text-sm font-mono
" type="password" value="'
+
mentorDeployReviewEsc
(
p
.
apiKey
)
+
'" placeholder="sk-..." oninput="setMentorDeployReviewParam(
\'
apiKey
\'
, this.value)"
></div>'
+
'<div><label class="text-xs font-medium text-[#4E5969] block mb-1">API 地址</label><input class="input-field text-sm font-mono
'
+
readonlyClass
+
'" value="'
+
mentorDeployReviewEsc
(
p
.
apiUrl
)
+
'" placeholder="http://IP:端口"'
+
disabled
+
'
></div>'
+
'<div><label class="text-xs font-medium text-[#4E5969] block mb-1">API Key</label><input class="input-field text-sm font-mono
'
+
readonlyClass
+
'" type="password" value="'
+
mentorDeployReviewEsc
(
p
.
apiKey
)
+
'" placeholder="sk-..."'
+
disabled
+
'
></div>'
+
'<div class="grid grid-cols-2 gap-2">'
+
'<div><label class="text-xs font-medium text-[#4E5969] block mb-1">模型名称</label><input class="input-field text-sm font-mono
" value="'
+
mentorDeployReviewEsc
(
p
.
modelName
)
+
'" oninput="setMentorDeployReviewParam(
\'
modelName
\'
, this.value)"
></div>'
+
'<div><label class="text-xs font-medium text-[#4E5969] block mb-1">请求路径</label><input class="input-field text-sm font-mono
" value="'
+
mentorDeployReviewEsc
(
p
.
apiPath
)
+
'" oninput="setMentorDeployReviewParam(
\'
apiPath
\'
, this.value)"
></div>'
+
'<div><label class="text-xs font-medium text-[#4E5969] block mb-1">模型名称</label><input class="input-field text-sm font-mono
'
+
readonlyClass
+
'" value="'
+
mentorDeployReviewEsc
(
p
.
modelName
)
+
'"'
+
disabled
+
'
></div>'
+
'<div><label class="text-xs font-medium text-[#4E5969] block mb-1">请求路径</label><input class="input-field text-sm font-mono
'
+
readonlyClass
+
'" value="'
+
mentorDeployReviewEsc
(
p
.
apiPath
)
+
'"'
+
disabled
+
'
></div>'
+
'</div>'
+
'</div>'
+
'<button class="btn-outline w-full mt-3 py-2 text-sm" onclick="restoreMentorDeployReviewParams()">恢复学生提交值</button>'
+
(
locked
?
''
:
'<button class="btn-outline w-full mt-3 py-2 text-sm" onclick="restoreMentorDeployReviewParams()">恢复学生提交值</button>'
)
+
'</div>'
;
}
...
...
@@ -2132,26 +2142,24 @@ function updateMentorDeployScoreTotal() {
}
function
buildMentorDeployScoreCard
(
sid
)
{
var
locked
=
isMentorDeployReviewLocked
(
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
+
'
\'
)"
>'
+
'<input id="mentorDeployScore_'
+
item
.
key
+
'" type="number" min="0" max="'
+
item
.
max
+
'" class="w-16 input-field text-sm text-center font-mono
'
+
(
locked
?
' bg-[#F7F8FA] text-[#86909C] cursor-not-allowed'
:
''
)
+
'" value="'
+
s
[
item
.
key
]
+
'"'
+
(
locked
?
' disabled'
:
' 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="flex items-center justify-between mb-1"><h3 class="font-semibold text-[#1D2129]">验收评分</h3><span class="text-xs px-2 py-1 rounded
'
+
(
locked
?
'bg-[#F2F3F5] text-[#86909C]'
:
'bg-[#E8F3FF] text-[#165DFF]'
)
+
'
">'
+
s
.
total
+
'/100 分</span></div>'
+
'<p class="text-xs text-[#86909C] mb-1">
'
+
(
locked
?
'本轮验收已提交,评分只读。'
:
'按五项维度给分,总分自动计算,最高 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 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>'
;
}
...
...
@@ -2189,13 +2197,80 @@ function buildMentorDeployConclusionPanel(sid) {
'</div>'
;
}
function
buildMentorDeployLockedReviewPanel
(
sid
)
{
var
sub
=
getMentorDeploySubmission
(
sid
)
||
{};
var
review
=
sub
.
review
||
{};
var
score
=
getMentorDeployReviewScores
(
sid
);
var
round
=
review
.
round
||
1
;
var
tests
=
review
.
tests
||
{};
var
taskType
=
sub
.
taskType
||
'text-model'
;
var
testSummaryHtml
=
buildMentorDeployReviewTestsSummary
(
tests
,
taskType
);
return
'<div class="bg-white rounded-lg border border-[#E5E6EB] p-4 mb-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]">第 '
+
round
+
' 轮 · 只读</span>'
+
'</div>'
+
'<div class="rounded-lg bg-[#F7F8FA] p-4 mb-3">'
+
'<div class="flex items-center justify-between"><div class="text-xs text-[#86909C]">验收状态</div><span class="text-sm font-medium px-2.5 py-1 rounded '
+
getMentorDeployStatusBadge
(
review
.
status
||
'待验收'
)
+
'">'
+
mentorDeployReviewEsc
(
review
.
status
||
'待验收'
)
+
'</span></div>'
+
'<div class="grid grid-cols-2 gap-2 mt-3 text-xs">'
+
'<div class="text-[#86909C]">提交时间:<span class="text-[#4E5969]">'
+
mentorDeployReviewEsc
(
review
.
reviewedAt
||
'—'
)
+
'</span></div>'
+
'<div class="text-[#86909C]">通知时间:<span class="text-[#4E5969]">'
+
mentorDeployReviewEsc
(
review
.
notifiedAt
||
'—'
)
+
'</span></div>'
+
'</div>'
+
'</div>'
+
'<div class="mb-3">'
+
'<div class="text-xs text-[#86909C] mb-2">API 测试摘要</div>'
+
testSummaryHtml
+
'</div>'
+
'<div class="grid grid-cols-2 gap-2 text-sm">'
+
MENTOR_DEPLOY_SCORE_ITEMS
.
map
(
function
(
item
)
{
return
'<div class="p-2 rounded bg-[#F7F8FA] flex justify-between"><span class="text-[#86909C]">'
+
item
.
label
+
'</span><b class="text-[#1D2129]">'
+
score
[
item
.
key
]
+
'/'
+
item
.
max
+
'</b></div>'
;
}).
join
(
''
)
+
'</div>'
+
'<div class="flex justify-between mt-3 pt-3 border-t border-[#E5E6EB]"><span class="font-medium text-[#1D2129]">总分</span><b class="text-xl text-[#165DFF]">'
+
score
.
total
+
'/100 分</b></div>'
+
'<div class="mt-3 pt-3 border-t border-[#E5E6EB]"><div class="text-xs text-[#86909C] mb-1">导师评语</div><div class="text-sm text-[#4E5969] leading-relaxed whitespace-pre-wrap">'
+
mentorDeployReviewEsc
(
review
.
comment
||
'—'
)
+
'</div></div>'
+
'</div>'
;
}
function
buildMentorDeployReviewTestsSummary
(
tests
,
taskType
)
{
var
items
=
(
taskType
===
'image-gen'
)
?
[{
k
:
'models'
,
label
:
'模型列表'
},
{
k
:
'genSubmit'
,
label
:
'提交生成任务'
},
{
k
:
'genStatus'
,
label
:
'查询生成任务'
}]
:
[{
k
:
'models'
,
label
:
'模型列表'
},
{
k
:
'chat'
,
label
:
'聊天补全'
}];
if
(
!
tests
||
Object
.
keys
(
tests
).
length
===
0
)
{
return
'<div class="p-2 rounded bg-[#F7F8FA] text-xs text-[#86909C]">本轮未记录 API 测试结果</div>'
;
}
var
rows
=
items
.
map
(
function
(
it
)
{
var
t
=
tests
[
it
.
k
];
var
badge
=
'bg-[#F2F3F5] text-[#86909C]'
;
var
text
=
'未测试'
;
var
extra
=
''
;
if
(
t
)
{
if
(
t
.
status
===
'pass'
)
{
badge
=
'bg-emerald-100 text-emerald-700'
;
text
=
'通过'
+
(
t
.
httpStatus
?
' · '
+
t
.
httpStatus
:
''
);
if
(
t
.
latency
!=
null
)
extra
=
'<div class="text-xs text-[#86909C] mt-1">耗时 '
+
t
.
latency
+
' ms</div>'
;
}
else
if
(
t
.
status
===
'fail'
)
{
badge
=
'bg-rose-100 text-rose-700'
;
text
=
'失败'
;
if
(
t
.
error
)
extra
=
'<div class="text-xs text-rose-500 mt-1 leading-relaxed">'
+
mentorDeployReviewEsc
(
t
.
error
)
+
'</div>'
;
}
else
if
(
t
.
status
===
'loading'
)
{
badge
=
'bg-amber-100 text-amber-700'
;
text
=
'测试中'
;
}
}
return
'<div class="p-2 rounded bg-[#F7F8FA] mb-1.5">'
+
'<div class="flex items-center justify-between"><span class="text-sm text-[#4E5969]">'
+
it
.
label
+
'</span><span class="text-xs px-2 py-0.5 rounded '
+
badge
+
'">'
+
text
+
'</span></div>'
+
extra
+
'</div>'
;
}).
join
(
''
);
return
rows
;
}
function
buildMentorDeployReviewPanel
(
student
)
{
if
(
!
student
)
return
''
;
var
sid
=
Number
(
student
.
id
);
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
+
buildMentorDeployScoreCard
(
sid
)
+
buildMentorDeployConclusionPanel
(
sid
);
var
locked
=
isMentorDeployReviewLocked
(
sid
);
return
buildMentorDeployParamsPanel
(
sid
)
+
itemsHtml
+
(
locked
?
buildMentorDeployLockedReviewPanel
(
sid
)
:
buildMentorDeployScoreCard
(
sid
))
+
buildMentorDeployConclusionPanel
(
sid
);
}
function
getMentorDeployMissingApiTests
(
sid
)
{
...
...
@@ -2241,23 +2316,64 @@ function submitMentorDeployReview(action) {
}
if
(
!
sub
.
review
)
sub
.
review
=
{};
var
reviewedAt
=
getMentorDeployNowTimestamp
();
sub
.
review
.
round
=
(
parseInt
(
sub
.
review
.
round
,
10
)
||
0
)
+
1
;
sub
.
review
.
status
=
statusMap
[
action
];
sub
.
review
.
comment
=
comment
;
sub
.
review
.
score
=
scores
;
sub
.
review
.
reviewedAt
=
getMentorDeployNowTimestamp
();
if
(
action
!==
'pass'
)
{
sub
.
artifactSubmitted
=
false
;
sub
.
reportSubmitted
=
false
;
sub
.
review
.
reviewedAt
=
reviewedAt
;
sub
.
review
.
notifiedAt
=
reviewedAt
;
sub
.
review
.
updatedAt
=
reviewedAt
;
// 同步到学生端
// 快照本轮 API 测试结果与验收参数,避免学生重提或导师重新测试影响历史验收记录
sub
.
review
.
tests
=
JSON
.
parse
(
JSON
.
stringify
(
mentorDeployReviewState
.
tests
[
sid
]
||
{}));
sub
.
review
.
params
=
JSON
.
parse
(
JSON
.
stringify
(
mentorDeployReviewState
.
params
[
sid
]
||
{}));
// 同步到 studentState(全局学生数据)
if
(
typeof
studentState
!==
'undefined'
)
{
studentState
.
deployReviewStatus
=
statusMap
[
action
];
studentState
.
deployReviewComment
=
comment
;
studentState
.
deployReviewScore
=
scores
;
studentState
.
deployReviewRound
=
sub
.
review
.
round
;
studentState
.
deployReviewUpdatedAt
=
reviewedAt
;
studentState
.
deployReviewNotifiedAt
=
reviewedAt
;
studentState
.
deployPassed
=
(
action
===
'pass'
);
studentState
.
deployRejected
=
(
action
===
'reject'
);
studentState
.
deployReviewStatus
=
statusMap
[
action
];
if
(
action
!==
'pass'
)
{
studentState
.
deployArtifactSubmitted
=
false
;
studentState
.
deployReportSubmitted
=
false
;
}
}
delete
mentorDeployReviewState
.
scores
[
sid
];
delete
mentorDeployReviewState
.
comments
[
sid
];
renderContent
();
// 通知学生(本地模拟,真实通知留给步骤5)
if
(
typeof
studentState
!==
'undefined'
)
{
if
(
!
studentState
.
notifications
)
studentState
.
notifications
=
[];
studentState
.
notifications
.
unshift
({
id
:
'deploy-'
+
sid
+
'-'
+
reviewedAt
.
replace
(
/
[^
0-9
]
/g
,
''
),
type
:
'deploy-review'
,
studentId
:
sid
,
round
:
sub
.
review
.
round
,
status
:
statusMap
[
action
],
title
:
titleMap
[
action
],
message
:
action
===
'pass'
?
(
'你的部署验收已通过,本次评分 '
+
scores
.
total
+
'/100 分。'
)
:
(
action
===
'reject'
?
(
'你的部署验收被驳回:'
+
comment
)
:
(
'你的部署验收需要补充材料:'
+
comment
)),
createdAt
:
reviewedAt
,
read
:
false
,
targetPage
:
'student-deploy-result'
});
}
var
msg
=
action
===
'pass'
?
'已通知学生查看验收结果,本次评分 '
+
scores
.
total
+
'/100 分。'
:
(
action
===
'reject'
?
'已通知学生根据驳回评语修改后重新提交。'
:
'已通知学生按补充要求补交材料后重新提交。'
);
showStudentFlowModal
(
titleMap
[
action
],
msg
);
renderContent
();
}
pageRenderers
[
"mentor-deploy-review"
]
=
function
()
{
...
...
pages-student.js
浏览文件 @
7c6cd020
...
...
@@ -3129,6 +3129,39 @@ function isDeployReviewRejected() {
return
!!
studentState
.
deployRejected
||
studentState
.
deployReviewStatus
===
'驳回'
||
studentState
.
deployReviewStatus
===
'已驳回'
;
}
function
getDeployReviewStatusLabel
()
{
var
s
=
studentState
.
deployReviewStatus
||
''
;
if
(
s
===
'已通过'
)
return
'通过'
;
if
(
s
===
'已驳回'
)
return
'驳回'
;
if
(
s
===
'待补充'
)
return
'待补充'
;
if
(
s
===
'验收中'
)
return
'验收中'
;
if
(
s
===
'待验收'
)
return
'待验收'
;
if
(
s
===
'通过'
||
s
===
'驳回'
)
return
s
;
return
s
||
'待验收'
;
}
function
getDeployReviewBadgeClass
(
status
)
{
if
(
status
===
'通过'
||
status
===
'已通过'
)
return
'bg-emerald-100 text-emerald-700'
;
if
(
status
===
'驳回'
||
status
===
'已驳回'
)
return
'bg-rose-100 text-rose-700'
;
if
(
status
===
'待补充'
)
return
'bg-violet-100 text-violet-700'
;
if
(
status
===
'验收中'
)
return
'bg-[#E8F3FF] text-[#165DFF]'
;
return
'bg-amber-100 text-amber-700'
;
}
function
getDeployResultPrimaryAction
(
status
)
{
if
(
status
===
'通过'
)
return
'去撰写实操报告'
;
if
(
status
===
'驳回'
||
status
===
'待补充'
)
return
'返回提交页修改'
;
if
(
status
===
'验收中'
)
return
'等待导师验收'
;
return
'返回提交页继续编辑'
;
}
function
getDeployResultSecondaryAction
(
status
)
{
if
(
status
===
'通过'
)
return
'返回首页'
;
if
(
status
===
'驳回'
||
status
===
'待补充'
)
return
'返回首页'
;
if
(
status
===
'验收中'
)
return
'返回首页'
;
return
'返回首页'
;
}
function
reopenDeploySubmit
()
{
studentState
.
deploySubmitted
=
false
;
studentState
.
deployReviewed
=
false
;
...
...
@@ -3399,14 +3432,16 @@ pageRenderers["student-deploy-submit"] = function() {
pageRenderers
[
"student-deploy-result"
]
=
function
()
{
var
a
=
studentState
.
deployArtifact
||
{};
var
r
=
studentState
.
deployReport
||
{};
var
passed
=
isDeployReviewPassed
();
var
rejected
=
isDeployReviewRejected
();
var
hasAnySaved
=
!!
(
studentState
.
deployArtifactSubmitted
||
studentState
.
deployReportSubmitted
||
studentState
.
deploySubmitted
||
studentState
.
deployReviewed
||
studentState
.
deployArtifactSaved
||
studentState
.
deployReportSaved
);
if
(
!
hasAnySaved
&&
!
passed
&&
!
rejected
)
{
var
status
=
getDeployReviewStatusLabel
();
var
passed
=
status
===
'通过'
;
var
rejected
=
status
===
'驳回'
;
var
supplement
=
status
===
'待补充'
;
var
reviewing
=
status
===
'待验收'
||
status
===
'验收中'
;
var
hasAnySaved
=
!!
(
studentState
.
deployArtifactSubmitted
||
studentState
.
deployReportSubmitted
||
studentState
.
deploySubmitted
||
studentState
.
deployReviewed
||
studentState
.
deployArtifactSaved
||
studentState
.
deployReportSaved
||
passed
||
rejected
||
supplement
);
if
(
!
hasAnySaved
&&
!
reviewing
&&
!
passed
&&
!
rejected
&&
!
supplement
)
{
return
pageRenderers
[
"student-deploy-submit"
]();
}
var
status
=
passed
?
'通过'
:
(
rejected
?
'驳回'
:
(
studentState
.
deployReviewStatus
||
'待验收'
));
var
badge
=
passed
?
'bg-emerald-100 text-emerald-700'
:
(
rejected
?
'bg-rose-100 text-rose-700'
:
'bg-amber-100 text-amber-700'
);
var
badge
=
getDeployReviewBadgeClass
(
status
);
var
apiLabel
=
a
.
apiUrl
||
a
.
apiPath
||
studentState
.
deployApiUrl
||
'—'
;
var
portLabel
=
a
.
port
||
studentState
.
deployApiPort
||
'—'
;
var
modelLabel
=
a
.
modelName
||
'—'
;
...
...
@@ -3415,16 +3450,19 @@ pageRenderers["student-deploy-result"] = function() {
var
submitSummaryText
=
submitSummary
===
'both'
?
'产物与报告都已提交'
:
(
submitSummary
===
'artifact'
?
'仅产物已提交'
:
(
submitSummary
===
'report'
?
'仅报告已提交'
:
'尚未提交'
));
var
lockedNote
=
submitSummary
===
'both'
?
'两边都提交后,本页只读,不能再修改。'
:
'只要还有一边未提交,就可以返回提交页继续修改。'
;
var
bothSubmitted
=
submitSummary
===
'both'
;
var
reviewRound
=
studentState
.
deployReviewRound
||
1
;
var
reviewTime
=
studentState
.
deployReviewUpdatedAt
||
'—'
;
var
notifyTime
=
studentState
.
deployReviewNotifiedAt
||
'—'
;
var
actionHtml
=
''
;
if
(
passed
)
{
actionHtml
=
'<button class="btn-primary w-full py-3" onclick="switchPage(
\'
student-report
\'
)">去撰写实操报告</button>'
+
'<button class="btn-outline w-full py-3" onclick="switchPage(
\'
student-dashboard
\'
)">返回首页</button>'
;
}
else
if
(
rejected
)
{
}
else
if
(
rejected
||
supplement
)
{
actionHtml
=
'<button class="btn-primary w-full py-3" onclick="
reopenDeploySubmit()">修改并重新保存
</button>'
+
'<button class="btn-primary w-full py-3" onclick="
switchPage(
\'
student-deploy-submit
\'
)">返回提交页修改
</button>'
+
'<button class="btn-outline w-full py-3" onclick="switchPage(
\'
student-dashboard
\'
)">返回首页</button>'
;
}
else
if
(
bothSubmitted
)
{
}
else
if
(
bothSubmitted
||
reviewing
)
{
actionHtml
=
'<button class="btn-outline w-full py-3" onclick="switchPage(
\'
student-dashboard
\'
)">返回首页</button>'
;
}
else
{
...
...
@@ -3464,10 +3502,22 @@ pageRenderers["student-deploy-result"] = function() {
</div>
<div class="p-4 bg-[#F7F8FA] rounded-lg">
<div class="text-xs text-[#86909C]">当前状态</div>
<div class="text-sm font-semibold text-[#1D2129] mt-1">`
+
s
ubmitSummaryText
+
`</div>
<div class="text-sm font-semibold text-[#1D2129] mt-1">`
+
s
tatus
+
`</div>
</div>
</div>
</div>
<div class="bg-white rounded-lg border border-[#E5E6EB] shadow-sm p-6">
<div class="flex items-center justify-between mb-4">
<h3 class="font-semibold text-[#1D2129]">导师验收记录</h3>
<span class="text-xs px-2 py-1 rounded bg-[#F7F8FA] text-[#4E5969]">第 `
+
reviewRound
+
` 轮</span>
</div>
<div class="grid grid-cols-3 gap-3">
<div class="p-4 rounded-lg bg-[#F7F8FA]"><div class="text-xs text-[#86909C]">状态</div><div class="text-sm font-semibold mt-1 text-[#1D2129]">`
+
status
+
`</div></div>
<div class="p-4 rounded-lg bg-[#F7F8FA]"><div class="text-xs text-[#86909C]">提交时间</div><div class="text-sm font-semibold mt-1 text-[#1D2129]">`
+
escapeAutodlHtml
(
reviewTime
)
+
`</div></div>
<div class="p-4 rounded-lg bg-[#F7F8FA]"><div class="text-xs text-[#86909C]">通知时间</div><div class="text-sm font-semibold mt-1 text-[#1D2129]">`
+
escapeAutodlHtml
(
notifyTime
)
+
`</div></div>
</div>
<div class="mt-4 text-sm text-[#4E5969] leading-relaxed whitespace-pre-wrap">`
+
escapeAutodlHtml
(
studentState
.
deployReviewComment
||
(
passed
?
'验收已通过。'
:
(
rejected
?
'请修改后重新提交。'
:
(
supplement
?
'请按补充要求修改后再次提交。'
:
'导师尚未完成验收。'
))))
+
`</div>
</div>
<div class="bg-white rounded-lg border border-[#E5E6EB] shadow-sm p-6">
<h3 class="font-semibold text-[#1D2129] mb-4">API 探测</h3>
<div class="grid grid-cols-3 gap-3">
...
...
@@ -3493,7 +3543,7 @@ pageRenderers["student-deploy-result"] = function() {
<div><b class="text-[#1D2129]">2. 启动:</b>模型权重加载完整,服务监听正常。</div>
<div><b class="text-[#1D2129]">3. 性能:</b>`
+
(
passed
?
'接口探测已通过,首包延迟处于合理区间。'
:
'首包延迟处于合理区间(待导师确认)。'
)
+
`</div>
<div><b class="text-[#1D2129]">4. 风险:</b>建议补充并发压测与进程守护。</div>
<div><b class="text-[#1D2129]">5. 结论:</b>`
+
(
passed
?
'部署产物已通过验收,可继续推进后续任务。'
:
(
rejected
?
'验收未通过,请按评语修改后重提。'
:
'当前保存内容具备人工验收条件。'
))
+
`</div>
<div><b class="text-[#1D2129]">5. 结论:</b>`
+
(
passed
?
'部署产物已通过验收,可继续推进后续任务。'
:
(
rejected
?
'验收未通过,请按评语修改后重提。'
:
(
supplement
?
'请按补充要求修改后重新提交。'
:
'当前保存内容具备人工验收条件。'
)
))
+
`</div>
</div>
</div>
</div>
...
...
@@ -3507,9 +3557,13 @@ pageRenderers["student-deploy-result"] = function() {
<p>模型:<b class="text-[#1D2129]">`
+
escapeAutodlHtml
(
modelLabel
)
+
`</b></p>
</div>
</div>
<div class="bg-white rounded-lg border border-[#E5E6EB] shadow-sm p-5">
<h3 class="font-semibold text-[#1D2129] mb-3">通知</h3>
<p class="text-sm text-[#4E5969] leading-relaxed">`
+
escapeAutodlHtml
((
studentState
.
notifications
&&
studentState
.
notifications
[
0
]
&&
studentState
.
notifications
[
0
].
message
)
||
(
passed
?
'验收已通过。'
:
(
rejected
?
'请修改后重新提交。'
:
(
supplement
?
'请按补充要求修改后重新提交。'
:
'导师尚未完成验收。'
))))
+
`</p>
</div>
<div class="bg-white rounded-lg border border-[#E5E6EB] shadow-sm p-5">
<h3 class="font-semibold text-[#1D2129] mb-3">导师评语</h3>
<p class="text-sm text-[#4E5969] leading-relaxed">`
+
escapeAutodlHtml
(
studentState
.
deployReviewComment
||
(
passed
?
'验收已通过。'
:
(
rejected
?
'请修改后重新提交。'
:
'导师尚未完成验收。'
)))
+
`</p>
<p class="text-sm text-[#4E5969] leading-relaxed">`
+
escapeAutodlHtml
(
studentState
.
deployReviewComment
||
(
passed
?
'验收已通过。'
:
(
rejected
?
'请修改后重新提交。'
:
(
supplement
?
'请按补充要求修改后重新提交。'
:
'导师尚未完成验收。'
)
)))
+
`</p>
</div>
<div class="space-y-3">`
+
actionHtml
+
`</div>
</div>
...
...
@@ -3517,6 +3571,85 @@ pageRenderers["student-deploy-result"] = function() {
</div>`
;
};
// ===== 学生通知(部署验收通知 + 顶栏铃铛展示)=====
function
getStudentUnreadNotificationCount
()
{
if
(
!
studentState
.
notifications
)
return
0
;
return
studentState
.
notifications
.
filter
(
function
(
n
)
{
return
!
n
.
read
;
}).
length
;
}
function
updateStudentNotificationBadge
()
{
var
badge
=
document
.
getElementById
(
'stuNtfBadge'
);
if
(
!
badge
)
return
;
var
count
=
getStudentUnreadNotificationCount
();
badge
.
textContent
=
count
>
99
?
'99+'
:
String
(
count
);
if
(
count
>
0
)
{
badge
.
classList
.
remove
(
'hidden'
);
badge
.
classList
.
add
(
'flex'
);
}
else
{
badge
.
classList
.
add
(
'hidden'
);
badge
.
classList
.
remove
(
'flex'
);
}
}
function
buildStudentNotificationListHtml
()
{
var
list
=
studentState
.
notifications
||
[];
if
(
!
list
.
length
)
{
return
'<div class="p-8 text-center"><div class="text-3xl mb-2"><svg class="w-8 h-8 mx-auto text-[#C9CDD4]" data-lucide="bell-off"></svg></div><div class="text-sm text-[#86909C]">暂无通知</div></div>'
;
}
var
items
=
list
.
map
(
function
(
n
)
{
var
statusClass
=
n
.
status
===
'已通过'
?
'bg-emerald-100 text-emerald-700'
:
(
n
.
status
===
'已驳回'
?
'bg-rose-100 text-rose-700'
:
(
n
.
status
===
'待补充'
?
'bg-violet-100 text-violet-700'
:
'bg-[#E8F3FF] text-[#165DFF]'
));
var
unreadDot
=
n
.
read
?
''
:
'<span class="w-1.5 h-1.5 rounded-full bg-[#165DFF] flex-shrink-0"></span>'
;
return
'<div class="notif-item '
+
(
n
.
read
?
''
:
'bg-[#E8F3FF]/40'
)
+
'" onclick="openStudentNotification(
\'
'
+
n
.
id
+
'
\'
)">'
+
'<div class="flex items-center gap-2 w-full">'
+
'<span class="text-xs px-2 py-0.5 rounded '
+
statusClass
+
'">'
+
(
n
.
status
||
'通知'
)
+
'</span>'
+
unreadDot
+
'</div>'
+
'<div class="title mt-1">'
+
escapeAutodlHtml
(
n
.
title
)
+
'</div>'
+
'<div class="desc">'
+
escapeAutodlHtml
(
n
.
message
)
+
'</div>'
+
'<div class="time">第 '
+
(
n
.
round
||
1
)
+
' 轮验收 · '
+
escapeAutodlHtml
(
n
.
createdAt
)
+
'</div>'
+
'</div>'
;
}).
join
(
''
);
return
'<div class="p-3 border-b flex items-center justify-between"><span class="font-semibold text-sm">通知</span>'
+
(
getStudentUnreadNotificationCount
()
?
'<button class="text-xs text-[#165DFF] hover:underline" onclick="markStudentNotificationsReadAll()">全部标为已读</button>'
:
''
)
+
'</div>'
+
items
;
}
function
toggleStudentNotifications
()
{
var
menu
=
document
.
getElementById
(
'stuNtfList'
);
var
container
=
document
.
getElementById
(
'stuNtfMenu'
);
if
(
!
menu
||
!
container
)
return
;
if
(
menu
.
style
.
display
===
'block'
)
{
menu
.
style
.
display
=
'none'
;
return
;
}
menu
.
innerHTML
=
buildStudentNotificationListHtml
();
menu
.
style
.
display
=
'block'
;
if
(
window
.
lucide
)
lucide
.
createIcons
();
updateStudentNotificationBadge
();
}
function
markStudentNotificationsReadAll
()
{
(
studentState
.
notifications
||
[]).
forEach
(
function
(
n
)
{
n
.
read
=
true
;
});
var
menu
=
document
.
getElementById
(
'stuNtfList'
);
if
(
menu
)
menu
.
innerHTML
=
buildStudentNotificationListHtml
();
if
(
window
.
lucide
)
lucide
.
createIcons
();
updateStudentNotificationBadge
();
}
function
openStudentNotification
(
id
)
{
var
list
=
studentState
.
notifications
||
[];
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
String
(
list
[
i
].
id
)
===
String
(
id
))
list
[
i
].
read
=
true
;
}
var
menu
=
document
.
getElementById
(
'stuNtfList'
);
if
(
menu
)
menu
.
style
.
display
=
'none'
;
updateStudentNotificationBadge
();
switchPage
(
'student-deploy-result'
);
}
// 入项申请未解锁提示
function
showEntryNotAllowedAlert
()
{
var
completedStages
=
0
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论