Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
x-learn
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
x-learn
Commits
d4bb63c3
提交
d4bb63c3
authored
10月 21, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fixes
上级
14dd1232
全部展开
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
60 行增加
和
34 行删除
+60
-34
examCard.vue
src/components/exam/examCard.vue
+14
-2
questionListItem.vue
src/components/exam/questionListItem.vue
+3
-3
questionNumbers.vue
src/components/exam/questionNumbers.vue
+0
-0
index copy.vue
src/pages/exam/courseExam/chapter/index copy.vue
+0
-0
index.vue
src/pages/exam/courseExam/chapter/index.vue
+12
-2
result.vue
src/pages/exam/courseExam/chapter/result.vue
+20
-25
questionDetails.vue
src/pages/exam/myExam/questionDetails.vue
+1
-0
index copy.vue
src/pages/exam/testExam/exam/index copy.vue
+0
-0
index.vue
src/pages/exam/testExam/exam/index.vue
+8
-2
review.vue
src/pages/teacher/examReview/review.vue
+1
-0
review.vue
src/pages/teacher/testReview/review.vue
+1
-0
没有找到文件。
src/components/exam/examCard.vue
浏览文件 @
d4bb63c3
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
</div>
</div>
<div
class=
"right"
>
<div
class=
"right"
>
<question-numbers
<question-numbers
:status=
"status"
:page=
"currentGroupPage"
:page=
"currentGroupPage"
:data=
"currentQuestionGroup"
:data=
"currentQuestionGroup"
:list=
"numberGroups.length ? numberGroups : questionGroups"
:list=
"numberGroups.length ? numberGroups : questionGroups"
...
@@ -66,6 +67,7 @@ import questionNumbers from '@/components/exam/questionNumbers'
...
@@ -66,6 +67,7 @@ import questionNumbers from '@/components/exam/questionNumbers'
export
default
{
export
default
{
components
:
{
questionList
,
questionNumbers
},
components
:
{
questionList
,
questionNumbers
},
props
:
{
props
:
{
status
:
{
type
:
Number
,
default
:
1
},
// 1:答题;2:查看;3:批阅
title
:
{
type
:
String
},
title
:
{
type
:
String
},
hasMark
:
{
type
:
Boolean
,
default
:
true
},
// 标记
hasMark
:
{
type
:
Boolean
,
default
:
true
},
// 标记
hasCollect
:
{
type
:
Boolean
,
default
:
true
},
// 收藏
hasCollect
:
{
type
:
Boolean
,
default
:
true
},
// 收藏
...
@@ -259,7 +261,7 @@ export default {
...
@@ -259,7 +261,7 @@ export default {
},
},
// 组装试题数据
// 组装试题数据
genQuestions
(
data
)
{
genQuestions
(
data
)
{
const
{
questions
,
answers
=
{}
}
=
data
const
{
questions
,
answers
=
{}
,
score_items
:
scores
=
{}
}
=
data
if
(
!
questions
)
return
[]
if
(
!
questions
)
return
[]
this
.
questionGroups
=
questions
.
question_items
.
reduce
((
result
,
question
)
=>
{
this
.
questionGroups
=
questions
.
question_items
.
reduce
((
result
,
question
)
=>
{
if
(
question
.
question_list
.
length
)
{
if
(
question
.
question_list
.
length
)
{
...
@@ -267,17 +269,27 @@ export default {
...
@@ -267,17 +269,27 @@ export default {
list
=
list
.
map
(
item
=>
{
list
=
list
.
map
(
item
=>
{
let
userAnswers
=
[]
let
userAnswers
=
[]
let
sign
=
false
let
sign
=
false
let
scoreItem
=
{}
if
(
answers
)
{
if
(
answers
)
{
// 大题答案包含所有小题答案
// 大题答案包含所有小题答案
const
bigQuestionAnswer
=
answers
[
question
.
question_item_id
]
const
bigQuestionAnswer
=
answers
[
question
.
question_item_id
]
const
bigQuestionScore
=
scores
[
question
.
question_item_id
]
if
(
bigQuestionAnswer
)
{
if
(
bigQuestionAnswer
)
{
// 小题答案
// 小题答案
const
questionAnswer
=
bigQuestionAnswer
[
item
.
id
]
||
{}
const
questionAnswer
=
bigQuestionAnswer
[
item
.
id
]
||
{}
// 小题分数
scoreItem
=
bigQuestionScore
[
item
.
id
]
||
{}
userAnswers
=
questionAnswer
.
answer
||
[]
userAnswers
=
questionAnswer
.
answer
||
[]
sign
=
questionAnswer
.
sign
||
false
sign
=
questionAnswer
.
sign
||
false
if
(
userAnswers
.
length
)
{
scoreItem
.
answer
=
scoreItem
.
is_right
?
1
:
2
}
else
{
scoreItem
.
answer
=
0
}
}
}
}
}
return
{
...
item
,
user_answer
:
userAnswers
,
sign
}
return
{
...
item
,
user_answer
:
userAnswers
,
sign
,
...
scoreItem
}
})
})
result
.
push
(
Object
.
assign
({},
question
,
{
question_list
:
list
}))
result
.
push
(
Object
.
assign
({},
question
,
{
question_list
:
list
}))
})
})
...
...
src/components/exam/questionListItem.vue
浏览文件 @
d4bb63c3
...
@@ -52,10 +52,10 @@
...
@@ -52,10 +52,10 @@
</div>
</div>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<
!--
<div
class=
"answer-item
"
>
<
div
class=
"answer-item"
v-if=
"data.comment
"
>
<div
class=
"answer-item-label"
>
老师点评:
</div>
<div
class=
"answer-item-label"
>
老师点评:
</div>
<div
class=
"answer-item-content"
>
{{
correctAnswerTex
t
}}
</div>
<div
class=
"answer-item-content"
>
{{
data
.
commen
t
}}
</div>
</div>
-->
</div>
</
template
>
</
template
>
<div
class=
"answer-item"
v-if=
"data.question_analysis"
>
<div
class=
"answer-item"
v-if=
"data.question_analysis"
>
<div
class=
"answer-item-label"
>
解析:
</div>
<div
class=
"answer-item-label"
>
解析:
</div>
...
...
src/components/exam/questionNumbers.vue
浏览文件 @
d4bb63c3
差异被折叠。
点击展开。
src/pages/exam/courseExam/chapter/index copy.vue
deleted
100644 → 0
浏览文件 @
14dd1232
差异被折叠。
点击展开。
src/pages/exam/courseExam/chapter/index.vue
浏览文件 @
d4bb63c3
<
template
>
<
template
>
<exam-card
<exam-card
title=
"课后练习"
title=
"课后练习"
:hasMark=
"hasMark"
:status=
"status"
:data=
"data"
:data=
"data"
:hasCountdown=
"false"
:hasCountdown=
"false"
@
submit=
"handleSubmit"
@
submit=
"handleSubmit"
...
@@ -15,6 +17,8 @@ export default {
...
@@ -15,6 +17,8 @@ export default {
components
:
{
ExamCard
},
components
:
{
ExamCard
},
data
()
{
data
()
{
return
{
return
{
status
:
1
,
// 考试状态
hasMark
:
true
,
data
:
{}
data
:
{}
}
}
},
},
...
@@ -35,6 +39,12 @@ export default {
...
@@ -35,6 +39,12 @@ export default {
}
}
api
.
getCourseQuestion
(
param
).
then
(
response
=>
{
api
.
getCourseQuestion
(
param
).
then
(
response
=>
{
this
.
data
=
JSON
.
parse
(
response
.
data
).
sheet
this
.
data
=
JSON
.
parse
(
response
.
data
).
sheet
// 已提交
const
isSubmited
=
[
'1'
,
'2'
].
includes
(
this
.
data
.
status
)
if
(
isSubmited
)
{
this
.
status
=
2
this
.
hasMark
=
false
}
})
})
},
},
// 返回
// 返回
...
@@ -59,9 +69,9 @@ export default {
...
@@ -59,9 +69,9 @@ export default {
answers
[
group
.
question_item_id
]
=
{}
answers
[
group
.
question_item_id
]
=
{}
}
}
group
.
question_list
.
forEach
(
item
=>
{
group
.
question_list
.
forEach
(
item
=>
{
answers
[
item
.
question_item_id
][
item
.
id
]
=
{
answers
[
group
.
question_item_id
][
item
.
id
]
=
{
sign
:
item
.
sign
?
item
.
sign
:
false
,
sign
:
item
.
sign
?
item
.
sign
:
false
,
answer
s
:
item
.
user_answer
answer
:
item
.
user_answer
}
}
})
})
})
})
...
...
src/pages/exam/courseExam/chapter/result.vue
浏览文件 @
d4bb63c3
...
@@ -57,8 +57,7 @@ export default {
...
@@ -57,8 +57,7 @@ export default {
return
`width:
${
this
.
accuracy
}
%`
return
`width:
${
this
.
accuracy
}
%`
}
}
},
},
mounted
()
{
mounted
()
{},
},
methods
:
{
methods
:
{
goPage
(
param
)
{
goPage
(
param
)
{
const
urlParam
=
this
.
$route
.
query
const
urlParam
=
this
.
$route
.
query
...
@@ -76,24 +75,20 @@ export default {
...
@@ -76,24 +75,20 @@ export default {
course_id
:
this
.
$route
.
query
.
course_id
,
course_id
:
this
.
$route
.
query
.
course_id
,
chapter_id
:
this
.
$route
.
query
.
chapter_id
chapter_id
:
this
.
$route
.
query
.
chapter_id
}
}
api
api
.
getCourseQuestion
(
param
).
then
(
response
=>
{
.
getCourseQuestion
(
param
)
.
then
(
response
=>
{
const
data
=
JSON
.
parse
(
response
.
data
)
const
data
=
JSON
.
parse
(
response
.
data
)
this
.
data
=
data
this
.
data
=
data
this
.
accuracy
=
parseInt
(
data
.
sheet
.
score
)
/
parseInt
(
data
.
sheet
.
questions
.
total_score
)
*
100
this
.
accuracy
=
(
parseInt
(
data
.
sheet
.
score
)
/
parseInt
(
data
.
sheet
.
questions
.
total_score
))
*
100
})
.
finally
(()
=>
{
})
})
}
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.result-box
{
.result-box
{
width
:
100%
;
width
:
100%
;
display
:
flex
;
display
:
flex
;
.card-left
{
.card-left
{
position
:
relative
;
position
:
relative
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
padding
:
10px
30px
20px
;
padding
:
10px
30px
20px
;
...
@@ -102,13 +97,13 @@ export default {
...
@@ -102,13 +97,13 @@ export default {
margin-right
:
10px
;
margin-right
:
10px
;
height
:
560px
;
height
:
560px
;
border-radius
:
8px
;
border-radius
:
8px
;
.title
{
.title
{
font-size
:
18px
;
font-size
:
18px
;
color
:
#222222
;
color
:
#222222
;
line-height
:
45px
;
line-height
:
45px
;
border-bottom
:
1px
solid
#ccc
;
border-bottom
:
1px
solid
#ccc
;
}
}
.chart-box
{
.chart-box
{
position
:
absolute
;
position
:
absolute
;
top
:
50%
;
top
:
50%
;
left
:
50%
;
left
:
50%
;
...
@@ -116,63 +111,63 @@ export default {
...
@@ -116,63 +111,63 @@ export default {
width
:
148px
;
width
:
148px
;
// margin: 26px auto 0;
// margin: 26px auto 0;
}
}
.assess
{
.assess
{
font-size
:
18px
;
font-size
:
18px
;
color
:
#222222
;
color
:
#222222
;
line-height
:
45px
;
line-height
:
45px
;
border-bottom
:
1px
solid
#ccc
;
border-bottom
:
1px
solid
#ccc
;
}
}
.assess-box
{
.assess-box
{
padding-top
:
27px
;
padding-top
:
27px
;
.prog
{
.prog
{
width
:
350px
;
width
:
350px
;
margin
:
0
auto
;
margin
:
0
auto
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
.line-box
{
.line-box
{
width
:
300px
;
width
:
300px
;
width
:
300px
;
width
:
300px
;
height
:
10px
;
height
:
10px
;
background
:
#
F9F9F
9
;
background
:
#
f9f9f
9
;
border-radius
:
5px
;
border-radius
:
5px
;
.line
{
.line
{
width
:
80%
;
width
:
80%
;
height
:
10px
;
height
:
10px
;
background
:
linear-gradient
(
90deg
,
#
F47C46
0%
,
#F22F
48
100%
);
background
:
linear-gradient
(
90deg
,
#
f47c46
0%
,
#f22f
48
100%
);
border-radius
:
5px
;
border-radius
:
5px
;
}
}
}
}
.icon
{
.icon
{
width
:
41px
;
width
:
41px
;
height
:
38px
;
height
:
38px
;
background
:
url(@/assets/images/res-icon.png)
;
background
:
url(@/assets/images/res-icon.png)
;
background-size
:
100%
100%
;
background-size
:
100%
100%
;
}
}
}
}
.text
{
.text
{
font-size
:
14px
;
font-size
:
14px
;
color
:
#222222
;
color
:
#222222
;
line-height
:
20px
;
line-height
:
20px
;
text-align
:
center
;
text-align
:
center
;
margin
:
50px
0
68px
0
;
margin
:
50px
0
68px
0
;
}
}
.btn
{
.btn
{
cursor
:
pointer
;
cursor
:
pointer
;
text-align
:
center
;
text-align
:
center
;
line-height
:
40px
;
line-height
:
40px
;
width
:
144px
;
width
:
144px
;
height
:
40px
;
height
:
40px
;
background
:
#
C
01540
;
background
:
#
c
01540
;
border-radius
:
4px
;
border-radius
:
4px
;
font-size
:
14px
;
font-size
:
14px
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#
FFFFFF
;
color
:
#
ffffff
;
margin
:
0
auto
;
margin
:
0
auto
;
}
}
}
}
}
}
.card-right
{
.card-right
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
flex
:
1
;
flex
:
1
;
background
:
#fff
;
background
:
#fff
;
...
...
src/pages/exam/myExam/questionDetails.vue
浏览文件 @
d4bb63c3
<
template
>
<
template
>
<exam-card
<exam-card
:title=
"title"
:title=
"title"
:status=
"2"
:groups=
"questionGroups"
:groups=
"questionGroups"
:numberGroups=
"numberGroups"
:numberGroups=
"numberGroups"
:hasMark=
"false"
:hasMark=
"false"
...
...
src/pages/exam/testExam/exam/index copy.vue
deleted
100644 → 0
浏览文件 @
14dd1232
差异被折叠。
点击展开。
src/pages/exam/testExam/exam/index.vue
浏览文件 @
d4bb63c3
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
<div>
<div>
<exam-card
<exam-card
title=
"模拟考试"
title=
"模拟考试"
:hasMark=
"hasMark"
:status=
"status"
:hasSubmitBtn=
"!!!this.$route.query.id"
:hasSubmitBtn=
"!!!this.$route.query.id"
:hasCountdown=
"!!!this.$route.query.id"
:hasCountdown=
"!!!this.$route.query.id"
:data=
"data"
:data=
"data"
...
@@ -19,10 +21,11 @@ export default {
...
@@ -19,10 +21,11 @@ export default {
components
:
{
ExamCard
},
components
:
{
ExamCard
},
data
()
{
data
()
{
return
{
return
{
data
:
{
status
:
1
,
// 考试状态
hasMark
:
true
,
data
:
{},
cacheAnswerTime
:
null
// 缓存题计时器
cacheAnswerTime
:
null
// 缓存题计时器
}
}
}
},
},
computed
:
{
computed
:
{
examId
()
{
examId
()
{
...
@@ -56,6 +59,9 @@ export default {
...
@@ -56,6 +59,9 @@ export default {
this
.
cacheAnswerTime
=
setInterval
(()
=>
{
this
.
cacheAnswerTime
=
setInterval
(()
=>
{
this
.
submitExam
(
0
)
this
.
submitExam
(
0
)
},
3000
)
},
3000
)
}
else
{
this
.
status
=
2
this
.
hasMark
=
false
}
}
})
})
},
},
...
...
src/pages/teacher/examReview/review.vue
浏览文件 @
d4bb63c3
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<div>
<div>
<exam-card
<exam-card
title=
"批阅考卷"
title=
"批阅考卷"
:status=
"3"
:hasSubmitBtn=
"false"
:hasSubmitBtn=
"false"
:hasCountdown=
"false"
:hasCountdown=
"false"
:hasCollect=
"false"
:hasCollect=
"false"
...
...
src/pages/teacher/testReview/review.vue
浏览文件 @
d4bb63c3
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<div>
<div>
<exam-card
<exam-card
title=
"批阅考卷"
title=
"批阅考卷"
:status=
"3"
:hasSubmitBtn=
"false"
:hasSubmitBtn=
"false"
:hasCountdown=
"false"
:hasCountdown=
"false"
:hasCollect=
"false"
:hasCollect=
"false"
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论