Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
x-learn
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
x-learn
Commits
189ecee7
提交
189ecee7
authored
10月 22, 2021
作者:
lihuihui
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://gitlab.ezijing.com/ezijing/x-learn
上级
078cb7fe
a32ea474
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
41 行增加
和
2 行删除
+41
-2
questionListItem.vue
src/components/exam/questionListItem.vue
+2
-0
index.vue
src/pages/exam/courseExam/chapter/index.vue
+20
-2
review.vue
src/pages/teacher/examReview/review.vue
+9
-0
review.vue
src/pages/teacher/testReview/review.vue
+10
-0
没有找到文件。
src/components/exam/questionListItem.vue
浏览文件 @
189ecee7
...
...
@@ -34,6 +34,8 @@
:autosize=
"
{ minRows: 4, maxRows: 6 }"
:disabled="disabled"
@blur="handleChange"
:maxlength="100"
:show-word-limit="true"
>
</el-input>
</
template
>
<
template
v-if=
"questionType === 3"
>
...
...
src/pages/exam/courseExam/chapter/index.vue
浏览文件 @
189ecee7
...
...
@@ -7,6 +7,7 @@
:hasCountdown=
"false"
@
submit=
"handleSubmit"
@
back=
"handleBack"
ref=
"exam"
v-if=
"Object.keys(data).length"
></exam-card>
</
template
>
...
...
@@ -19,13 +20,17 @@ export default {
return
{
status
:
1
,
// 考试状态
hasMark
:
true
,
data
:
{}
data
:
{},
cacheAnswerTime
:
null
}
},
beforeMount
()
{
// 获取考卷
this
.
getTopic
()
},
beforeDestroy
()
{
this
.
cacheAnswerTime
&&
clearInterval
(
this
.
cacheAnswerTime
)
// 停止缓存
},
methods
:
{
// 获取考卷
getTopic
()
{
...
...
@@ -41,9 +46,13 @@ export default {
this
.
data
=
JSON
.
parse
(
response
.
data
).
sheet
// 已提交
const
isSubmited
=
[
'1'
,
'2'
].
includes
(
this
.
data
.
status
)
// 缓存答题
if
(
isSubmited
)
{
this
.
status
=
2
this
.
hasMark
=
false
}
else
{
clearInterval
(
this
.
cacheAnswerTime
)
this
.
cacheAnswerTime
=
setInterval
(
this
.
handleCache
,
3000
)
}
})
},
...
...
@@ -55,6 +64,7 @@ export default {
handleSubmit
(
data
)
{
const
params
=
this
.
genSubmitData
(
data
).
params
const
answerNum
=
this
.
genSubmitData
(
data
).
answerNum
params
.
status
=
1
if
(
answerNum
!==
0
)
{
this
.
$confirm
(
`您还有
${
answerNum
}
道题没有作答`
,
'请确认'
,
{
confirmButtonText
:
'确认提交'
,
...
...
@@ -70,13 +80,21 @@ export default {
}
},
submitApi
(
params
)
{
api
.
setCourseCache
(
Object
.
assign
(
params
,
{
status
:
1
})).
then
(
res
=>
{
this
.
cacheAnswerTime
&&
clearInterval
(
this
.
cacheAnswerTime
)
// 停止缓存
api
.
setCourseCache
(
params
).
then
(
res
=>
{
this
.
$router
.
replace
({
path
:
'/course/chapter/result'
,
query
:
Object
.
assign
({},
this
.
$route
.
query
,
{
type
:
2
})
})
})
},
// 缓存答案
handleCache
()
{
const
refData
=
this
.
$refs
.
exam
const
params
=
this
.
genSubmitData
(
refData
.
questionGroups
).
params
params
.
status
=
0
api
.
setCourseCache
(
params
)
},
// 组装提交数据
genSubmitData
(
questionGroups
)
{
const
answers
=
{}
...
...
src/pages/teacher/examReview/review.vue
浏览文件 @
189ecee7
...
...
@@ -30,6 +30,7 @@
placeholder=
"请输入分数"
size=
"mini"
style=
"width:80px"
@
input=
"handleScoreInput(item)"
></el-input>
</div>
</div>
...
...
@@ -42,6 +43,8 @@
max=
"2"
resize=
"none"
v-model=
"item.comment"
:maxlength=
"100"
:show-word-limit=
"true"
>
</el-input>
</div>
...
...
@@ -115,6 +118,12 @@ export default {
this
.
studentList
=
JSON
.
parse
(
window
.
localStorage
.
examStudentsList
)
},
methods
:
{
handleScoreInput
(
item
)
{
item
.
user_score
=
parseInt
(
item
.
user_score
.
replace
(
/
[^\d]
+/g
,
''
))
if
(
item
.
user_score
>
item
.
score
)
{
item
.
user_score
=
item
.
score
}
},
selectStudent
(
item
)
{
this
.
sheetId
=
item
.
sheet_id
this
.
getTopic
()
...
...
src/pages/teacher/testReview/review.vue
浏览文件 @
189ecee7
...
...
@@ -26,10 +26,12 @@
<el-input
type=
"number"
:disabled=
"item.checked_flag"
:max=
"item.score"
v-model=
"item.user_score"
placeholder=
"请输入分数"
size=
"mini"
style=
"width:80px"
@
input=
"handleScoreInput(item)"
></el-input>
</div>
</div>
...
...
@@ -42,6 +44,8 @@
max=
"2"
resize=
"none"
v-model=
"item.comment"
:maxlength=
"100"
:show-word-limit=
"true"
>
</el-input>
</div>
...
...
@@ -115,6 +119,12 @@ export default {
this
.
studentList
=
JSON
.
parse
(
window
.
localStorage
.
testStudentsList
)
},
methods
:
{
handleScoreInput
(
item
)
{
item
.
user_score
=
parseInt
(
item
.
user_score
.
replace
(
/
[^\d]
+/g
,
''
))
if
(
item
.
user_score
>
item
.
score
)
{
item
.
user_score
=
item
.
score
}
},
selectStudent
(
item
)
{
this
.
sheetId
=
item
.
sheet_id
this
.
getTopic
()
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论