Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
studyweb_Prototype
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
yujiejie
studyweb_Prototype
Commits
3c23b227
提交
3c23b227
authored
8月 23, 2026
作者:
yujiejie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
821步骤一完成
上级
c684d05f
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
96 行增加
和
19 行删除
+96
-19
pages-mentor.js
pages-mentor.js
+96
-19
没有找到文件。
pages-mentor.js
浏览文件 @
3c23b227
...
...
@@ -76,7 +76,7 @@ var mentorState = {
// 阶段二部署验收:按学生 ID 索引的提交内容(原型 mock,与全局 studentState 解耦)
deploySubmissionsByStudent
:
{
1
:
{
taskType
:
'text-model'
,
'text-model'
:
{
artifactSubmitted
:
true
,
reportSubmitted
:
true
,
artifact
:
{
...
...
@@ -107,8 +107,17 @@ var mentorState = {
},
review
:
{
status
:
''
,
comment
:
''
,
reviewedAt
:
''
}
},
'image-gen'
:
{
artifactSubmitted
:
false
,
reportSubmitted
:
false
,
artifact
:
{
fileName
:
''
,
apiUrl
:
''
,
apiPath
:
'/v1/generations'
,
port
:
''
,
modelName
:
''
,
apiKey
:
''
},
log
:
{
fileName
:
''
,
content
:
''
},
report
:
{
taskName
:
''
,
process
:
''
,
issues
:
''
,
selfTest
:
''
,
summary
:
''
},
review
:
{
status
:
''
,
comment
:
''
,
reviewedAt
:
''
}
}
},
2
:
{
taskType
:
'text-model'
,
'text-model'
:
{
artifactSubmitted
:
true
,
reportSubmitted
:
true
,
artifact
:
{
...
...
@@ -146,8 +155,40 @@ var mentorState = {
notifiedAt
:
'2026-07-20 17:40'
}
},
'image-gen'
:
{
artifactSubmitted
:
true
,
reportSubmitted
:
true
,
artifact
:
{
fileName
:
'lisi-image-deploy-20260722.log'
,
apiUrl
:
'http://connect.west-b.autodl.com'
,
apiPath
:
'/v1/generations'
,
port
:
'7861'
,
modelName
:
'qwen-image-2.0'
,
apiKey
:
'sk-li4f-92cd-7712'
},
log
:
{
fileName
:
'lisi-image-deploy-20260722.log'
,
content
:
[
'[2026-07-22 16:20:10] [INFO] AutoDL 实例启动成功,GPU:NVIDIA GeForce RTX 4090 (24GB)'
,
'[2026-07-22 16:22:35] [INFO] 加载 Qwen-Image 2.0 图像生成模型,显存占用 16.3GB'
,
'[2026-07-22 16:23:12] [INFO] 图像服务启动,监听 0.0.0.0:7861'
,
'[2026-07-22 16:23:15] [INFO] 接口就绪:/v1/models, /v1/generations'
,
'[2026-07-22 16:25:40] [INFO] 提交测试生成任务成功,任务 ID:gen-9b41d7'
,
'[2026-07-22 16:26:05] [INFO] 任务轮询至 succeeded,图片已生成'
].
join
(
'
\
n'
)
},
report
:
{
taskName
:
'完成 Qwen-Image 2.0 图像生成服务的部署与验收'
,
process
:
'租赁 AutoDL RTX 4090 实例,部署 Qwen-Image 2.0 图像生成服务,开放 7861 端口,配置异步生成任务接口。'
,
issues
:
'吸取文本任务显存不足的教训,启动前先评估模型显存需求(约 16.3GB / 24GB),本次部署一次成功。'
,
selfTest
:
'提交生成任务返回 202 与任务 ID,轮询任务状态最终 succeeded,图片可正常下载查看。'
,
summary
:
'本次部署顺利,掌握了图像生成服务的异步任务机制,也验证了提前评估显存的重要性。'
},
review
:
{
status
:
''
,
comment
:
''
,
reviewedAt
:
''
}
}
},
3
:
{
taskType
:
'image-gen'
,
'image-gen'
:
{
artifactSubmitted
:
true
,
reportSubmitted
:
true
,
artifact
:
{
...
...
@@ -177,8 +218,17 @@ var mentorState = {
},
review
:
{
status
:
''
,
comment
:
''
,
reviewedAt
:
''
}
},
'text-model'
:
{
artifactSubmitted
:
false
,
reportSubmitted
:
false
,
artifact
:
{
fileName
:
''
,
apiUrl
:
''
,
apiPath
:
'/v1/chat/completions'
,
port
:
''
,
modelName
:
''
,
apiKey
:
''
},
log
:
{
fileName
:
''
,
content
:
''
},
report
:
{
taskName
:
''
,
process
:
''
,
issues
:
''
,
selfTest
:
''
,
summary
:
''
},
review
:
{
status
:
''
,
comment
:
''
,
reviewedAt
:
''
}
}
},
4
:
{
taskType
:
'text-model'
,
'text-model'
:
{
artifactSubmitted
:
true
,
reportSubmitted
:
false
,
artifact
:
{
...
...
@@ -206,6 +256,15 @@ var mentorState = {
summary
:
''
},
review
:
{
status
:
''
,
comment
:
''
,
reviewedAt
:
''
}
},
'image-gen'
:
{
artifactSubmitted
:
false
,
reportSubmitted
:
false
,
artifact
:
{
fileName
:
''
,
apiUrl
:
''
,
apiPath
:
'/v1/generations'
,
port
:
''
,
modelName
:
''
,
apiKey
:
''
},
log
:
{
fileName
:
''
,
content
:
''
},
report
:
{
taskName
:
''
,
process
:
''
,
issues
:
''
,
selfTest
:
''
,
summary
:
''
},
review
:
{
status
:
''
,
comment
:
''
,
reviewedAt
:
''
}
}
}
},
pendingTasks
:
[
...
...
@@ -1419,13 +1478,31 @@ function mentorDeployReviewEsc(s) {
});
}
function
getMentorDeploySubmission
(
studentId
)
{
function
getMentorDeployTaskKey
(
studentId
)
{
// 显式切换任务后以全局 activeTask 为准;未切换时自动选择当前学生「有提交内容」的任务,保证页面默认展示有效内容
if
(
mentorDeployReviewState
&&
mentorDeployReviewState
.
activeTask
)
return
mentorDeployReviewState
.
activeTask
;
var
sid
=
Number
(
studentId
);
if
(
sid
)
{
var
s
=
(
mentorState
.
deploySubmissionsByStudent
||
{})[
sid
];
if
(
s
)
{
var
order
=
[
'text-model'
,
'image-gen'
];
for
(
var
i
=
0
;
i
<
order
.
length
;
i
++
)
{
var
t
=
s
[
order
[
i
]];
if
(
t
&&
(
t
.
artifactSubmitted
||
t
.
reportSubmitted
||
(
t
.
review
&&
t
.
review
.
status
)))
return
order
[
i
];
}
}
}
return
'text-model'
;
}
function
getMentorDeploySubmission
(
studentId
,
taskKey
)
{
var
subs
=
mentorState
.
deploySubmissionsByStudent
||
{};
return
subs
[
Number
(
studentId
)]
||
null
;
var
s
=
subs
[
Number
(
studentId
)];
return
s
?
(
s
[
taskKey
||
getMentorDeployTaskKey
(
studentId
)]
||
null
)
:
null
;
}
function
getMentorDeployStudentStatus
(
studentId
)
{
var
sub
=
getMentorDeploySubmission
(
studentId
);
function
getMentorDeployStudentStatus
(
studentId
,
taskKey
)
{
var
sub
=
getMentorDeploySubmission
(
studentId
,
taskKey
);
if
(
!
sub
)
return
'未提交'
;
if
(
sub
.
review
&&
sub
.
review
.
status
)
return
sub
.
review
.
status
;
if
(
sub
.
artifactSubmitted
&&
sub
.
reportSubmitted
)
return
'待验收'
;
...
...
@@ -1433,8 +1510,8 @@ function getMentorDeployStudentStatus(studentId) {
return
'未提交'
;
}
function
isMentorDeployReviewLocked
(
studentId
)
{
var
sub
=
getMentorDeploySubmission
(
studentId
);
function
isMentorDeployReviewLocked
(
studentId
,
taskKey
)
{
var
sub
=
getMentorDeploySubmission
(
studentId
,
taskKey
);
if
(
!
sub
||
!
sub
.
review
||
!
sub
.
review
.
status
)
return
false
;
// 只有导师真正提交的验收结论(已通过/已驳回/待补充)才锁定,「待验收」仍可编辑
return
sub
.
review
.
status
!==
'待验收'
;
...
...
@@ -1453,13 +1530,13 @@ function getMentorDeployStatusBadge(status) {
return
map
[
status
]
||
'bg-amber-100 text-amber-700'
;
}
function
getMentorDeployTaskTypeLabel
(
studentId
)
{
var
sub
=
getMentorDeploySubmission
(
studentId
);
return
(
sub
&&
sub
.
taskType
===
'image-gen'
)
?
'图像生成任务'
:
'文本模型任务'
;
function
getMentorDeployTaskTypeLabel
(
studentId
,
taskKey
)
{
var
tk
=
taskKey
||
getMentorDeployTaskKey
(
studentId
);
return
tk
===
'image-gen'
?
'图像生成任务'
:
'文本模型任务'
;
}
function
getMentorDeployCompletenessLabel
(
studentId
)
{
var
sub
=
getMentorDeploySubmission
(
studentId
);
function
getMentorDeployCompletenessLabel
(
studentId
,
taskKey
)
{
var
sub
=
getMentorDeploySubmission
(
studentId
,
taskKey
);
if
(
!
sub
)
return
'产物未提交 · 报告未提交'
;
return
(
sub
.
artifactSubmitted
?
'产物已提交'
:
'产物未提交'
)
+
' · '
+
(
sub
.
reportSubmitted
?
'报告已提交'
:
'报告未提交'
);
}
...
...
@@ -2309,7 +2386,7 @@ function buildMentorDeployLockedReviewPanel(sid) {
var
score
=
getMentorDeployReviewScores
(
sid
);
var
round
=
review
.
round
||
1
;
var
tests
=
review
.
tests
||
{};
var
taskType
=
sub
.
taskType
||
'text-model'
;
var
taskType
=
getMentorDeployTaskKey
(
sid
)
;
var
testSummaryHtml
=
buildMentorDeployReviewTestsSummary
(
tests
,
taskType
);
var
artifactStatus
=
review
.
artifactStatus
||
''
;
var
reportStatus
=
review
.
reportStatus
||
''
;
...
...
@@ -2395,8 +2472,8 @@ function buildMentorDeployReviewPanel(student) {
if
(
!
student
)
return
''
;
var
sid
=
Number
(
student
.
id
);
var
sub
=
getMentorDeploySubmission
(
sid
);
var
task
Type
=
(
sub
&&
sub
.
taskType
===
'image-gen'
)
?
'image-gen'
:
'text-model'
;
var
itemsHtml
=
task
Type
===
'image-gen'
?
buildMentorDeployImageGenItems
(
sid
)
:
buildMentorDeployTextModelItems
(
sid
);
var
task
Key
=
getMentorDeployTaskKey
(
sid
)
;
var
itemsHtml
=
task
Key
===
'image-gen'
?
buildMentorDeployImageGenItems
(
sid
)
:
buildMentorDeployTextModelItems
(
sid
);
var
locked
=
isMentorDeployReviewLocked
(
sid
);
var
leftHtml
=
buildMentorDeployReviewHistoryHtml
(
sid
)
+
buildMentorDeployParamsPanel
(
sid
)
+
itemsHtml
;
var
rightHtml
=
locked
?
buildMentorDeployLockedReviewPanel
(
sid
)
:
buildMentorDeployScoreCard
(
sid
)
+
buildMentorDeployConclusionPanel
(
sid
);
...
...
@@ -2409,7 +2486,7 @@ function buildMentorDeployReviewPanel(student) {
function
getMentorDeployMissingApiTests
(
sid
)
{
var
sub
=
getMentorDeploySubmission
(
sid
);
var
tests
=
mentorDeployReviewState
.
tests
[
sid
]
||
{};
var
config
=
(
sub
&&
sub
.
taskType
===
'image-gen'
)
var
config
=
(
getMentorDeployTaskKey
(
sid
)
===
'image-gen'
)
?
[{
k
:
'models'
,
label
:
'图像模型列表'
},
{
k
:
'genSubmit'
,
label
:
'提交生成任务'
},
{
k
:
'genStatus'
,
label
:
'查询生成任务'
}]
:
[{
k
:
'models'
,
label
:
'模型列表'
},
{
k
:
'chat'
,
label
:
'聊天补全'
}];
var
missing
=
[];
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论