Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
f99803b3
提交
f99803b3
authored
6月 13, 2020
作者:
haodaking
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
课程作业提交提示语修改
上级
d3b27796
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
41 行增加
和
48 行删除
+41
-48
chapterPlayer.vue
...nt/src/modules/viewer/components/player/chapterPlayer.vue
+5
-10
chapterWork.vue
client/src/modules/viewer/components/work/chapterWork.vue
+15
-21
courseWork.vue
client/src/modules/viewer/components/work/courseWork.vue
+21
-17
没有找到文件。
client/src/modules/viewer/components/player/chapterPlayer.vue
浏览文件 @
f99803b3
...
...
@@ -27,12 +27,7 @@
<em
class=
"player-button player-button-download"
v-if=
"chapter.pdf"
>
<a
:href=
"chapter.pdf"
download
target=
"_blank"
>
下载PPT
</a>
</em>
<em
:class=
"pptClass"
@
click=
"togglePPTVisible"
v-if=
"chatperResources.ppts.length"
>
同步显示PPT
</em
>
<em
:class=
"pptClass"
@
click=
"togglePPTVisible"
v-if=
"chatperResources.ppts.length"
>
同步显示PPT
</em>
<em
:class=
"skipClass"
@
click=
"toggleSkip"
>
始终跳过片头
</em>
</div>
</div>
...
...
@@ -159,7 +154,7 @@ export default {
this
.
isPlaying
=
true
const
ppts
=
this
.
chatperResources
.
ppts
||
[]
let
index
=
this
.
chatperResources
.
ppts
.
findIndex
(
(
item
)
=>
item
.
ppt_point
>
time
item
=>
item
.
ppt_point
>
time
)
index
=
index
!==
-
1
?
index
-
1
:
ppts
.
length
-
1
this
.
$emit
(
'change-ppt'
,
index
)
...
...
@@ -191,12 +186,12 @@ export default {
getChapterVideo
()
{
// 视频播放类型 1是CC加密; 2是非加密; 3是阿里云
if
(
this
.
videoProvider
===
3
)
{
api
.
getChapterVideoAliyun
(
this
.
resourceId
).
then
(
(
response
)
=>
{
api
.
getChapterVideoAliyun
(
this
.
resourceId
).
then
(
response
=>
{
this
.
chatperResources
=
response
Array
.
isArray
(
response
.
ppts
)
&&
this
.
$emit
(
'pptupdate'
,
response
.
ppts
)
})
}
else
{
api
.
getChapterVideo
(
this
.
resourceId
).
then
(
(
response
)
=>
{
api
.
getChapterVideo
(
this
.
resourceId
).
then
(
response
=>
{
let
{
video
,
audio
,
ppts
}
=
response
video
=
video
.
reduce
(
(
result
,
item
)
=>
{
...
...
@@ -221,7 +216,7 @@ export default {
.
getChapterVideoProgress
(
this
.
sid
,
this
.
resourceId
,
{
device_id
:
Cookies
.
get
(
'_idt'
)
})
.
then
(
(
response
)
=>
{
.
then
(
response
=>
{
this
.
progress
=
response
// 跳转播放进度
if
(
this
.
player
&&
response
.
cpt
)
{
...
...
client/src/modules/viewer/components/work/chapterWork.vue
浏览文件 @
f99803b3
...
...
@@ -32,9 +32,7 @@
</div>
</div>
<div
class=
"buttons"
>
<el-button
type=
"primary"
@
click=
"onReEdit"
:disabled=
"!isWorkTime"
>
重新编辑
</el-button
>
<el-button
type=
"primary"
@
click=
"onReEdit"
:disabled=
"!isWorkTime"
>
重新编辑
</el-button>
</div>
</
template
>
<!-- 正常状态 -->
...
...
@@ -55,9 +53,7 @@
</div>
</
template
>
<
template
v-else-if=
"detail.created_time"
>
<p
class=
"help"
>
已于
{{
detail
.
created_time
}}
提交,等待老师批改中。
</p>
<p
class=
"help"
>
已于
{{
detail
.
created_time
}}
提交,等待老师批改中。
</p>
<template
v-if=
"
detail.updated_time &&
...
...
@@ -70,16 +66,12 @@
</div>
</div>
<div
class=
"buttons"
>
<el-tooltip
content=
"在获老师批改之前,可以多次提交,将以最后一次提交为准"
placement=
"right"
>
<el-tooltip
content=
"在获老师批改之前,可以多次提交,将以最后一次提交为准"
placement=
"right"
>
<el-button
type=
"primary"
@
click=
"onSubmit"
:disabled=
"disabled || !isWorkTime"
>
{{ submitText }}
</el-button
>
>
{{ submitText }}
</el-button>
</el-tooltip>
</div>
</template>
...
...
@@ -177,7 +169,7 @@ export default {
getDeadline
()
{
api
.
getChapterHomeworkDeadline
(
this
.
sid
,
this
.
cid
,
this
.
pid
)
.
then
(
(
response
)
=>
{
.
then
(
response
=>
{
this
.
deadline
=
response
.
dead_line
})
},
...
...
@@ -186,16 +178,16 @@ export default {
this
.
loading
=
true
api
.
getChapterHomework
(
this
.
sid
,
this
.
cid
,
this
.
resourceId
)
.
then
(
(
response
)
=>
{
.
then
(
response
=>
{
this
.
detail
=
Array
.
isArray
(
response
)
?
null
:
response
if
(
this
.
detail
)
{
// -1未处理 0已处理 1驳回
this
.
disabled
=
[
0
,
1
].
includes
(
this
.
detail
.
status
)
const
parseAnswers
=
JSON
.
parse
(
this
.
detail
.
work_contents
)
// 设置答案
this
.
questions
=
this
.
questions
.
map
(
(
item
)
=>
{
this
.
questions
=
this
.
questions
.
map
(
item
=>
{
const
found
=
parseAnswers
.
find
(
(
answer
)
=>
answer
.
question_id
===
item
.
id
answer
=>
answer
.
question_id
===
item
.
id
)
if
(
found
)
{
item
.
user_answer
=
found
.
descreption
...
...
@@ -215,7 +207,7 @@ export default {
if
(
!
list
)
{
return
[]
}
return
list
.
map
(
(
item
)
=>
{
return
list
.
map
(
item
=>
{
let
temp
=
null
if
(
item
.
question_type
===
1
)
{
// 单选
...
...
@@ -268,7 +260,9 @@ export default {
// 校验
if
(
!
this
.
checkSubmit
())
{
this
.
messageInstance
&&
this
.
messageInstance
.
close
()
this
.
messageInstance
=
this
.
$message
.
error
(
'还有题目未做,不能提交'
)
this
.
messageInstance
=
this
.
$message
.
error
(
'答题内容不能为空,请检查并输入内容'
)
return
}
// 计算答题时间
...
...
@@ -276,7 +270,7 @@ export default {
(
new
Date
().
getTime
()
-
this
.
startTime
)
/
1000
)
// 提交的答案数据
const
answers
=
this
.
questions
.
map
(
(
item
)
=>
{
const
answers
=
this
.
questions
.
map
(
item
=>
{
return
{
question_id
:
item
.
id
,
descreption
:
...
...
@@ -303,7 +297,7 @@ export default {
handleSubmitRequest
(
params
)
{
api
.
sbumitChapterHomework
(
params
)
.
then
(
(
response
)
=>
{
.
then
(
response
=>
{
if
(
response
.
status
)
{
this
.
$message
.
success
(
'提交成功,等待批改'
)
this
.
getDetail
()
...
...
@@ -311,7 +305,7 @@ export default {
this
.
$message
.
error
(
response
.
data
.
error
)
}
})
.
catch
(
(
error
)
=>
{
.
catch
(
error
=>
{
this
.
$message
.
error
(
error
.
message
)
})
},
...
...
client/src/modules/viewer/components/work/courseWork.vue
浏览文件 @
f99803b3
...
...
@@ -19,7 +19,7 @@
ref=
"ruleForm"
>
<el-form-item
label=
"主题"
prop=
"essay_name"
>
<el-input
v-model=
"ruleForm.essay_name"
placeholder=
"主题"
></el-input>
<el-input
v-model=
"ruleForm.essay_name"
placeholder=
"主题"
maxlength=
"50"
></el-input>
</el-form-item>
<el-form-item
label=
"正文"
prop=
"essay_description"
>
<!-- 编辑器 -->
...
...
@@ -108,11 +108,10 @@ export default {
},
rules
:
{
essay_name
:
[
{
required
:
true
,
message
:
'请输入主题'
,
trigger
:
'blur'
},
{
max
:
50
,
message
:
'最多输入 50 个字符'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入主题'
,
trigger
:
'blur'
}
],
essay_description
:
[
{
required
:
true
,
message
:
'请输入正文'
,
trigger
:
'
blur
'
}
{
required
:
true
,
message
:
'请输入正文'
,
trigger
:
'
change
'
}
],
url
:
[{
required
:
true
,
message
:
'请上传附件'
,
trigger
:
'change'
}]
},
...
...
@@ -159,19 +158,24 @@ export default {
},
// 提交
onSubmit
()
{
this
.
$refs
.
ruleForm
.
validate
()
.
then
(
response
=>
{
const
params
=
Object
.
assign
(
this
.
ruleForm
,
{
semester_id
:
this
.
sid
,
course_id
:
this
.
cid
})
this
.
handleSubmitRequest
(
params
)
})
.
catch
(()
=>
{
this
.
messageInstance
&&
this
.
messageInstance
.
close
()
this
.
messageInstance
=
this
.
$message
.
error
(
'还有题目未做,不能提交'
)
})
this
.
messageInstance
&&
this
.
messageInstance
.
close
()
if
(
!
this
.
ruleForm
.
essay_name
)
{
this
.
messageInstance
=
this
.
$message
.
error
(
'请输入主题'
)
return
}
if
(
!
this
.
ruleForm
.
essay_description
)
{
this
.
messageInstance
=
this
.
$message
.
error
(
'请输入正文'
)
return
}
if
(
!
this
.
ruleForm
.
url
)
{
this
.
messageInstance
=
this
.
$message
.
error
(
'请上传附件'
)
return
}
const
params
=
Object
.
assign
(
this
.
ruleForm
,
{
semester_id
:
this
.
sid
,
course_id
:
this
.
cid
})
this
.
handleSubmitRequest
(
params
)
},
// 请求提交接口
handleSubmitRequest
(
params
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论