Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
59f43674
提交
59f43674
authored
7月 23, 2020
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore:课程作业考试提交按钮增加loading状态
上级
5c2b0467
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
41 行增加
和
10 行删除
+41
-10
chapterExam.vue
client/src/modules/viewer/components/work/chapterExam.vue
+7
-2
chapterTest.vue
client/src/modules/viewer/components/work/chapterTest.vue
+7
-2
chapterWork.vue
client/src/modules/viewer/components/work/chapterWork.vue
+8
-2
courseExam.vue
client/src/modules/viewer/components/work/courseExam.vue
+7
-2
courseWork.vue
client/src/modules/viewer/components/work/courseWork.vue
+12
-2
没有找到文件。
client/src/modules/viewer/components/work/chapterExam.vue
浏览文件 @
59f43674
...
...
@@ -31,7 +31,7 @@
</
template
>
<div
class=
"exam-buttons"
>
<el-tooltip
effect=
"dark"
content=
"提交之后就不能修改了哦"
placement=
"right"
>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
{{submitText}}
</el-button>
<el-button
type=
"primary"
:loading=
"submitLoading"
@
click=
"onSubmit"
>
{{submitText}}
</el-button>
</el-tooltip>
</div>
</el-form>
...
...
@@ -78,7 +78,8 @@ export default {
messageInstance
:
null
,
exam
:
{},
isStartExam
:
false
,
// 是否开始考试
autoSubmitTimer
:
null
// 自动提交定时器
autoSubmitTimer
:
null
,
// 自动提交定时器
submitLoading
:
false
}
},
watch
:
{
...
...
@@ -265,6 +266,7 @@ export default {
},
// 请求提交接口
handleSubmitRequest
(
params
)
{
this
.
submitLoading
=
true
params
.
paper_type
=
0
api
.
submitCourseExam
(
this
.
sid
,
this
.
cid
,
this
.
pid
,
params
)
...
...
@@ -284,6 +286,9 @@ export default {
.
catch
(
error
=>
{
this
.
$message
.
error
(
error
.
message
)
})
.
finally
(()
=>
{
this
.
submitLoading
=
false
})
}
},
beforeMount
()
{
...
...
client/src/modules/viewer/components/work/chapterTest.vue
浏览文件 @
59f43674
...
...
@@ -15,7 +15,7 @@
></exam-item>
<div
class=
"exam-buttons"
>
<el-tooltip
effect=
"dark"
content=
"提交之后就不能修改了哦"
placement=
"right"
>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
{{submitText}}
</el-button>
<el-button
type=
"primary"
:loading=
"submitLoading"
@
click=
"onSubmit"
>
{{submitText}}
</el-button>
</el-tooltip>
</div>
</el-form>
...
...
@@ -52,7 +52,8 @@ export default {
detail
:
null
,
questions
:
[],
// 问题列表
startTime
:
new
Date
().
getTime
(),
// 进入时间
messageInstance
:
null
messageInstance
:
null
,
submitLoading
:
false
}
},
watch
:
{
...
...
@@ -247,6 +248,7 @@ export default {
},
// 请求提交接口
handleSubmitRequest
(
params
)
{
this
.
submitLoading
=
true
api
.
sbumitChapterHomework
(
params
)
.
then
(
response
=>
{
...
...
@@ -259,6 +261,9 @@ export default {
.
catch
(
error
=>
{
this
.
$message
.
error
(
error
.
message
)
})
.
finally
(()
=>
{
this
.
submitLoading
=
false
})
}
},
beforeMount
()
{
...
...
client/src/modules/viewer/components/work/chapterWork.vue
浏览文件 @
59f43674
...
...
@@ -69,8 +69,9 @@
<el-tooltip
content=
"在获老师批改之前,可以多次提交,将以最后一次提交为准"
placement=
"right"
>
<el-button
type=
"primary"
@
click=
"onSubmit"
:disabled=
"disabled || !isWorkTime"
:loading=
"submitLoading"
@
click=
"onSubmit"
>
{{ submitText }}
</el-button>
</el-tooltip>
</div>
...
...
@@ -115,7 +116,8 @@ export default {
startTime
:
new
Date
().
getTime
(),
// 进入时间
messageInstance
:
null
,
deadline
:
''
,
// 截止时间
disabled
:
false
disabled
:
false
,
submitLoading
:
false
}
},
watch
:
{
...
...
@@ -295,6 +297,7 @@ export default {
},
// 请求提交接口
handleSubmitRequest
(
params
)
{
this
.
submitLoading
=
true
api
.
sbumitChapterHomework
(
params
)
.
then
(
response
=>
{
...
...
@@ -308,6 +311,9 @@ export default {
.
catch
(
error
=>
{
this
.
$message
.
error
(
error
.
message
)
})
.
finally
(()
=>
{
this
.
submitLoading
=
false
})
},
// 重新编辑
onReEdit
()
{
...
...
client/src/modules/viewer/components/work/courseExam.vue
浏览文件 @
59f43674
...
...
@@ -34,7 +34,7 @@
</
template
>
<div
class=
"exam-buttons"
>
<el-tooltip
effect=
"dark"
content=
"提交之后就不能修改了哦"
placement=
"right"
>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
{{submitText}}
</el-button>
<el-button
type=
"primary"
:loading=
"submitLoading"
@
click=
"onSubmit"
>
{{submitText}}
</el-button>
</el-tooltip>
</div>
</el-form>
...
...
@@ -83,7 +83,8 @@ export default {
exam
:
{},
isStartExam
:
false
,
// 是否开始考试
autoSubmitTimer
:
null
,
// 自动提交定时器
checkStatusTimer
:
null
// 考试状态定时器
checkStatusTimer
:
null
,
// 考试状态定时器
submitLoading
:
false
}
},
computed
:
{
...
...
@@ -287,6 +288,7 @@ export default {
},
// 请求提交接口
handleSubmitRequest
(
params
)
{
this
.
submitLoading
=
true
api
.
submitCourseExam
(
this
.
sid
,
this
.
cid
,
this
.
pid
,
params
)
.
then
(
response
=>
{
...
...
@@ -305,6 +307,9 @@ export default {
.
catch
(
error
=>
{
this
.
$message
.
error
(
error
.
message
)
})
.
finally
(()
=>
{
this
.
submitLoading
=
false
})
}
},
beforeMount
()
{
...
...
client/src/modules/viewer/components/work/courseWork.vue
浏览文件 @
59f43674
...
...
@@ -62,7 +62,12 @@
</div>
<div
class=
"buttons"
>
<el-tooltip
content=
"在获老师批改之前,可以多次提交,将以最后一次提交为准"
placement=
"right"
>
<el-button
type=
"primary"
@
click=
"onSubmit"
:disabled=
"isRevised"
>
{{submitText}}
</el-button>
<el-button
type=
"primary"
:disabled=
"isRevised"
:loading=
"submitLoading"
@
click=
"onSubmit"
>
{{submitText}}
</el-button>
</el-tooltip>
</div>
</template>
...
...
@@ -117,7 +122,8 @@ export default {
},
detail
:
null
,
loading
:
false
,
messageInstance
:
null
messageInstance
:
null
,
submitLoading
:
false
}
},
computed
:
{
...
...
@@ -179,6 +185,7 @@ export default {
},
// 请求提交接口
handleSubmitRequest
(
params
)
{
this
.
submitLoading
=
true
api
.
updateCourseWork
(
this
.
sid
,
this
.
cid
,
params
)
.
then
(
response
=>
{
...
...
@@ -192,6 +199,9 @@ export default {
.
catch
(
error
=>
{
this
.
$message
.
error
(
error
.
message
)
})
.
finally
(()
=>
{
this
.
submitLoading
=
false
})
}
},
beforeMount
()
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论