Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
x-learn
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
x-learn
Commits
1210b4ce
提交
1210b4ce
authored
1月 21, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fixes
上级
4a2d99d1
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
341 行增加
和
272 行删除
+341
-272
exam.js
src/api/exam.js
+15
-7
aside.vue
src/components/layout/aside.vue
+16
-4
main.vue
src/components/layout/main.vue
+1
-1
ExamEnd.vue
src/modules/exam-module/src/ExamEnd.vue
+210
-141
index.vue
src/pages/account/index.vue
+13
-13
CourseTeacher.vue
src/pages/course/learn/components/CourseTeacher.vue
+1
-0
index.vue
src/pages/exam/testExam/exam/index.vue
+80
-99
index.vue
src/pages/exam/testExam/index.vue
+2
-4
routes.js
src/router/routes.js
+3
-3
没有找到文件。
src/api/exam.js
浏览文件 @
1210b4ce
import
httpRequest
from
'@/utils/axios'
/**
* 获取
考前摸底
试题
* 获取
模拟测试
试题
*/
export
function
getExamQuestion
(
params
)
{
return
httpRequest
.
get
(
'/api/zy/v2/examination/examination-papers'
,
{
params
},
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
return
httpRequest
.
get
(
'/api/zy/v2/examination/examination-papers'
,
{
params
},
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
}
)
}
/**
* 缓存
考前摸底
试题
* 缓存
模拟测试
试题
*/
export
function
setCache
(
params
)
{
return
httpRequest
.
post
(
'/api/zy/v2/examination/examination-papers'
,
params
)
...
...
@@ -31,9 +35,13 @@ export function setRoles(params) {
* 获取我的已做试题
*/
export
function
getMyQuestion
(
params
)
{
return
httpRequest
.
get
(
'/api/zy/v2/examination/my-question'
,
{
params
},
{
return
httpRequest
.
get
(
'/api/zy/v2/examination/my-question'
,
{
params
},
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
}
)
}
/**
...
...
@@ -44,8 +52,8 @@ export function getAllQuestion(params) {
}
/**
* 缓存错题集
*/
* 缓存错题集
*/
export
function
setMyCache
(
params
)
{
return
httpRequest
.
post
(
'/api/zy/v2/examination/cache-question'
,
params
)
}
...
...
src/components/layout/aside.vue
浏览文件 @
1210b4ce
...
...
@@ -12,8 +12,7 @@
<template
v-for=
"item in datalist"
>
<el-submenu
:index=
"item.title"
:key=
"item.title"
v-if=
"item.children"
>
<template
slot=
"title"
>
<i
class=
"iconfont"
:class=
"item.icon"
></i>
<span>
{{
item
.
title
}}
</span>
<i
class=
"iconfont"
:class=
"item.icon"
></i><span>
{{
item
.
title
}}
</span>
</
template
>
<el-menu-item
:index=
"item.path"
:key=
"item.title"
v-for=
"item in item.children"
>
<span
slot=
"title"
>
{{ item.title }}
</span>
...
...
@@ -52,7 +51,7 @@ export default {
title
:
'我的考试'
,
icon
:
'icon-bianzuhong'
,
children
:
[
{
title
:
'
考前摸底
'
,
path
:
'/testExam'
},
{
title
:
'
模拟测试
'
,
path
:
'/testExam'
},
{
title
:
'错题集合'
,
path
:
'/my/questions/wrong'
},
{
title
:
'收藏试题'
,
path
:
'/my/questions/collection'
}
]
...
...
@@ -60,7 +59,7 @@ export default {
{
title
:
'实训练习'
,
icon
:
'icon-kaoshihong'
,
children
:
[{
title
:
'实训案例练习'
,
path
:
'
/xxxx
'
}]
children
:
[{
title
:
'实训案例练习'
,
path
:
'
https://xtraining.ezijing.com/
'
}]
},
{
title
:
'个人中心'
,
...
...
@@ -162,6 +161,8 @@ export default {
padding
:
30px
0
;
color
:
#ccc
;
.iconfont
{
display
:
inline-block
;
width
:
30px
;
font-size
:
16px
;
color
:
currentColor
;
}
...
...
@@ -173,13 +174,24 @@ export default {
}
.is-active
.el-submenu__title
{
background
:
#fff4f7
;
font-weight
:
bold
;
color
:
#c01540
;
}
.el-submenu__title
{
height
:
50px
;
line-height
:
50px
;
padding-left
:
25px
!
important
;
}
.el-menu-item
:hover
,
.el-menu-item
:focus
{
color
:
#c01540
;
background
:
transparent
;
}
.el-submenu
.el-menu-item
{
height
:
36px
;
line-height
:
36px
;
padding-left
:
55px
!
important
;
}
}
}
</
style
>
src/components/layout/main.vue
浏览文件 @
1210b4ce
...
...
@@ -10,6 +10,6 @@ export default {}
<
style
lang=
"scss"
>
.app-main
{
padding
:
3
0px
;
padding
:
2
0px
;
}
</
style
>
src/modules/exam-module/src/ExamEnd.vue
浏览文件 @
1210b4ce
...
...
@@ -6,41 +6,53 @@
<div
class=
"cs_time"
><span>
测试时间:
</span>
{{
questionsData
.
created_time
}}
</div>
<div
class=
"charts"
>
<svg
width=
"86%"
height=
"86%"
viewBox=
"0 0 100 100"
>
<circle
r=
"25"
cx=
"50"
cy=
"50"
fill=
"none"
stroke=
"rgba(255,193,79,1)"
stroke-width=
"50"
stroke-dasharray=
"158 158"
/>
<circle
r=
"25"
cx=
"50"
cy=
"50"
fill=
"none"
stroke=
"rgba(255,193,79,1)"
stroke-width=
"50"
stroke-dasharray=
"158 158"
/>
</svg>
<svg
v-show=
"ratioNum
!==
0"
class=
"w_svg"
width=
"100%"
height=
"100%"
viewBox=
"0 0 100 100"
>
<svg
v-show=
"ratioNum
!==
0"
class=
"w_svg"
width=
"100%"
height=
"100%"
viewBox=
"0 0 100 100"
>
<circle
r=
"25"
cx=
"50"
cy=
"50"
fill=
"none"
stroke=
"#07cb78"
stroke-width=
"50"
:stroke-dasharray=
"ratio"
/>
</svg>
<template
v-if=
"title === '真题实战'"
>
<div
class=
"circle"
>
<p
class=
"p1"
>
得分
</p>
<p
class=
"p2"
>
{{
questionsData
.
score
}}
</p>
<p
class=
"p2"
>
{{
questionsData
.
score
}}
</p>
</div>
</
template
>
<
template
v-else
>
<div
class=
"circle"
>
<p
class=
"p1"
>
正确率
</p>
<p
class=
"p2"
>
{{
ratioNum
}}
%
</p>
<p
class=
"p2"
>
{{
ratioNum
}}
%
</p>
</div>
</
template
>
</div>
<div
class=
"assess"
>
<div
class=
"tit"
>
测试评估:
</div>
<img
v-show=
"ratioNum < 20"
src=
"../assets/images/mountain0.png"
alt=
""
>
<img
v-show=
"ratioNum >= 20 && ratioNum < 40"
src=
"../assets/images/mountain1.png"
alt=
""
>
<img
v-show=
"ratioNum >= 40 && ratioNum < 60"
src=
"../assets/images/mountain2.png"
alt=
""
>
<img
v-show=
"ratioNum >= 60 && ratioNum < 99"
src=
"../assets/images/mountain3.png"
alt=
""
>
<img
v-show=
"ratioNum == 100"
src=
"../assets/images/mountain4.png"
alt=
""
>
<
template
v-if=
"title != '
考前摸底
'"
>
<img
v-show=
"ratioNum < 20"
src=
"../assets/images/mountain0.png"
alt=
""
/
>
<img
v-show=
"ratioNum >= 20 && ratioNum < 40"
src=
"../assets/images/mountain1.png"
alt=
""
/
>
<img
v-show=
"ratioNum >= 40 && ratioNum < 60"
src=
"../assets/images/mountain2.png"
alt=
""
/
>
<img
v-show=
"ratioNum >= 60 && ratioNum < 99"
src=
"../assets/images/mountain3.png"
alt=
""
/
>
<img
v-show=
"ratioNum == 100"
src=
"../assets/images/mountain4.png"
alt=
""
/
>
<
template
v-if=
"title != '
模拟测试
'"
>
<div
v-if=
"ratioNum == 100"
class=
"txt"
>
成功近在眼前,再接再厉!
</div>
<div
v-else
class=
"txt"
>
您离成功还有一段距离,继续努力!
</div>
</
template
>
<
template
v-else
>
<div
v-if=
"ratioNum >= 90"
class=
"txt"
style=
"text-align: left;"
>
您的成绩不错呦,保持住,想进一步提升成绩,推荐您使用全部考试服务!
</div>
<div
v-else
class=
"txt"
style=
"text-align: left;"
>
您距离拿证还有一段距离,急速拿证推荐您使用全部考试服务!
</div>
<div
v-if=
"ratioNum >= 90"
class=
"txt"
style=
"text-align: left"
>
您的成绩不错呦,保持住,想进一步提升成绩,推荐您使用全部考试服务!
</div>
<div
v-else
class=
"txt"
style=
"text-align: left"
>
您距离拿证还有一段距离,急速拿证推荐您使用全部考试服务!
</div>
</
template
>
</div>
<div
class=
"nl-btn"
v-if=
"title == '
考前摸底
'"
>
<div
class=
"nl-btn"
v-if=
"title == '
模拟测试
'"
>
<!-- <div class="btn" @click="goAbilityExam">重做测试</div>
<div class="btn" @click="goCourse">学习课程</div> -->
<div
class=
"new-btn"
@
click=
"goVip"
>
全部考试服务
</div>
...
...
@@ -65,35 +77,87 @@
</ul>
</div>
<div
class=
"question"
>
<
template
v-if=
"answerData['1'].data.length !=0"
>
<div
class=
"title"
>
{{
answerData
[
'1'
].
title
}}
</div>
<
template
v-if=
"answerData['1'].data.length !=
0"
>
<div
class=
"title"
>
{{
answerData
[
'1'
].
title
}}
</div>
<ul>
<template
v-for=
"(item, index) in answerData['1'].data"
>
<li
@
click=
"go(item.id)"
:data-id=
"item.id"
:key=
"index"
:class=
"item.answer == undefined || item.answer.length == 0 ? 'active3' : item.is_right ? 'active1' : 'active2'"
>
{{
item
.
num
}}
</li>
<li
@
click=
"go(item.id)"
:data-id=
"item.id"
:key=
"index"
:class=
"
item.answer == undefined || item.answer.length == 0
? 'active3'
: item.is_right
? 'active1'
: 'active2'
"
>
{{
item
.
num
}}
</li>
</
template
>
</ul>
</template>
<
template
v-if=
"answerData['2'].data.length !=0"
>
<div
class=
"title"
>
{{
answerData
[
'2'
].
title
}}
</div>
<
template
v-if=
"answerData['2'].data.length !=
0"
>
<div
class=
"title"
>
{{
answerData
[
'2'
].
title
}}
</div>
<ul>
<template
v-for=
"(item, index) in answerData['2'].data"
>
<li
@
click=
"go(item.id)"
:data-id=
"item.id"
:key=
"index"
:class=
"item.answer == undefined || item.answer.length == 0 ? 'active3' : item.is_right ? 'active1' : 'active2'"
>
{{
item
.
num
}}
</li>
<li
@
click=
"go(item.id)"
:data-id=
"item.id"
:key=
"index"
:class=
"
item.answer == undefined || item.answer.length == 0
? 'active3'
: item.is_right
? 'active1'
: 'active2'
"
>
{{
item
.
num
}}
</li>
</
template
>
</ul>
</template>
<
template
v-if=
"answerData['6'].data.length !=0"
>
<div
class=
"title"
>
{{
answerData
[
'6'
].
title
}}
</div>
<
template
v-if=
"answerData['6'].data.length !=
0"
>
<div
class=
"title"
>
{{
answerData
[
'6'
].
title
}}
</div>
<ul>
<template
v-for=
"(item, index) in answerData['6'].data"
>
<li
@
click=
"go(item.id)"
:data-id=
"item.id"
:key=
"index"
:class=
"item.answer == undefined || item.answer.length == 0 ? 'active3' : item.is_right ? 'active1' : 'active2'"
>
{{
item
.
num
}}
</li>
<li
@
click=
"go(item.id)"
:data-id=
"item.id"
:key=
"index"
:class=
"
item.answer == undefined || item.answer.length == 0
? 'active3'
: item.is_right
? 'active1'
: 'active2'
"
>
{{
item
.
num
}}
</li>
</
template
>
</ul>
</template>
<
template
v-if=
"answerData['5'].data.length !=0"
>
<div
class=
"title"
>
{{
answerData
[
'5'
].
title
}}
</div>
<
template
v-if=
"answerData['5'].data.length !=
0"
>
<div
class=
"title"
>
{{
answerData
[
'5'
].
title
}}
</div>
<ul>
<template
v-for=
"(item, index) in answerData['5'].data"
>
<li
@
click=
"go(item.id)"
:data-id=
"item.id"
:key=
"index"
:class=
"item.answer == undefined || item.answer.length == 0 ? 'active3' : item.is_right ? 'active1' : 'active2'"
>
{{
item
.
num
}}
</li>
<li
@
click=
"go(item.id)"
:data-id=
"item.id"
:key=
"index"
:class=
"
item.answer == undefined || item.answer.length == 0
? 'active3'
: item.is_right
? 'active1'
: 'active2'
"
>
{{
item
.
num
}}
</li>
</
template
>
</ul>
</template>
...
...
@@ -158,9 +222,13 @@ export default {
},
mounted
()
{
if
(
this
.
$route
.
query
.
course_id
||
this
.
$route
.
query
.
tag_id
)
{
this
.
$route
.
query
.
type
===
2
||
this
.
$route
.
query
.
type
===
'2'
?
this
.
title
=
'考点练习'
:
this
.
title
=
'章节练习'
this
.
$route
.
query
.
type
===
2
||
this
.
$route
.
query
.
type
===
'2'
?
(
this
.
title
=
'考点练习'
)
:
(
this
.
title
=
'章节练习'
)
}
else
{
this
.
$route
.
query
.
type
===
1
||
this
.
$route
.
query
.
type
===
'1'
?
this
.
title
=
'考前摸底'
:
this
.
title
=
'真题实战'
this
.
$route
.
query
.
type
===
1
||
this
.
$route
.
query
.
type
===
'1'
?
(
this
.
title
=
'模拟测试'
)
:
(
this
.
title
=
'真题实战'
)
}
// this.title
this
.
initData
()
...
...
@@ -282,7 +350,7 @@ export default {
}
</
script
>
<
style
lang=
"scss"
scoped
>
.end_box
{
.end_box
{
width
:
100%
;
position
:
absolute
;
top
:
0
;
...
...
@@ -290,79 +358,79 @@ export default {
z-index
:
99
;
background
:
#fff
;
}
.head
{
.head
{
border-bottom
:
1px
solid
#ccc
;
color
:
#222
;
display
:
flex
;
padding
:
.4rem
0
;
padding
:
0
.4rem
0
;
align-items
:
center
;
i
{
font-size
:
.35rem
;
margin-left
:
.28rem
;
i
{
font-size
:
0
.35rem
;
margin-left
:
0
.28rem
;
}
.title
{
margin-left
:
.03rem
;
font-size
:
.3rem
;
.title
{
margin-left
:
0
.03rem
;
font-size
:
0
.3rem
;
}
}
#bottom-view3
{
#bottom-view3
{
width
:
100%
;
overflow
:
scroll
;
}
.end_con
{
.end_con
{
height
:
100%
;
padding
:
.4rem
0
.4rem
1rem
.4rem
;
.cs_type
{
font-size
:
.3rem
;
padding
:
0
.4rem
0
.4rem
1rem
0
.4rem
;
.cs_type
{
font-size
:
0
.3rem
;
color
:
#222
;
line-height
:
100%
;
span
{
span
{
font-weight
:
bold
;
}
}
.cs_time
{
font-size
:
.3rem
;
.cs_time
{
font-size
:
0
.3rem
;
color
:
#222
;
line-height
:
100%
;
margin-top
:
.2rem
;
span
{
margin-top
:
0
.2rem
;
span
{
font-weight
:
bold
;
}
}
.charts
{
.charts
{
width
:
3rem
;
height
:
3rem
;
margin
:
.4rem
auto
;
margin
:
0
.4rem
auto
;
position
:
relative
;
svg
{
svg
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
-webkit-transform
:
translate
(
-50%
,-
50%
);
-webkit-transform
:
translate
(
-50%
,
-50%
);
}
.w_svg
{
-webkit-transform
:
rotate
(
-90deg
)
translate
(
50
%
,
-50
%
)
;
.w_svg
{
-webkit-transform
:
rotate
(
-90deg
)
translate
(
50%
,
-50%
);
}
.circle
{
width
:
.96rem
;
height
:
.96rem
;
.circle
{
width
:
0
.96rem
;
height
:
0
.96rem
;
position
:
absolute
;
top
:
50%
;
left
:
50%
;
z-index
:
999
;
-webkit-transform
:
translate
(
-50%
,-
50%
);
background
:
#
FF
8000
;
-webkit-transform
:
translate
(
-50%
,
-50%
);
background
:
#
ff
8000
;
border-radius
:
50%
;
text-align
:
center
;
.p1
{
font-size
:
.2rem
;
.p1
{
font-size
:
0
.2rem
;
color
:
#fff
;
line-height
:
100%
;
margin
:
0
.18rem
0
0
.15rem
0
;
opacity
:
.7
;
opacity
:
0
.7
;
}
.p2
{
font-size
:
.26rem
;
.p2
{
font-size
:
0
.26rem
;
color
:
#fff
;
line-height
:
100%
;
font-weight
:
bold
;
...
...
@@ -370,173 +438,174 @@ export default {
}
}
}
.assess
{
.tit
{
font-size
:
.3rem
;
.assess
{
.tit
{
font-size
:
0
.3rem
;
color
:
#333
;
font-weight
:
bold
;
}
img
{
img
{
width
:
4rem
;
height
:
1
.93rem
;
display
:
block
;
margin
:
0
auto
;
}
.txt
{
.txt
{
font-weight
:
bold
;
font-size
:
.3rem
;
font-size
:
0
.3rem
;
color
:
#333
;
text-align
:
center
;
margin-top
:
.18rem
;
margin-top
:
0
.18rem
;
}
}
.card
{
.card
{
padding-bottom
:
env
(
safe-area-inset-bottom
);
margin-top
:
.38rem
;
.tit
{
font-size
:
.3rem
;
margin-top
:
0
.38rem
;
.tit
{
font-size
:
0
.3rem
;
color
:
#333
;
font-weight
:
bold
;
}
.card_con
{
.card_con
{
overflow-y
:
scroll
;
.flag
{
border-bottom
:
0
.01rem
solid
#
EEEEEE
;
ul
{
.flag
{
border-bottom
:
0
.01rem
solid
#
eeeeee
;
ul
{
list-style
:
none
;
margin
:
0
;
padding
:
0
;
display
:
flex
;
justify-content
:
center
;
li
{
margin
:
0
.4rem
0
.1rem
.4rem
;
li
{
margin
:
0
0
.4rem
0
.1rem
0
.4rem
;
text-align
:
center
;
.circle
{
width
:
.6rem
;
height
:
.6rem
;
.circle
{
width
:
0
.6rem
;
height
:
0
.6rem
;
border-radius
:
50%
;
font-size
:
.26rem
;
font-size
:
0
.26rem
;
text-align
:
center
;
line-height
:
.6rem
;
line-height
:
0
.6rem
;
color
:
#fff
;
}
.active1
{
background
:
#67
C23A
;
.active1
{
background
:
#67
c23a
;
}
.active2
{
background
:
#FA
5555
;
.active2
{
background
:
#fa
5555
;
}
.active3
{
background
:
rgba
(
204
,
204
,
204
,
1
)
;
.active3
{
background
:
rgba
(
204
,
204
,
204
,
1
);
}
.txt
{
.txt
{
color
:
#222222
;
font-size
:
.26rem
;
font-size
:
0
.26rem
;
margin-top
:
0
.1rem
;
}
}
}
}
.question
{
.title
{
font-size
:
.3rem
;
.question
{
.title
{
font-size
:
0
.3rem
;
color
:
#333333
;
margin-top
:
.1rem
;
margin-bottom
:
.4rem
;
margin-top
:
0
.1rem
;
margin-bottom
:
0
.4rem
;
}
ul
{
ul
{
list-style
:
none
;
margin-top
:
.3rem
;
margin-top
:
0
.3rem
;
padding
:
0
0
.6rem
;
// border-bottom: 0.01rem solid #EEEEEE;
display
:
flex
;
flex-wrap
:
wrap
;
li
{
width
:
.6rem
;
height
:
.6rem
;
li
{
width
:
0
.6rem
;
height
:
0
.6rem
;
border-radius
:
50%
;
font-size
:
.26rem
;
font-size
:
0
.26rem
;
text-align
:
center
;
line-height
:
.6rem
;
line-height
:
0
.6rem
;
color
:
#fff
;
margin-right
:
.6rem
;
margin-bottom
:
.4rem
;
margin-right
:
0
.6rem
;
margin-bottom
:
0
.4rem
;
}
:nth-child
(
5n
+
5
)
{
:nth-child
(
5n
+
5
)
{
margin
:
0
;
}
.active1
{
background
:
#67C23A
;
.active1
{
background
:
#67c23a
;
}
.active2
{
background
:
#FA
5555
;
.active2
{
background
:
#fa
5555
;
}
.active3
{
background
:
rgba
(
204
,
204
,
204
,
1
)
;
.active3
{
background
:
rgba
(
204
,
204
,
204
,
1
);
}
}
}
}
}
}
.nl-btn
{
.nl-btn
{
display
:
flex
;
margin-top
:
.3rem
;
.btn
{
width
:
3rem
;
height
:
.7rem
;
background
:
linear-gradient
(
90deg
,
rgba
(
43
,
124
,
233
,
1
)
0
%
,
rgba
(
103
,
168
,
255
,
1
)
100
%
)
;
border-radius
:
.12rem
;
font-size
:
.3rem
;
margin-top
:
0
.3rem
;
.btn
{
width
:
3rem
;
height
:
0
.7rem
;
background
:
linear-gradient
(
90deg
,
rgba
(
43
,
124
,
233
,
1
)
0%
,
rgba
(
103
,
168
,
255
,
1
)
100%
);
border-radius
:
0
.12rem
;
font-size
:
0
.3rem
;
color
:
#fff
;
text-align
:
center
;
line-height
:
.7rem
;
line-height
:
0
.7rem
;
}
.btn
:nth-child
(
2
)
{
.btn
:nth-child
(
2
)
{
margin-left
:
auto
;
}
.new-btn
{
.new-btn
{
width
:
3
.2rem
;
height
:
.9rem
;
background
:
#
C
62245
;
height
:
0
.9rem
;
background
:
#
c
62245
;
text-align
:
center
;
line-height
:
.9rem
;
line-height
:
0
.9rem
;
color
:
#fff
;
font-size
:
.3rem
;
font-size
:
0
.3rem
;
background
:
url(../assets/images/ability-r-btn.png)
;
background-size
:
100%
100%
;
margin
:
0
auto
;
}
}
.st-btn
{
.st-btn
{
width
:
100%
;
position
:
fixed
;
bottom
:
0
;
left
:
0
;
height
:
1rem
;
background
:
rgba
(
255
,
255
,
255
,
1
)
;
box-shadow
:
0px
0px
6px
0px
rgba
(
0
,
0
,
0
,
0
.05
);
background
:
rgba
(
255
,
255
,
255
,
1
);
box-shadow
:
0px
0px
6px
0px
rgba
(
0
,
0
,
0
,
0
.05
);
z-index
:
99
;
display
:
flex
;
align-items
:
center
;
// padding: 0 .4rem;
padding-bottom
:
env
(
safe-area-inset-bottom
);
.btn
{
width
:
3rem
;
height
:
.7rem
;
background
:
#C62245
;
border-radius
:
.12rem
;
.btn
{
width
:
3rem
;
height
:
0
.7rem
;
background
:
#c62245
;
border-radius
:
0
.12rem
;
color
:
#fff
;
font-size
:
.3rem
;
font-size
:
0
.3rem
;
text-align
:
center
;
line-height
:
.7rem
;
margin-left
:
.4rem
;
line-height
:
0
.7rem
;
margin-left
:
0
.4rem
;
}
.btn
:nth-child
(
2
)
{
.btn
:nth-child
(
2
)
{
margin-left
:
auto
;
margin-right
:
.4rem
;
margin-right
:
0
.4rem
;
}
}
.cent
{
.cent
{
justify-content
:
center
;
}
</
style
>
src/pages/account/index.vue
浏览文件 @
1210b4ce
...
...
@@ -2,34 +2,34 @@
<app-container
title=
"个人信息"
>
<el-form
:model=
"ruleForm"
:rules=
"rules"
label-width=
"120px"
ref=
"ruleForm"
class=
"form"
>
<el-form-item
label=
"所在院校"
prop=
"phone"
>
<el-input
type=
"password"
v-model=
"ruleForm.phone"
></el-input>
<el-input
v-model=
"ruleForm.phone"
readonly
></el-input>
</el-form-item>
<el-form-item
label=
"学院名称"
prop=
"phone"
>
<el-input
type=
"password"
v-model=
"ruleForm.phone"
></el-input>
<el-input
v-model=
"ruleForm.phone"
readonly
></el-input>
</el-form-item>
<el-form-item
label=
"专业名称"
prop=
"phone"
>
<el-input
type=
"password"
v-model=
"ruleForm.phone"
></el-input>
<el-input
v-model=
"ruleForm.phone"
readonly
></el-input>
</el-form-item>
<el-form-item
label=
"考证等级"
prop=
"phone"
>
<el-input
type=
"password"
v-model=
"ruleForm.phone"
></el-input>
<el-input
v-model=
"ruleForm.phone"
readonly
></el-input>
</el-form-item>
<el-form-item
label=
"用户真实姓名"
prop=
"phone"
>
<el-input
type=
"password"
v-model=
"ruleForm.phone"
></el-input>
<el-input
v-model=
"ruleForm.phone"
readonly
></el-input>
</el-form-item>
<el-form-item
label=
"身份证号码"
prop=
"phone"
>
<el-input
type=
"password"
v-model=
"ruleForm.phone"
></el-input>
<el-input
v-model=
"ruleForm.phone"
readonly
></el-input>
</el-form-item>
<el-form-item
label=
"身份"
prop=
"phone"
>
<el-input
type=
"password"
v-model=
"ruleForm.phone"
></el-input>
<el-input
v-model=
"ruleForm.phone"
readonly
></el-input>
</el-form-item>
<el-form-item
label=
"登录帐号"
prop=
"phone"
>
<el-input
type=
"password"
v-model=
"ruleForm.phone"
></el-input>
<el-input
v-model=
"ruleForm.phone"
readonly
></el-input>
</el-form-item>
<el-form-item
label=
"账号名"
prop=
"phone"
>
<el-input
type=
"password"
v-model=
"ruleForm.phone"
></el-input>
<el-input
v-model=
"ruleForm.phone"
></el-input>
</el-form-item>
<el-form-item
label=
"常用邮箱"
prop=
"
phone
"
>
<el-input
type=
"password"
v-model=
"ruleForm.phone
"
></el-input>
<el-form-item
label=
"常用邮箱"
prop=
"
email
"
>
<el-input
v-model=
"ruleForm.email
"
></el-input>
</el-form-item>
</el-form>
<template
#
footer
>
...
...
@@ -48,10 +48,10 @@ export default {
data
()
{
return
{
ruleForm
:
{
phone
:
''
email
:
''
},
rules
:
{
phone
:
[{
required
:
true
,
message
:
'请输入手机号码'
,
trigger
:
'blur'
}]
email
:
[{
required
:
true
,
message
:
'请输入手机号码'
,
trigger
:
'blur'
}]
},
submitLoading
:
false
}
...
...
src/pages/course/learn/components/CourseTeacher.vue
浏览文件 @
1210b4ce
...
...
@@ -36,6 +36,7 @@ export default {
font-weight
:
bold
;
}
.t2
{
font-size
:
13px
;
margin-top
:
5px
;
color
:
#707070
;
}
...
...
src/pages/exam/testExam/exam/index.vue
浏览文件 @
1210b4ce
...
...
@@ -3,12 +3,12 @@
<div
class=
"answer-box"
>
<div
class=
"head"
id=
"head-h"
>
<el-button
icon=
"el-icon-arrow-left"
circle
@
click=
"$router.back()"
></el-button>
<div
class=
"title"
>
考前摸底
</div>
<div
class=
"title"
>
模拟测试
</div>
<div
class=
"right"
>
<div
class=
"count"
>
{{
time
.
examTimeText
}}
</div>
</div>
</div>
<div
class=
"exam-main"
:style=
"
{
height: this.contentHeight + 'px'
}">
<div
class=
"exam-main"
:style=
"
{
height: this.contentHeight + 'px'
}">
<div
class=
"left"
>
<question
v-if=
"Object.keys(questionParams.question).length"
...
...
@@ -17,22 +17,20 @@
></question>
</div>
<div
class=
"right"
>
<answer-card
:questionParams=
"questionParams"
ref=
"signHandle"
></answer-card>
<answer-card
:questionParams=
"questionParams"
ref=
"signHandle"
></answer-card>
</div>
</div>
<div
class=
"foot"
id=
"foot-h"
>
<div
class=
"exam-btn"
>
<div
@
click=
"changeIndex('prev')"
:class=
"this.questionParams.questionIndex !== 0 ? 'active' : ''"
>
上一题
</div>
<div
@
click=
"changeIndex('prev')"
:class=
"this.questionParams.questionIndex !== 0 ? 'active' : ''"
>
上一题
</div>
<div
:class=
"questionParams.questionIndex + 1 !== questionParams.question.total_question_count ? 'active' : ''"
@
click=
"changeIndex('next')"
>
下一题
</div>
>
下一题
</div>
</div>
<div
class=
"rigth-btn"
>
<div
class=
"sign"
@
click=
"collectQuestion"
>
...
...
@@ -41,7 +39,7 @@
</div>
<div
class=
"sign2"
@
click=
"setSign"
v-if=
"!$route.query.id"
>
<div
:class=
"isSignText() ? 'icon active' : 'icon'"
></div>
<div
class=
"txt"
>
{{
isSignText
()
?
'已标记'
:
'标记'
}}
</div>
<div
class=
"txt"
>
{{
isSignText
()
?
'已标记'
:
'标记'
}}
</div>
</div>
<div
class=
"end-exam-btn"
>
<div
class=
"btn"
@
click=
"endExam"
v-if=
"!$route.query.id"
>
交卷
</div>
...
...
@@ -102,7 +100,9 @@ export default {
this
.
handlePapers
()
},
3000
)
// 赋值页面高度
this
.
contentHeight
=
parseInt
(
document
.
documentElement
.
clientHeight
-
(
this
.
getDom
(
'head-h'
).
offsetHeight
+
this
.
getDom
(
'foot-h'
).
offsetHeight
))
this
.
contentHeight
=
parseInt
(
document
.
documentElement
.
clientHeight
-
(
this
.
getDom
(
'head-h'
).
offsetHeight
+
this
.
getDom
(
'foot-h'
).
offsetHeight
)
)
this
.
getTopic
()
},
methods
:
{
...
...
@@ -114,49 +114,34 @@ export default {
ansRecord
[
qData
.
question_item_id
]
?
ansRecord
[
qData
.
question_item_id
][
qData
.
id
]
?
ansRecord
[
qData
.
question_item_id
][
qData
.
id
].
sign
?
flag
=
true
:
flag
=
false
:
flag
=
false
:
flag
=
false
?
(
flag
=
true
)
:
(
flag
=
false
)
:
(
flag
=
false
)
:
(
flag
=
false
)
}
return
flag
},
// 标记
setSign
()
{
const
data
=
this
.
questionParams
.
question
data
.
sign
?
data
.
sign
=
false
:
data
.
sign
=
true
data
.
sign
?
(
data
.
sign
=
false
)
:
(
data
.
sign
=
true
)
this
.
$refs
.
signHandle
.
onSignHandle
(
data
.
sign
)
},
// 收藏试题
collectQuestion
()
{
const
data
=
this
.
questionParams
.
question
data
.
isCollection
?
this
.
removeCall
(
data
.
id
,
()
=>
{
data
.
isCollection
=
false
})
:
this
.
addCall
(
data
.
id
,
()
=>
{
data
.
isCollection
=
true
})
?
this
.
removeCall
(
data
.
id
,
()
=>
{
data
.
isCollection
=
false
})
:
this
.
addCall
(
data
.
id
,
()
=>
{
data
.
isCollection
=
true
})
},
addCall
(
id
,
call
)
{
api
.
addCollection
({
question_id
:
id
})
.
then
(
response
=>
{
api
.
addCollection
({
question_id
:
id
}).
then
(
response
=>
{
call
(
response
.
list
)
})
.
finally
(()
=>
{
})
},
removeCall
(
id
,
call
)
{
api
.
deleteCollection
({
type
:
2
,
question_id
:
id
})
.
then
(
response
=>
{
api
.
deleteCollection
({
type
:
2
,
question_id
:
id
}).
then
(
response
=>
{
call
(
response
.
list
)
})
.
finally
(()
=>
{
})
},
// 提交考试
endExam
()
{
...
...
@@ -188,8 +173,9 @@ export default {
},
secondToDate
(
result
)
{
const
h
=
Math
.
floor
(
result
/
3600
)
<
10
?
'0'
+
Math
.
floor
(
result
/
3600
)
:
Math
.
floor
(
result
/
3600
)
const
m
=
Math
.
floor
((
result
/
60
%
60
))
<
10
?
'0'
+
Math
.
floor
((
result
/
60
%
60
))
:
Math
.
floor
((
result
/
60
%
60
))
const
s
=
Math
.
floor
((
result
%
60
))
<
10
?
'0'
+
Math
.
floor
((
result
%
60
))
:
Math
.
floor
((
result
%
60
))
const
m
=
Math
.
floor
((
result
/
60
)
%
60
)
<
10
?
'0'
+
Math
.
floor
((
result
/
60
)
%
60
)
:
Math
.
floor
((
result
/
60
)
%
60
)
const
s
=
Math
.
floor
(
result
%
60
)
<
10
?
'0'
+
Math
.
floor
(
result
%
60
)
:
Math
.
floor
(
result
%
60
)
if
(
h
===
0
)
{
result
=
m
+
':'
+
s
}
else
{
...
...
@@ -206,9 +192,10 @@ export default {
// 改变题序
changeIndex
(
type
)
{
if
(
type
===
'prev'
)
{
this
.
questionParams
.
questionIndex
>
0
&&
(
this
.
questionParams
.
questionIndex
--
)
this
.
questionParams
.
questionIndex
>
0
&&
this
.
questionParams
.
questionIndex
--
}
else
{
this
.
questionParams
.
questionIndex
+
1
!==
this
.
questionParams
.
question
.
total_question_count
&&
(
this
.
questionParams
.
questionIndex
++
)
this
.
questionParams
.
questionIndex
+
1
!==
this
.
questionParams
.
question
.
total_question_count
&&
this
.
questionParams
.
questionIndex
++
}
this
.
changeData
()
},
...
...
@@ -218,9 +205,7 @@ export default {
type
:
1
,
is_create
:
this
.
$route
.
query
.
id
||
this
.
$route
.
query
.
is_create
===
undefined
?
0
:
this
.
$route
.
query
.
is_create
}
api
.
getExamQuestion
(
param
)
.
then
(
response
=>
{
api
.
getExamQuestion
(
param
).
then
(
response
=>
{
const
data
=
JSON
.
parse
(
response
.
data
)
this
.
beforeChangeData
=
data
.
sheet
this
.
questionParams
.
beforeData
=
data
.
sheet
...
...
@@ -237,14 +222,10 @@ export default {
this
.
afterChangeData
=
countData
this
.
questionParams
.
card
=
countData
data
.
sheet
.
answers
!==
null
&&
(
this
.
questionParams
.
answerRecord
=
data
.
sheet
.
answers
)
this
.
$route
.
query
.
id
&&
this
.
$route
.
query
.
id
.
length
>
5
?
this
.
analysisInit
()
:
this
.
changeData
()
this
.
$route
.
query
.
id
&&
this
.
$route
.
query
.
id
.
length
>
5
?
this
.
analysisInit
()
:
this
.
changeData
()
this
.
setClock
(
data
.
sheet
.
remaining_times
)
this
.
time
.
duration
=
data
.
sheet
.
duration
})
.
finally
(()
=>
{
})
},
// 计算错题总数
countErrNum
(
data
)
{
...
...
@@ -282,14 +263,18 @@ export default {
// 解析
if
(
this
.
$route
.
query
.
id
)
{
if
(
this
.
$route
.
query
.
id
.
length
>
5
||
this
.
$route
.
query
.
id
===
'all'
||
this
.
$route
.
query
.
id
===
'err'
)
{
const
qAnswer
=
Array
.
isArray
(
cItem
.
question_answer
)
?
cItem
.
question_answer
:
cItem
.
question_answer
=
[
cItem
.
question_answer
]
const
qAnswer
=
Array
.
isArray
(
cItem
.
question_answer
)
?
cItem
.
question_answer
:
(
cItem
.
question_answer
=
[
cItem
.
question_answer
])
let
optGroup
=
''
const
findAB
=
qAnswer
.
map
(
qOpt
=>
{
const
findIndex
=
cItem
.
question_options
.
findIndex
(
i
=>
{
return
i
.
id
===
qOpt
})
const
findIndex
=
cItem
.
question_options
.
findIndex
(
i
=>
{
return
i
.
id
===
qOpt
})
return
this
.
A_Z
()[
findIndex
]
})
data
.
question_analysis
=
cItem
.
question_analysis
optGroup
=
(
findAB
.
sort
().
toString
().
replace
(
new
RegExp
(
','
,
'g'
),
''
)
)
optGroup
=
findAB
.
sort
().
toString
().
replace
(
new
RegExp
(
','
,
'g'
),
''
)
data
.
question_answer
=
optGroup
}
}
...
...
@@ -329,9 +314,7 @@ export default {
let
_tmp
=
null
arr
.
length
&&
(
_tmp
=
arr
[
0
][
str
])
for
(
const
i
in
arr
)
{
arr
[
i
][
str
]
===
_tmp
?
_t
.
push
(
arr
[
i
])
:
(()
=>
{
arr
[
i
][
str
]
===
_tmp
?
_t
.
push
(
arr
[
i
])
:
(()
=>
{
_tmp
=
arr
[
i
][
str
]
_arr
.
push
(
_t
)
_t
=
[
arr
[
i
]]
...
...
@@ -351,11 +334,13 @@ export default {
// 结果页进入设置默认点击的题
analysisInit
()
{
this
.
afterChangeData
.
map
(
item
=>
{
const
findData
=
item
.
find
(
datas
=>
{
return
datas
.
id
===
this
.
$route
.
query
.
id
})
const
findData
=
item
.
find
(
datas
=>
{
return
datas
.
id
===
this
.
$route
.
query
.
id
})
if
(
findData
)
{
this
.
questionParams
.
questionIndex
=
findData
.
q_order
-
1
this
.
questionParams
.
questions
=
findData
findData
.
q_order
===
1
&&
(
this
.
changeData
()
)
findData
.
q_order
===
1
&&
this
.
changeData
(
)
}
})
},
...
...
@@ -368,17 +353,13 @@ export default {
answers
:
JSON
.
stringify
(
this
.
questionParams
.
answerRecord
),
duration
:
this
.
time
.
duration
}
api
.
setCache
(
param
)
.
then
(
response
=>
{
api
.
setCache
(
param
).
then
(
response
=>
{
if
(
n
)
{
this
.
$router
.
replace
({
path
:
'/testExam/result'
})
}
})
.
finally
(()
=>
{
})
}
},
filterData
(
data
)
{
...
...
@@ -401,44 +382,44 @@ export default {
}
</
script
>
<
style
lang=
"scss"
scoped
>
.answer-box
{
.answer-box
{
width
:
100%
;
height
:
100%
;
// background: #f9f9f9;
.head
{
.head
{
border-bottom
:
1px
solid
#ccc
;
height
:
80px
;
background
:
#
FFFFFF
;
background
:
#
ffffff
;
display
:
flex
;
align-items
:
center
;
padding-left
:
40px
;
.title
{
.title
{
padding-left
:
20px
;
font-size
:
24px
;
font-weight
:
bold
;
color
:
#222222
;
line-height
:
80px
;
}
.right
{
.right
{
width
:
260px
;
margin-left
:
auto
;
display
:
flex
;
justify-content
:
space-around
;
align-items
:
center
;
.count
{
.count
{
font-size
:
18px
;
font-weight
:
bold
;
color
:
#222222
;
}
.time
{
.time
{
display
:
flex
;
.icon
{
.icon
{
width
:
23px
;
height
:
23px
;
// background: url(../../assets/images/tick.png);
background-size
:
100%
100%
;
background-size
:
100%
100%
;
}
.mun
{
.mun
{
font-size
:
18px
;
font-weight
:
bold
;
color
:
#222222
;
...
...
@@ -448,9 +429,9 @@ export default {
}
}
}
.exam-main
{
.exam-main
{
display
:
flex
;
.left
{
.left
{
background
:
#fff
;
flex
:
1
;
padding
:
10px
20px
0
53px
;
...
...
@@ -460,7 +441,7 @@ export default {
display
:
none
;
}
}
.right
{
.right
{
border-left
:
1px
solid
#ccc
;
position
:
relative
;
width
:
220px
;
...
...
@@ -473,42 +454,42 @@ export default {
}
}
}
.foot
{
.foot
{
border-top
:
1px
solid
#ccc
;
position
:
absolute
;
bottom
:
0
;
left
:
0
;
width
:
100%
;
height
:
60px
;
background
:
#
FFFFFF
;
background
:
#
ffffff
;
display
:
flex
;
align-items
:
center
;
.exam-btn
{
.exam-btn
{
display
:
flex
;
padding-left
:
40px
;
cursor
:
pointer
;
div
{
div
{
width
:
100px
;
height
:
40px
;
border-radius
:
4px
;
border
:
1px
solid
#
CCCCCC
;
border
:
1px
solid
#
cccccc
;
font-size
:
14px
;
font-weight
:
bold
;
color
:
#999999
;
line-height
:
40px
;
text-align
:
center
;
margin-right
:
20px
;
&
.active
{
background
:
#
C
01540
;
&
.active
{
background
:
#
c
01540
;
border-radius
:
4px
;
color
:
#fff
;
}
}
}
.rigth-btn
{
.rigth-btn
{
display
:
flex
;
margin-left
:
auto
;
.end-exam-btn
{
.end-exam-btn
{
background
:
#fff
;
height
:
62px
;
margin-top
:
-2px
;
...
...
@@ -517,7 +498,7 @@ export default {
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
.btn
{
.btn
{
cursor
:
pointer
;
width
:
200px
;
height
:
40px
;
...
...
@@ -525,49 +506,49 @@ export default {
border-radius
:
4px
;
font-size
:
14px
;
font-weight
:
bold
;
color
:
#
CCCCCC
;
color
:
#
cccccc
;
line-height
:
40px
;
text-align
:
center
;
}
}
.sign
{
.sign
{
margin-right
:
20px
;
margin-top
:
8px
;
.icon
{
.icon
{
margin
:
0
auto
;
width
:
24px
;
height
:
24px
;
background
:
url(@/assets/images/collection.png)
;
background-size
:
100%
100%
;
&
.active
{
background-size
:
100%
100%
;
&
.active
{
background
:
url(@/assets/images/collection2.png)
;
background-size
:
100%
100%
;
background-size
:
100%
100%
;
}
}
.txt
{
.txt
{
font-size
:
14px
;
color
:
#
CCCCCC
;
color
:
#
cccccc
;
line-height
:
20px
;
margin-top
:
2px
;
}
}
.sign2
{
.sign2
{
margin-right
:
20px
;
margin-top
:
8px
;
.icon
{
.icon
{
margin
:
0
auto
;
width
:
24px
;
height
:
24px
;
background
:
url(@/assets/images/sign.png)
;
background-size
:
100%
100%
;
&
.active
{
background-size
:
100%
100%
;
&
.active
{
background
:
url(@/assets/images/sign2.png)
;
background-size
:
100%
100%
;
background-size
:
100%
100%
;
}
}
.txt
{
.txt
{
font-size
:
14px
;
color
:
#
CCCCCC
;
color
:
#
cccccc
;
line-height
:
20px
;
margin-top
:
2px
;
}
...
...
src/pages/exam/testExam/index.vue
浏览文件 @
1210b4ce
<
template
>
<app-container
title=
"
考前摸底
介绍"
>
<app-container
title=
"
模拟测试
介绍"
>
<div
class=
"desc-exam"
>
<p>
考试时间20分钟。
</p>
<p>
演示考试题目共10题,全部为单选题。
</p>
...
...
@@ -45,9 +45,7 @@ export default {
const
h
=
this
.
$createElement
this
.
$msgbox
({
title
:
'消息'
,
message
:
h
(
'p'
,
null
,
[
h
(
'span'
,
null
,
'您上次未做完试题 '
)
]),
message
:
h
(
'p'
,
null
,
[
h
(
'span'
,
null
,
'您上次未做完试题 '
)]),
showCancelButton
:
true
,
confirmButtonText
:
'继续答题'
,
cancelButtonText
:
'重新答题'
,
...
...
src/router/routes.js
浏览文件 @
1210b4ce
...
...
@@ -27,12 +27,12 @@ const courseRoutes = [
}
]
const
examAnswer
=
[
/*
考前摸底
*/
/*
模拟测试
*/
{
path
:
'/testExam'
,
component
:
()
=>
import
(
/* webpackChunkName: "exam" */
'@/pages/exam/testExam/index'
)
},
/*
考前摸底
结果页 */
/*
模拟测试
结果页 */
{
path
:
'/testExam/result'
,
component
:
()
=>
import
(
/* webpackChunkName: "exam" */
'@/pages/exam/testExam/exam/result'
)
...
...
@@ -128,7 +128,7 @@ export default [
{
path
:
'questions'
,
component
:
()
=>
import
(
/* webpackChunkName: "my" */
'@/pages/my/questions/questionAll'
)
}
]
},
/*
考前摸底
考试 */
/*
模拟测试
考试 */
{
path
:
'/testExam/exam'
,
component
:
()
=>
import
(
/* webpackChunkName: "course-learn" */
'@/pages/exam/testExam/exam/index'
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论