Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
studyweb_Prototype
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
yujiejie
studyweb_Prototype
Commits
e8ccb60c
提交
e8ccb60c
authored
8月 21, 2026
作者:
yujiejie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
导师端与学生端验收初步联通,差学生端通知展示
上级
7c6cd020
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
518 行增加
和
78 行删除
+518
-78
0821HANDOFF.md
docs/0821HANDOFF.md
+271
-0
index.html
index.html
+2
-2
pages-mentor.js
pages-mentor.js
+156
-42
pages-student.js
pages-student.js
+89
-34
没有找到文件。
docs/0821HANDOFF.md
0 → 100644
浏览文件 @
e8ccb60c
# 0821 阶段二部署验收流程交接文档
> 更新时间:2026-08-21
> 项目:`0820studyweb_Prototype`
> 当前阶段:阶段二 AutoDL 部署实操、导师验收台与学生验收结果闭环
---
## 1. 任务背景和目标
当前项目是一个 HTML + JavaScript 实训平台原型,包含学生端、导师端及其他角色端。阶段二围绕 AutoDL 部署实操展开,学生需要自行租赁 AutoDL 实例,在实例上完成模型服务部署,再提交部署产物、实操日志和实操报告,由导师进行 API、日志和报告的综合验收。
**核心目标**
:建立完整的部署验收闭环流程,包含:
-
学生端:AutoDL 自主租赁 → 产物/报告分别保存提交 → 查看验收结果
-
导师端:选择学生 → 查看提交内容 → API 验收 → 给出结论(通过/驳回/待补充) → 通知学生
-
学生端:接收通知 → 查看验收结果 → 根据状态决定后续动作
**当前已实现的流程**
:
```
学生查看任务
→ 自行租赁 AutoDL
→ 登记租赁信息并测试连通性
→ 进入 Code Server / Web IDE
→ 分别填写并保存部署产物、实操报告
→ 分别提交产物、报告
→ 两部分都提交后进入 student-deploy-result
→ 导师选择负责学生
→ 查看部署产物、实操日志、实操报告
→ API 测试与综合验收
→ 导师通知学生(创建通知)
→ 学生结果页更新状态
```
---
## 2. 已完成的修改
### 2.1 `index.html`
**新增字段**
:
-
`deployReviewRound: 1`
- 导师验收轮次
-
`deployReviewNotifiedAt: ''`
- 导师验收通知时间
**修改函数**
:
-
`renderContent()`
- 增加通知角标更新调用
`updateStudentNotificationBadge()`
**新增静态结构**
:
-
学生端顶部通知铃铛区域(
`#stuNtfMenu`
)
-
铃铛按钮 + 红点角标(
`#stuNtfBadge`
)
-
通知下拉菜单容器(
`#stuNtfList`
)
### 2.2 `pages-mentor.js`
**新增辅助函数**
:
-
`buildMentorDeployReviewTestsSummary(tests, taskType)`
- 渲染 API 测试摘要(按任务类型区分文本模型/图像生成)
**重写函数**
:
-
`buildMentorDeployLockedReviewPanel(sid)`
- 完善验收记录只读面板
-
增加验收轮次显示
-
增加 API 测试摘要(每项测试通过/失败/未测试,失败项显示错误详情,通过项显示耗时)
-
增加提交时间/通知时间双行显示
-
保留分项评分、总分、评语展示
**修改函数**
:
-
`submitMentorDeployReview(action)`
- 导师提交验收结论
-
增加验收轮次自增(
`sub.review.round`
)
-
增加 API 测试结果快照(
`sub.review.tests`
)
-
增加验收参数快照(
`sub.review.params`
)
-
增加通知时间(
`sub.review.notifiedAt`
)
-
同步到
`studentState`
:
-
`deployReviewRound`
-
`deployReviewNotifiedAt`
-
`deployReviewStatus`
-
`deployReviewComment`
-
`deployReviewScore`
-
`deployReviewUpdatedAt`
-
**新增学生通知创建**
:
-
创建通知对象推入
`studentState.notifications`
-
包含:
`id`
,
`type`
,
`title`
,
`message`
,
`status`
,
`read`
,
`createdAt`
,
`round`
,
`studentId`
,
`targetPage`
**Mock 数据更新**
:
-
学生2的验收记录增加
`round: 1`
和
`notifiedAt: '2026-07-20 17:40'`
### 2.3 `pages-student.js`
**新增辅助函数**
:
-
`getDeployReviewStatusLabel()`
- 状态别名映射(已通过→通过,已驳回→驳回,待补充→待补充,验收中→验收中,待验收→待验收)
-
`getDeployReviewBadgeClass(status)`
- 状态徽章样式类
-
`getDeployResultPrimaryAction(status)`
- 主要操作按钮文案
-
`getDeployResultSecondaryAction(status)`
- 次要操作按钮文案
**新增通知相关函数**
:
-
`getStudentUnreadNotificationCount()`
- 获取未读通知数量
-
`updateStudentNotificationBadge()`
- 更新铃铛红点角标
-
`buildStudentNotificationListHtml()`
- 构建通知下拉列表 HTML
-
`toggleStudentNotifications()`
- 切换通知菜单显隐
-
`markStudentNotificationsReadAll()`
- 标记所有通知为已读
-
`openStudentNotification(id)`
- 打开通知并跳转到结果页
**重写页面渲染**
:
-
`pageRenderers["student-deploy-result"]`
- 部署作业详情页
-
状态判定:
`passed`
/
`rejected`
/
`supplement`
/
`reviewing`
-
右上角状态按钮使用
`getDeployReviewStatusLabel()`
和
`getDeployReviewBadgeClass()`
-
增加
**导师验收记录**
卡片:
-
验收轮次
-
状态、提交时间、通知时间
-
导师评语
-
通知卡片:显示最新通知内容
-
AI 五段分析:根据状态显示不同结论文案
-
操作按钮:
-
`通过`
→ 去撰写实操报告 + 返回首页
-
`驳回`
/
`待补充`
→ 返回提交页修改 + 返回首页
-
`待验收`
/
`验收中`
/ 部分提交 → 返回首页 或 返回提交页继续编辑
---
## 3. 已确定的决策和约束
### 3.1 产品流程决策
1.
**验收结论分项**
:导师验收结论改为
**产物/报告分别验收**
,分别给结论(通过/驳回/待补充),驳回/待补充时只重置对应部分
2.
**验收记录状态**
:验收记录需保存轮次、API测试快照、通知时间,避免学生重提或导师重新测试影响历史记录
3.
**通知机制**
:导师提交验收结论时自动创建学生端通知,点击通知跳转到
`student-deploy-result`
4.
**状态流转**
:
-
学生双提交后 → 待验收
-
导师验收中 → 验收中
-
导师通过 → 已通过
-
导师驳回 → 已驳回(学生可重新编辑提交)
-
导师要求补充 → 待补充(学生可重新编辑提交)
5.
**验收布局**
:产物/实操验收区放在导师页面的
**实操日志卡片下方**
(中列),报告验收区放在
**实操报告卡片下方**
(中列),不把所有验收打分和结论都写在最右侧一列
### 3.2 视觉风格约束
-
使用当前平台的 Arco Design Pro 风格
-
主色使用科技蓝
`#165DFF`
-
使用白色卡片、浅灰背景、蓝色状态强调
-
状态使用平台已有的标签样式:
-
待处理 / 待验收:琥珀色(
`bg-amber-100 text-amber-700`
)
-
进行中:蓝色(
`bg-[#E8F3FF] text-[#165DFF]`
)
-
通过:绿色(
`bg-emerald-100 text-emerald-700`
)
-
驳回:红色(
`bg-rose-100 text-rose-700`
)
-
待补充:紫色(
`bg-violet-100 text-violet-700`
)
-
复用项目已有的
`btn-primary`
、
`btn-outline`
、
`input-field`
、卡片和 lucide 图标
### 3.3 文件和命名约束
-
设计文档统一放在
`docs`
下
-
交接文档命名为
`docs/0821HANDOFF.md`
-
阶段二相关状态使用
`deploy`
前缀
-
保存和提交字段必须区分:
-
`deployArtifactSaved`
/
`deployArtifactSubmitted`
-
`deployReportSaved`
/
`deployReportSubmitted`
-
验收状态使用:
-
`待验收`
-
`验收中`
-
`已通过`
-
`已驳回`
-
`待补充`
### 3.4 方案取舍
-
暂时采用原型内存状态模拟,不引入后端接口
-
先完成页面结构和状态流,再接入真实 API 请求
-
学生原始提交内容和导师验收临时参数分离
-
验收历史应该保留快照,避免学生后续草稿修改影响已完成验收记录
-
通知采用前端内存列表,点击后标记已读
---
## 4. 未完成的任务和下一步计划
### 下一步一:步骤10 - 学生提交页重新编辑规则(分项验收适配)
**待完成**
:
-
导师端验收结论改为
**分项**
(产物/报告分别验收)
-
学生提交页在驳回/待补充后的重新编辑规则:
-
保留已通过的部分,只重置被驳回/待补充的部分
-
如产物通过但报告被驳回,则只重置报告部分
-
更新
`isDeploySubmissionLocked()`
为分项锁定逻辑
-
更新
`reopenDeploySubmit()`
为分项重置逻辑
**涉及文件**
:
-
`pages-mentor.js`
:
`buildMentorDeployConclusionPanel`
改为分项结论
-
`pages-student.js`
:
`isDeploySubmissionLocked`
、
`reopenDeploySubmit`
等逻辑更新
### 下一步二:步骤11 - 最终联调检查
**待验证**
:
-
学生提交状态是否正确传给导师端
-
导师选择学生后是否显示对应内容
-
API 测试是否只影响当前学生
-
验收结论是否只影响当前学生
-
通知是否只发给对应学生
-
结果页状态是否与导师端一致
-
驳回后学生是否能重新编辑
-
通过后学生是否不能重复提交
-
通知点击后是否正确跳转并标记已读
---
## 5. 注意事项 / 踩过的坑
### 5.1 必须先做语法检查
`ReadLints`
只能发现 IDE 诊断,不能完全替代 JavaScript 语法检查。每次修改
`pages-mentor.js`
后必须执行:
```
bash
node
--check
pages-mentor.js
node
--check
pages-student.js
```
### 5.2 不要把保存状态和提交状态混用
必须始终区分:
```
javascript
deployArtifactSaved
deployArtifactSubmitted
deployReportSaved
deployReportSubmitted
```
### 5.3 双提交后不能使用独立锁定页
用户要求:双提交后可以返回原提交表单查看自己的内容,表单控件只读,不进入独立锁定页面。
### 5.4 只有两个都提交后才进入验收状态
只有
`deployArtifactSubmitted && deployReportSubmitted`
同时成立时,才应进入导师待验收流程。
### 5.5 输入修改需要撤销对应提交状态
如果学生在允许编辑状态下修改已保存内容,应避免继续保留旧提交状态。
`setDeployArtifact`
和
`setDeployReportField`
会把对应提交状态重置,后续逻辑必须保留这一点。
### 5.6 导师端当前数据模型仍有原型限制
当前
`studentState`
是全局学生状态,导师端暂时读取的是同一份演示数据。多个学生切换时,提交内容可能仍然是同一份 mock 数据。在真实业务或更完整的原型中,不能直接依赖全局
`studentState`
代表所有学生。
### 5.7 导师端页面是超长模板字符串
`pages-mentor.js`
的
`mentor-deploy-review`
当前使用较长的字符串拼接。修改时容易出现:
-
多余或缺少
`};`
-
引号未闭合
-
模板内 HTML 引号冲突
-
变量拼接错误
建议后续逐步拆成小函数。
### 5.8 学生端通知铃铛的点击事件
学生端通知铃铛使用
`toggleStudentNotifications()`
而不是
`toggleMenu()`
,因为需要动态渲染通知列表内容。点击通知项后会调用
`openStudentNotification(id)`
标记已读并跳转页面。
### 5.9 验收记录快照
验收提交时会保存 API 测试结果和验收参数的快照,存储在
`sub.review.tests`
和
`sub.review.params`
中。这是为了避免学生重新提交或导师重新测试时覆盖历史验收记录。
---
## 6. 当前验证状态
**已执行检查**
:
-
`node --check pages-mentor.js`
:通过
-
`node --check pages-student.js`
:通过
-
`ReadLints`
检查:
`pages-mentor.js`
有 4 个无位置信息的预警(Lundefined:undefined),为 HTML 模板字符串导致,不影响功能
**仍需要在浏览器中验证**
:
-
导师端页面是否正常加载
-
导师负责学生列表是否符合预期
-
选择学生后内容展示是否正确
-
导师提交验收结论后,学生端通知铃铛是否出现红点
-
学生端点击通知是否能跳转到结果页
-
学生端
`student-deploy-result`
状态按钮是否与导师端一致
-
驳回/待补充后学生是否能重新编辑提交
index.html
浏览文件 @
e8ccb60c
...
...
@@ -516,8 +516,8 @@ var studentState = {
deployReviewUpdatedAt
:
''
,
// 导师验收提交时间
deployReviewRound
:
1
,
// 导师验收轮次
deployReviewNotifiedAt
:
''
,
// 导师验收通知时间
deploy
ReviewRound
:
1
,
// 当前验收轮次
deployRe
viewNotifiedAt
:
''
,
// 导师验收通知时间
deploy
ArtifactReviewStatus
:
''
,
// 产物分项验收状态:通过 | 驳回 | 待补充
deployRe
portReviewStatus
:
''
,
// 报告分项验收状态:通过 | 驳回 | 待补充
deployLogName
:
''
,
deployLogContent
:
''
,
deployApiUrl
:
''
,
...
...
pages-mentor.js
浏览文件 @
e8ccb60c
...
...
@@ -139,6 +139,8 @@ var mentorState = {
review
:
{
round
:
1
,
status
:
'已驳回'
,
artifactStatus
:
'通过'
,
reportStatus
:
'驳回'
,
comment
:
'服务未能成功启动,日志显示 CUDA 显存不足导致模型加载中断。请检查实例配置,调整 gpu-memory-utilization 参数或更换更高显存实例后重新部署并提交。'
,
reviewedAt
:
'2026-07-20 17:40'
,
notifiedAt
:
'2026-07-20 17:40'
...
...
@@ -1433,7 +1435,9 @@ function getMentorDeployStudentStatus(studentId) {
function
isMentorDeployReviewLocked
(
studentId
)
{
var
sub
=
getMentorDeploySubmission
(
studentId
);
return
!!
(
sub
&&
sub
.
review
&&
sub
.
review
.
status
);
if
(
!
sub
||
!
sub
.
review
||
!
sub
.
review
.
status
)
return
false
;
// 只有导师真正提交的验收结论(已通过/已驳回/待补充)才锁定,「待验收」仍可编辑
return
sub
.
review
.
status
!==
'待验收'
;
}
function
getMentorDeployStatusBadge
(
status
)
{
...
...
@@ -1534,7 +1538,8 @@ var mentorDeployReviewState = {
params
:
{},
tests
:
{},
scores
:
{},
comments
:
{}
comments
:
{},
partStatus
:
{}
// 分项验收结论草稿:partStatus[sid] = { artifact: '通过'|'驳回'|'待补充', report: '...' }
};
function
getMentorDeployReviewParams
(
studentId
)
{
...
...
@@ -2179,21 +2184,83 @@ function setMentorDeployReviewComment(value) {
mentorDeployReviewState
.
comments
[
sid
]
=
value
;
}
// ===== 导师部署验收台:分项验收结论(产物 / 报告分别给结论)=====
function
getMentorDeployPartReviewStatus
(
studentId
,
part
)
{
var
sid
=
Number
(
studentId
);
var
sub
=
getMentorDeploySubmission
(
sid
);
var
review
=
(
sub
&&
sub
.
review
)
||
{};
var
draft
=
mentorDeployReviewState
.
partStatus
[
sid
]
||
{};
var
key
=
part
===
'report'
?
'reportStatus'
:
'artifactStatus'
;
if
(
draft
[
part
])
return
draft
[
part
];
if
(
review
[
key
])
return
review
[
key
];
return
''
;
}
function
setMentorDeployPartReviewStatus
(
part
,
value
)
{
var
sid
=
Number
(
mentorState
.
deployReviewStudentId
);
if
(
!
mentorDeployReviewState
.
partStatus
[
sid
])
mentorDeployReviewState
.
partStatus
[
sid
]
=
{};
var
draft
=
mentorDeployReviewState
.
partStatus
[
sid
];
if
(
draft
[
part
]
===
value
)
{
delete
draft
[
part
];
}
else
{
draft
[
part
]
=
value
;
}
renderContent
();
}
function
getMentorDeployOverallStatus
(
artifactStatus
,
reportStatus
)
{
if
(
artifactStatus
===
'驳回'
||
reportStatus
===
'驳回'
)
return
'已驳回'
;
if
(
artifactStatus
===
'待补充'
||
reportStatus
===
'待补充'
)
return
'待补充'
;
if
(
artifactStatus
===
'通过'
&&
reportStatus
===
'通过'
)
return
'已通过'
;
return
''
;
}
function
buildMentorDeployPartConclusionRow
(
part
,
label
,
current
)
{
var
opts
=
[
'通过'
,
'驳回'
,
'待补充'
];
var
map
=
{
'通过'
:
'bg-emerald-100 text-emerald-700 border-emerald-200'
,
'驳回'
:
'bg-rose-100 text-rose-700 border-rose-200'
,
'待补充'
:
'bg-violet-100 text-violet-700 border-violet-200'
};
var
btns
=
opts
.
map
(
function
(
opt
)
{
var
active
=
opt
===
current
;
return
'<button type="button" class="flex-1 px-2 py-1.5 text-xs font-medium rounded-lg border transition-all '
+
(
active
?
map
[
opt
]
:
'bg-[#F7F8FA] text-[#86909C] border-[#E5E6EB] hover:border-[#165DFF]'
)
+
'" onclick="setMentorDeployPartReviewStatus(
\'
'
+
part
+
'
\'
,
\'
'
+
opt
+
'
\'
)">'
+
opt
+
'</button>'
;
}).
join
(
''
);
return
'<div class="mb-3">'
+
'<div class="text-xs font-medium text-[#4E5969] mb-1.5">'
+
label
+
'</div>'
+
'<div class="flex gap-2">'
+
btns
+
'</div>'
+
'</div>'
;
}
function
getMentorDeployPartStatusLabel
(
s
)
{
if
(
!
s
)
return
'未给出'
;
return
s
;
}
function
getMentorDeployPartStatusBadge
(
s
)
{
if
(
s
===
'通过'
)
return
'bg-emerald-100 text-emerald-700'
;
if
(
s
===
'驳回'
)
return
'bg-rose-100 text-rose-700'
;
if
(
s
===
'待补充'
)
return
'bg-violet-100 text-violet-700'
;
return
'bg-[#F2F3F5] text-[#86909C]'
;
}
function
buildMentorDeployConclusionPanel
(
sid
)
{
var
comment
=
getMentorDeployReviewComment
(
sid
);
var
artifactStatus
=
getMentorDeployPartReviewStatus
(
sid
,
'artifact'
);
var
reportStatus
=
getMentorDeployPartReviewStatus
(
sid
,
'report'
);
var
overallStatus
=
getMentorDeployOverallStatus
(
artifactStatus
,
reportStatus
);
var
hasDecision
=
!!
(
artifactStatus
||
reportStatus
);
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>'
+
'<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>'
+
buildMentorDeployPartConclusionRow
(
'artifact'
,
'部署产物验收'
,
artifactStatus
)
+
buildMentorDeployPartConclusionRow
(
'report'
,
'实操报告验收'
,
reportStatus
)
+
(
hasDecision
?
'<div class="mb-3 p-2 rounded bg-[#F7F8FA] text-xs text-[#4E5969] flex items-center justify-between"><span>综合结论</span><span class="px-2 py-0.5 rounded text-xs font-medium '
+
getMentorDeployPartStatusBadge
(
overallStatus
)
+
'">'
+
(
overallStatus
||
'部分结论未给出'
)
+
'</span></div>'
:
''
)
+
'<div class="mb-4">'
+
'<label class="text-xs font-medium text-[#4E5969] block mb-1">导师评语</label>'
+
'<textarea id="deployReviewComment" class="input-field text-sm min-h-[110px] resize-none" placeholder="请填写验收结论、发现的问题、修改建议、补充材料要求或后续学习建议…" oninput="setMentorDeployReviewComment(this.value)">'
+
mentorDeployReviewEsc
(
comment
)
+
'</textarea>'
+
'<p class="text-xs text-[#86909C] mt-1">
通过时建议填写评语;驳回 / 要求补充材料时
必填。</p>'
+
'<p class="text-xs text-[#86909C] mt-1">
有驳回或要求补充材料时评语
必填。</p>'
+
'</div>'
+
'<div class="space-y-2.5">'
+
'<button class="w-full py-2.5 text-sm font-medium rounded-lg bg-emerald-600 hover:bg-emerald-500 text-white transition-all" onclick="submitMentorDeployReview(
\'
pass
\'
)">通过并通知学生</button>'
+
'<button class="w-full py-2.5 text-sm font-medium rounded-lg bg-rose-600 hover:bg-rose-500 text-white transition-all" onclick="submitMentorDeployReview(
\'
reject
\'
)">驳回并通知学生</button>'
+
'<button class="w-full py-2.5 text-sm font-medium rounded-lg bg-amber-500 hover:bg-amber-400 text-white transition-all" onclick="submitMentorDeployReview(
\'
supplement
\'
)">要求补充材料并通知学生</button>'
+
'</div>'
+
'<p class="text-xs text-[#86909C] mt-3 leading-relaxed">「通过」需先完成关键 API 测试且全部通过;「驳回 / 要求补充材料」需填写评语。</p>'
+
'<button class="w-full py-2.5 text-sm font-medium rounded-lg bg-[#165DFF] hover:bg-[#4080FF] text-white transition-all" onclick="submitMentorDeployReview()">提交验收结论并通知学生</button>'
+
'<p class="text-xs text-[#86909C] mt-2 leading-relaxed">提交前请先为产物和报告分别给出结论(通过 / 驳回 / 待补充),然后填写评语。</p>'
+
'</div>'
;
}
...
...
@@ -2205,13 +2272,19 @@ function buildMentorDeployLockedReviewPanel(sid) {
var
tests
=
review
.
tests
||
{};
var
taskType
=
sub
.
taskType
||
'text-model'
;
var
testSummaryHtml
=
buildMentorDeployReviewTestsSummary
(
tests
,
taskType
);
var
artifactStatus
=
review
.
artifactStatus
||
''
;
var
reportStatus
=
review
.
reportStatus
||
''
;
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="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">'
+
'<div class="p-2 rounded bg-white"><div class="text-xs text-[#86909C]">部署产物</div><span class="text-xs px-2 py-0.5 rounded mt-1 inline-block '
+
getMentorDeployPartStatusBadge
(
artifactStatus
)
+
'">'
+
(
artifactStatus
||
'—'
)
+
'</span></div>'
+
'<div class="p-2 rounded bg-white"><div class="text-xs text-[#86909C]">实操报告</div><span class="text-xs px-2 py-0.5 rounded mt-1 inline-block '
+
getMentorDeployPartStatusBadge
(
reportStatus
)
+
'">'
+
(
reportStatus
||
'—'
)
+
'</span></div>'
+
'</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>'
+
...
...
@@ -2263,6 +2336,22 @@ function buildMentorDeployReviewTestsSummary(tests, taskType) {
return
rows
;
}
function
buildMentorDeployReviewHistoryHtml
(
sid
)
{
var
sub
=
getMentorDeploySubmission
(
sid
);
var
history
=
(
sub
&&
sub
.
reviewHistory
)
||
[];
if
(
!
history
.
length
)
return
''
;
var
rows
=
history
.
map
(
function
(
h
)
{
return
'<div class="p-3 rounded bg-[#F7F8FA] mb-2">'
+
'<div class="flex items-center justify-between"><span class="text-xs text-[#86909C]">第 '
+
(
h
.
round
||
1
)
+
' 轮</span><span class="text-xs px-2 py-0.5 rounded '
+
getMentorDeployStatusBadge
(
h
.
status
||
'—'
)
+
'">'
+
mentorDeployReviewEsc
(
h
.
status
||
'—'
)
+
'</span></div>'
+
'<div class="grid grid-cols-2 gap-2 mt-2 text-xs text-[#86909C]"><span>产物:<span class="text-[#4E5969]">'
+
(
h
.
artifactStatus
||
'—'
)
+
'</span></span><span>报告:<span class="text-[#4E5969]">'
+
(
h
.
reportStatus
||
'—'
)
+
'</span></span></div>'
+
'<div class="text-xs text-[#86909C] mt-1">'
+
mentorDeployReviewEsc
(
h
.
reviewedAt
||
''
)
+
(
h
.
notifiedAt
?
' · 通知 '
+
mentorDeployReviewEsc
(
h
.
notifiedAt
)
:
''
)
+
'</div>'
+
'</div>'
;
}).
join
(
''
);
return
'<div class="bg-white rounded-lg border border-[#E5E6EB] p-4 mb-4">'
+
'<h3 class="font-semibold text-[#1D2129] mb-3">历史验收记录</h3>'
+
rows
+
'</div>'
;
}
function
buildMentorDeployReviewPanel
(
student
)
{
if
(
!
student
)
return
''
;
var
sid
=
Number
(
student
.
id
);
...
...
@@ -2270,7 +2359,7 @@ function buildMentorDeployReviewPanel(student) {
var
taskType
=
(
sub
&&
sub
.
taskType
===
'image-gen'
)
?
'image-gen'
:
'text-model'
;
var
itemsHtml
=
taskType
===
'image-gen'
?
buildMentorDeployImageGenItems
(
sid
)
:
buildMentorDeployTextModelItems
(
sid
);
var
locked
=
isMentorDeployReviewLocked
(
sid
);
return
buildMentorDeploy
ParamsPanel
(
sid
)
+
itemsHtml
+
(
locked
?
buildMentorDeployLockedReviewPanel
(
sid
)
:
buildMentorDeployScoreCard
(
sid
))
+
buildMentorDeployConclusionPanel
(
sid
);
return
buildMentorDeploy
ReviewHistoryHtml
(
sid
)
+
buildMentorDeployParamsPanel
(
sid
)
+
itemsHtml
+
(
locked
?
buildMentorDeployLockedReviewPanel
(
sid
)
:
buildMentorDeployScoreCard
(
sid
)
+
buildMentorDeployConclusionPanel
(
sid
)
);
}
function
getMentorDeployMissingApiTests
(
sid
)
{
...
...
@@ -2286,7 +2375,7 @@ function getMentorDeployMissingApiTests(sid) {
return
missing
;
}
function
submitMentorDeployReview
(
action
)
{
function
submitMentorDeployReview
()
{
var
sid
=
Number
(
mentorState
.
deployReviewStudentId
);
var
sub
=
getMentorDeploySubmission
(
sid
);
if
(
!
sub
)
{
...
...
@@ -2295,30 +2384,46 @@ function submitMentorDeployReview(action) {
}
var
comment
=
getMentorDeployReviewComment
(
sid
).
trim
();
var
scores
=
getMentorDeployReviewScores
(
sid
);
var
statusMap
=
{
pass
:
'已通过'
,
reject
:
'已驳回'
,
supplement
:
'待补充'
};
var
titleMap
=
{
pass
:
'已通过验收'
,
reject
:
'已驳回'
,
supplement
:
'已要求补充材料'
};
var
artifactStatus
=
getMentorDeployPartReviewStatus
(
sid
,
'artifact'
);
var
reportStatus
=
getMentorDeployPartReviewStatus
(
sid
,
'report'
);
var
overallStatus
=
getMentorDeployOverallStatus
(
artifactStatus
,
reportStatus
);
var
titleMap
=
{
'已通过'
:
'已通过验收'
,
'已驳回'
:
'已驳回'
,
'待补充'
:
'已要求补充材料'
};
var
title
=
titleMap
[
overallStatus
]
||
'已提交验收结论'
;
if
(
!
artifactStatus
&&
!
reportStatus
)
{
showStudentFlowModal
(
'请先给出分项结论'
,
'请分别选择部署产物和实操报告的验收结论(通过 / 驳回 / 待补充)。'
);
return
;
}
if
(
action
===
'pass'
)
{
if
(
!
sub
.
artifactSubmitted
||
!
sub
.
reportSubmitted
)
{
showStudentFlowModal
(
'暂不能通过验收'
,
'该学生提交材料不完整(缺少部署产物或实操报告)。请选择「驳回」或「要求补充材料」。'
);
// 分项「通过」校验:材料必须已提交;产物通过还需关键 API 测试全部通过
if
(
artifactStatus
===
'通过'
)
{
if
(
!
sub
.
artifactSubmitted
)
{
showStudentFlowModal
(
'产物不能判定通过'
,
'该学生尚未提交部署产物,请将产物结论改为「驳回」或「待补充」。'
);
return
;
}
var
missing
=
getMentorDeployMissingApiTests
(
sid
);
if
(
missing
.
length
)
{
showStudentFlowModal
(
'请先完成关键 API 测试'
,
'通过前必须完成并全部通过以下关键验收项:'
+
missing
.
join
(
'、'
)
+
'。'
);
showStudentFlowModal
(
'
产物通过前
请先完成关键 API 测试'
,
'通过前必须完成并全部通过以下关键验收项:'
+
missing
.
join
(
'、'
)
+
'。'
);
return
;
}
}
else
if
(
!
comment
)
{
var
t
=
action
===
'reject'
?
'请填写驳回原因'
:
'请填写补充材料要求'
;
var
m
=
action
===
'reject'
?
'驳回必须填写原因,说明存在的问题与修改建议。'
:
'要求补充材料必须明确指出缺少的内容。'
;
showStudentFlowModal
(
t
,
m
);
}
if
(
reportStatus
===
'通过'
&&
!
sub
.
reportSubmitted
)
{
showStudentFlowModal
(
'报告不能判定通过'
,
'该学生尚未提交实操报告,请将报告结论改为「驳回」或「待补充」。'
);
return
;
}
// 有驳回 / 待补充时评语必填
if
((
artifactStatus
===
'驳回'
||
artifactStatus
===
'待补充'
||
reportStatus
===
'驳回'
||
reportStatus
===
'待补充'
)
&&
!
comment
)
{
showStudentFlowModal
(
'请填写导师评语'
,
'有驳回或要求补充材料时,评语必须填写,说明存在的问题与修改建议。'
);
return
;
}
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
.
status
=
overallStatus
;
sub
.
review
.
artifactStatus
=
artifactStatus
;
sub
.
review
.
reportStatus
=
reportStatus
;
sub
.
review
.
comment
=
comment
;
sub
.
review
.
score
=
scores
;
sub
.
review
.
reviewedAt
=
reviewedAt
;
...
...
@@ -2327,51 +2432,60 @@ function submitMentorDeployReview(action) {
// 快照本轮 API 测试结果与验收参数,避免学生重提或导师重新测试影响历史验收记录
sub
.
review
.
tests
=
JSON
.
parse
(
JSON
.
stringify
(
mentorDeployReviewState
.
tests
[
sid
]
||
{}));
sub
.
review
.
params
=
JSON
.
parse
(
JSON
.
stringify
(
mentorDeployReviewState
.
params
[
sid
]
||
{}));
// 清空本轮分项草稿,避免下次切换学生时残留
if
(
mentorDeployReviewState
.
partStatus
)
mentorDeployReviewState
.
partStatus
[
sid
]
=
{};
// 同步到 studentState(全局学生数据)
if
(
typeof
studentState
!==
'undefined'
)
{
studentState
.
deployReviewStatus
=
statusMap
[
action
]
;
studentState
.
deployReviewStatus
=
overallStatus
;
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
.
deployArtifactReviewStatus
=
artifactStatus
;
studentState
.
deployReportReviewStatus
=
reportStatus
;
studentState
.
deployPassed
=
(
overallStatus
===
'已通过'
);
studentState
.
deployRejected
=
(
overallStatus
===
'已驳回'
);
// 分项重置:只有被驳回 / 待补充的部分才重置提交状态,已通过的部分保留
if
(
artifactStatus
===
'驳回'
||
artifactStatus
===
'待补充'
)
{
studentState
.
deployArtifactSubmitted
=
false
;
}
if
(
reportStatus
===
'驳回'
||
reportStatus
===
'待补充'
)
{
studentState
.
deployReportSubmitted
=
false
;
}
studentState
.
deploySubmitted
=
!!
(
studentState
.
deployArtifactSubmitted
&&
studentState
.
deployReportSubmitted
);
}
// 通知学生(本地模拟
,真实通知留给步骤5
)
// 通知学生(本地模拟)
if
(
typeof
studentState
!==
'undefined'
)
{
if
(
!
studentState
.
notifications
)
studentState
.
notifications
=
[];
var
partDesc
=
'部署产物:'
+
(
artifactStatus
||
'未给出'
)
+
';实操报告:'
+
(
reportStatus
||
'未给出'
);
var
message
=
overallStatus
===
'已通过'
?
(
'你的部署验收已通过。'
+
partDesc
+
',本次评分 '
+
scores
.
total
+
'/100 分。'
)
:
(
'你的部署验收需要处理。'
+
partDesc
+
(
comment
?
',评语:'
+
comment
:
''
));
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
)),
status
:
overallStatus
,
artifactStatus
:
artifactStatus
,
reportStatus
:
reportStatus
,
title
:
title
,
message
:
message
,
createdAt
:
reviewedAt
,
read
:
false
,
targetPage
:
'student-deploy-result'
});
}
var
msg
=
action
===
'pass
'
var
msg
=
overallStatus
===
'已通过
'
?
'已通知学生查看验收结果,本次评分 '
+
scores
.
total
+
'/100 分。'
:
(
action
===
'reject
'
?
'已通知学生
根据驳回评语
修改后重新提交。'
:
'已通知学生按补充要求补交材料后重新提交。'
);
showStudentFlowModal
(
title
Map
[
action
]
,
msg
);
:
(
overallStatus
===
'已驳回
'
?
'已通知学生
,被驳回的部分需要
修改后重新提交。'
:
'已通知学生
,
按补充要求补交材料后重新提交。'
);
showStudentFlowModal
(
title
,
msg
);
renderContent
();
}
...
...
pages-student.js
浏览文件 @
e8ccb60c
...
...
@@ -3112,6 +3112,7 @@ function setDeployArtifact(field, value) {
studentState
.
deployArtifact
[
field
]
=
value
;
studentState
.
deployArtifactSubmitted
=
false
;
studentState
.
deploySubmitted
=
false
;
studentState
.
deployArtifactReviewStatus
=
''
;
}
function
selectDemoDeployLog
(
input
)
{
...
...
@@ -3163,11 +3164,19 @@ function getDeployResultSecondaryAction(status) {
}
function
reopenDeploySubmit
()
{
studentState
.
deploySubmitted
=
false
;
var
artifactLocked
=
isDeployPartLocked
(
'artifact'
);
var
reportLocked
=
isDeployPartLocked
(
'report'
);
if
(
!
artifactLocked
)
{
studentState
.
deployArtifactSubmitted
=
false
;
}
if
(
!
reportLocked
)
{
studentState
.
deployReportSubmitted
=
false
;
}
studentState
.
deploySubmitted
=
!!
(
studentState
.
deployArtifactSubmitted
&&
studentState
.
deployReportSubmitted
);
studentState
.
deployReviewed
=
false
;
studentState
.
deployPassed
=
false
;
studentState
.
deployRejected
=
false
;
studentState
.
deployReviewStatus
=
'待提交'
;
if
(
!
studentState
.
deploySubmitted
)
studentState
.
deployReviewStatus
=
'待提交'
;
switchPage
(
'student-deploy-submit'
);
}
...
...
@@ -3180,18 +3189,35 @@ function getDeploySubmissionStatus() {
return
'none'
;
}
function
getDeployPartReviewStatus
(
part
)
{
return
part
===
'artifact'
?
(
studentState
.
deployArtifactReviewStatus
||
''
)
:
(
studentState
.
deployReportReviewStatus
||
''
);
}
function
isDeployPartLocked
(
part
)
{
var
submitted
=
part
===
'artifact'
?
!!
studentState
.
deployArtifactSubmitted
:
!!
studentState
.
deployReportSubmitted
;
if
(
!
submitted
)
return
false
;
var
reviewStatus
=
getDeployPartReviewStatus
(
part
);
if
(
reviewStatus
===
'驳回'
||
reviewStatus
===
'待补充'
)
return
false
;
return
true
;
}
function
isDeploySubmissionLocked
()
{
return
getDeploySubmissionStatus
()
===
'both'
;
return
isDeployPartLocked
(
'artifact'
)
&&
isDeployPartLocked
(
'report'
)
;
}
function
buildDeploySubmitNotice
()
{
var
locked
=
isDeploySubmissionLocked
();
if
(
!
locked
)
return
''
;
return
`
<div class="rounded-lg bg-emerald-50 border border-emerald-200 p-4 text-sm text-emerald-700 mb-6 flex items-start gap-2">
<svg class="w-4 h-4 mt-0.5 flex-shrink-0" data-lucide="check-circle"></svg>
<div>产物和报告都已提交,你现在可以查看提交内容,但不能再编辑。</div>
</div>`
;
var
artifactLocked
=
isDeployPartLocked
(
'artifact'
);
var
reportLocked
=
isDeployPartLocked
(
'report'
);
if
(
artifactLocked
&&
reportLocked
)
{
return
'<div class="rounded-lg bg-emerald-50 border border-emerald-200 p-4 text-sm text-emerald-700 mb-6 flex items-start gap-2"><svg class="w-4 h-4 mt-0.5 flex-shrink-0" data-lucide="check-circle"></svg><div>产物和报告都已提交,你现在可以查看提交内容,但不能再编辑。</div></div>'
;
}
if
(
artifactLocked
)
{
return
'<div class="rounded-lg bg-[#E8F3FF] border border-[#165DFF]/20 p-4 text-sm text-[#165DFF] mb-6 flex items-start gap-2"><svg class="w-4 h-4 mt-0.5 flex-shrink-0" data-lucide="info"></svg><div>部署产物已通过验收(只读),实操报告需要修改后重新提交。</div></div>'
;
}
if
(
reportLocked
)
{
return
'<div class="rounded-lg bg-[#E8F3FF] border border-[#165DFF]/20 p-4 text-sm text-[#165DFF] mb-6 flex items-start gap-2"><svg class="w-4 h-4 mt-0.5 flex-shrink-0" data-lucide="info"></svg><div>实操报告已通过验收(只读),部署产物需要修改后重新提交。</div></div>'
;
}
return
''
;
}
function
getDeployArtifactButtonLabel
()
{
...
...
@@ -3211,7 +3237,7 @@ function getDeployReportSubmitLabel() {
}
function
saveDeployArtifact
()
{
if
(
isDeploy
SubmissionLocked
(
))
return
false
;
if
(
isDeploy
PartLocked
(
'artifact'
))
return
false
;
if
(
!
studentState
.
deployArtifact
)
studentState
.
deployArtifact
=
{};
var
a
=
studentState
.
deployArtifact
;
if
(
!
a
.
fileName
||
!
a
.
fileName
.
trim
())
{
...
...
@@ -3240,25 +3266,28 @@ function saveDeployArtifact() {
}
function
submitDeployArtifact
()
{
if
(
isDeploy
SubmissionLocked
(
))
return
false
;
if
(
isDeploy
PartLocked
(
'artifact'
))
return
false
;
if
(
!
studentState
.
deployArtifactSaved
)
{
showStudentFlowModal
(
'请先保存部署产物'
,
'提交产物前,请先点击左侧的“保存”按钮完成产物保存。'
);
return
false
;
}
studentState
.
deployArtifactSubmitted
=
true
;
studentState
.
deployArtifactReviewStatus
=
''
;
studentState
.
deploySubmitted
=
!!
studentState
.
deployReportSubmitted
;
studentState
.
deployReviewStatus
=
studentState
.
deployReportSubmitted
?
'待验收'
:
studentState
.
deployReviewStatus
;
studentState
.
deployReviewed
=
false
;
studentState
.
deployPassed
=
false
;
studentState
.
deployRejected
=
false
;
studentState
.
deployReviewComment
=
''
;
if
(
studentState
.
deployReportSubmitted
)
{
studentState
.
deployReviewStatus
=
'待验收'
;
studentState
.
deployReviewed
=
false
;
studentState
.
deployPassed
=
false
;
studentState
.
deployRejected
=
false
;
}
syncDeploySubmissionToMentor
();
renderContent
();
if
(
studentState
.
deployReportSubmitted
)
switchPage
(
'student-deploy-result'
);
return
true
;
}
function
saveDeployReport
()
{
if
(
isDeploy
SubmissionLocked
(
))
return
false
;
if
(
isDeploy
PartLocked
(
'report'
))
return
false
;
if
(
!
studentState
.
deployReport
)
studentState
.
deployReport
=
{};
var
r
=
studentState
.
deployReport
;
if
(
!
r
.
taskName
||
!
r
.
taskName
.
trim
())
{
...
...
@@ -3277,28 +3306,49 @@ function saveDeployReport() {
}
function
submitDeployReport
()
{
if
(
isDeploy
SubmissionLocked
(
))
return
false
;
if
(
isDeploy
PartLocked
(
'report'
))
return
false
;
if
(
!
studentState
.
deployReportSaved
)
{
showStudentFlowModal
(
'请先保存实操报告'
,
'提交报告前,请先点击左侧的“保存”按钮完成报告保存。'
);
return
false
;
}
studentState
.
deployReportSubmitted
=
true
;
studentState
.
deployReportReviewStatus
=
''
;
studentState
.
deploySubmitted
=
!!
studentState
.
deployArtifactSubmitted
;
studentState
.
deployReviewStatus
=
studentState
.
deployArtifactSubmitted
?
'待验收'
:
studentState
.
deployReviewStatus
;
studentState
.
deployReviewed
=
false
;
studentState
.
deployPassed
=
false
;
studentState
.
deployRejected
=
false
;
studentState
.
deployReviewComment
=
''
;
if
(
studentState
.
deployArtifactSubmitted
)
{
studentState
.
deployReviewStatus
=
'待验收'
;
studentState
.
deployReviewed
=
false
;
studentState
.
deployPassed
=
false
;
studentState
.
deployRejected
=
false
;
}
syncDeploySubmissionToMentor
();
renderContent
();
if
(
studentState
.
deployArtifactSubmitted
)
switchPage
(
'student-deploy-result'
);
return
true
;
}
function
syncDeploySubmissionToMentor
()
{
if
(
typeof
mentorState
===
'undefined'
||
!
mentorState
.
deploySubmissionsByStudent
)
return
;
var
sid
=
1
;
// 原型演示:当前登录学生对应导师 mock 数据中的学生 1
var
msub
=
mentorState
.
deploySubmissionsByStudent
[
sid
];
if
(
!
msub
)
return
;
msub
.
artifactSubmitted
=
!!
studentState
.
deployArtifactSubmitted
;
msub
.
reportSubmitted
=
!!
studentState
.
deployReportSubmitted
;
msub
.
artifact
=
JSON
.
parse
(
JSON
.
stringify
(
studentState
.
deployArtifact
||
{}));
msub
.
log
=
msub
.
log
||
{};
if
(
studentState
.
deployLogName
)
msub
.
log
.
fileName
=
studentState
.
deployLogName
;
if
(
studentState
.
deployLogContent
)
msub
.
log
.
content
=
studentState
.
deployLogContent
;
msub
.
report
=
JSON
.
parse
(
JSON
.
stringify
(
studentState
.
deployReport
||
{}));
msub
.
review
=
msub
.
review
||
{
status
:
''
,
comment
:
''
,
reviewedAt
:
''
,
artifactStatus
:
''
,
reportStatus
:
''
};
// 不写入 review.status:'待验收' 由导师端根据提交状态推导,只有导师真正提交验收结论时才写入,
// 避免把「待验收」误判为「已验收锁定」导致导师端进入只读面板。
}
function
buildDeployArtifactPanel
()
{
var
a
=
studentState
.
deployArtifact
||
{};
var
saved
=
!!
studentState
.
deployArtifactSaved
;
var
submitted
=
!!
studentState
.
deployArtifactSubmitted
;
var
locked
=
isDeploy
SubmissionLocked
(
);
var
locked
=
isDeploy
PartLocked
(
'artifact'
);
return
`
<div class="bg-white rounded-lg border border-[#E5E6EB] shadow-sm p-6 space-y-5">
<div class="flex items-center justify-between gap-2">
...
...
@@ -3342,7 +3392,7 @@ function buildDeployArtifactPanel() {
</div>
<div class="flex gap-3">
<button class="btn-outline flex-1 py-3" onclick="saveDeployArtifact()" `
+
(
locked
?
'disabled'
:
''
)
+
`>`
+
(
submitted
?
'已保存'
:
(
saved
?
'已保存'
:
'保存'
))
+
`</button>
<button class="btn-primary flex-1 py-3" onclick="submitDeployArtifact()" `
+
((
!
saved
||
submitted
)
?
'disabled'
:
''
)
+
`>`
+
(
submitted
?
'已提交'
:
'提交'
)
+
`</button>
<button class="btn-primary flex-1 py-3" onclick="submitDeployArtifact()" `
+
((
!
saved
||
submitted
||
locked
)
?
'disabled'
:
''
)
+
`>`
+
(
submitted
?
'已提交'
:
'提交'
)
+
`</button>
</div>
</div>`
;
}
...
...
@@ -3351,7 +3401,7 @@ function buildDeployReportPanel() {
var
r
=
studentState
.
deployReport
||
{};
var
saved
=
!!
studentState
.
deployReportSaved
;
var
submitted
=
!!
studentState
.
deployReportSubmitted
;
var
locked
=
isDeploy
SubmissionLocked
(
);
var
locked
=
isDeploy
PartLocked
(
'report'
);
return
`
<div class="bg-white rounded-lg border border-[#E5E6EB] shadow-sm p-6 space-y-5">
<div class="flex items-center justify-between gap-2">
...
...
@@ -3384,7 +3434,7 @@ function buildDeployReportPanel() {
</div>
<div class="flex gap-3">
<button class="btn-outline flex-1 py-3" onclick="saveDeployReport()" `
+
(
locked
?
'disabled'
:
''
)
+
`>`
+
(
submitted
?
'已保存'
:
(
saved
?
'已保存'
:
'保存'
))
+
`</button>
<button class="btn-primary flex-1 py-3" onclick="submitDeployReport()" `
+
((
!
saved
||
submitted
)
?
'disabled'
:
''
)
+
`>`
+
(
submitted
?
'已提交'
:
'提交'
)
+
`</button>
<button class="btn-primary flex-1 py-3" onclick="submitDeployReport()" `
+
((
!
saved
||
submitted
||
locked
)
?
'disabled'
:
''
)
+
`>`
+
(
submitted
?
'已提交'
:
'提交'
)
+
`</button>
</div>
</div>`
;
}
...
...
@@ -3453,6 +3503,8 @@ pageRenderers["student-deploy-result"] = function() {
var
reviewRound
=
studentState
.
deployReviewRound
||
1
;
var
reviewTime
=
studentState
.
deployReviewUpdatedAt
||
'—'
;
var
notifyTime
=
studentState
.
deployReviewNotifiedAt
||
'—'
;
var
artifactStatus
=
studentState
.
deployArtifactReviewStatus
||
(
passed
?
'通过'
:
(
rejected
?
'驳回'
:
(
supplement
?
'待补充'
:
''
)));
var
reportStatus
=
studentState
.
deployReportReviewStatus
||
(
passed
?
'通过'
:
(
rejected
?
'驳回'
:
(
supplement
?
'待补充'
:
''
)));
var
actionHtml
=
''
;
if
(
passed
)
{
actionHtml
=
...
...
@@ -3460,7 +3512,7 @@ pageRenderers["student-deploy-result"] = function() {
'<button class="btn-outline w-full py-3" onclick="switchPage(
\'
student-dashboard
\'
)">返回首页</button>'
;
}
else
if
(
rejected
||
supplement
)
{
actionHtml
=
'<button class="btn-primary w-full py-3" onclick="
switchPage(
\'
student-deploy-submit
\'
)">返回提交页修改</button>'
+
'<button class="btn-primary w-full py-3" onclick="
reopenDeploySubmit(
)">返回提交页修改</button>'
+
'<button class="btn-outline w-full py-3" onclick="switchPage(
\'
student-dashboard
\'
)">返回首页</button>'
;
}
else
if
(
bothSubmitted
||
reviewing
)
{
actionHtml
=
...
...
@@ -3511,8 +3563,12 @@ pageRenderers["student-deploy-result"] = function() {
<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-2 gap-3 mb-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]">`
+
escapeAutodlHtml
(
artifactStatus
||
'待验收'
)
+
`</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
(
reportStatus
||
'待验收'
)
+
`</div></div>
</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]">`
+
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>
...
...
@@ -3619,8 +3675,7 @@ function buildStudentNotificationListHtml() {
function
toggleStudentNotifications
()
{
var
menu
=
document
.
getElementById
(
'stuNtfList'
);
var
container
=
document
.
getElementById
(
'stuNtfMenu'
);
if
(
!
menu
||
!
container
)
return
;
if
(
!
menu
)
return
;
if
(
menu
.
style
.
display
===
'block'
)
{
menu
.
style
.
display
=
'none'
;
return
;
...
...
@@ -3644,10 +3699,10 @@ function openStudentNotification(id) {
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
String
(
list
[
i
].
id
)
===
String
(
id
))
list
[
i
].
read
=
true
;
}
updateStudentNotificationBadge
();
var
menu
=
document
.
getElementById
(
'stuNtfList'
);
if
(
menu
)
menu
.
style
.
display
=
'none'
;
updateStudentNotificationBadge
();
switchPage
(
'student-deploy-result'
);
if
(
studentState
.
deployReviewStatus
)
switchPage
(
'student-deploy-result'
);
}
// 入项申请未解锁提示
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论