Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
x-learn
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
x-learn
Commits
b0b6c0f4
提交
b0b6c0f4
authored
10月 21, 2021
作者:
lihuihui
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://gitlab.ezijing.com/ezijing/x-learn
# Conflicts: # src/pages/exam/courseExam/chapter/index.vue
上级
31001612
df816229
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
127 行增加
和
91 行删除
+127
-91
examCard.vue
src/components/exam/examCard.vue
+20
-6
questionList.vue
src/components/exam/questionList.vue
+2
-2
questionListItem.vue
src/components/exam/questionListItem.vue
+3
-3
questionNumbers.vue
src/components/exam/questionNumbers.vue
+0
-0
CourseChapter.vue
src/pages/course/learn/components/CourseChapter.vue
+13
-10
resultCard.vue
src/pages/exam/components/resultCard.vue
+35
-35
index copy.vue
src/pages/exam/courseExam/chapter/index copy.vue
+0
-0
index.vue
src/pages/exam/courseExam/chapter/index.vue
+11
-1
result.vue
src/pages/exam/courseExam/chapter/result.vue
+23
-28
questionDetails copy.vue
src/pages/exam/myExam/questionDetails copy.vue
+0
-0
questionDetails.vue
src/pages/exam/myExam/questionDetails.vue
+4
-0
index copy.vue
src/pages/exam/testExam/exam/index copy.vue
+0
-0
index.vue
src/pages/exam/testExam/exam/index.vue
+9
-3
index.vue
src/pages/exam/testExam/index.vue
+5
-3
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
浏览文件 @
b0b6c0f4
...
...
@@ -25,6 +25,7 @@
</div>
<div
class=
"right"
>
<question-numbers
:status=
"status"
:page=
"currentGroupPage"
:data=
"currentQuestionGroup"
:list=
"numberGroups.length ? numberGroups : questionGroups"
...
...
@@ -66,6 +67,7 @@ import questionNumbers from '@/components/exam/questionNumbers'
export
default
{
components
:
{
questionList
,
questionNumbers
},
props
:
{
status
:
{
type
:
Number
,
default
:
1
},
// 1:答题;2:查看;3:批阅
title
:
{
type
:
String
},
hasMark
:
{
type
:
Boolean
,
default
:
true
},
// 标记
hasCollect
:
{
type
:
Boolean
,
default
:
true
},
// 收藏
...
...
@@ -136,11 +138,8 @@ export default {
}
},
groups
:
{
immediate
:
true
,
handler
(
groups
)
{
if
(
groups
.
length
)
{
this
.
questionGroups
=
groups
}
this
.
questionGroups
=
groups
}
},
groupPage
(
value
)
{
...
...
@@ -259,7 +258,7 @@ export default {
},
// 组装试题数据
genQuestions
(
data
)
{
const
{
questions
,
answers
=
{}
}
=
data
const
{
questions
,
answers
=
{}
,
score_items
:
scores
=
{}
}
=
data
if
(
!
questions
)
return
[]
this
.
questionGroups
=
questions
.
question_items
.
reduce
((
result
,
question
)
=>
{
if
(
question
.
question_list
.
length
)
{
...
...
@@ -267,6 +266,8 @@ export default {
list
=
list
.
map
(
item
=>
{
let
userAnswers
=
[]
let
sign
=
false
let
scoreItem
=
{}
// 答案
if
(
answers
)
{
// 大题答案包含所有小题答案
const
bigQuestionAnswer
=
answers
[
question
.
question_item_id
]
...
...
@@ -277,7 +278,20 @@ export default {
sign
=
questionAnswer
.
sign
||
false
}
}
return
{
...
item
,
user_answer
:
userAnswers
,
sign
}
// 分数与结果
if
(
scores
)
{
const
bigQuestionScore
=
scores
[
question
.
question_item_id
]
if
(
bigQuestionScore
)
{
// 小题分数
scoreItem
=
bigQuestionScore
[
item
.
id
]
||
{}
if
(
userAnswers
.
length
)
{
scoreItem
.
answer
=
scoreItem
.
is_right
?
1
:
2
}
else
{
scoreItem
.
answer
=
0
}
}
}
return
{
...
scoreItem
,
...
item
,
user_answer
:
userAnswers
,
sign
}
})
result
.
push
(
Object
.
assign
({},
question
,
{
question_list
:
list
}))
})
...
...
src/components/exam/questionList.vue
浏览文件 @
b0b6c0f4
...
...
@@ -52,8 +52,8 @@ export default {
position
:
relative
;
}
.question-list-hd
{
position
:
sticky
;
top
:
0
;
//
position: sticky;
//
top: 0;
display
:
flex
;
align-items
:
center
;
height
:
45px
;
...
...
src/components/exam/questionListItem.vue
浏览文件 @
b0b6c0f4
...
...
@@ -52,10 +52,10 @@
</div>
</
template
>
<
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-content"
>
{{
correctAnswerTex
t
}}
</div>
</div>
-->
<div
class=
"answer-item-content"
>
{{
data
.
commen
t
}}
</div>
</div>
</
template
>
<div
class=
"answer-item"
v-if=
"data.question_analysis"
>
<div
class=
"answer-item-label"
>
解析:
</div>
...
...
src/components/exam/questionNumbers.vue
浏览文件 @
b0b6c0f4
差异被折叠。
点击展开。
src/pages/course/learn/components/CourseChapter.vue
浏览文件 @
b0b6c0f4
...
...
@@ -3,10 +3,13 @@
<el-collapse-item
:title=
"item.name"
:name=
"item.id"
v-for=
"item in currentList"
:key=
"item.id"
>
<ul
v-if=
"item.id === '1'"
>
<li
class=
"meterial-item"
v-for=
"subItem in item.children"
:key=
"subItem.id"
>
<p>
{{
subItem
.
file_name
}}
</p><i
class=
"el-icon-download"
@
click=
"handleDownload(subItem)"
></i>
<p>
<a
:href=
"subItem.file_url"
target=
"_blank"
>
{{
subItem
.
file_name
}}
</a>
</p>
<i
class=
"el-icon-download"
@
click=
"handleDownload(subItem)"
></i>
</li>
</ul>
<u
v-else
>
<u
l
v-else
>
<li
v-for=
"subItem in item.children"
:key=
"subItem.id"
@
click=
"handleClick(subItem)"
>
<div
class=
"name"
>
{{
subItem
.
name
}}
</div>
<div
class=
"duration"
>
{{
subItem
.
duration
}}
</div>
...
...
@@ -26,7 +29,7 @@
</
template
>
</div>
</li>
</u>
</u
l
>
</el-collapse-item>
</el-collapse>
</template>
...
...
@@ -116,14 +119,14 @@ li {
color
:
#999
;
}
}
li
.meterial-item
{
display
:flex
;
p
{
flex
:
1
;
li
.meterial-item
{
display
:
flex
;
p
{
flex
:
1
;
}
i
{
padding
:
10px
;
font-size
:
20px
;
i
{
padding
:
10px
;
font-size
:
20px
;
}
}
</
style
>
src/pages/exam/components/resultCard.vue
浏览文件 @
b0b6c0f4
...
...
@@ -20,7 +20,7 @@
<div
class=
"tit"
>
{{
item
.
title
}}
</div>
<ul>
<template
v-for=
"(cItem, index) in item.question_list"
>
<li
@
click=
"goQuestion(cItem.id)"
:class=
"`stu$
{cItem.cardStust}`" :key="cItem.id
">
{{
index
+
1
}}
</li>
<li
@
click=
"goQuestion(cItem.id)"
:class=
"`stu$
{cItem.cardStust}`" :key="cItem.id">
{{
index
+
1
}}
</li>
</
template
>
</ul>
</div>
...
...
@@ -76,13 +76,13 @@ export default {
this
.
data
.
questions
.
question_items
.
forEach
(
list
=>
{
list
.
question_list
=
list
.
question_list
.
reduce
((
a
,
b
)
=>
{
return
a
.
concat
(
b
)
})
}
,
[]
)
list
.
question_list
.
map
(
item
=>
{
if
(
!
this
.
data
.
answers
[
list
.
question_item_id
][
item
.
id
].
answer
.
length
)
{
item
.
cardStust
=
3
return
item
}
else
{
this
.
data
.
score_items
[
list
.
question_item_id
][
item
.
id
].
is_right
?
item
.
cardStust
=
1
:
item
.
cardStust
=
2
this
.
data
.
score_items
[
list
.
question_item_id
][
item
.
id
].
is_right
?
(
item
.
cardStust
=
1
)
:
(
item
.
cardStust
=
2
)
return
item
}
})
...
...
@@ -97,10 +97,10 @@ export default {
}
</
script
>
<
style
lang=
"scss"
scoped
>
.card-box
{
.card-box
{
position
:
relative
;
height
:
100%
;
.tips-box
{
.tips-box
{
display
:
flex
;
justify-content
:
center
;
padding
:
15px
0
10px
;
...
...
@@ -108,57 +108,57 @@ export default {
margin
:
0
;
list-style
:
none
;
border-bottom
:
1px
solid
#ccc
;
li
{
&
:nth-child
(
2
)
{
li
{
&
:nth-child
(
2
)
{
margin
:
0
50px
;
}
.circle1
{
.circle1
{
width
:
24px
;
height
:
24px
;
background
:
#fff
;
border
:
2px
solid
#0
FC
118
;
border
:
2px
solid
#0
fc
118
;
border-radius
:
50%
;
box-sizing
:
border-box
;
}
.circle2
{
.circle2
{
width
:
24px
;
height
:
24px
;
border
:
2px
solid
#
C
01540
;
border
:
2px
solid
#
c
01540
;
border-radius
:
50%
;
box-sizing
:
border-box
;
}
.circle3
{
.circle3
{
width
:
24px
;
height
:
24px
;
background
:
#999999
;
border-radius
:
50%
;
}
.circle4
{
.circle4
{
position
:
relative
;
width
:
24px
;
height
:
24px
;
border
:
1px
solid
#
CCCCCC
;
border
:
1px
solid
#
cccccc
;
border-radius
:
50%
;
&
:
:
after
{
&
:
:
after
{
content
:
''
;
position
:
absolute
;
top
:
-1px
;
right
:
-1px
;
width
:
4px
;
height
:
4px
;
background
:
#
C
01540
;
background
:
#
c
01540
;
border-radius
:
50%
;
}
}
.txt
{
.txt
{
margin-top
:
5px
;
font-size
:
12px
;
color
:
#
CCCCCC
;
color
:
#
cccccc
;
line-height
:
17px
;
}
}
}
.order-num
{
.order-num
{
height
:
420px
;
overflow-y
:
scroll
;
padding-left
:
30px
;
...
...
@@ -167,27 +167,27 @@ export default {
display
:
none
;
}
// padding-bottom: 90px;
.tit
{
.tit
{
font-size
:
12px
;
color
:
#999999
;
line-height
:
17px
;
margin-bottom
:
12px
;
margin-top
:
30px
;
}
ul
{
ul
{
display
:
flex
;
list-style
:
none
;
padding
:
0
;
margin
:
0
;
flex-wrap
:
wrap
;
li
{
li
{
box-sizing
:
border-box
;
cursor
:
pointer
;
position
:
relative
;
border-radius
:
50px
;
width
:
24px
;
height
:
24px
;
border
:
1px
solid
#
CCCCCC
;
border
:
1px
solid
#
cccccc
;
font-size
:
12px
;
color
:
#666666
;
line-height
:
24px
;
...
...
@@ -197,22 +197,22 @@ export default {
// &:nth-child(5n+5){
// margin-right: 0;
// }
&
.stu1
{
border
:
2px
solid
#0
FC
118
;
&
.stu1
{
border
:
2px
solid
#0
fc
118
;
line-height
:
22px
;
}
&
.stu2
{
border
:
2px
solid
#
C
01540
;
&
.stu2
{
border
:
2px
solid
#
c
01540
;
line-height
:
22px
;
}
&
.stu3
{
&
.stu3
{
color
:
#fff
;
background
:
#999999
;
}
}
}
}
.btn-box
{
.btn-box
{
position
:
absolute
;
bottom
:
0
;
left
:
0
;
...
...
@@ -222,26 +222,26 @@ export default {
align-items
:
center
;
height
:
60px
;
background
:
#fff
;
.btn
{
.btn
{
width
:
116px
;
height
:
40px
;
text-align
:
center
;
line-height
:
40px
;
border-radius
:
4px
;
cursor
:
pointer
;
&
:nth-child
(
1
)
{
border
:
1px
solid
#
CCCCCC
;
&
:nth-child
(
1
)
{
border
:
1px
solid
#
cccccc
;
font-size
:
14px
;
font-weight
:
bold
;
color
:
#999999
;
box-sizing
:
border-box
;
}
&
:nth-child
(
2
)
{
background
:
#
C
01540
;
&
:nth-child
(
2
)
{
background
:
#
c
01540
;
border-radius
:
4px
;
font-size
:
14px
;
font-weight
:
bold
;
color
:
#
FFFFFF
;
color
:
#
ffffff
;
margin-left
:
30px
;
}
}
...
...
src/pages/exam/courseExam/chapter/index copy.vue
deleted
100644 → 0
浏览文件 @
31001612
差异被折叠。
点击展开。
src/pages/exam/courseExam/chapter/index.vue
浏览文件 @
b0b6c0f4
<
template
>
<exam-card
title=
"课后练习"
:hasMark=
"hasMark"
:status=
"status"
:data=
"data"
:hasCountdown=
"false"
@
submit=
"handleSubmit"
...
...
@@ -15,6 +17,8 @@ export default {
components
:
{
ExamCard
},
data
()
{
return
{
status
:
1
,
// 考试状态
hasMark
:
true
,
data
:
{}
}
},
...
...
@@ -35,6 +39,12 @@ export default {
}
api
.
getCourseQuestion
(
param
).
then
(
response
=>
{
this
.
data
=
JSON
.
parse
(
response
.
data
).
sheet
// 已提交
const
isSubmited
=
[
'1'
,
'2'
].
includes
(
this
.
data
.
status
)
if
(
isSubmited
)
{
this
.
status
=
2
this
.
hasMark
=
false
}
})
},
// 返回
...
...
@@ -79,7 +89,7 @@ export default {
}
answers
[
group
.
question_item_id
][
item
.
id
]
=
{
sign
:
item
.
sign
?
item
.
sign
:
false
,
answer
s
:
item
.
user_answer
answer
:
item
.
user_answer
}
})
})
...
...
src/pages/exam/courseExam/chapter/result.vue
浏览文件 @
b0b6c0f4
...
...
@@ -57,8 +57,7 @@ export default {
return
`width:
${
this
.
accuracy
}
%`
}
},
mounted
()
{
},
mounted
()
{},
methods
:
{
goPage
(
param
)
{
const
urlParam
=
this
.
$route
.
query
...
...
@@ -76,24 +75,20 @@ export default {
course_id
:
this
.
$route
.
query
.
course_id
,
chapter_id
:
this
.
$route
.
query
.
chapter_id
}
api
.
getCourseQuestion
(
param
)
.
then
(
response
=>
{
const
data
=
JSON
.
parse
(
response
.
data
)
this
.
data
=
data
this
.
accuracy
=
parseInt
(
data
.
sheet
.
score
)
/
parseInt
(
data
.
sheet
.
questions
.
total_score
)
*
100
})
.
finally
(()
=>
{
})
api
.
getCourseQuestion
(
param
).
then
(
response
=>
{
const
data
=
JSON
.
parse
(
response
.
data
)
this
.
data
=
data
this
.
accuracy
=
(
parseInt
(
data
.
sheet
.
score
)
/
parseInt
(
data
.
sheet
.
questions
.
total_score
))
*
100
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.result-box
{
.result-box
{
width
:
100%
;
display
:
flex
;
.card-left
{
.card-left
{
position
:
relative
;
box-sizing
:
border-box
;
padding
:
10px
30px
20px
;
...
...
@@ -102,13 +97,13 @@ export default {
margin-right
:
10px
;
height
:
560px
;
border-radius
:
8px
;
.title
{
.title
{
font-size
:
18px
;
color
:
#222222
;
line-height
:
45px
;
border-bottom
:
1px
solid
#ccc
;
}
.chart-box
{
.chart-box
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
...
...
@@ -116,63 +111,63 @@ export default {
width
:
148px
;
// margin: 26px auto 0;
}
.assess
{
.assess
{
font-size
:
18px
;
color
:
#222222
;
line-height
:
45px
;
border-bottom
:
1px
solid
#ccc
;
}
.assess-box
{
.assess-box
{
padding-top
:
27px
;
.prog
{
.prog
{
width
:
350px
;
margin
:
0
auto
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
.line-box
{
.line-box
{
width
:
300px
;
width
:
300px
;
height
:
10px
;
background
:
#
F9F9F
9
;
background
:
#
f9f9f
9
;
border-radius
:
5px
;
.line
{
.line
{
width
:
80%
;
height
:
10px
;
background
:
linear-gradient
(
90deg
,
#
F47C46
0%
,
#F22F
48
100%
);
background
:
linear-gradient
(
90deg
,
#
f47c46
0%
,
#f22f
48
100%
);
border-radius
:
5px
;
}
}
.icon
{
.icon
{
width
:
41px
;
height
:
38px
;
background
:
url(@/assets/images/res-icon.png)
;
background-size
:
100%
100%
;
}
}
.text
{
.text
{
font-size
:
14px
;
color
:
#222222
;
line-height
:
20px
;
text-align
:
center
;
margin
:
50px
0
68px
0
;
}
.btn
{
.btn
{
cursor
:
pointer
;
text-align
:
center
;
line-height
:
40px
;
width
:
144px
;
height
:
40px
;
background
:
#
C
01540
;
background
:
#
c
01540
;
border-radius
:
4px
;
font-size
:
14px
;
font-weight
:
bold
;
color
:
#
FFFFFF
;
color
:
#
ffffff
;
margin
:
0
auto
;
}
}
}
.card-right
{
.card-right
{
box-sizing
:
border-box
;
flex
:
1
;
background
:
#fff
;
...
...
src/pages/exam/myExam/questionDetails copy.vue
deleted
100644 → 0
浏览文件 @
31001612
差异被折叠。
点击展开。
src/pages/exam/myExam/questionDetails.vue
浏览文件 @
b0b6c0f4
<
template
>
<exam-card
:title=
"title"
:status=
"2"
:groups=
"questionGroups"
:numberGroups=
"numberGroups"
:hasMark=
"false"
...
...
@@ -121,6 +122,9 @@ export default {
}
return
api
.
getAllQuestion
(
param
).
then
(
response
=>
{
this
.
allQuestionList
=
response
.
list
if
(
!
this
.
allQuestionList
.
length
)
{
this
.
handleBack
()
}
})
},
// 清空
...
...
src/pages/exam/testExam/exam/index copy.vue
deleted
100644 → 0
浏览文件 @
31001612
差异被折叠。
点击展开。
src/pages/exam/testExam/exam/index.vue
浏览文件 @
b0b6c0f4
...
...
@@ -2,6 +2,8 @@
<div>
<exam-card
title=
"模拟考试"
:hasMark=
"hasMark"
:status=
"status"
:hasSubmitBtn=
"!!!this.$route.query.id"
:hasCountdown=
"!!!this.$route.query.id"
:data=
"data"
...
...
@@ -19,9 +21,10 @@ export default {
components
:
{
ExamCard
},
data
()
{
return
{
data
:
{
cacheAnswerTime
:
null
// 缓存题计时器
}
status
:
1
,
// 考试状态
hasMark
:
true
,
data
:
{},
cacheAnswerTime
:
null
// 缓存题计时器
}
},
computed
:
{
...
...
@@ -57,6 +60,9 @@ export default {
this
.
cacheAnswerTime
=
setInterval
(()
=>
{
this
.
submitExam
(
0
)
},
3000
)
}
else
{
this
.
status
=
2
this
.
hasMark
=
false
}
})
},
...
...
src/pages/exam/testExam/index.vue
浏览文件 @
b0b6c0f4
...
...
@@ -37,9 +37,13 @@ export default {
})
},
startExam
(
item
)
{
if
(
item
.
status
===
0
||
item
.
status
===
3
)
{
if
(
[
0
,
3
].
includes
(
item
.
status
)
)
{
this
.
open
(
item
)
}
else
if
([
1
,
2
].
includes
(
item
.
status
))
{
// 已完成
this
.
$router
.
push
({
path
:
'/testExam/result'
,
query
:
{
exam_id
:
item
.
id
}
})
}
else
{
// 未做
this
.
$router
.
push
({
path
:
'/testExam/exam'
,
query
:
{
exam_id
:
item
.
id
,
is_create
:
0
}
})
}
},
...
...
@@ -65,8 +69,6 @@ export default {
}
</
script
>
<
style
lang=
"scss"
scoped
>
.exam-list
{
}
.exam-item
{
display
:
inline-block
;
width
:
300px
;
...
...
src/pages/teacher/examReview/review.vue
浏览文件 @
b0b6c0f4
...
...
@@ -2,6 +2,7 @@
<div>
<exam-card
title=
"批阅考卷"
:status=
"3"
:hasSubmitBtn=
"false"
:hasCountdown=
"false"
:hasCollect=
"false"
...
...
src/pages/teacher/testReview/review.vue
浏览文件 @
b0b6c0f4
...
...
@@ -2,6 +2,7 @@
<div>
<exam-card
title=
"批阅考卷"
:status=
"3"
:hasSubmitBtn=
"false"
:hasCountdown=
"false"
:hasCollect=
"false"
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论