Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
x-learn
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
x-learn
Commits
34170278
提交
34170278
authored
11月 29, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updates
上级
c84edffb
隐藏空白字符变更
内嵌
并排
正在显示
19 个修改的文件
包含
39 行增加
和
42 行删除
+39
-42
aside.vue
src/components/layout/aside.vue
+3
-3
CourseChapter.vue
src/modules/course/learn/components/CourseChapter.vue
+1
-1
Item.vue
src/modules/course/learn/views/Item.vue
+1
-1
api.js
src/modules/exam/exam/api.js
+0
-0
index.js
src/modules/exam/exam/index.js
+3
-3
Exam.vue
src/modules/exam/exam/views/Exam.vue
+6
-5
Index.vue
src/modules/exam/exam/views/Index.vue
+5
-5
Result.vue
src/modules/exam/exam/views/Result.vue
+2
-4
api.js
src/modules/exam/test/api.js
+0
-0
index.js
src/modules/exam/test/index.js
+2
-2
Exam.vue
src/modules/exam/test/views/Exam.vue
+1
-1
Result.vue
src/modules/exam/test/views/Result.vue
+2
-4
index.js
src/modules/teacher/exam/chapter/index.js
+2
-2
Index.vue
src/modules/teacher/exam/chapter/views/Index.vue
+1
-1
Review.vue
src/modules/teacher/exam/chapter/views/Review.vue
+2
-2
index.js
src/modules/teacher/exam/mock/index.js
+2
-2
Index.vue
src/modules/teacher/exam/mock/views/Index.vue
+1
-1
Review.vue
src/modules/teacher/exam/mock/views/Review.vue
+2
-2
beforeEnter.js
src/utils/beforeEnter.js
+3
-3
没有找到文件。
src/components/layout/aside.vue
浏览文件 @
34170278
...
...
@@ -70,7 +70,7 @@ export default {
title
:
'模拟考试'
,
icon
:
'icon-bianzuhong'
,
children
:
[
{
tag
:
'menu_exam_index'
,
title
:
'模拟考试'
,
path
:
'/exam/
mock
'
},
{
tag
:
'menu_exam_index'
,
title
:
'模拟考试'
,
path
:
'/exam/
exam
'
},
{
tag
:
'menu_exam_wq'
,
title
:
'错题集合'
,
path
:
'/exam/questions/wrong'
},
{
tag
:
'menu_exam_cq'
,
title
:
'收藏试题'
,
path
:
'/exam/questions/collection'
}
]
...
...
@@ -94,8 +94,8 @@ export default {
title
:
'模拟考试'
,
icon
:
'icon-bianzuhong'
,
children
:
[
{
tag
:
'menu_exam_paper_review'
,
title
:
'考卷批阅'
,
path
:
'/teacher/exam/
mock
'
},
{
tag
:
'menu_exam_exercise_review'
,
title
:
'习题批阅'
,
path
:
'/teacher/exam/
chapter
'
}
{
tag
:
'menu_exam_paper_review'
,
title
:
'考卷批阅'
,
path
:
'/teacher/exam/
exam
'
},
{
tag
:
'menu_exam_exercise_review'
,
title
:
'习题批阅'
,
path
:
'/teacher/exam/
test
'
}
]
},
{
...
...
src/modules/course/learn/components/CourseChapter.vue
浏览文件 @
34170278
...
...
@@ -77,7 +77,7 @@ export default {
}
},
toExamPage
(
data
,
type
)
{
const
path
=
type
===
3
?
'/exam/
chapter/result'
:
'/exam/chapter
/exam'
const
path
=
type
===
3
?
'/exam/
test/result'
:
'/exam/test
/exam'
this
.
$router
.
push
({
path
:
path
,
query
:
{
course_id
:
this
.
courseId
,
chapter_id
:
data
.
id
,
type
,
exam_id
:
data
.
resource_id
}
...
...
src/modules/course/learn/views/Item.vue
浏览文件 @
34170278
...
...
@@ -125,7 +125,7 @@ export default {
this
.
$router
.
push
({
name
:
'viewerCourseChapter'
,
params
:
{
cid
:
this
.
courseId
,
id
:
data
.
id
}
})
},
toExamPage
(
data
,
type
)
{
const
path
=
type
===
3
?
'/exam/
chapter/result'
:
'/exam/chapter
/exam'
const
path
=
type
===
3
?
'/exam/
test/result'
:
'/exam/test
/exam'
this
.
$router
.
push
({
path
:
path
,
query
:
{
course_id
:
this
.
courseId
,
chapter_id
:
data
.
id
,
type
,
exam_id
:
data
.
resource_id
}
...
...
src/modules/exam/
chapter
/api.js
→
src/modules/exam/
exam
/api.js
浏览文件 @
34170278
File moved
src/modules/exam/
mock
/index.js
→
src/modules/exam/
exam
/index.js
浏览文件 @
34170278
...
...
@@ -3,11 +3,11 @@ const routes = [
path
:
'/'
,
component
:
()
=>
import
(
'@/components/layout/index.vue'
),
children
:
[
{
path
:
'/exam/
mock
'
,
component
:
()
=>
import
(
'./views/Index.vue'
)
},
{
path
:
'/exam/
mock
/result'
,
component
:
()
=>
import
(
'./views/Result.vue'
)
}
{
path
:
'/exam/
exam
'
,
component
:
()
=>
import
(
'./views/Index.vue'
)
},
{
path
:
'/exam/
exam
/result'
,
component
:
()
=>
import
(
'./views/Result.vue'
)
}
]
},
{
path
:
'/exam/
mock
/exam'
,
component
:
()
=>
import
(
'./views/Exam.vue'
)
}
{
path
:
'/exam/
exam
/exam'
,
component
:
()
=>
import
(
'./views/Exam.vue'
)
}
]
export
{
routes
}
src/modules/exam/
mock
/views/Exam.vue
→
src/modules/exam/
exam
/views/Exam.vue
浏览文件 @
34170278
...
...
@@ -68,7 +68,7 @@ export default {
},
// 返回
handleBack
()
{
this
.
$router
.
push
(
'/exam/
mock
'
)
this
.
$router
.
push
(
'/exam/
exam
'
)
},
// 提交考卷 isCache:0缓存,1提交
submitExam
(
isCache
)
{
...
...
@@ -94,10 +94,11 @@ export default {
confirmButtonText
:
'确认提交'
,
cancelButtonText
:
'继续作答'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
submitApi
(
id
,
isCache
,
answer
,
refData
.
duration
)
}).
catch
(()
=>
{
})
.
then
(()
=>
{
this
.
submitApi
(
id
,
isCache
,
answer
,
refData
.
duration
)
})
.
catch
(()
=>
{})
}
else
{
this
.
submitApi
(
id
,
isCache
,
answer
,
refData
.
duration
)
}
...
...
@@ -115,7 +116,7 @@ export default {
api
.
setCache
(
param
).
then
(
response
=>
{
if
(
isCache
)
{
clearInterval
(
this
.
cacheAnswerTime
)
this
.
$router
.
replace
({
path
:
'/exam/
mock
/result'
,
query
:
{
exam_id
:
this
.
examId
}
})
this
.
$router
.
replace
({
path
:
'/exam/
exam
/result'
,
query
:
{
exam_id
:
this
.
examId
}
})
}
})
}
...
...
src/modules/exam/
mock
/views/Index.vue
→
src/modules/exam/
exam
/views/Index.vue
浏览文件 @
34170278
<
template
>
<app-container
title=
"模拟考试"
>
<template
#
header-right
>
<el-select
v-model=
"courseId"
@
change=
"getExamList"
placeholder=
"请选择课程"
clearable
style=
"width:300px"
>
<el-select
v-model=
"courseId"
@
change=
"getExamList"
placeholder=
"请选择课程"
clearable
style=
"width:
300px"
>
<el-option
v-for=
"item in courseList"
:key=
"item.id"
:label=
"item.course_name"
:value=
"item.id"
></el-option>
</el-select>
</
template
>
...
...
@@ -52,10 +52,10 @@ export default {
this
.
open
(
item
)
}
else
if
([
1
,
2
].
includes
(
item
.
status
))
{
// 已完成
this
.
$router
.
push
({
path
:
'/exam/
mock
/result'
,
query
:
{
exam_id
:
item
.
id
}
})
this
.
$router
.
push
({
path
:
'/exam/
exam
/result'
,
query
:
{
exam_id
:
item
.
id
}
})
}
else
{
// 未做
this
.
$router
.
push
({
path
:
'/exam/
mock
/exam'
,
query
:
{
exam_id
:
item
.
id
,
is_create
:
0
}
})
this
.
$router
.
push
({
path
:
'/exam/
exam
/exam'
,
query
:
{
exam_id
:
item
.
id
,
is_create
:
0
}
})
}
},
open
(
item
)
{
...
...
@@ -68,11 +68,11 @@ export default {
distinguishCancelAndClose
:
true
})
.
then
(()
=>
{
this
.
$router
.
push
({
path
:
'/exam/
mock
/exam'
,
query
:
{
exam_id
:
item
.
id
,
is_create
:
0
}
})
this
.
$router
.
push
({
path
:
'/exam/
exam
/exam'
,
query
:
{
exam_id
:
item
.
id
,
is_create
:
0
}
})
})
.
catch
(
action
=>
{
if
(
action
===
'cancel'
)
{
this
.
$router
.
push
({
path
:
'/exam/
mock
/exam'
,
query
:
{
exam_id
:
item
.
id
,
is_create
:
1
}
})
this
.
$router
.
push
({
path
:
'/exam/
exam
/exam'
,
query
:
{
exam_id
:
item
.
id
,
is_create
:
1
}
})
}
})
}
...
...
src/modules/exam/
mock
/views/Result.vue
→
src/modules/exam/
exam
/views/Result.vue
浏览文件 @
34170278
...
...
@@ -36,9 +36,7 @@
</div>
<
template
v-if=
"status !== '2'"
>
<p
class=
"text"
>
请等待老师评分~
</p></
template
>
<
template
v-else
>
<p
class=
"text"
v-if=
"percent
<
0
.
8
"
>
您离成功还有一段距离,继续努力!
</p>
<p
class=
"text"
v-if=
"percent
<
0
.
8
"
>
您离成功还有一段距离,继续努力!
</p>
<div
class=
"chart-box"
>
<div
class=
"chart-item"
>
<div
class=
"chart-title"
>
总分
</div>
...
...
@@ -109,7 +107,7 @@ export default {
methods
:
{
goPage
(
param
)
{
this
.
$router
.
push
({
path
:
'/exam/
mock
/exam'
,
path
:
'/exam/
exam
/exam'
,
query
:
{
exam_id
:
this
.
examId
,
id
:
param
}
})
},
...
...
src/modules/exam/
mock
/api.js
→
src/modules/exam/
test
/api.js
浏览文件 @
34170278
File moved
src/modules/exam/
chapter
/index.js
→
src/modules/exam/
test
/index.js
浏览文件 @
34170278
...
...
@@ -2,9 +2,9 @@ const routes = [
{
path
:
'/'
,
component
:
()
=>
import
(
'@/components/layout/index.vue'
),
children
:
[{
path
:
'/exam/
chapter
/result'
,
component
:
()
=>
import
(
'./views/Result.vue'
)
}]
children
:
[{
path
:
'/exam/
test
/result'
,
component
:
()
=>
import
(
'./views/Result.vue'
)
}]
},
{
path
:
'/exam/
chapter
/exam'
,
component
:
()
=>
import
(
'./views/Exam.vue'
)
}
{
path
:
'/exam/
test
/exam'
,
component
:
()
=>
import
(
'./views/Exam.vue'
)
}
]
export
{
routes
}
src/modules/exam/
chapter
/views/Exam.vue
→
src/modules/exam/
test
/views/Exam.vue
浏览文件 @
34170278
...
...
@@ -83,7 +83,7 @@ export default {
this
.
cacheAnswerTime
&&
clearInterval
(
this
.
cacheAnswerTime
)
// 停止缓存
api
.
setCourseCache
(
params
).
then
(
res
=>
{
this
.
$router
.
replace
({
path
:
'/exam/
chapter
/result'
,
path
:
'/exam/
test
/result'
,
query
:
Object
.
assign
({},
this
.
$route
.
query
,
{
type
:
2
})
})
})
...
...
src/modules/exam/
chapter
/views/Result.vue
→
src/modules/exam/
test
/views/Result.vue
浏览文件 @
34170278
...
...
@@ -45,9 +45,7 @@
</div> -->
<
template
v-if=
"status !== '2'"
>
<p
class=
"text"
>
请等待老师评分~
</p></
template
>
<
template
v-else
>
<p
class=
"text"
v-if=
"percent
<
0
.
8
"
>
您离成功还有一段距离,继续努力!
</p>
<p
class=
"text"
v-if=
"percent
<
0
.
8
"
>
您离成功还有一段距离,继续努力!
</p>
<div
class=
"chart-box"
>
<div
class=
"chart-item"
>
<div
class=
"chart-title"
>
总分
</div>
...
...
@@ -120,7 +118,7 @@ export default {
const
urlParam
=
this
.
$route
.
query
urlParam
.
id
=
param
urlParam
.
type
=
2
this
.
$router
.
push
({
path
:
'/exam/
chapter
/exam'
,
query
:
urlParam
})
this
.
$router
.
push
({
path
:
'/exam/
test
/exam'
,
query
:
urlParam
})
},
getExamPapers
()
{
const
param
=
{
...
...
src/modules/teacher/exam/chapter/index.js
浏览文件 @
34170278
...
...
@@ -2,9 +2,9 @@ const routes = [
{
path
:
'/'
,
component
:
()
=>
import
(
'@/components/layout/index.vue'
),
children
:
[{
path
:
'/teacher/exam/
chapter
'
,
component
:
()
=>
import
(
'./views/Index.vue'
)
}]
children
:
[{
path
:
'/teacher/exam/
test
'
,
component
:
()
=>
import
(
'./views/Index.vue'
)
}]
},
{
path
:
'/teacher/exam/
chapter
/review'
,
component
:
()
=>
import
(
'./views/Review.vue'
)
}
{
path
:
'/teacher/exam/
test
/review'
,
component
:
()
=>
import
(
'./views/Review.vue'
)
}
]
export
{
routes
}
src/modules/teacher/exam/chapter/views/Index.vue
浏览文件 @
34170278
...
...
@@ -75,7 +75,7 @@ export default {
},
studentReview
(
data
)
{
this
.
$router
.
push
({
path
:
'/teacher/exam/
chapter
/review'
,
path
:
'/teacher/exam/
test
/review'
,
query
:
{
sheet_id
:
data
.
sheet_id
,
stu_id
:
data
.
id
}
})
},
...
...
src/modules/teacher/exam/chapter/views/Review.vue
浏览文件 @
34170278
...
...
@@ -30,7 +30,7 @@
v-model=
"item.user_score"
placeholder=
"请输入分数"
size=
"mini"
style=
"width:80px"
style=
"width:
80px"
@
input=
"handleScoreInput(item)"
></el-input>
</div>
...
...
@@ -138,7 +138,7 @@ export default {
},
// 返回
handleBack
()
{
this
.
$router
.
push
(
'/teacher/exam/
chapter
'
)
this
.
$router
.
push
(
'/teacher/exam/
test
'
)
},
// 提交批阅
submitComment
(
item
,
data
)
{
...
...
src/modules/teacher/exam/mock/index.js
浏览文件 @
34170278
...
...
@@ -2,9 +2,9 @@ const routes = [
{
path
:
'/'
,
component
:
()
=>
import
(
'@/components/layout/index.vue'
),
children
:
[{
path
:
'/teacher/exam/
mock
'
,
component
:
()
=>
import
(
'./views/Index.vue'
)
}]
children
:
[{
path
:
'/teacher/exam/
exam
'
,
component
:
()
=>
import
(
'./views/Index.vue'
)
}]
},
{
path
:
'/teacher/exam/
mock
/review'
,
component
:
()
=>
import
(
'./views/Review.vue'
)
}
{
path
:
'/teacher/exam/
exam
/review'
,
component
:
()
=>
import
(
'./views/Review.vue'
)
}
]
export
{
routes
}
src/modules/teacher/exam/mock/views/Index.vue
浏览文件 @
34170278
...
...
@@ -52,7 +52,7 @@ export default {
},
studentReview
(
data
)
{
this
.
$router
.
push
({
path
:
'/teacher/exam/
mock
/review'
,
path
:
'/teacher/exam/
exam
/review'
,
query
:
{
sheet_id
:
data
.
sheet_id
,
stu_id
:
data
.
id
}
})
}
...
...
src/modules/teacher/exam/mock/views/Review.vue
浏览文件 @
34170278
...
...
@@ -29,7 +29,7 @@
v-model=
"item.user_score"
placeholder=
"请输入分数"
size=
"mini"
style=
"width:80px"
style=
"width:
80px"
@
input=
"handleScoreInput(item)"
></el-input>
</div>
...
...
@@ -137,7 +137,7 @@ export default {
},
// 返回
handleBack
()
{
this
.
$router
.
push
(
'/teacher/exam/
mock
'
)
this
.
$router
.
push
(
'/teacher/exam/
exam
'
)
},
// 提交批阅
submitComment
(
item
,
data
)
{
...
...
src/utils/beforeEnter.js
浏览文件 @
34170278
import
store
from
'@/store'
export
default
async
function
(
to
,
from
,
next
)
{
export
default
async
function
(
to
,
from
,
next
)
{
const
{
user_id
:
userId
,
student_id
:
studentId
}
=
to
.
query
if
(
userId
&&
studentId
)
{
store
.
commit
(
'setGuestUser'
,
{
user_id
:
userId
,
student_id
:
studentId
})
...
...
@@ -15,8 +15,8 @@ export default async function(to, from, next) {
return
}
const
isLogin
=
store
.
state
.
user
.
id
||
(
await
store
.
dispatch
(
'checkLogin'
))
if
(
!
isLogin
)
{
const
isLogin
=
store
.
state
.
isLogin
||
(
await
store
.
dispatch
(
'checkLogin'
))
if
(
to
.
meta
.
requiredLogin
&&
!
isLogin
)
{
window
.
location
.
href
=
`
${
import
.
meta
.
env
.
VITE_LOGIN_URL
}
?rd=
${
encodeURIComponent
(
window
.
location
.
href
)}
`
return
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论