소스 검색

作业提交添加节流

11wqe1 2 달 전
부모
커밋
6742531d50

+ 12 - 1
src/components/EnglishVoice2/index.vue

@@ -69,6 +69,8 @@ export default {
             work: [],
             wScore: 0,
             scoreDetail: "",
+            homeWorkLoading : false
+
         }
     },
     methods: {
@@ -148,6 +150,8 @@ export default {
                     text: "",
                 },
             ];
+            if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+            this.homeWorkLoading = true
             this.ajax
                 .post(this.$store.state.api + "addCourseWorks5", params)
                 .then((res) => {
@@ -155,6 +159,10 @@ export default {
                         message: "提交成功",
                         type: "success",
                     });
+                    setTimeout(() => {
+                            this.homeWorkLoading = false
+                        }, 500);
+
                     this.addOp3('1', "", { courseid: this.id,tool:'英语口语',
                     data: JSON.stringify(this.work),
                     type: "course_tool_sub" }, "success")
@@ -166,7 +174,10 @@ export default {
                    
                     this.$message.error("提交失败");
                     console.error(err);
-                    
+                    setTimeout(() => {
+                            this.homeWorkLoading = false
+                        }, 500);
+
                     this.addOp3('1', "", { courseid: this.id,tool:'英语口语',
                     data: JSON.stringify(this.work),
                     type: "course_tool_sub" }, err)

+ 11 - 1
src/components/EnglishVoice3/index.vue

@@ -60,6 +60,8 @@ export default {
             work: [],
             wScore: 0,
             scoreDetail: "",
+            homeWorkLoading : false
+
         }
     },
     methods: {
@@ -134,6 +136,8 @@ export default {
                     text: "",
                 },
             ];
+            if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+            this.homeWorkLoading = true
             this.ajax
                 .post(this.$store.state.api + "addCourseWorks5", params)
                 .then((res) => {
@@ -141,6 +145,9 @@ export default {
                         message: "提交成功",
                         type: "success",
                     });
+                    setTimeout(() => {
+                            this.homeWorkLoading = false
+                        }, 500);
 
                     this.addOp3('1', "", { courseid: this.id,tool:'英语口语',
                     data: JSON.stringify(this.work),
@@ -153,7 +160,10 @@ export default {
                 .catch((err) => {
                     this.$message.error("提交失败");
                     console.error(err);
-                    
+                    setTimeout(() => {
+                            this.homeWorkLoading = false
+                        }, 500);
+
                     this.addOp3('1', "", { courseid: this.id,tool:'英语口语',
                     data: JSON.stringify(this.work),
                     type: "course_tool_sub" }, err)

+ 10 - 0
src/components/components/appStoreC.vue

@@ -42,6 +42,7 @@ import { myMixin } from "@/mixins/mixin.js"
                 userId: '',
                 appDialogVisible: false,
                 id: this.$route.query.courseId,
+                homeWorkLoading:false
             }
         },
         methods: {
@@ -77,6 +78,8 @@ import { myMixin } from "@/mixins/mixin.js"
                 // window.exposed_outputs
                 let Cow = JSON.stringify(_iframe.contentWindow.exposed_outputs)
 
+                if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+                this.homeWorkLoading = true
                 let params = [
                     {
                     uid: this.userId,
@@ -97,6 +100,10 @@ import { myMixin } from "@/mixins/mixin.js"
                         type: "success"
                     });
                         this.dialogVisibleSelectTeacher = false;
+                        setTimeout(() => {
+                            this.homeWorkLoading = false
+                        }, 500);
+
                         this.addOp3('1', "", { courseid: this.id,tool:'AI应用',data:Cow,type: "course_tool_sub" }, "success")
                         // this.selectAnswer = {};
                         this.$emit('selectSWorks');
@@ -104,6 +111,9 @@ import { myMixin } from "@/mixins/mixin.js"
                     })
                     .catch(err => {
                         this.addOp3('1', "", { courseid: this.id,tool:'AI应用',data:Cow,type: "course_tool_sub" }, err)
+                        setTimeout(() => {
+                            this.homeWorkLoading = false
+                        }, 500);
 
                         this.$message.error("提交失败");
                         console.error(err);

+ 65 - 14
src/components/components/choseWorksDetailDialog.vue

@@ -1180,15 +1180,25 @@
 
 												<span v-if="[15].includes(toolType)" class="questionsAndAnswersSpan">{{ questionsAndAnswers(item) }}</span>
 
-												<span v-for="(answer,answerIndex) in worksCheckAnswer(item)" :key="item.userid+'-'+answerIndex+'-'+answer.index" v-if="[45].includes(toolType)">
-													<span v-if="answer.type===1" v-for="(item2,indP) in answer.label" :key="indP +'indP'">
-														<span :class="`${item2.right?'answerRight':'answerWrong'}`">{{ item2.label }}</span>
-													</span>
-													<span v-if="answer.type===2" class="answer2" :class="`${answer.isRight?'answerRightLine':'answerWrongLine'}`"
-                          v-for="(item3,indUi) in answer.label" :key="indUi + 'indUi2'">
-														<span :class="`${item3.right?'answerRight':'answerWrong'}`">{{ item3.label }}</span>
-													</span>
-												</span>
+                        <template v-if="[45].includes(toolType)">
+                          <span v-for="(answer,answerIndex) in worksCheckAnswer(item)" :key="item.userid+'-'+answerIndex+'-'+answer.index">
+                            
+                            <template v-if="answer.type===1">
+                              <span  v-for="(item2,indP) in answer.label" :key="indP +'indP'">
+                                <span :class="`${item2.right?'answerRight':'answerWrong'}`">{{ item2.label }}</span>
+                              </span>
+                            </template>
+
+                            <template v-if="answer.type===2">
+                              <span  class="answer2" :class="`${answer.isRight?'answerRightLine':'answerWrongLine'}`"
+                              v-for="(item3,indUi) in answer.label" :key="indUi + 'indUi2'">
+                                <span :class="`${item3.right?'answerRight':'answerWrong'}`">{{ item3.label }}</span>
+                              </span>
+                            </template>
+
+                          </span>
+                        </template>
+												
 
                         <div class="answerSelect "  v-if="[57].includes(toolType)">
                           <!-- <img style="width: 300px;" src="../../assets/icon/word2.png" /> -->
@@ -1418,6 +1428,7 @@ export default {
   },
   data() {
     return {
+      homeWorkLoading:false,
       toolsList:toolsList,
       appStoreUrl:'',
       chapInfoListData2:[],
@@ -1883,6 +1894,8 @@ export default {
             atool: 72
             }
         ];
+        if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+        this.homeWorkLoading = true
         this.ajax
             .post(this.$store.state.api + "addCourseWorks3-2", params)
             .then(res => {
@@ -1890,6 +1903,10 @@ export default {
                 message: "提交成功",
                 type: "success"
             });
+            setTimeout(() => {
+                this.homeWorkLoading = false
+            }, 500);
+
                 this.$emit('selectSWorks');
                 this.$emit('selectStudent');
                 document.getElementById('loadLi_JieE').children[0].style.display = "none"
@@ -1899,6 +1916,10 @@ export default {
             .catch(err => {
                document.getElementById('loadLi_JieE').children[0].style.display = "none"
                 this.$message.error("提交失败");
+                setTimeout(() => {
+                    this.homeWorkLoading = false
+                }, 500);
+
                 console.error(err);
                this.addOp3('1', "", { courseid: this.id,tool: 'AI应用',data: Cow,type: "course_tool_sub" }, err)
 
@@ -1964,7 +1985,8 @@ export default {
         },
       ];
       //  console.log('params',params);
-
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks5", params)
         .then((res) => {
@@ -1972,6 +1994,10 @@ export default {
             message: "提交成功",
             type: "success",
           });
+          setTimeout(() => {
+              this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool: '英语写作',data:JSON.stringify(myAnList) ,type: "course_tool_sub" }, 'success')
 
           this.englishList = {};
@@ -1979,6 +2005,10 @@ export default {
         .catch((err) => {
           this.$message.error("提交失败");
           console.error(err);
+          setTimeout(() => {
+              this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool: '英语写作',data:JSON.stringify(myAnList) ,type: "course_tool_sub" }, err)
         });
     },
@@ -2255,10 +2285,21 @@ export default {
           aTool: this.toolType,
           txt:text
         }]
-
+        if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+        this.homeWorkLoading = true
         this.ajax.post(this.$store.state.api+"addCourseWorks4-u2",params).then(res=>{
           document.getElementById('loadLi_JieE').children[0].style.display = "none"
           this.$message.success('上传成功')
+          setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+        })
+        .catch(err=>{
+          setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+          this.$message.success('上传失败')
+          console.log(err);
         })
         this.addOp3('1', "", { courseid: this.id,tool: 'Cocopi',data:JSON.stringify(text.replaceAll(/%/g, "%25")) ,type: "course_tool_sub" }, 'success')
 
@@ -2296,7 +2337,11 @@ export default {
         text = await this.getEditorContent(iframeWindow);
       }
       console.log('text',text);
-
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
+      setTimeout(() => {
+        this.homeWorkLoading = false
+      }, 1000);
       var _ajs = iframeWindow.document.createElement("script");
             _ajs.type = "text/javascript";
             _ajs.innerHTML =
@@ -2488,7 +2533,8 @@ export default {
           },
         ];
       }
-
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       // return console.log('params',params);
 
         this.ajax
@@ -2498,7 +2544,9 @@ export default {
               message: "提交成功",
               type: "success",
             });
-
+            setTimeout(() => {
+              this.homeWorkLoading = false
+            }, 500);
             // this.askList = [];
             this.$emit("selectStudent")
             this.$emit("selectSWorks")
@@ -2508,6 +2556,9 @@ export default {
           })
           .catch((err) => {
             this.$message.error("提交失败");
+            setTimeout(() => {
+              this.homeWorkLoading = false
+            }, 500);
             console.error(err);
             this.addOp3('1', "", { courseid: this.id,tool: this.toolsList[this.toolType],data:answerData ,type: "course_tool_sub" }, err)
 

+ 131 - 20
src/components/easy2/studyStudent.vue

@@ -16327,6 +16327,7 @@ export default {
   },
   data() {
     return {
+      homeWorkLoading:false,
       wordCloudKey: 0,
       bg: null,
       drawShow: false,
@@ -17846,6 +17847,8 @@ export default {
           type: 7
         }
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then(res => {
@@ -17854,7 +17857,10 @@ export default {
             type: "success"
           });
           this.addOp3('1', "", { courseid: this.id,tool:'选择匹配',data: JSON.stringify(this.selectAnswer.answer),type: "course_tool_sub" }, "success")
-          
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.dialogVisibleSelect = false;
           // this.selectAnswer = {};
           this.selectSWorks();
@@ -17863,6 +17869,10 @@ export default {
         .catch(err => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'选择匹配',data: JSON.stringify(this.selectAnswer.answer),type: "course_tool_sub" }, err)
 
         });
@@ -17919,6 +17929,8 @@ export default {
           type: 9
         }
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then(res => {
@@ -17927,6 +17939,9 @@ export default {
             type: "success"
           });
           this.addOp3('1', "", { courseid: this.id,tool:'排序',data: JSON.stringify(this.sentenceList),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.dialogVisibleSentence = false;
           // this.selectAnswer = {};
@@ -17936,6 +17951,10 @@ export default {
         .catch(err => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'排序',data: JSON.stringify(this.sentenceList),type: "course_tool_sub" }, err)
 
         });
@@ -17992,6 +18011,8 @@ export default {
         .catch(() => {});
     },
     addTableWorks() {
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       let params = [
         {
           uid: this.userid,
@@ -18010,6 +18031,10 @@ export default {
             message: "提交成功",
             type: "success"
           });
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'表格',data:JSON.stringify(this.tableJson),type: "course_tool_sub" }, "success")
 
           this.dialogVisibleTable = false;
@@ -18020,6 +18045,10 @@ export default {
         .catch(err => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'表格',data:JSON.stringify(this.tableJson),type: "course_tool_sub" }, err)
 
         });
@@ -18084,6 +18113,8 @@ export default {
           atool: 52
         }
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks3-2", params)
         .then(res => {
@@ -18092,6 +18123,9 @@ export default {
             type: "success"
           });
           this.addOp3('1', "", { courseid: this.id,tool:'文档',data:JSON.stringify(this.wordJson),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.dialogVisibleWord = false;
           // this.selectAnswer = {};
@@ -18101,6 +18135,10 @@ export default {
         .catch(err => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'文档',data:JSON.stringify(this.wordJson),type: "course_tool_sub" }, err)
 
         });
@@ -18181,6 +18219,8 @@ export default {
           type: typesql
         }
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorksR1", params)
         .then(res => {
@@ -18189,6 +18229,9 @@ export default {
             type: "success"
           });
           this.addOp3('1', "", { courseid: this.id,tool:'作业提交',data: this.studyJuri[0].cover[0].url,type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.studyJuri[0].cover = [];
           this.dialogVisible = false;
@@ -18197,6 +18240,10 @@ export default {
         .catch(err => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'作业提交',data: this.studyJuri[0].cover[0].url,type: "course_tool_sub" }, err)
 
         });
@@ -18224,6 +18271,8 @@ export default {
           content: JSON.stringify(_files)
         }
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorksPl", params)
         .then(res => {
@@ -18232,6 +18281,9 @@ export default {
             type: "success"
           });
           this.addOp3('1', "", { courseid: this.id,tool:'批量上传',data: JSON.stringify(_files),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.plworkFile = [];
           this.dialogVisiblePl = false;
@@ -18240,6 +18292,10 @@ export default {
         .catch(err => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'批量上传',data: JSON.stringify(_files),type: "course_tool_sub" }, err)
 
         });
@@ -18277,6 +18333,8 @@ export default {
           text: ""
         }
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks5", params)
         .then(res => {
@@ -18284,6 +18342,10 @@ export default {
             message: "提交成功",
             type: "success"
           });
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'学生分组',data:JSON.stringify({
             type: typesql,
             groupIndex: this.groupIndex,
@@ -18296,6 +18358,9 @@ export default {
         .catch(err => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
           this.addOp3('1', "", { courseid: this.id,tool:'学生分组',data:JSON.stringify({
             type: typesql,
             groupIndex: this.groupIndex,
@@ -18327,6 +18392,8 @@ export default {
           text: ""
         }
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks5", params)
         .then(res => {
@@ -18334,6 +18401,10 @@ export default {
             message: "提交成功",
             type: "success"
           });
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'英语写作',
               data:  JSON.stringify(this.myAnList),
               type: "course_tool_sub" }, "success")
@@ -18346,6 +18417,10 @@ export default {
         })
         .catch(err => {
           this.$message.error("提交失败");
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           console.error(err);
           this.addOp3('1', "", { courseid: this.id,tool:'英语写作',
               data:  JSON.stringify(this.myAnList),
@@ -21564,6 +21639,8 @@ export default {
           type: 3
         }
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then(res => {
@@ -21572,6 +21649,9 @@ export default {
             type: "success"
           });
           this.addOp3('1', "", { courseid: this.id,tool:'问答',data:JSON.stringify(this.answerList),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.answerList = [];
           this.answerDialogVisible = false;
@@ -21581,6 +21661,10 @@ export default {
         })
         .catch(err => {
           this.$message.error("提交失败");
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           console.error(err);
           this.addOp3('1', "", { courseid: this.id,tool:'问答',data:JSON.stringify(this.answerList),type: "course_tool_sub" }, err)
 
@@ -22958,6 +23042,8 @@ export default {
           type: 6
         }
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then(res => {
@@ -22966,6 +23052,9 @@ export default {
             type: "success"
           });
           this.addOp3('1', "", { courseid: this.id,tool:'个人评价',data: JSON.stringify(this.eScore),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.eScore = { eBzText: "", eStar: [] };
           this.studentEvalDialogVisible = false;
@@ -22974,6 +23063,10 @@ export default {
         .catch(err => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'个人评价',data: JSON.stringify(this.eScore),type: "course_tool_sub" }, err)
 
         });
@@ -23032,6 +23125,8 @@ export default {
           type: 2
         }
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then(res => {
@@ -23040,6 +23135,9 @@ export default {
             type: "success"
           });
           this.addOp3('1', "", { courseid: this.id,tool:'问卷调查',data:JSON.stringify(this.askList),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.askList = [];
           this.dialogVisible5 = false;
@@ -23050,6 +23148,10 @@ export default {
         .catch(err => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'问卷调查',data:JSON.stringify(this.askList),type: "course_tool_sub" }, err)
 
         });
@@ -23124,6 +23226,8 @@ export default {
           type: 8
         }
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then(res => {
@@ -23132,6 +23236,9 @@ export default {
             type: "success"
           });
           this.addOp3('1', "", { courseid: this.id,tool:'选择题',data:JSON.stringify(this.askList),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.askList = [];
           this.dialogVisibleChoice = false;
@@ -23142,6 +23249,10 @@ export default {
         .catch(err => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'选择题',data:JSON.stringify(this.askList),type: "course_tool_sub" }, err)
 
         });
@@ -25623,15 +25734,15 @@ export default {
       if (!document.fullscreenElement) {
         this.enterFullScreen();
       }
-      if (this.timer2) {
-        clearInterval(this.timer2);
-        this.timer2 = null;
-        console.log('清除定时器');
+      // if (this.timer2) {
+      //   clearInterval(this.timer2);
+      //   this.timer2 = null;
+      //   console.log('清除定时器');
 
-      }
-      this.timer2 = setInterval(()=> {
-        this.getSplitScreenData();//获取分屏数据
-      }, 1000);
+      // }
+      // this.timer2 = setInterval(()=> {
+      //   this.getSplitScreenData();//获取分屏数据
+      // }, 1000);
       this.IsLookOpen = flase
       this.$message.success("分屏模式已开启");
     },
@@ -25683,13 +25794,13 @@ export default {
               this.splitScreenData.uid = "";
               this.splitScreenData.behavior = null;
               this.$message.error("已结束分屏模式");
-              if (this.timer2) {
-                clearInterval(this.timer2);
-                this.timer2 = null;
-              }
-              this.timer2 = setInterval(()=> {
-                this.getSplitScreenData();//获取分屏数据
-              }, 5000);
+              // if (this.timer2) {
+              //   clearInterval(this.timer2);
+              //   this.timer2 = null;
+              // }
+              // this.timer2 = setInterval(()=> {
+              //   this.getSplitScreenData();//获取分屏数据
+              // }, 5000);
               this.$confirm("教师已结束分屏,确定后自由预览。", "提示", {
                 confirmButtonText: '确定', //确认按钮的文字
                 showCancelButton: false, //是否显示取消按钮
@@ -28196,8 +28307,8 @@ export default {
   width: 400px;
 }
 
-.e_add_btn {
-}
+/* .e_add_btn {
+} */
 
 .e_add_content {
   display: flex;
@@ -29728,8 +29839,8 @@ ol {
   border-radius: 5px;
 }
 
-.groupBox {
-}
+/* .groupBox {
+} */
 
 .groupContent + .groupContent {
   margin-top: 30px;

+ 136 - 26
src/components/easy3/studyStudent.vue

@@ -12671,6 +12671,7 @@ export default {
   },
   data() {
     return {
+      homeWorkLoading:false,
 			toolsList: toolsList,
       wordCloudKey: 0,
       bg: null,
@@ -13568,6 +13569,8 @@ export default {
           type: 7,
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then((res) => {
@@ -13576,6 +13579,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'选择匹配',data: JSON.stringify(this.selectAnswer.answer),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.dialogVisibleSelect = false;
           // this.selectAnswer = {};
@@ -13585,6 +13591,10 @@ export default {
         .catch((err) => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'选择匹配',data: JSON.stringify(this.selectAnswer.answer),type: "course_tool_sub" }, err)
 
         });
@@ -13641,6 +13651,8 @@ export default {
           type: 9,
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then((res) => {
@@ -13649,6 +13661,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'排序',data: JSON.stringify(this.sentenceList),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.dialogVisibleSentence = false;
           // this.selectAnswer = {};
@@ -13658,6 +13673,10 @@ export default {
         .catch((err) => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'排序',data: JSON.stringify(this.sentenceList),type: "course_tool_sub" }, err)
 
         });
@@ -13725,6 +13744,8 @@ export default {
           type: 10,
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then((res) => {
@@ -13733,6 +13754,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'表格',data:JSON.stringify(this.tableJson),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.dialogVisibleTable = false;
           // this.selectAnswer = {};
@@ -13742,6 +13766,10 @@ export default {
         .catch((err) => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'表格',data:JSON.stringify(this.tableJson),type: "course_tool_sub" }, err)
 
         });
@@ -13806,6 +13834,8 @@ export default {
           atool: 52,
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks3-2", params)
         .then((res) => {
@@ -13814,6 +13844,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'文档',data:JSON.stringify(this.wordJson),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.dialogVisibleWord = false;
           // this.selectAnswer = {};
@@ -13823,6 +13856,10 @@ export default {
         .catch((err) => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'文档',data:JSON.stringify(this.wordJson),type: "course_tool_sub" }, err)
 
         });
@@ -13884,6 +13921,8 @@ export default {
           type: typesql,
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorksR", params)
         .then((res) => {
@@ -13892,6 +13931,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'作业提交',data: this.studyJuri[0].cover[0].url,type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.studyJuri[0].cover = [];
           this.dialogVisible = false;
@@ -13900,6 +13942,10 @@ export default {
         .catch((err) => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'作业提交',data: this.studyJuri[0].cover[0].url,type: "course_tool_sub" }, err)
 
         });
@@ -13927,6 +13973,8 @@ export default {
           content: JSON.stringify(_files),
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorksPl", params)
         .then((res) => {
@@ -13935,6 +13983,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'批量上传',data: JSON.stringify(_files),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.plworkFile = [];
           this.dialogVisiblePl = false;
@@ -13943,6 +13994,10 @@ export default {
         .catch((err) => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'批量上传',data: JSON.stringify(_files),type: "course_tool_sub" }, err)
 
         });
@@ -13980,6 +14035,8 @@ export default {
           text: "",
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks5", params)
         .then((res) => {
@@ -13987,6 +14044,10 @@ export default {
             message: "提交成功",
             type: "success",
           });
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'学生分组',data:JSON.stringify({
             type: typesql,
             groupIndex: this.groupIndex,
@@ -13999,6 +14060,10 @@ export default {
         .catch((err) => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'学生分组',data:JSON.stringify({
             type: typesql,
             groupIndex: this.groupIndex,
@@ -14025,6 +14090,8 @@ export default {
           text: "",
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks5", params)
         .then((res) => {
@@ -14032,6 +14099,10 @@ export default {
             message: "提交成功",
             type: "success",
           });
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'英语写作',
               data:  JSON.stringify(this.myAnList),
               type: "course_tool_sub" }, "success")
@@ -14045,6 +14116,10 @@ export default {
         .catch((err) => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'英语写作',
               data:  JSON.stringify(this.myAnList),
               type: "course_tool_sub" }, err)
@@ -17130,6 +17205,8 @@ export default {
           type: 3,
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then((res) => {
@@ -17138,6 +17215,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'问答',data:JSON.stringify(this.answerList),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.answerList = [];
           this.answerDialogVisible = false;
@@ -17148,6 +17228,10 @@ export default {
         .catch((err) => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'问答',data:JSON.stringify(this.answerList),type: "course_tool_sub" }, err)
 
         });
@@ -18429,6 +18513,8 @@ export default {
           type: 6,
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then((res) => {
@@ -18437,6 +18523,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'个人评价',data: JSON.stringify(this.eScore),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.eScore = { eBzText: "", eStar: [] };
           this.studentEvalDialogVisible = false;
@@ -18445,6 +18534,10 @@ export default {
         .catch((err) => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'个人评价',data: JSON.stringify(this.eScore),type: "course_tool_sub" }, err)
 
         });
@@ -18504,6 +18597,8 @@ export default {
           type: 2,
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then((res) => {
@@ -18512,6 +18607,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'问卷调查',data:JSON.stringify(this.askList),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.askList = [];
           this.dialogVisible5 = false;
@@ -18521,6 +18619,9 @@ export default {
         })
         .catch((err) => {
           this.addOp3('1', "", { courseid: this.id,tool:'问卷调查',data:JSON.stringify(this.askList),type: "course_tool_sub" }, err)
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.$message.error("提交失败");
           console.error(err);
@@ -18596,6 +18697,8 @@ export default {
           type: 8,
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then((res) => {
@@ -18604,6 +18707,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'选择题',data:JSON.stringify(this.askList),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.askList = [];
           this.dialogVisibleChoice = false;
@@ -18614,6 +18720,10 @@ export default {
         .catch((err) => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'选择题',data:JSON.stringify(this.askList),type: "course_tool_sub" }, err)
 
         });
@@ -21050,13 +21160,13 @@ export default {
       if (!document.fullscreenElement) {
         this.enterFullScreen();
       }
-      if (this.timer2) {
-        clearInterval(this.timer2);
-        this.timer2 = null;
-      }
-      this.timer2 = setInterval(()=> {
-        this.getSplitScreenData();//获取分屏数据
-      }, 1000);
+      // if (this.timer2) {
+      //   clearInterval(this.timer2);
+      //   this.timer2 = null;
+      // }
+      // this.timer2 = setInterval(()=> {
+      //   this.getSplitScreenData();//获取分屏数据
+      // }, 1000);
 
       this.$message.success("分屏模式已开启");
     },
@@ -21107,13 +21217,13 @@ export default {
               this.splitScreenData.uid = "";
               this.splitScreenData.behavior = null;
               this.$message.error("已结束分屏模式");
-              if (this.timer2) {
-                clearInterval(this.timer2);
-                this.timer2 = null;
-              }
-              this.timer2 = setInterval(()=> {
-                this.getSplitScreenData();//获取分屏数据
-              }, 5000);
+              // if (this.timer2) {
+              //   clearInterval(this.timer2);
+              //   this.timer2 = null;
+              // }
+              // this.timer2 = setInterval(()=> {
+              //   this.getSplitScreenData();//获取分屏数据
+              // }, 5000);
               this.$confirm("教师已结束分屏,确定后自由预览。", "提示", {
                 confirmButtonText: '确定', //确认按钮的文字
                 showCancelButton: false, //是否显示取消按钮
@@ -23381,10 +23491,10 @@ export default {
   justify-content: center;
 }
 
-.answerBg > div:nth-child(1) {
-  /* font-size: 22px;
-  padding: 25px 0 10px; */
-}
+/* .answerBg > div:nth-child(1) {
+  font-size: 22px;
+  padding: 25px 0 10px;
+} */
 
 .answerContent {
   width: 215px;
@@ -23553,8 +23663,8 @@ export default {
   width: 400px;
 }
 
-.e_add_btn {
-}
+/* .e_add_btn {
+} */
 
 .e_add_content {
   display: flex;
@@ -24946,8 +25056,8 @@ ol {
   top: -25px;
 }
 
-.group_workBox {
-}
+/* .group_workBox {
+} */
 
 .group_workBox + .group_workBox {
   margin-top: 20px;
@@ -25070,8 +25180,8 @@ ol {
   border-radius: 5px;
 }
 
-.groupBox {
-}
+/* .groupBox {
+} */
 
 .groupContent + .groupContent {
   margin-top: 30px;
@@ -25437,11 +25547,11 @@ ol {
   overflow: hidden;
   transition: all 0.5s;
 }
-.toolChild {
+/* .toolChild { */
   /* margin: 0 0 0 17px;
   padding: 0 0 0 20px;
   border-left: 1px solid #d7d7d7; */
-}
+/* } */
 
 .toolChild > div + div{
   margin-top:5px;

+ 121 - 15
src/components/studyStudent.vue

@@ -12607,6 +12607,7 @@ export default {
   },
   data() {
     return {
+      homeWorkLoading:false,
       wordCloudKey: 0,
       bg: null,
       drawShow: false,
@@ -13503,6 +13504,8 @@ export default {
           type: 7,
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then((res) => {
@@ -13511,6 +13514,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'选择匹配',data: JSON.stringify(this.selectAnswer.answer),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.dialogVisibleSelect = false;
           // this.selectAnswer = {};
@@ -13519,6 +13525,9 @@ export default {
         })
         .catch((err) => {
           this.addOp3('1', "", { courseid: this.id,tool:'选择匹配',data: JSON.stringify(this.selectAnswer.answer),type: "course_tool_sub" }, err)
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.$message.error("提交失败");
           console.error(err);
@@ -13576,6 +13585,8 @@ export default {
           type: 9,
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then((res) => {
@@ -13584,6 +13595,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'排序',data: JSON.stringify(this.sentenceList),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.dialogVisibleSentence = false;
           // this.selectAnswer = {};
@@ -13592,6 +13606,9 @@ export default {
         })
         .catch((err) => {
           this.addOp3('1', "", { courseid: this.id,tool:'排序',data: JSON.stringify(this.sentenceList),type: "course_tool_sub" }, err)
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.$message.error("提交失败");
           console.error(err);
@@ -13649,6 +13666,8 @@ export default {
         .catch(() => {});
     },
     addTableWorks() {
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       let params = [
         {
           uid: this.userid,
@@ -13670,12 +13689,19 @@ export default {
             type: "success",
           });
           this.dialogVisibleTable = false;
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           // this.selectAnswer = {};
           this.selectSWorks();
           this.selectStudent();
         })
         .catch((err) => {
           this.addOp3('1', "", { courseid: this.id,tool:'表格',data:JSON.stringify(this.tableJson),type: "course_tool_sub" }, err)
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.$message.error("提交失败");
           console.error(err);
@@ -13729,6 +13755,8 @@ export default {
         .catch(() => {});
     },
     addWordWorks() {
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       let params = [
         {
           uid: this.userid,
@@ -13751,12 +13779,19 @@ export default {
             type: "success",
           });
           this.dialogVisibleWord = false;
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           // this.selectAnswer = {};
           this.selectSWorks();
           this.selectStudent();
         })
         .catch((err) => {
           this.addOp3('1', "", { courseid: this.id,tool:'文档',data:JSON.stringify(this.wordJson),type: "course_tool_sub" }, err)
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.$message.error("提交失败");
           console.error(err);
@@ -13808,6 +13843,8 @@ export default {
         this.$message.error("请上传文件");
         return;
       }
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       let params = [
         {
           uid: this.userid,
@@ -13827,6 +13864,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'作业提交',data: this.studyJuri[0].cover[0].url,type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.studyJuri[0].cover = [];
           this.dialogVisible = false;
@@ -13834,6 +13874,9 @@ export default {
         })
         .catch((err) => {
           this.addOp3('1', "", { courseid: this.id,tool:'作业提交',data: this.studyJuri[0].cover[0].url,type: "course_tool_sub" }, err)
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.$message.error("提交失败");
           console.error(err);
@@ -13862,6 +13905,8 @@ export default {
           content: JSON.stringify(_files),
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorksPl", params)
         .then((res) => {
@@ -13870,6 +13915,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'批量上传',data: JSON.stringify(_files),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.plworkFile = [];
           this.dialogVisiblePl = false;
@@ -13877,6 +13925,10 @@ export default {
         })
         .catch((err) => {
           this.$message.error("提交失败");
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           console.error(err);
           this.addOp3('1', "", { courseid: this.id,tool:'批量上传',data: JSON.stringify(_files),type: "course_tool_sub" }, err)
         });
@@ -13897,6 +13949,8 @@ export default {
         this.$message.error("请上传文件");
         return;
       }
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       let params = [
         {
           uid: this.userid,
@@ -13921,6 +13975,10 @@ export default {
             message: "提交成功",
             type: "success",
           });
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'学生分组',data:JSON.stringify({
             type: typesql,
             groupIndex: this.groupIndex,
@@ -13932,6 +13990,10 @@ export default {
         })
         .catch((err) => {
           this.$message.error("提交失败");
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           console.error(err);
           this.addOp3('1', "", { courseid: this.id,tool:'学生分组',data:JSON.stringify({
             type: typesql,
@@ -13959,6 +14021,8 @@ export default {
           text: "",
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks5", params)
         .then((res) => {
@@ -13966,6 +14030,10 @@ export default {
             message: "提交成功",
             type: "success",
           });
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'英语写作',
               data:  JSON.stringify(this.myAnList),
               type: "course_tool_sub" }, "success")
@@ -13979,6 +14047,10 @@ export default {
         .catch((err) => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'英语写作',
               data:  JSON.stringify(this.myAnList),
               type: "course_tool_sub" }, err)
@@ -17074,6 +17146,8 @@ export default {
           type: 3,
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then((res) => {
@@ -17082,6 +17156,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'问答',data:JSON.stringify(this.answerList),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.answerList = [];
           this.answerDialogVisible = false;
@@ -17091,6 +17168,9 @@ export default {
         })
         .catch((err) => {
           this.addOp3('1', "", { courseid: this.id,tool:'问答',data:JSON.stringify(this.answerList),type: "course_tool_sub" }, err)
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.$message.error("提交失败");
           console.error(err);
@@ -18372,6 +18452,8 @@ export default {
           type: 6,
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then((res) => {
@@ -18380,6 +18462,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'个人评价',data: JSON.stringify(this.eScore),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.eScore = { eBzText: "", eStar: [] };
           this.studentEvalDialogVisible = false;
@@ -18387,6 +18472,9 @@ export default {
         })
         .catch((err) => {
           this.addOp3('1', "", { courseid: this.id,tool:'个人评价',data: JSON.stringify(this.eScore),type: "course_tool_sub" }, err)
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.$message.error("提交失败");
           console.error(err);
@@ -18448,6 +18536,9 @@ export default {
       ];
       // console.log('params',params);
 
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
+
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then((res) => {
@@ -18455,16 +18546,23 @@ export default {
             message: "提交成功",
             type: "success",
           });
-          this.addOp3('1', "", { courseid: this.id,tool:'问卷调查',data:JSON.stringify(this.askList),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.askList = [];
           this.dialogVisible5 = false;
           this.selectStudent();
           this.selectSWorks();
           this.selectSLook();
+
+          this.addOp3('1', "", { courseid: this.id,tool:'问卷调查',data:JSON.stringify(this.askList),type: "course_tool_sub" }, "success")
         })
         .catch((err) => {
           this.addOp3('1', "", { courseid: this.id,tool:'问卷调查',data:JSON.stringify(this.askList),type: "course_tool_sub" }, err)
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.$message.error("提交失败");
           console.error(err);
@@ -18540,6 +18638,8 @@ export default {
           type: 8,
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then((res) => {
@@ -18548,6 +18648,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'选择题',data:JSON.stringify(this.askList),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.askList = [];
           this.dialogVisibleChoice = false;
@@ -18557,6 +18660,9 @@ export default {
         })
         .catch((err) => {
           this.addOp3('1', "", { courseid: this.id,tool:'选择题',data:JSON.stringify(this.askList),type: "course_tool_sub" }, err)
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.$message.error("提交失败");
           console.error(err);
@@ -20994,13 +21100,13 @@ export default {
       if (!document.fullscreenElement) {
         this.enterFullScreen();
       }
-      if (this.timer2) {
-        clearInterval(this.timer2);
-        this.timer2 = null;
-      }
-      this.timer2 = setInterval(()=> {
-        this.getSplitScreenData();//获取分屏数据
-      }, 1000);
+      // if (this.timer2) {
+      //   clearInterval(this.timer2);
+      //   this.timer2 = null;
+      // }
+      // this.timer2 = setInterval(()=> {
+      //   this.getSplitScreenData();//获取分屏数据
+      // }, 5000);
       this.$message.success("分屏模式已开启");
     },
     // 获取分屏数据
@@ -21051,13 +21157,13 @@ export default {
               this.splitScreenData.uid = "";
               this.splitScreenData.behavior = null;
               this.$message.error("已结束分屏模式");
-              if (this.timer2) {
-                clearInterval(this.timer2);
-                this.timer2 = null;
-              }
-              this.timer2 = setInterval(()=> {
-                this.getSplitScreenData();//获取分屏数据
-              }, 5000);
+              // if (this.timer2) {
+              //   clearInterval(this.timer2);
+              //   this.timer2 = null;
+              // }
+              // this.timer2 = setInterval(()=> {
+              //   this.getSplitScreenData();//获取分屏数据
+              // }, 5000);
               this.$confirm("教师已结束分屏,确定后自由预览。", "提示", {
                 confirmButtonText: '确定', //确认按钮的文字
                 showCancelButton: false, //是否显示取消按钮

+ 123 - 14
src/components/studySutdentClass/studyStudent.vue

@@ -15922,6 +15922,7 @@ export default {
   },
   data() {
     return {
+      homeWorkLoading:false,
 			toolsList: toolsList,
       wordCloudKey: 0,
       bg: null,
@@ -17403,6 +17404,8 @@ export default {
           type: 7,
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then((res) => {
@@ -17411,6 +17414,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'选择匹配',data: JSON.stringify(this.selectAnswer.answer),type: "course_tool_sub" }, "success")
+          setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.dialogVisibleSelect = false;
           // this.selectAnswer = {};
@@ -17418,6 +17424,10 @@ export default {
           this.selectStudent();
         })
         .catch((err) => {
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.$message.error("提交失败");
           console.error(err);
           this.addOp3('1', "", { courseid: this.id,tool:'选择匹配',data: JSON.stringify(this.selectAnswer.answer),type: "course_tool_sub" }, err)
@@ -17476,6 +17486,8 @@ export default {
           type: 9,
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then((res) => {
@@ -17484,6 +17496,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'排序',data: JSON.stringify(this.sentenceList),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.dialogVisibleSentence = false;
           // this.selectAnswer = {};
@@ -17491,6 +17506,10 @@ export default {
           this.selectStudent();
         })
         .catch((err) => {
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.$message.error("提交失败");
           console.error(err);
           this.addOp3('1', "", { courseid: this.id,tool:'排序',data: JSON.stringify(this.sentenceList),type: "course_tool_sub" }, err)
@@ -17560,6 +17579,8 @@ export default {
           type: 10,
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then((res) => {
@@ -17568,6 +17589,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'表格',data:JSON.stringify(this.tableJson),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.dialogVisibleTable = false;
           // this.selectAnswer = {};
@@ -17577,6 +17601,10 @@ export default {
         .catch((err) => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'表格',data:JSON.stringify(this.tableJson),type: "course_tool_sub" }, err)
 
         });
@@ -17641,6 +17669,8 @@ export default {
           atool: 52,
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks3-2", params)
         .then((res) => {
@@ -17649,6 +17679,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'文档',data:JSON.stringify(this.wordJson),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.dialogVisibleWord = false;
           // this.selectAnswer = {};
@@ -17658,6 +17691,9 @@ export default {
         .catch((err) => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
           this.addOp3('1', "", { courseid: this.id,tool:'文档',data:JSON.stringify(this.wordJson),type: "course_tool_sub" }, err)
 
         });
@@ -17738,6 +17774,8 @@ export default {
           type: typesql,
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorksR", params)
         .then((res) => {
@@ -17746,6 +17784,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'作业提交',data: this.studyJuri[0].cover[0].url,type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.studyJuri[0].cover = [];
           this.dialogVisible = false;
@@ -17754,6 +17795,10 @@ export default {
         .catch((err) => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'作业提交',data: this.studyJuri[0].cover[0].url,type: "course_tool_sub" }, err)
 
         });
@@ -17781,6 +17826,8 @@ export default {
           content: JSON.stringify(_files),
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorksPl", params)
         .then((res) => {
@@ -17789,6 +17836,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'批量上传',data: JSON.stringify(_files),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.plworkFile = [];
           this.dialogVisiblePl = false;
@@ -17797,6 +17847,10 @@ export default {
         .catch((err) => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'批量上传',data: JSON.stringify(_files),type: "course_tool_sub" }, err)
 
         });
@@ -17834,6 +17888,8 @@ export default {
           text: "",
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks5", params)
         .then((res) => {
@@ -17841,6 +17897,10 @@ export default {
             message: "提交成功",
             type: "success",
           });
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'学生分组',data:JSON.stringify({
             type: typesql,
             groupIndex: this.groupIndex,
@@ -17853,6 +17913,10 @@ export default {
         .catch((err) => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'学生分组',data:JSON.stringify({
             type: typesql,
             groupIndex: this.groupIndex,
@@ -17879,6 +17943,8 @@ export default {
           text: "",
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks5", params)
         .then((res) => {
@@ -17886,6 +17952,10 @@ export default {
             message: "提交成功",
             type: "success",
           });
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'英语写作',
               data:  JSON.stringify(this.myAnList),
               type: "course_tool_sub" }, "success")
@@ -17899,6 +17969,10 @@ export default {
         .catch((err) => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'英语写作',
               data:  JSON.stringify(this.myAnList),
               type: "course_tool_sub" }, err)
@@ -21027,6 +21101,8 @@ export default {
           type: 3,
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then((res) => {
@@ -21035,6 +21111,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'问答',data:JSON.stringify(this.answerList),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.answerList = [];
           this.answerDialogVisible = false;
@@ -21044,6 +21123,9 @@ export default {
         })
         .catch((err) => {
           this.addOp3('1', "", { courseid: this.id,tool:'问答',data:JSON.stringify(this.answerList),type: "course_tool_sub" }, err)
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.$message.error("提交失败");
           console.error(err);
@@ -22402,6 +22484,8 @@ export default {
           type: 6,
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then((res) => {
@@ -22410,6 +22494,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'个人评价',data: JSON.stringify(this.eScore),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.eScore = { eBzText: "", eStar: [] };
           this.studentEvalDialogVisible = false;
@@ -22418,6 +22505,10 @@ export default {
         .catch((err) => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'个人评价',data: JSON.stringify(this.eScore),type: "course_tool_sub" }, err)
 
         });
@@ -22477,6 +22568,8 @@ export default {
           type: 2,
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then((res) => {
@@ -22485,6 +22578,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'问卷调查',data:JSON.stringify(this.askList),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.askList = [];
           this.dialogVisible5 = false;
@@ -22495,6 +22591,10 @@ export default {
         .catch((err) => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'问卷调查',data:JSON.stringify(this.askList),type: "course_tool_sub" }, err)
 
         });
@@ -22569,6 +22669,8 @@ export default {
           type: 8,
         },
       ];
+      if (this.homeWorkLoading) return this.$message.info('点击过快,请稍后...')
+      this.homeWorkLoading = true
       this.ajax
         .post(this.$store.state.api + "addCourseWorks", params)
         .then((res) => {
@@ -22577,6 +22679,9 @@ export default {
             type: "success",
           });
           this.addOp3('1', "", { courseid: this.id,tool:'选择题',data:JSON.stringify(this.askList),type: "course_tool_sub" }, "success")
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
 
           this.askList = [];
           this.dialogVisibleChoice = false;
@@ -22587,6 +22692,10 @@ export default {
         .catch((err) => {
           this.$message.error("提交失败");
           console.error(err);
+           setTimeout(() => {
+            this.homeWorkLoading = false
+          }, 500);
+
           this.addOp3('1', "", { courseid: this.id,tool:'选择题',data:JSON.stringify(this.askList),type: "course_tool_sub" }, err)
 
         });
@@ -25030,13 +25139,13 @@ export default {
       if (!document.fullscreenElement) {
         this.enterFullScreen();
       }
-        if (this.timer2) {
-          clearInterval(this.timer2);
-          this.timer2 = null;
-        }
-        this.timer2 = setInterval(()=> {
-          this.getSplitScreenData();//获取分屏数据
-        }, 1000);
+        // if (this.timer2) {
+        //   clearInterval(this.timer2);
+        //   this.timer2 = null;
+        // }
+        // this.timer2 = setInterval(()=> {
+        //   this.getSplitScreenData();//获取分屏数据
+        // }, 1000);
       this.$message.success("分屏模式已开启");
     },
     getSplitScreenData() {
@@ -25086,13 +25195,13 @@ export default {
               this.splitScreenData.uid = "";
               this.splitScreenData.behavior = null;
               this.$message.error("已结束分屏模式");
-              if (this.timer2) {
-                clearInterval(this.timer2);
-                this.timer2 = null;
-              }
-              this.timer2 = setInterval(()=> {
-                this.getSplitScreenData();//获取分屏数据
-              }, 5000);
+              // if (this.timer2) {
+              //   clearInterval(this.timer2);
+              //   this.timer2 = null;
+              // }
+              // this.timer2 = setInterval(()=> {
+              //   this.getSplitScreenData();//获取分屏数据
+              // }, 5000);
               this.$confirm("教师已结束分屏,确定后自由预览。", "提示", {
                 confirmButtonText: '确定', //确认按钮的文字
                 showCancelButton: false, //是否显示取消按钮

+ 1 - 0
src/mixins/mixin.js

@@ -34,6 +34,7 @@ export const myMixin = {
       }
     },
     async addOp3(userTime, loadTime, object, status) {
+      if (!this.$route.query.userid) return
       try {
         if(!this.userJson || !this.userJson.accountNumber){
             let res = await this.ajax.get(this.$store.state.api + "selectUser", {