Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
e5d52fd6
提交
e5d52fd6
authored
1月 12, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化课后考试
上级
06bb1660
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
32 行增加
和
13 行删除
+32
-13
index.js
src/modules/offices/api/index.js
+7
-0
chapterExam.vue
src/modules/viewer/components/work/chapterExam.vue
+10
-1
chapterTest.vue
src/modules/viewer/components/work/chapterTest.vue
+9
-6
chapterWork.vue
src/modules/viewer/components/work/chapterWork.vue
+6
-6
没有找到文件。
src/modules/offices/api/index.js
浏览文件 @
e5d52fd6
...
...
@@ -95,3 +95,10 @@ export function paySuccess(id) {
export
function
getAcitivityReportList
(
id
)
{
return
httpRequest
.
get
(
`/api/lms/v2/education/symposium/
${
id
}
/report`
)
}
// 上传文件
export
function
uploadFile
(
data
)
{
return
httpRequest
.
post
(
'/api/lms/v2/lobby/tools/upload'
,
data
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
}
src/modules/viewer/components/work/chapterExam.vue
浏览文件 @
e5d52fd6
...
...
@@ -179,7 +179,10 @@ export default {
},
// 获取考试结果
getExamResult
()
{
api
.
getCourseExamResult
(
this
.
sid
,
this
.
cid
,
this
.
pid
,
{
paper_type
:
0
}).
then
(
response
=>
{
this
.
loading
=
true
api
.
getCourseExamResult
(
this
.
sid
,
this
.
cid
,
this
.
pid
,
{
paper_type
:
0
})
.
then
(
response
=>
{
// 设置问题列表数据
if
(
response
.
code
!==
8001
)
{
this
.
isStartExam
=
true
...
...
@@ -191,9 +194,15 @@ export default {
}
}
})
.
finally
(()
=>
{
this
.
loading
=
false
})
},
// 提交校验
checkSubmit
()
{
if
(
!
this
.
questions
.
length
)
{
return
}
for
(
let
i
=
0
;
i
<
this
.
questions
.
length
;
i
++
)
{
const
questions
=
this
.
questions
[
i
]
for
(
let
k
=
0
;
k
<
questions
.
length
;
k
++
)
{
...
...
src/modules/viewer/components/work/chapterTest.vue
浏览文件 @
e5d52fd6
...
...
@@ -61,7 +61,7 @@ export default {
immediate
:
true
,
handler
(
data
)
{
if
(
!
this
.
questions
.
length
)
{
this
.
questions
=
data
.
homework
?
this
.
genQue
n
stions
(
data
.
homework
.
questions
)
:
[]
this
.
questions
=
data
.
homework
?
this
.
genQuestions
(
data
.
homework
.
questions
)
:
[]
}
}
}
...
...
@@ -120,7 +120,7 @@ export default {
}
return
item
})
this
.
questions
=
this
.
genQue
n
stions
(
this
.
questions
)
this
.
questions
=
this
.
genQuestions
(
this
.
questions
)
}
})
.
finally
(()
=>
{
...
...
@@ -128,7 +128,7 @@ export default {
})
},
// 组装问题数据
genQue
n
stions
(
list
)
{
genQuestions
(
list
)
{
if
(
!
list
)
{
return
[]
}
...
...
@@ -167,9 +167,12 @@ export default {
},
// 提交校验
checkSubmit
()
{
const
quenstions
=
this
.
questions
for
(
let
i
=
0
;
i
<
quenstions
.
length
;
i
++
)
{
const
value
=
quenstions
[
i
].
formModel
.
user_answer
const
questions
=
this
.
questions
if
(
!
questions
.
length
)
{
return
}
for
(
let
i
=
0
;
i
<
questions
.
length
;
i
++
)
{
const
value
=
questions
[
i
].
formModel
.
user_answer
if
(
Array
.
isArray
(
value
)
?
!
value
.
length
:
!
value
)
{
return
false
}
...
...
src/modules/viewer/components/work/chapterWork.vue
浏览文件 @
e5d52fd6
...
...
@@ -117,7 +117,7 @@ export default {
immediate
:
true
,
handler
(
data
)
{
if
(
!
this
.
questions
.
length
)
{
this
.
questions
=
data
.
homework
?
this
.
genQue
n
stions
(
data
.
homework
.
questions
)
:
[]
this
.
questions
=
data
.
homework
?
this
.
genQuestions
(
data
.
homework
.
questions
)
:
[]
}
}
}
...
...
@@ -185,7 +185,7 @@ export default {
}
return
item
}
)
this
.
questions
=
this
.
genQue
n
stions
(
this
.
questions
)
this
.
questions
=
this
.
genQuestions
(
this
.
questions
)
}
}
)
.
finally
(()
=>
{
...
...
@@ -193,7 +193,7 @@ export default {
}
)
}
,
// 组装问题数据
genQue
n
stions
(
list
)
{
genQuestions
(
list
)
{
if
(
!
list
)
{
return
[]
}
...
...
@@ -232,9 +232,9 @@ export default {
}
,
// 提交校验
checkSubmit
()
{
const
que
n
stions
=
this
.
questions
for
(
let
i
=
0
;
i
<
que
n
stions
.
length
;
i
++
)
{
const
value
=
que
n
stions
[
i
].
formModel
.
user_answer
const
questions
=
this
.
questions
for
(
let
i
=
0
;
i
<
questions
.
length
;
i
++
)
{
const
value
=
questions
[
i
].
formModel
.
user_answer
if
(
Array
.
isArray
(
value
)
?
!
value
.
length
:
!
value
)
{
return
false
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论