Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
15e006dd
提交
15e006dd
authored
5月 30, 2022
作者:
haodaking
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 修改作业提交判断逻辑
上级
e59bb059
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
8 行增加
和
26 行删除
+8
-26
chapterWork.vue
src/modules/viewer/components/work/chapterWork.vue
+8
-26
没有找到文件。
src/modules/viewer/components/work/chapterWork.vue
浏览文件 @
15e006dd
...
...
@@ -8,14 +8,7 @@
<
template
v-for=
"(item, index) in questions"
>
<el-form
:disabled=
"disabled"
:key=
"item.id"
ref=
"form"
:model=
"item.formModel"
:rules=
"rules"
>
<el-form-item
prop=
"user_answer"
>
<exam-item
:index=
"index"
:type=
"item.question_type"
:data=
"item"
:value=
"item.formModel"
:disabled=
"disabled"
:hasUpload=
"hasUpload"
></exam-item>
<exam-item
:index=
"index"
:type=
"item.question_type"
:data=
"item"
:value=
"item.formModel"
:disabled=
"disabled"
:hasUpload=
"hasUpload"
></exam-item>
</el-form-item>
</el-form>
</
template
>
...
...
@@ -65,13 +58,7 @@
<!--
我收到的作业评论
-->
<
chapter
-
work
-
comment
-
to
-
me
:
id
=
"detail.id"
v
-
if
=
"showComment"
><
/chapter-work-comment-to-me
>
<!--
评论同学作业
-->
<
chapter
-
work
-
comment
id
=
"comment"
:
endTime
=
"commentEndTime"
:
status
=
"detail.status2"
@
update
=
"$emit('updateHomework')"
v
-
if
=
"showComment"
>
<
chapter
-
work
-
comment
id
=
"comment"
:
endTime
=
"commentEndTime"
:
status
=
"detail.status2"
@
update
=
"$emit('updateHomework')"
v
-
if
=
"showComment"
>
<!--
已批改
-->
<
template
v
-
if
=
"isRevised"
>
<
div
class
=
"work-bottom"
>
...
...
@@ -168,10 +155,7 @@ export default {
const
{
questions
=
[],
answer
=
{
}
}
=
data
this
.
questions
=
this
.
genQuestions
(
questions
)
this
.
detail
=
Array
.
isArray
(
answer
)
?
{
}
:
answer
if
(
(
this
.
detail
.
status
===
1
||
this
.
detail
.
status2
===
1
)
&&
!
([
-
1
,
-
2
].
includes
(
this
.
detail
.
status
)
||
[
-
1
,
-
2
].
includes
(
this
.
detail
.
status2
))
)
{
if
((
this
.
detail
.
status
===
1
||
this
.
detail
.
status2
===
1
)
&&
!
([
-
1
,
-
2
].
includes
(
this
.
detail
.
status
)
||
[
-
1
,
-
2
].
includes
(
this
.
detail
.
status2
)))
{
this
.
dialogVisible
=
true
}
// 答案处理
...
...
@@ -234,12 +218,11 @@ export default {
disabled
()
{
// 已提交
const
isSubmit
=
!!
this
.
detail
.
created_time
if
(
this
.
detail
.
status
===
1
)
{
return
false
}
// -1未处理 0已处理 1驳回
return
this
.
detail
.
status
===
0
||
(
isSubmit
&&
!
this
.
isWorkTime
)
// if (this.detail.status === 1)
{
// return false
//
}
// // -1未处理 0已处理 1驳回
// return this.detail.status === 0 || !this.isWorkTime
}
,
dialogTitle
()
{
if
(
this
.
detail
.
status
===
1
&&
this
.
detail
.
status2
===
1
)
{
...
...
@@ -356,8 +339,7 @@ export default {
const
answers
=
this
.
questions
.
map
(
item
=>
{
return
{
question_id
:
item
.
id
,
descreption
:
item
.
question_type
===
3
?
Base64
.
encode
(
item
.
formModel
.
user_answer
)
:
item
.
formModel
.
user_answer
,
descreption
:
item
.
question_type
===
3
?
Base64
.
encode
(
item
.
formModel
.
user_answer
)
:
item
.
formModel
.
user_answer
,
file_url
:
item
.
formModel
.
attachments
,
is_encoded
:
1
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论