Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
41be0d08
提交
41be0d08
authored
10月 23, 2020
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
课程考试支持多次考试
上级
a979c5a3
全部展开
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
37 行增加
和
36 行删除
+37
-36
CourseAction.js
src/action/CourseAction.js
+17
-2
courseExam.vue
src/modules/viewer/components/work/courseExam.vue
+0
-0
examItem.vue
src/modules/viewer/components/work/examItem.vue
+17
-25
index.vue
src/modules/viewer/components/work/index.vue
+1
-8
index.vue
src/modules/viewer/index.vue
+1
-0
courseDetail.vue
src/pages/learn/courseDetail.vue
+1
-1
没有找到文件。
src/action/CourseAction.js
浏览文件 @
41be0d08
...
@@ -211,15 +211,30 @@ export default class CourseAction extends BaseACTION {
...
@@ -211,15 +211,30 @@ export default class CourseAction extends BaseACTION {
type
:
102
type
:
102
})
})
if
(
cur
.
course_examination
)
{
if
(
cur
.
course_examination
)
{
let
courseExamChildren
=
[]
if
(
data
.
exist_examination
.
length
>
1
)
{
courseExamChildren
=
data
.
exist_examination
.
map
((
item
,
index
)
=>
{
const
map
=
[
'一'
,
'二'
,
'三'
]
return
{
name
:
`第
${
map
[
index
]}
次考试`
,
id
:
'course_exam'
,
offset
:
index
,
sid
:
sid
,
cid
:
cid
,
examId
:
cur
.
course_examination
,
type
:
101
}
})
}
json
.
tabs1ChapterList
.
course
.
push
({
json
.
tabs1ChapterList
.
course
.
push
({
title
:
'课程考试'
,
title
:
'课程考试'
,
isUp
:
true
,
isUp
:
true
,
chapters
:
[]
,
chapters
:
courseExamChildren
,
id
:
'course_exam'
,
id
:
'course_exam'
,
sid
:
sid
,
sid
:
sid
,
cid
:
cid
,
cid
:
cid
,
examId
:
cur
.
course_examination
,
examId
:
cur
.
course_examination
,
type
:
10
2
type
:
10
1
})
})
}
}
/* 课程考核 考核标准文案读取 */
/* 课程考核 考核标准文案读取 */
...
...
src/modules/viewer/components/work/courseExam.vue
浏览文件 @
41be0d08
差异被折叠。
点击展开。
src/modules/viewer/components/work/examItem.vue
浏览文件 @
41be0d08
<
template
>
<
template
>
<div
class=
"q-item"
>
<div
class=
"q-item"
>
<div
class=
"q-item-hd"
>
<div
class=
"q-item-hd"
>
<div
class=
"q-item-num"
>
{{
index
+
1
}}
.
</div>
<div
class=
"q-item-num"
>
{{
index
+
1
}}
.
</div>
<div
class=
"q-item-title"
v-html=
"data.content"
></div>
<div
class=
"q-item-title"
v-html=
"data.content"
></div>
<div
class=
"q-item-aside"
>
<div
class=
"q-item-aside"
>
<template
v-if=
"typeText"
>
(
{{
typeText
}}
)
</
template
>
<template
v-if=
"typeText"
>
(
{{
typeText
}}
)
</
template
>
<
template
v-if=
"data.hasOwnProperty('score')"
>
(
{{
data
.
score
}}
分)
</
template
>
<
template
v-if=
"data.hasOwnProperty('score')"
>
(
{{
data
.
score
}}
分)
</
template
>
</div>
</div>
</div>
</div>
<div
class=
"q-item-bd"
>
<div
class=
"q-item-bd"
>
<!-- 单选 -->
<!-- 单选 -->
<el-radio-group
v-model=
"currentValue.user_answer"
v-if=
"type === 1"
>
<el-radio-group
v-model=
"currentValue.user_answer"
v-if=
"type === 1"
>
<div
class=
"q-option-item"
v-for=
"item in currentOptions"
:key=
"item.id"
>
<div
class=
"q-option-item"
v-for=
"item in currentOptions"
:key=
"item.id"
>
<el-radio
:class=
"genClass(item)"
:label=
"item.id"
>
{{
item.abc_option
}}
</el-radio>
<el-radio
:class=
"genClass(item)"
:label=
"item.id"
>
{{
item.abc_option
}}
</el-radio>
</div>
</div>
</el-radio-group>
</el-radio-group>
<!-- 多选 -->
<!-- 多选 -->
<el-checkbox-group
v-model=
"currentValue.user_answer"
v-if=
"type === 2"
>
<el-checkbox-group
v-model=
"currentValue.user_answer"
v-if=
"type === 2"
>
<div
class=
"q-option-item"
v-for=
"item in currentOptions"
:key=
"item.id"
>
<div
class=
"q-option-item"
v-for=
"item in currentOptions"
:key=
"item.id"
>
<el-checkbox
:class=
"genClass(item)"
:label=
"item.id"
>
{{
item.abc_option
}}
</el-checkbox>
<el-checkbox
:class=
"genClass(item)"
:label=
"item.id"
>
{{
item.abc_option
}}
</el-checkbox>
</div>
</div>
</el-checkbox-group>
</el-checkbox-group>
<!-- 简答题 -->
<!-- 简答题 -->
...
@@ -27,39 +27,34 @@
...
@@ -27,39 +27,34 @@
<v-upload
:disabled=
"disabled"
v-model=
"currentValue.attachments"
>
请上传对应的文件附件:
</v-upload>
<v-upload
:disabled=
"disabled"
v-model=
"currentValue.attachments"
>
请上传对应的文件附件:
</v-upload>
</
template
>
</
template
>
</div>
</div>
<div
class=
"q-item-ft"
v-if=
"disabled"
>
<div
class=
"q-item-ft"
v-if=
"disabled
&& showResult
"
>
<
template
v-if=
"type === 3"
>
<
template
v-if=
"type === 3"
>
<p
v-if=
"data.check_comment"
>
<p
v-if=
"data.check_comment"
>
<span>
评语:
</span>
<span>
评语:
</span>
<span>
{{
data
.
check_comment
}}
</span>
<span>
{{
data
.
check_comment
}}
</span>
</p>
</p>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<div
class=
"result"
>
<div
class=
"result"
>
<p>
<p>
<span>
学生答案:
</span>
<span>
学生答案:
</span>
<span
:class=
"isCorrect ? 'is-success' : 'is-error'"
>
{{
submitAnswerText
}}
</span>
<span
:class=
"isCorrect ? 'is-success' : 'is-error'"
>
{{
submitAnswerText
}}
</span>
</p>
</p>
<p>
<p>
<span>
正确答案:
</span>
<span>
正确答案:
</span>
<span>
{{
correctAnswerText
}}
</span>
<span>
{{
correctAnswerText
}}
</span>
</p>
</p>
</div>
</div>
</
template
>
</
template
>
<p
v-if=
"data.hasOwnProperty('get_score')"
>
<p
v-if=
"data.hasOwnProperty('get_score')"
>
<span>
评分:
</span>
<span>
评分:
</span>
<span>
{{
data.get_score
}}分
</span>
<span>
{{
data.get_score
}}分
</span>
</p>
</p>
<div
class=
"analyze"
v-if=
"data.analysis"
>
<div
class=
"analyze"
v-if=
"data.analysis"
>
<span>
解析:
</span>
<span>
解析:
</span>
<div
class=
"analyze-main"
>
<div
class=
"analyze-main"
>
<span
style=
"color:blue;cursor:pointer;"
@
click=
"showAnalyze = !showAnalyze"
>
查看解析
</span>
<span
style=
"color: blue; cursor: pointer"
@
click=
"showAnalyze = !showAnalyze"
>
查看解析
</span>
<div
<div
v-html=
"data.analysis"
v-if=
"data.analysis"
v-show=
"showAnalyze"
class=
"analyze-content"
></div>
v-html=
"data.analysis"
v-if=
"data.analysis"
v-show=
"showAnalyze"
class=
"analyze-content"
></div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -94,7 +89,8 @@ export default {
...
@@ -94,7 +89,8 @@ export default {
}
}
},
},
// 是否禁用,提交过的是禁用状态
// 是否禁用,提交过的是禁用状态
disabled
:
{
type
:
Boolean
,
default
:
false
}
disabled
:
{
type
:
Boolean
,
default
:
false
},
showResult
:
{
type
:
Boolean
,
default
:
true
}
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -135,16 +131,12 @@ export default {
...
@@ -135,16 +131,12 @@ export default {
item
.
abc_option
=
`
${
this
.
A_Z
[
index
]}
.
${
item
.
option
}
`
item
.
abc_option
=
`
${
this
.
A_Z
[
index
]}
.
${
item
.
option
}
`
// 提交时的选中状态
// 提交时的选中状态
const
value
=
this
.
value
.
user_answer
||
''
const
value
=
this
.
value
.
user_answer
||
''
item
.
selected
=
Array
.
isArray
(
value
)
item
.
selected
=
Array
.
isArray
(
value
)
?
value
.
includes
(
item
.
id
)
:
value
===
item
.
id
?
value
.
includes
(
item
.
id
)
:
value
===
item
.
id
// 处理正确的选中状态
// 处理正确的选中状态
const
hasChecked
=
Object
.
prototype
.
hasOwnProperty
.
call
(
item
,
'checked'
)
const
hasChecked
=
Object
.
prototype
.
hasOwnProperty
.
call
(
item
,
'checked'
)
const
rightAnswer
=
this
.
data
.
right_answer
||
''
const
rightAnswer
=
this
.
data
.
right_answer
||
''
if
(
!
hasChecked
&&
rightAnswer
)
{
if
(
!
hasChecked
&&
rightAnswer
)
{
item
.
checked
=
Array
.
isArray
(
rightAnswer
)
item
.
checked
=
Array
.
isArray
(
rightAnswer
)
?
rightAnswer
.
includes
(
item
.
id
)
:
rightAnswer
===
item
.
id
?
rightAnswer
.
includes
(
item
.
id
)
:
rightAnswer
===
item
.
id
}
}
return
item
return
item
})
})
...
@@ -179,7 +171,7 @@ export default {
...
@@ -179,7 +171,7 @@ export default {
methods
:
{
methods
:
{
// 生成class
// 生成class
genClass
(
item
)
{
genClass
(
item
)
{
if
(
!
this
.
disabled
)
{
if
(
!
this
.
disabled
||
!
this
.
showResult
)
{
return
null
return
null
}
}
return
{
return
{
...
...
src/modules/viewer/components/work/index.vue
浏览文件 @
41be0d08
<
template
>
<
template
>
<component
<component
:is=
"currentCompoent"
:chapter=
"chapter"
:data=
"data"
v-bind=
"$attrs"
v-on=
"$listeners"
v-if=
"chapter"
/>
:is=
"currentCompoent"
:chapter=
"chapter"
:data=
"data"
v-bind=
"$attrs"
v-on=
"$listeners"
v-if=
"chapter"
/>
</
template
>
</
template
>
<
script
>
<
script
>
...
...
src/modules/viewer/index.vue
浏览文件 @
41be0d08
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
:key=
"pid"
:key=
"pid"
@
pptupdate=
"handlePPTupdate"
@
pptupdate=
"handlePPTupdate"
@
change-ppt=
"handleChangePPT(...arguments, false)"
@
change-ppt=
"handleChangePPT(...arguments, false)"
@
update=
"getCourse"
/>
/>
</div>
</div>
</div>
</div>
...
...
src/pages/learn/courseDetail.vue
浏览文件 @
41be0d08
...
@@ -542,7 +542,7 @@ export default {
...
@@ -542,7 +542,7 @@ export default {
window
.
open
(
data
.
live
.
record_url
||
data
.
live
.
join_url
)
window
.
open
(
data
.
live
.
record_url
||
data
.
live
.
join_url
)
return
return
}
}
this
.
$router
.
push
({
name
:
'viewerCourseChapter'
,
params
:
{
sid
,
cid
,
id
:
data
.
id
}
})
this
.
$router
.
push
({
name
:
'viewerCourseChapter'
,
params
:
{
sid
,
cid
,
id
:
data
.
id
}
,
query
:
{
offset
:
data
.
offset
}
})
},
},
/**
/**
* 开始学习或继续学习 - 跳转到对应音视频播放页
* 开始学习或继续学习 - 跳转到对应音视频播放页
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论