Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
286ac677
提交
286ac677
authored
6月 04, 2020
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: viewer模块样式问题
上级
8601259f
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
37 行增加
和
19 行删除
+37
-19
chapterWork.vue
client/src/modules/viewer/components/work/chapterWork.vue
+34
-19
courseWork.vue
client/src/modules/viewer/components/work/courseWork.vue
+3
-0
没有找到文件。
client/src/modules/viewer/components/work/chapterWork.vue
浏览文件 @
286ac677
<
template
>
<
template
>
<container
:title=
"chapter.name"
v-loading=
"loading"
>
<container
:title=
"chapter.name"
v-loading=
"loading"
>
<div
class=
"exam-form"
>
<div
class=
"exam-form"
>
...
@@ -14,7 +13,7 @@
...
@@ -14,7 +13,7 @@
></exam-item>
></exam-item>
</el-form>
</el-form>
</div>
</div>
<p
style=
"color:red;"
v-if=
"deadline"
>
请于截止日期
{{
deadline
}}
前提交
</p>
<p
style=
"color:red;"
v-if=
"deadline"
>
请于截止日期
{{
deadline
}}
前提交
</p>
<!-- 驳回状态 -->
<!-- 驳回状态 -->
<template
v-if=
"detail && detail.status === 1"
>
<template
v-if=
"detail && detail.status === 1"
>
<div
class=
"work-bottom"
>
<div
class=
"work-bottom"
>
...
@@ -23,7 +22,7 @@
...
@@ -23,7 +22,7 @@
<h4>
作业被驳回,点击“重新编辑”按钮重新编辑内容再次提交
</h4>
<h4>
作业被驳回,点击“重新编辑”按钮重新编辑内容再次提交
</h4>
<div
class=
"paper-check-item"
>
<div
class=
"paper-check-item"
>
<b>
驳回时间:
</b>
<b>
驳回时间:
</b>
{{
detail
.
checker_time
}}
{{
detail
.
checker_time
}}
</div>
</div>
<div
class=
"paper-check-item"
>
<div
class=
"paper-check-item"
>
<b>
驳回说明:
</b>
<b>
驳回说明:
</b>
...
@@ -33,7 +32,9 @@
...
@@ -33,7 +32,9 @@
</div>
</div>
</div>
</div>
<div
class=
"buttons"
>
<div
class=
"buttons"
>
<el-button
type=
"primary"
@
click=
"onReEdit"
:disabled=
"!isWorkTime"
>
重新编辑
</el-button>
<el-button
type=
"primary"
@
click=
"onReEdit"
:disabled=
"!isWorkTime"
>
重新编辑
</el-button
>
</div>
</div>
</
template
>
</
template
>
<!-- 正常状态 -->
<!-- 正常状态 -->
...
@@ -42,10 +43,10 @@
...
@@ -42,10 +43,10 @@
<div
class=
"info"
>
<div
class=
"info"
>
<template
v-if=
"isRevised"
>
<template
v-if=
"isRevised"
>
<div
class=
"paper-check"
>
<div
class=
"paper-check"
>
<p>
批改时间:
{{
detail
.
checker_time
}}
</p>
<p>
批改时间:
{{
detail
.
checker_time
}}
</p>
<div
class=
"paper-check-item"
>
<div
class=
"paper-check-item"
>
<b>
评分:
</b>
<b>
评分:
</b>
{{
detail
.
score
}}
{{
detail
.
score
}}
</div>
</div>
<div
class=
"paper-check-item"
>
<div
class=
"paper-check-item"
>
<b>
评语:
</b>
<b>
评语:
</b>
...
@@ -54,20 +55,31 @@
...
@@ -54,20 +55,31 @@
</div>
</div>
</
template
>
</
template
>
<
template
v-else-if=
"detail.created_time"
>
<
template
v-else-if=
"detail.created_time"
>
<p
class=
"help"
>
已于
{{
detail
.
created_time
}}
提交,等待老师批改中。
</p>
<p
class=
"help"
>
<template
v-if=
"detail.updated_time && detail.updated_time !== detail.created_time"
>
已于
{{
detail
.
created_time
}}
提交,等待老师批改中。
<p
class=
"help"
>
最近提交时间:
{{
detail
.
updated_time
}}
</p>
</p>
<template
v-if=
"
detail.updated_time &&
detail.updated_time !== detail.created_time
"
>
<p
class=
"help"
>
最近提交时间:
{{
detail
.
updated_time
}}
</p>
</
template
>
</
template
>
</template>
</template>
</div>
</div>
</div>
</div>
<div
class=
"buttons"
>
<div
class=
"buttons"
>
<el-tooltip
content=
"在获老师批改之前,可以多次提交,将以最后一次提交为准"
placement=
"right"
>
<el-tooltip
content=
"在获老师批改之前,可以多次提交,将以最后一次提交为准"
placement=
"right"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
@
click=
"onSubmit"
@
click=
"onSubmit"
:disabled=
"disabled || !isWorkTime"
:disabled=
"disabled || !isWorkTime"
>
{{submitText}}
</el-button>
>
{{ submitText }}
</el-button
>
</el-tooltip>
</el-tooltip>
</div>
</div>
</template>
</template>
...
@@ -165,7 +177,7 @@ export default {
...
@@ -165,7 +177,7 @@ export default {
getDeadline
()
{
getDeadline
()
{
api
api
.
getChapterHomeworkDeadline
(
this
.
sid
,
this
.
cid
,
this
.
pid
)
.
getChapterHomeworkDeadline
(
this
.
sid
,
this
.
cid
,
this
.
pid
)
.
then
(
response
=>
{
.
then
(
(
response
)
=>
{
this
.
deadline
=
response
.
dead_line
this
.
deadline
=
response
.
dead_line
})
})
},
},
...
@@ -174,16 +186,16 @@ export default {
...
@@ -174,16 +186,16 @@ export default {
this
.
loading
=
true
this
.
loading
=
true
api
api
.
getChapterHomework
(
this
.
sid
,
this
.
cid
,
this
.
resourceId
)
.
getChapterHomework
(
this
.
sid
,
this
.
cid
,
this
.
resourceId
)
.
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驳回
// -1未处理 0已处理 1驳回
this
.
disabled
=
[
0
,
1
].
includes
(
this
.
detail
.
status
)
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
)
=>
{
const
found
=
parseAnswers
.
find
(
const
found
=
parseAnswers
.
find
(
answer
=>
answer
.
question_id
===
item
.
id
(
answer
)
=>
answer
.
question_id
===
item
.
id
)
)
if
(
found
)
{
if
(
found
)
{
item
.
user_answer
=
found
.
descreption
item
.
user_answer
=
found
.
descreption
...
@@ -203,7 +215,7 @@ export default {
...
@@ -203,7 +215,7 @@ export default {
if
(
!
list
)
{
if
(
!
list
)
{
return
[]
return
[]
}
}
return
list
.
map
(
item
=>
{
return
list
.
map
(
(
item
)
=>
{
let
temp
=
null
let
temp
=
null
if
(
item
.
question_type
===
1
)
{
if
(
item
.
question_type
===
1
)
{
// 单选
// 单选
...
@@ -264,7 +276,7 @@ export default {
...
@@ -264,7 +276,7 @@ export default {
(
new
Date
().
getTime
()
-
this
.
startTime
)
/
1000
(
new
Date
().
getTime
()
-
this
.
startTime
)
/
1000
)
)
// 提交的答案数据
// 提交的答案数据
const
answers
=
this
.
questions
.
map
(
item
=>
{
const
answers
=
this
.
questions
.
map
(
(
item
)
=>
{
return
{
return
{
question_id
:
item
.
id
,
question_id
:
item
.
id
,
descreption
:
descreption
:
...
@@ -291,7 +303,7 @@ export default {
...
@@ -291,7 +303,7 @@ export default {
handleSubmitRequest
(
params
)
{
handleSubmitRequest
(
params
)
{
api
api
.
sbumitChapterHomework
(
params
)
.
sbumitChapterHomework
(
params
)
.
then
(
response
=>
{
.
then
(
(
response
)
=>
{
if
(
response
.
status
)
{
if
(
response
.
status
)
{
this
.
$message
.
success
(
'提交成功,等待批改'
)
this
.
$message
.
success
(
'提交成功,等待批改'
)
this
.
getDetail
()
this
.
getDetail
()
...
@@ -299,7 +311,7 @@ export default {
...
@@ -299,7 +311,7 @@ export default {
this
.
$message
.
error
(
response
.
data
.
error
)
this
.
$message
.
error
(
response
.
data
.
error
)
}
}
})
})
.
catch
(
error
=>
{
.
catch
(
(
error
)
=>
{
this
.
$message
.
error
(
error
.
message
)
this
.
$message
.
error
(
error
.
message
)
})
})
},
},
...
@@ -340,5 +352,8 @@ export default {
...
@@ -340,5 +352,8 @@ export default {
}
}
.paper-check-item
{
.paper-check-item
{
display
:
flex
;
display
:
flex
;
b
{
white-space
:
nowrap
;
}
}
}
</
style
>
</
style
>
client/src/modules/viewer/components/work/courseWork.vue
浏览文件 @
286ac677
...
@@ -231,5 +231,8 @@ p {
...
@@ -231,5 +231,8 @@ p {
}
}
.paper-check-item
{
.paper-check-item
{
display
:
flex
;
display
:
flex
;
b
{
white-space
:
nowrap
;
}
}
}
</
style
>
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论