Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
f2fe6965
提交
f2fe6965
authored
4月 21, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
驳回作业重修编辑取消时间限制
上级
dc20f1ec
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
14 行增加
和
8 行删除
+14
-8
chapterWork.vue
src/modules/viewer/components/work/chapterWork.vue
+14
-8
没有找到文件。
src/modules/viewer/components/work/chapterWork.vue
浏览文件 @
f2fe6965
...
@@ -3,14 +3,14 @@
...
@@ -3,14 +3,14 @@
<container
:title=
"chapter.name"
v-loading=
"loading"
>
<container
:title=
"chapter.name"
v-loading=
"loading"
>
<div
class=
"exam-form"
>
<div
class=
"exam-form"
>
<template
v-for=
"(item, index) in questions"
>
<template
v-for=
"(item, index) in questions"
>
<el-form
:disabled=
"disabled
|| !isWorkTime
"
:key=
"item.id"
ref=
"form"
:model=
"item.formModel"
:rules=
"rules"
>
<el-form
:disabled=
"disabled"
:key=
"item.id"
ref=
"form"
:model=
"item.formModel"
:rules=
"rules"
>
<el-form-item
prop=
"user_answer"
>
<el-form-item
prop=
"user_answer"
>
<exam-item
<exam-item
:index=
"index"
:index=
"index"
:type=
"item.question_type"
:type=
"item.question_type"
:data=
"item"
:data=
"item"
:value=
"item.formModel"
:value=
"item.formModel"
:disabled=
"disabled
|| !isWorkTime
"
:disabled=
"disabled"
:hasUpload=
"hasUpload"
:hasUpload=
"hasUpload"
></exam-item>
></exam-item>
</el-form-item>
</el-form-item>
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
</div>
</div>
</div>
</div>
<div
class=
"buttons"
>
<div
class=
"buttons"
>
<el-button
type=
"primary"
@
click=
"onReEdit"
:disabled=
"!isWorkTime"
>
{{
$t
(
'viewerWork.reEdit'
)
}}
</el-button>
<el-button
type=
"primary"
@
click=
"onReEdit"
>
{{
$t
(
'viewerWork.reEdit'
)
}}
</el-button>
</div>
</div>
</
template
>
</
template
>
<!-- 正常状态 -->
<!-- 正常状态 -->
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
<
/div
>
<
/div
>
<
div
class
=
"buttons"
>
<
div
class
=
"buttons"
>
<
el
-
tooltip
:
content
=
"$t('viewerWork.workSubmitButtonTips')"
placement
=
"right"
>
<
el
-
tooltip
:
content
=
"$t('viewerWork.workSubmitButtonTips')"
placement
=
"right"
>
<
el
-
button
type
=
"primary"
:
disabled
=
"disabled
|| !isWorkTime
"
:
loading
=
"submitLoading"
@
click
=
"onSubmit"
>
{{
<
el
-
button
type
=
"primary"
:
disabled
=
"disabled"
:
loading
=
"submitLoading"
@
click
=
"onSubmit"
>
{{
submitText
submitText
}}
<
/el-button
>
}}
<
/el-button
>
<
/el-tooltip
>
<
/el-tooltip
>
...
@@ -116,7 +116,6 @@ export default {
...
@@ -116,7 +116,6 @@ export default {
startTime
:
new
Date
().
getTime
(),
// 进入时间
startTime
:
new
Date
().
getTime
(),
// 进入时间
messageInstance
:
null
,
messageInstance
:
null
,
deadline
:
''
,
// 截止时间
deadline
:
''
,
// 截止时间
disabled
:
false
,
submitLoading
:
false
,
submitLoading
:
false
,
hasUpload
:
true
,
// 是否可以上传
hasUpload
:
true
,
// 是否可以上传
isAnonymous
:
false
,
// 是否匿名
isAnonymous
:
false
,
// 是否匿名
...
@@ -184,6 +183,16 @@ export default {
...
@@ -184,6 +183,16 @@ export default {
const
currentTime
=
new
Date
().
getTime
()
const
currentTime
=
new
Date
().
getTime
()
const
endTime
=
+
new
Date
(
this
.
deadline
)
const
endTime
=
+
new
Date
(
this
.
deadline
)
return
this
.
hasComment
&&
currentTime
>
endTime
return
this
.
hasComment
&&
currentTime
>
endTime
}
,
disabled
()
{
if
(
!
this
.
detail
)
{
return
true
}
// -1未处理 0已处理 1驳回
if
(
this
.
detail
.
status
===
-
1
)
{
return
false
}
return
[
0
,
1
].
includes
(
this
.
detail
.
status
)
||
this
.
isWorkTime
}
}
}
,
}
,
methods
:
{
methods
:
{
...
@@ -205,8 +214,6 @@ export default {
...
@@ -205,8 +214,6 @@ export default {
.
then
(
response
=>
{
.
then
(
response
=>
{
this
.
detail
=
Array
.
isArray
(
response
)
?
null
:
response
this
.
detail
=
Array
.
isArray
(
response
)
?
null
:
response
if
(
this
.
detail
)
{
if
(
this
.
detail
)
{
// -1未处理 0已处理 1驳回
this
.
disabled
=
[
0
,
1
].
includes
(
this
.
detail
.
status
)
const
parseAnswers
=
JSON
.
parse
(
this
.
detail
.
work_contents
)
const
parseAnswers
=
JSON
.
parse
(
this
.
detail
.
work_contents
)
// 设置答案
// 设置答案
this
.
questions
=
this
.
questions
.
map
(
item
=>
{
this
.
questions
=
this
.
questions
.
map
(
item
=>
{
...
@@ -329,7 +336,6 @@ export default {
...
@@ -329,7 +336,6 @@ export default {
}
,
}
,
// 重新编辑
// 重新编辑
onReEdit
()
{
onReEdit
()
{
this
.
disabled
=
false
this
.
detail
.
status
=
-
1
this
.
detail
.
status
=
-
1
}
}
}
,
}
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论