Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
studyweb_Prototype
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
yujiejie
studyweb_Prototype
Commits
2147d675
提交
2147d675
authored
8月 23, 2026
作者:
yujiejie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
821步骤二完成
上级
3c23b227
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
110 行增加
和
57 行删除
+110
-57
pages-mentor.js
pages-mentor.js
+110
-57
没有找到文件。
pages-mentor.js
浏览文件 @
2147d675
...
...
@@ -1649,43 +1649,84 @@ function buildMentorDeployCompletenessNotice(sub) {
'<div>该学生提交材料不完整:缺少<b class="mx-0.5">'
+
missing
.
join
(
'、'
)
+
'</b>,暂不能提交「通过」验收结论。</div></div>'
;
}
// ===== 导师部署验收台:验收参数与测试状态(按学生索引,临时值不改学生原始提交) =====
// ===== 导师部署验收台:任务定义 =====
var
MENTOR_DEPLOY_TASKS
=
{
'text-model'
:
{
key
:
'text-model'
,
tabName
:
'任务一'
,
title
:
'文本模型部署'
,
shortName
:
'文本模型'
,
modelsPath
:
'/v1/models'
,
mainPath
:
'/v1/chat/completions'
,
defaultPrompt
:
'请用一句话介绍你自己。'
,
defaultMaxTokens
:
'2048'
,
defaultTemperature
:
'0.7'
},
'image-gen'
:
{
key
:
'image-gen'
,
tabName
:
'任务二'
,
title
:
'图像生成 API'
,
shortName
:
'图像生成'
,
modelsPath
:
'/v1/models'
,
mainPath
:
'/v1/generations'
,
statusPath
:
'/v1/generations/{id}'
,
defaultImagePrompt
:
'一只戴蓝色围巾的柴犬,半身像,自然光'
,
defaultSize
:
'1024x1024'
}
};
// ===== 导师部署验收台:验收参数与测试状态(按「任务 × 学生」索引,临时值不改学生原始提交) =====
var
mentorDeployReviewState
=
{
params
:
{},
tests
:
{},
scores
:
{},
comments
:
{},
partStatus
:
{}
// 分项验收结论草稿:partStatus[sid] = { artifact: '通过'|'驳回'|'待补充', report: '...' }
activeTask
:
''
,
// 全局任务 Tab 当前选中:'text-model' | 'image-gen';空串表示未显式切换(自动选择)
contentTab
:
'artifact'
,
// 中栏 Tab:'artifact' | 'log' | 'report'(步骤 5 启用)
params
:
{},
// [taskKey][sid] -> { apiUrl, apiKey, modelName, ... }
tests
:
{},
// [taskKey][sid] -> { models, chat | genSubmit | genStatus }
scores
:
{},
// [taskKey][sid] -> { api, deployment, logs, report, reflection }
comments
:
{},
// [taskKey][sid] -> string
decision
:
{},
// [taskKey][sid] -> '通过' | '待补充' | '驳回'(草稿,步骤 11 启用)
partStatus
:
{}
// 分项验收结论草稿:partStatus[sid] = { artifact: '通过'|'驳回'|'待补充', report: '...' }(保留至步骤 11 删除)
};
function
getMentorDeployReviewParams
(
studentId
)
{
// 返回验收台状态中指定容器在当前任务维度的「学生 map」,自动初始化中间层级
function
getMentorDeployReviewNode
(
stateKey
,
sid
,
taskKey
)
{
var
tk
=
taskKey
||
getMentorDeployTaskKey
(
sid
);
if
(
!
mentorDeployReviewState
[
stateKey
])
mentorDeployReviewState
[
stateKey
]
=
{};
if
(
!
mentorDeployReviewState
[
stateKey
][
tk
])
mentorDeployReviewState
[
stateKey
][
tk
]
=
{};
return
mentorDeployReviewState
[
stateKey
][
tk
];
}
function
getMentorDeployReviewParams
(
studentId
,
taskKey
)
{
var
sid
=
Number
(
studentId
);
var
sub
=
getMentorDeploySubmission
(
sid
);
var
tk
=
taskKey
||
getMentorDeployTaskKey
(
sid
);
var
sub
=
getMentorDeploySubmission
(
sid
,
tk
);
var
a
=
(
sub
&&
sub
.
artifact
)
||
{};
var
saved
=
mentorDeployReviewState
.
params
[
sid
]
||
{};
var
saved
=
getMentorDeployReviewNode
(
'params'
,
sid
,
tk
)[
sid
]
||
{};
var
def
=
MENTOR_DEPLOY_TASKS
[
tk
]
||
{};
return
{
apiUrl
:
saved
.
apiUrl
!=
null
?
saved
.
apiUrl
:
(
a
.
apiUrl
||
''
),
apiKey
:
saved
.
apiKey
!=
null
?
saved
.
apiKey
:
(
a
.
apiKey
||
''
),
modelName
:
saved
.
modelName
!=
null
?
saved
.
modelName
:
(
a
.
modelName
||
''
),
apiPath
:
saved
.
apiPath
!=
null
?
saved
.
apiPath
:
(
a
.
apiPath
||
'/v1/chat/completions'
),
prompt
:
saved
.
prompt
!=
null
?
saved
.
prompt
:
'请用一句话介绍你自己。'
,
maxTokens
:
saved
.
maxTokens
!=
null
?
saved
.
maxTokens
:
'2048'
,
temperature
:
saved
.
temperature
!=
null
?
saved
.
temperature
:
'0.7'
,
imagePrompt
:
saved
.
imagePrompt
!=
null
?
saved
.
imagePrompt
:
'一只戴蓝色围巾的柴犬,半身像,自然光'
,
size
:
saved
.
size
!=
null
?
saved
.
size
:
'1024x1024'
,
apiPath
:
saved
.
apiPath
!=
null
?
saved
.
apiPath
:
(
a
.
apiPath
||
def
.
mainPath
||
'/v1/chat/completions'
),
prompt
:
saved
.
prompt
!=
null
?
saved
.
prompt
:
(
def
.
defaultPrompt
||
'请用一句话介绍你自己。'
)
,
maxTokens
:
saved
.
maxTokens
!=
null
?
saved
.
maxTokens
:
(
def
.
defaultMaxTokens
||
'2048'
)
,
temperature
:
saved
.
temperature
!=
null
?
saved
.
temperature
:
(
def
.
defaultTemperature
||
'0.7'
)
,
imagePrompt
:
saved
.
imagePrompt
!=
null
?
saved
.
imagePrompt
:
(
def
.
defaultImagePrompt
||
'一只戴蓝色围巾的柴犬,半身像,自然光'
)
,
size
:
saved
.
size
!=
null
?
saved
.
size
:
(
def
.
defaultSize
||
'1024x1024'
)
,
seed
:
saved
.
seed
!=
null
?
saved
.
seed
:
''
};
}
function
setMentorDeployReviewParam
(
field
,
value
)
{
var
sid
=
Number
(
mentorState
.
deployReviewStudentId
);
if
(
!
mentorDeployReviewState
.
params
[
sid
])
mentorDeployReviewState
.
params
[
sid
]
=
{};
mentorDeployReviewState
.
params
[
sid
][
field
]
=
value
;
var
map
=
getMentorDeployReviewNode
(
'params'
,
sid
);
if
(
!
map
[
sid
])
map
[
sid
]
=
{};
map
[
sid
][
field
]
=
value
;
}
function
restoreMentorDeployReviewParams
()
{
var
sid
=
Number
(
mentorState
.
deployReviewStudentId
);
mentorDeployReviewState
.
params
[
sid
]
=
{};
var
map
=
getMentorDeployReviewNode
(
'params'
,
sid
);
map
[
sid
]
=
{};
renderContent
();
}
...
...
@@ -1693,8 +1734,9 @@ function restoreMentorDeployReviewParams() {
function
getMentorDeployBaseUrl
()
{
var
sid
=
Number
(
mentorState
.
deployReviewStudentId
);
var
p
=
getMentorDeployReviewParams
(
sid
);
var
sub
=
getMentorDeploySubmission
(
sid
);
var
tk
=
getMentorDeployTaskKey
(
sid
);
var
p
=
getMentorDeployReviewParams
(
sid
,
tk
);
var
sub
=
getMentorDeploySubmission
(
sid
,
tk
);
var
a
=
(
sub
&&
sub
.
artifact
)
||
{};
var
url
=
String
(
p
.
apiUrl
||
''
).
trim
().
replace
(
/
\/
+$/
,
''
);
if
(
!
url
)
return
''
;
...
...
@@ -1731,16 +1773,18 @@ function getMentorDeployRequestHeaders() {
function
runMentorDeployModelsTest
()
{
var
sid
=
Number
(
mentorState
.
deployReviewStudentId
);
var
p
=
getMentorDeployReviewParams
(
sid
);
var
tk
=
getMentorDeployTaskKey
(
sid
);
var
p
=
getMentorDeployReviewParams
(
sid
,
tk
);
var
base
=
getMentorDeployBaseUrl
();
if
(
!
base
)
{
showStudentFlowModal
(
'缺少 API 地址'
,
'请在验收参数中填写 API 地址后再测试。'
);
return
;
}
if
(
!
mentorDeployReviewState
.
tests
[
sid
])
mentorDeployReviewState
.
tests
[
sid
]
=
{};
var
testsNode
=
getMentorDeployReviewNode
(
'tests'
,
sid
,
tk
);
if
(
!
testsNode
[
sid
])
testsNode
[
sid
]
=
{};
var
url
=
base
+
'/v1/models'
;
var
startedAt
=
Date
.
now
();
mentorDeployReviewState
.
tests
[
sid
].
models
=
{
status
:
'loading'
,
url
:
url
};
testsNode
[
sid
].
models
=
{
status
:
'loading'
,
url
:
url
};
renderContent
();
fetch
(
url
,
{
method
:
'GET'
,
headers
:
getMentorDeployRequestHeaders
()
})
.
then
(
function
(
res
)
{
...
...
@@ -1762,7 +1806,7 @@ function runMentorDeployModelsTest() {
}
else
if
(
p
.
modelName
&&
!
modelFound
)
{
err
=
'HTTP 200,但模型列表未包含声明的模型名称「'
+
p
.
modelName
+
'」,请核对模型名称是否与部署服务一致。'
;
}
mentorDeployReviewState
.
tests
[
sid
].
models
=
{
testsNode
[
sid
].
models
=
{
status
:
pass
?
'pass'
:
'fail'
,
httpStatus
:
res
.
status
,
latency
:
latency
,
...
...
@@ -1778,7 +1822,7 @@ function runMentorDeployModelsTest() {
})
.
catch
(
function
(
err
)
{
var
latency
=
Date
.
now
()
-
startedAt
;
mentorDeployReviewState
.
tests
[
sid
].
models
=
{
testsNode
[
sid
].
models
=
{
status
:
'fail'
,
httpStatus
:
0
,
latency
:
latency
,
...
...
@@ -1795,16 +1839,18 @@ function runMentorDeployModelsTest() {
function
runMentorDeployChatTest
()
{
var
sid
=
Number
(
mentorState
.
deployReviewStudentId
);
var
p
=
getMentorDeployReviewParams
(
sid
);
var
tk
=
getMentorDeployTaskKey
(
sid
);
var
p
=
getMentorDeployReviewParams
(
sid
,
tk
);
var
base
=
getMentorDeployBaseUrl
();
if
(
!
base
)
{
showStudentFlowModal
(
'缺少 API 地址'
,
'请在验收参数中填写 API 地址后再测试。'
);
return
;
}
if
(
!
mentorDeployReviewState
.
tests
[
sid
])
mentorDeployReviewState
.
tests
[
sid
]
=
{};
var
testsNode
=
getMentorDeployReviewNode
(
'tests'
,
sid
,
tk
);
if
(
!
testsNode
[
sid
])
testsNode
[
sid
]
=
{};
var
url
=
joinMentorDeployPath
(
base
,
p
.
apiPath
||
'/v1/chat/completions'
);
var
startedAt
=
Date
.
now
();
mentorDeployReviewState
.
tests
[
sid
].
chat
=
{
status
:
'loading'
,
url
:
url
};
testsNode
[
sid
].
chat
=
{
status
:
'loading'
,
url
:
url
};
renderContent
();
var
body
=
{
model
:
p
.
modelName
||
''
,
...
...
@@ -1840,7 +1886,7 @@ function runMentorDeployChatTest() {
}
else
if
(
!
pass
)
{
err
=
'HTTP 200,但未解析到非空的 choices[0].message.content,请确认返回结构与 OpenAI 兼容格式一致。'
;
}
mentorDeployReviewState
.
tests
[
sid
].
chat
=
{
testsNode
[
sid
].
chat
=
{
status
:
pass
?
'pass'
:
'fail'
,
httpStatus
:
res
.
status
,
latency
:
latency
,
...
...
@@ -1856,7 +1902,7 @@ function runMentorDeployChatTest() {
})
.
catch
(
function
(
err
)
{
var
latency
=
Date
.
now
()
-
startedAt
;
mentorDeployReviewState
.
tests
[
sid
].
chat
=
{
testsNode
[
sid
].
chat
=
{
status
:
'fail'
,
httpStatus
:
0
,
latency
:
latency
,
...
...
@@ -1880,7 +1926,7 @@ function getMentorDeployGenSubmitUrl() {
function
getMentorDeployGenStatusUrl
()
{
var
sid
=
Number
(
mentorState
.
deployReviewStudentId
);
var
tests
=
mentorDeployReviewState
.
tests
[
sid
]
||
{};
var
tests
=
getMentorDeployReviewNode
(
'tests'
,
sid
)
[
sid
]
||
{};
var
taskId
=
(
tests
.
genSubmit
&&
tests
.
genSubmit
.
taskId
)
||
''
;
var
base
=
getMentorDeployBaseUrl
();
return
taskId
?
(
base
+
'/v1/generations/'
+
encodeURIComponent
(
taskId
))
:
(
base
?
base
+
'/v1/generations/{id}'
:
''
);
...
...
@@ -1899,16 +1945,18 @@ function mentorDeployPickTaskInfo(data) {
function
runMentorDeployGenSubmitTest
()
{
var
sid
=
Number
(
mentorState
.
deployReviewStudentId
);
var
p
=
getMentorDeployReviewParams
(
sid
);
var
tk
=
getMentorDeployTaskKey
(
sid
);
var
p
=
getMentorDeployReviewParams
(
sid
,
tk
);
var
base
=
getMentorDeployBaseUrl
();
if
(
!
base
)
{
showStudentFlowModal
(
'缺少 API 地址'
,
'请在验收参数中填写 API 地址后再测试。'
);
return
;
}
if
(
!
mentorDeployReviewState
.
tests
[
sid
])
mentorDeployReviewState
.
tests
[
sid
]
=
{};
var
testsNode
=
getMentorDeployReviewNode
(
'tests'
,
sid
,
tk
);
if
(
!
testsNode
[
sid
])
testsNode
[
sid
]
=
{};
var
url
=
getMentorDeployGenSubmitUrl
();
var
startedAt
=
Date
.
now
();
mentorDeployReviewState
.
tests
[
sid
].
genSubmit
=
{
status
:
'loading'
,
url
:
url
};
testsNode
[
sid
].
genSubmit
=
{
status
:
'loading'
,
url
:
url
};
renderContent
();
var
body
=
{
model
:
p
.
modelName
||
''
,
...
...
@@ -1939,7 +1987,7 @@ function runMentorDeployGenSubmitTest() {
}
else
if
(
!
info
.
id
)
{
err
=
'HTTP '
+
res
.
status
+
',但未解析到任务 ID(data.id),请确认返回结构与 API 文档一致。'
;
}
mentorDeployReviewState
.
tests
[
sid
].
genSubmit
=
{
testsNode
[
sid
].
genSubmit
=
{
status
:
pass
?
'pass'
:
'fail'
,
httpStatus
:
res
.
status
,
latency
:
latency
,
...
...
@@ -1954,7 +2002,7 @@ function runMentorDeployGenSubmitTest() {
})
.
catch
(
function
(
err
)
{
var
latency
=
Date
.
now
()
-
startedAt
;
mentorDeployReviewState
.
tests
[
sid
].
genSubmit
=
{
testsNode
[
sid
].
genSubmit
=
{
status
:
'fail'
,
httpStatus
:
0
,
latency
:
latency
,
...
...
@@ -1970,22 +2018,23 @@ function runMentorDeployGenSubmitTest() {
function
runMentorDeployGenStatusTest
()
{
var
sid
=
Number
(
mentorState
.
deployReviewStudentId
);
var
p
=
getMentorDeployReviewParams
(
sid
);
var
tk
=
getMentorDeployTaskKey
(
sid
);
var
p
=
getMentorDeployReviewParams
(
sid
,
tk
);
var
base
=
getMentorDeployBaseUrl
();
if
(
!
base
)
{
showStudentFlowModal
(
'缺少 API 地址'
,
'请在验收参数中填写 API 地址后再测试。'
);
return
;
}
var
tests
=
mentorDeployReviewState
.
tests
[
sid
]
||
{}
;
var
prevTaskId
=
(
tests
.
genSubmit
&&
tests
.
genSubmit
.
taskId
)
||
''
;
var
tests
Node
=
getMentorDeployReviewNode
(
'tests'
,
sid
,
tk
)
;
var
prevTaskId
=
(
tests
Node
[
sid
]
&&
testsNode
[
sid
].
genSubmit
&&
testsNode
[
sid
]
.
genSubmit
.
taskId
)
||
''
;
if
(
!
prevTaskId
)
{
showStudentFlowModal
(
'无任务 ID'
,
'请先提交生成任务,获得任务 ID 后再查询状态。'
);
return
;
}
if
(
!
mentorDeployReviewState
.
tests
[
sid
])
mentorDeployReviewState
.
tests
[
sid
]
=
{};
if
(
!
testsNode
[
sid
])
testsNode
[
sid
]
=
{};
var
url
=
base
+
'/v1/generations/'
+
encodeURIComponent
(
prevTaskId
);
var
startedAt
=
Date
.
now
();
mentorDeployReviewState
.
tests
[
sid
].
genStatus
=
{
status
:
'loading'
,
url
:
url
,
taskId
:
prevTaskId
};
testsNode
[
sid
].
genStatus
=
{
status
:
'loading'
,
url
:
url
,
taskId
:
prevTaskId
};
renderContent
();
fetch
(
url
,
{
method
:
'GET'
,
headers
:
getMentorDeployRequestHeaders
()
})
.
then
(
function
(
res
)
{
...
...
@@ -2003,7 +2052,7 @@ function runMentorDeployGenStatusTest() {
}
else
if
(
info
.
status
===
'failed'
)
{
err
=
'生成任务失败,状态:'
+
info
.
status
+
'。'
+
(
data
&&
data
.
error
?
'错误:'
+
JSON
.
stringify
(
data
.
error
)
:
''
);
}
mentorDeployReviewState
.
tests
[
sid
].
genStatus
=
{
testsNode
[
sid
].
genStatus
=
{
status
:
pass
?
'pass'
:
'fail'
,
httpStatus
:
res
.
status
,
latency
:
latency
,
...
...
@@ -2021,7 +2070,7 @@ function runMentorDeployGenStatusTest() {
})
.
catch
(
function
(
err
)
{
var
latency
=
Date
.
now
()
-
startedAt
;
mentorDeployReviewState
.
tests
[
sid
].
genStatus
=
{
testsNode
[
sid
].
genStatus
=
{
status
:
'fail'
,
httpStatus
:
0
,
latency
:
latency
,
...
...
@@ -2107,7 +2156,7 @@ function buildMentorDeployParamsPanel(sid) {
function
buildMentorDeployTextModelItems
(
sid
)
{
var
p
=
getMentorDeployReviewParams
(
sid
);
var
tests
=
mentorDeployReviewState
.
tests
[
sid
]
||
{};
var
tests
=
getMentorDeployReviewNode
(
'tests'
,
sid
)
[
sid
]
||
{};
var
modelsResult
=
tests
.
models
||
null
;
var
chatResult
=
tests
.
chat
||
null
;
var
modelName
=
p
.
modelName
;
...
...
@@ -2156,7 +2205,7 @@ function getMentorDeploySizeOptions(current) {
function
buildMentorDeployImageGenItems
(
sid
)
{
var
p
=
getMentorDeployReviewParams
(
sid
);
var
tests
=
mentorDeployReviewState
.
tests
[
sid
]
||
{};
var
tests
=
getMentorDeployReviewNode
(
'tests'
,
sid
)
[
sid
]
||
{};
var
modelsResult
=
tests
.
models
||
null
;
var
genResult
=
tests
.
genSubmit
||
null
;
var
statusResult
=
tests
.
genStatus
||
null
;
...
...
@@ -2215,11 +2264,12 @@ function getMentorDeployScoreItem(key) {
return
null
;
}
function
getMentorDeployReviewScores
(
studentId
)
{
function
getMentorDeployReviewScores
(
studentId
,
taskKey
)
{
var
sid
=
Number
(
studentId
);
var
sub
=
getMentorDeploySubmission
(
sid
);
var
tk
=
taskKey
||
getMentorDeployTaskKey
(
sid
);
var
sub
=
getMentorDeploySubmission
(
sid
,
tk
);
var
reviewScore
=
(
sub
&&
sub
.
review
&&
sub
.
review
.
score
)
||
{};
var
saved
=
mentorDeployReviewState
.
scores
[
sid
]
||
{};
var
saved
=
getMentorDeployReviewNode
(
'scores'
,
sid
,
tk
)
[
sid
]
||
{};
var
scores
=
{};
var
total
=
0
;
MENTOR_DEPLOY_SCORE_ITEMS
.
forEach
(
function
(
item
)
{
...
...
@@ -2239,12 +2289,13 @@ function getMentorDeployReviewScores(studentId) {
function
setMentorDeployReviewScore
(
field
,
value
)
{
var
sid
=
Number
(
mentorState
.
deployReviewStudentId
);
if
(
!
mentorDeployReviewState
.
scores
[
sid
])
mentorDeployReviewState
.
scores
[
sid
]
=
{};
var
map
=
getMentorDeployReviewNode
(
'scores'
,
sid
);
if
(
!
map
[
sid
])
map
[
sid
]
=
{};
var
item
=
getMentorDeployScoreItem
(
field
);
if
(
!
item
)
return
;
var
num
=
parseInt
(
value
,
10
);
if
(
isNaN
(
num
))
num
=
0
;
m
entorDeployReviewState
.
scores
[
sid
][
field
]
=
Math
.
max
(
0
,
Math
.
min
(
item
.
max
,
num
));
m
ap
[
sid
][
field
]
=
Math
.
max
(
0
,
Math
.
min
(
item
.
max
,
num
));
updateMentorDeployScoreTotal
();
}
...
...
@@ -2287,17 +2338,19 @@ function buildMentorDeployScoreCard(sid) {
// ===== 导师部署验收台:导师评语(按学生索引,草稿不改学生原始提交) =====
function
getMentorDeployReviewComment
(
studentId
)
{
function
getMentorDeployReviewComment
(
studentId
,
taskKey
)
{
var
sid
=
Number
(
studentId
);
var
sub
=
getMentorDeploySubmission
(
sid
);
var
draft
=
mentorDeployReviewState
.
comments
[
sid
];
var
tk
=
taskKey
||
getMentorDeployTaskKey
(
sid
);
var
sub
=
getMentorDeploySubmission
(
sid
,
tk
);
var
draft
=
getMentorDeployReviewNode
(
'comments'
,
sid
,
tk
)[
sid
];
if
(
draft
!=
null
)
return
draft
;
return
(
sub
&&
sub
.
review
&&
sub
.
review
.
comment
)
||
''
;
}
function
setMentorDeployReviewComment
(
value
)
{
var
sid
=
Number
(
mentorState
.
deployReviewStudentId
);
mentorDeployReviewState
.
comments
[
sid
]
=
value
;
var
map
=
getMentorDeployReviewNode
(
'comments'
,
sid
);
map
[
sid
]
=
value
;
}
// ===== 导师部署验收台:分项验收结论(产物 / 报告分别给结论)=====
...
...
@@ -2485,7 +2538,7 @@ function buildMentorDeployReviewPanel(student) {
function
getMentorDeployMissingApiTests
(
sid
)
{
var
sub
=
getMentorDeploySubmission
(
sid
);
var
tests
=
mentorDeployReviewState
.
tests
[
sid
]
||
{};
var
tests
=
getMentorDeployReviewNode
(
'tests'
,
sid
)
[
sid
]
||
{};
var
config
=
(
getMentorDeployTaskKey
(
sid
)
===
'image-gen'
)
?
[{
k
:
'models'
,
label
:
'图像模型列表'
},
{
k
:
'genSubmit'
,
label
:
'提交生成任务'
},
{
k
:
'genStatus'
,
label
:
'查询生成任务'
}]
:
[{
k
:
'models'
,
label
:
'模型列表'
},
{
k
:
'chat'
,
label
:
'聊天补全'
}];
...
...
@@ -2551,8 +2604,8 @@ function submitMentorDeployReview() {
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
]
||
{}));
sub
.
review
.
tests
=
JSON
.
parse
(
JSON
.
stringify
(
getMentorDeployReviewNode
(
'tests'
,
sid
)
[
sid
]
||
{}));
sub
.
review
.
params
=
JSON
.
parse
(
JSON
.
stringify
(
getMentorDeployReviewNode
(
'params'
,
sid
)
[
sid
]
||
{}));
// 清空本轮分项草稿,避免下次切换学生时残留
if
(
mentorDeployReviewState
.
partStatus
)
mentorDeployReviewState
.
partStatus
[
sid
]
=
{};
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论