|
@@ -69,16 +69,26 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
finishTaskMaterial() {
|
|
|
+ if (this.exam_answer.length === 0) {
|
|
|
+ this.$message.warning('请完成课件');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const loading = this.$loading();
|
|
|
FinishMyTaskMaterial_Student({
|
|
|
task_id: this.id,
|
|
|
material_type: 'COURSEWARE',
|
|
|
material_id: this.coursewareId,
|
|
|
exam_answer: this.exam_answer
|
|
|
- }).then(() => {
|
|
|
- this.$message.success('完成课件成功');
|
|
|
- this.dialogClose();
|
|
|
- this.$router.go(0);
|
|
|
- });
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$message.success('完成课件成功');
|
|
|
+ this.dialogClose();
|
|
|
+ this.$router.go(0);
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ loading.close();
|
|
|
+ this.exam_answer = '';
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
handleBookUserAnswer(data) {
|