11wqe1 2 months ago
parent
commit
f0b01c35d0

+ 38 - 3
src/components/easy2/studyStudent.vue

@@ -15914,6 +15914,7 @@ export default {
       isHovered2: false,
       isHovered2: false,
       commentTagShow: 0,
       commentTagShow: 0,
       timer: null,
       timer: null,
+      timer2: null,
       opertimer: null,
       opertimer: null,
       showType: 0,
       showType: 0,
       fileType: 0,
       fileType: 0,
@@ -21313,7 +21314,7 @@ export default {
             _this.selectStudent();
             _this.selectStudent();
             _this.selectSLook();
             _this.selectSLook();
             _this.getPick();
             _this.getPick();
-            _this.getSplitScreenData();
+            // _this.getSplitScreenData();
             if (_this.courseDetail.userid == _this.userid && _this.IsFollow) {
             if (_this.courseDetail.userid == _this.userid && _this.IsFollow) {
               _this.setCTask();
               _this.setCTask();
             }
             }
@@ -21328,6 +21329,11 @@ export default {
               _this.selectPz();
               _this.selectPz();
             }
             }
           }, 5000);
           }, 5000);
+          if (_this.timer2 == null) {
+            _this.timer2 = setInterval(()=> {
+              _this.getSplitScreenData();//获取分屏数据
+            },  5000);
+          }
           _this.$nextTick(function() {
           _this.$nextTick(function() {
             setTimeout(() => {
             setTimeout(() => {
               // var a =
               // var a =
@@ -24719,6 +24725,15 @@ export default {
       if (!document.fullscreenElement) {
       if (!document.fullscreenElement) {
         this.enterFullScreen();
         this.enterFullScreen();
       } 
       } 
+      if (this.timer2) {
+        clearInterval(this.timer2);
+        this.timer2 = null;
+        console.log('清除定时器');
+        
+      } 
+      this.timer2 = setInterval(()=> {
+        this.getSplitScreenData();//获取分屏数据
+      }, 1000);
       this.$message.success("分屏模式已开启");
       this.$message.success("分屏模式已开启");
     },
     },
     getSplitScreenData() {
     getSplitScreenData() {
@@ -24769,6 +24784,13 @@ export default {
               this.splitScreenData.uid = "";
               this.splitScreenData.uid = "";
               this.splitScreenData.behavior = null;
               this.splitScreenData.behavior = null;
               this.$message.error("已结束分屏模式");
               this.$message.error("已结束分屏模式");
+              if (this.timer2) {
+                clearInterval(this.timer2);
+                this.timer2 = null;
+              }
+              this.timer2 = setInterval(()=> {
+                this.getSplitScreenData();//获取分屏数据
+              }, 5000);
               this.$confirm("教师已结束分屏,确定后自由预览。", "提示", {
               this.$confirm("教师已结束分屏,确定后自由预览。", "提示", {
                 confirmButtonText: '确定', //确认按钮的文字
                 confirmButtonText: '确定', //确认按钮的文字
                 showCancelButton: false, //是否显示取消按钮
                 showCancelButton: false, //是否显示取消按钮
@@ -24844,6 +24866,10 @@ export default {
             this.$refs.statisticalAnalysisRef.close();
             this.$refs.statisticalAnalysisRef.close();
           }
           }
           if(behavior.form.taskCount!=="" && behavior.form.courseType !==""){
           if(behavior.form.taskCount!=="" && behavior.form.courseType !==""){
+
+            let oldData = [parseInt(this.courseType),parseInt(this.taskCount)]
+            let newData = [parseInt(behavior.form.courseType),parseInt(behavior.form.taskCount)]
+
             if(this.courseType !=behavior.form.courseType){
             if(this.courseType !=behavior.form.courseType){
               this.courseType = behavior.form.courseType;
               this.courseType = behavior.form.courseType;
             }
             }
@@ -24863,9 +24889,14 @@ export default {
             if(behavior.form.navId){
             if(behavior.form.navId){
               this.navId = behavior.form.navId
               this.navId = behavior.form.navId
             }
             }
-            this.getCourseDetail()
+            // console.log("分屏阶段和任务",JSON.stringify(oldData),JSON.stringify(newData))
+            if(JSON.stringify(oldData)!=JSON.stringify(newData)){
+              // console.log("分屏测试====",JSON.stringify(oldData),JSON.stringify(newData))
+              this.getCourseDetail()
+              this.setContent2(false)
+            }
 
 
-            this.setContent2(false)
+            
           }
           }
         } else {
         } else {
         }
         }
@@ -25007,7 +25038,11 @@ export default {
   beforeDestroy() {
   beforeDestroy() {
     window.onresize = null;
     window.onresize = null;
     clearInterval(this.timer);
     clearInterval(this.timer);
+    clearInterval(this.timer2);
+
     this.timer = null;
     this.timer = null;
+    this.timer2 = null;
+
     clearInterval(this.opertimer);
     clearInterval(this.opertimer);
     this.opertimer = null;
     this.opertimer = null;
     this.updateSplitScreenData(1);
     this.updateSplitScreenData(1);

+ 34 - 3
src/components/easy3/studyStudent.vue

@@ -12456,6 +12456,7 @@ export default {
       isHovered2: false,
       isHovered2: false,
 			commentTagShow:0,
 			commentTagShow:0,
       timer: null,
       timer: null,
+      timer2: null,
       opertimer: null,
       opertimer: null,
       showType: '',
       showType: '',
       fileType: 0,
       fileType: 0,
@@ -17014,7 +17015,7 @@ export default {
             _this.selectStudent();
             _this.selectStudent();
             _this.selectSLook();
             _this.selectSLook();
             _this.getPick();
             _this.getPick();
-						_this.getSplitScreenData();//获取分屏数据
+						// _this.getSplitScreenData();//获取分屏数据
             if (_this.courseDetail.userid == _this.userid && _this.IsFollow) {
             if (_this.courseDetail.userid == _this.userid && _this.IsFollow) {
               _this.setCTask();
               _this.setCTask();
             }
             }
@@ -17029,6 +17030,11 @@ export default {
               _this.selectPz();
               _this.selectPz();
             }
             }
           }, 5000);
           }, 5000);
+          if (_this.timer2 == null) {
+            _this.timer2 = setInterval(()=> {
+              _this.getSplitScreenData();//获取分屏数据
+            },  5000);
+          }
           _this.$nextTick(function () {
           _this.$nextTick(function () {
             setTimeout(() => {
             setTimeout(() => {
               // var a =
               // var a =
@@ -20353,6 +20359,13 @@ export default {
       if (!document.fullscreenElement) {
       if (!document.fullscreenElement) {
         this.enterFullScreen();
         this.enterFullScreen();
       } 
       } 
+      if (this.timer2) {
+        clearInterval(this.timer2);
+        this.timer2 = null;
+      } 
+      this.timer2 = setInterval(()=> {
+        this.getSplitScreenData();//获取分屏数据
+      }, 1000);
       this.$message.success("分屏模式已开启");
       this.$message.success("分屏模式已开启");
     },
     },
     getSplitScreenData() {
     getSplitScreenData() {
@@ -20402,6 +20415,13 @@ export default {
               this.splitScreenData.uid = "";
               this.splitScreenData.uid = "";
               this.splitScreenData.behavior = null;
               this.splitScreenData.behavior = null;
               this.$message.error("已结束分屏模式");
               this.$message.error("已结束分屏模式");
+              if (this.timer2) {
+                clearInterval(this.timer2);
+                this.timer2 = null;
+              }
+              this.timer2 = setInterval(()=> {
+                this.getSplitScreenData();//获取分屏数据
+              }, 5000);
               this.$confirm("教师已结束分屏,确定后自由预览。", "提示", {
               this.$confirm("教师已结束分屏,确定后自由预览。", "提示", {
                 confirmButtonText: '确定', //确认按钮的文字
                 confirmButtonText: '确定', //确认按钮的文字
                 showCancelButton: false, //是否显示取消按钮
                 showCancelButton: false, //是否显示取消按钮
@@ -20477,6 +20497,10 @@ export default {
             this.$refs.statisticalAnalysisRef.close();
             this.$refs.statisticalAnalysisRef.close();
           }
           }
           if(behavior.form.taskCount!=="" && behavior.form.courseType !==""){
           if(behavior.form.taskCount!=="" && behavior.form.courseType !==""){
+
+            let oldData = [parseInt(this.courseType),parseInt(this.taskCount)]
+            let newData = [parseInt(behavior.form.courseType),parseInt(behavior.form.taskCount)]
+
             if(this.courseType !=behavior.form.courseType){
             if(this.courseType !=behavior.form.courseType){
               this.courseType = behavior.form.courseType;
               this.courseType = behavior.form.courseType;
             }
             }
@@ -20496,9 +20520,14 @@ export default {
             if(behavior.form.navId){
             if(behavior.form.navId){
               this.navId = behavior.form.navId
               this.navId = behavior.form.navId
             }
             }
-            this.getCourseDetail()
+            // console.log("分屏阶段和任务",JSON.stringify(oldData),JSON.stringify(newData))
+            if(JSON.stringify(oldData)!=JSON.stringify(newData)){
+              // console.log("分屏测试====",JSON.stringify(oldData),JSON.stringify(newData))
+              this.getCourseDetail()
+              this.setContent2(false)
+            }
 
 
-            this.setContent2(false)
+            
           }
           }
         } else {
         } else {
         }
         }
@@ -20641,6 +20670,8 @@ export default {
     window.onresize = null;
     window.onresize = null;
     clearInterval(this.timer);
     clearInterval(this.timer);
     this.timer = null;
     this.timer = null;
+    clearInterval(this.timer2);
+    this.timer2 = null;
     clearInterval(this.opertimer);
     clearInterval(this.opertimer);
     this.opertimer = null;
     this.opertimer = null;
 		this.updateSplitScreenData(1);
 		this.updateSplitScreenData(1);

+ 35 - 5
src/components/studyStudent.vue

@@ -12393,6 +12393,7 @@ export default {
       isHovered2: false,
       isHovered2: false,
 			commentTagShow:0,
 			commentTagShow:0,
       timer: null,
       timer: null,
+      timer2: null,
       opertimer: null,
       opertimer: null,
       showType: 0,
       showType: 0,
       fileType: 0,
       fileType: 0,
@@ -17004,7 +17005,7 @@ export default {
             _this.selectStudent();
             _this.selectStudent();
             _this.selectSLook();
             _this.selectSLook();
             _this.getPick();
             _this.getPick();
-						_this.getSplitScreenData();
+						// _this.getSplitScreenData();
 
 
             if (_this.courseDetail.userid == _this.userid && _this.IsFollow) {
             if (_this.courseDetail.userid == _this.userid && _this.IsFollow) {
               _this.setCTask();
               _this.setCTask();
@@ -17020,6 +17021,11 @@ export default {
               _this.selectPz();
               _this.selectPz();
             }
             }
           }, 5000);
           }, 5000);
+          if (_this.timer2 == null) {
+            _this.timer2 = setInterval(()=> {
+              _this.getSplitScreenData();//获取分屏数据
+            },  5000);
+          }
           _this.$nextTick(function () {
           _this.$nextTick(function () {
             setTimeout(() => {
             setTimeout(() => {
               // var a =
               // var a =
@@ -20343,6 +20349,13 @@ export default {
       if (!document.fullscreenElement) {
       if (!document.fullscreenElement) {
         this.enterFullScreen();
         this.enterFullScreen();
       } 
       } 
+      if (this.timer2) {
+        clearInterval(this.timer2);
+        this.timer2 = null;
+      } 
+      this.timer2 = setInterval(()=> {
+        this.getSplitScreenData();//获取分屏数据
+      }, 1000);
       this.$message.success("分屏模式已开启");
       this.$message.success("分屏模式已开启");
     },
     },
     getSplitScreenData() {
     getSplitScreenData() {
@@ -20370,7 +20383,7 @@ export default {
               await this.updateSplitScreenData(1);
               await this.updateSplitScreenData(1);
             } else if (!this.splitScreenData.isOpen && data.isOpen) {
             } else if (!this.splitScreenData.isOpen && data.isOpen) {
               this.confirmOpenDig = true
               this.confirmOpenDig = true
-              this.confirmOpenDigData = data
+              this.confirmOpenDigData = data      
             } else if (this.splitScreenData.isOpen && !data.isOpen) {
             } else if (this.splitScreenData.isOpen && !data.isOpen) {
               this.splitScreenData.isOpen = false;
               this.splitScreenData.isOpen = false;
               this.splitScreenData.userId = "";
               this.splitScreenData.userId = "";
@@ -20392,6 +20405,13 @@ export default {
               this.splitScreenData.uid = "";
               this.splitScreenData.uid = "";
               this.splitScreenData.behavior = null;
               this.splitScreenData.behavior = null;
               this.$message.error("已结束分屏模式");
               this.$message.error("已结束分屏模式");
+              if (this.timer2) {
+                clearInterval(this.timer2);
+                this.timer2 = null;
+              }
+              this.timer2 = setInterval(()=> {
+                this.getSplitScreenData();//获取分屏数据
+              }, 5000);
               this.$confirm("教师已结束分屏,确定后自由预览。", "提示", {
               this.$confirm("教师已结束分屏,确定后自由预览。", "提示", {
                 confirmButtonText: '确定', //确认按钮的文字
                 confirmButtonText: '确定', //确认按钮的文字
                 showCancelButton: false, //是否显示取消按钮
                 showCancelButton: false, //是否显示取消按钮
@@ -20467,6 +20487,10 @@ export default {
             this.$refs.statisticalAnalysisRef.close();
             this.$refs.statisticalAnalysisRef.close();
           }
           }
           if(behavior.form.taskCount!=="" && behavior.form.courseType !==""){
           if(behavior.form.taskCount!=="" && behavior.form.courseType !==""){
+
+            let oldData = [parseInt(this.courseType),parseInt(this.taskCount)]
+            let newData = [parseInt(behavior.form.courseType),parseInt(behavior.form.taskCount)]
+
             if(this.courseType !=behavior.form.courseType){
             if(this.courseType !=behavior.form.courseType){
               this.courseType = behavior.form.courseType;
               this.courseType = behavior.form.courseType;
             }
             }
@@ -20486,10 +20510,14 @@ export default {
             if(behavior.form.navId){
             if(behavior.form.navId){
               this.navId = behavior.form.navId
               this.navId = behavior.form.navId
             }
             }
+            // console.log("分屏阶段和任务",JSON.stringify(oldData),JSON.stringify(newData))
+            if(JSON.stringify(oldData)!=JSON.stringify(newData)){
+              // console.log("分屏测试====",JSON.stringify(oldData),JSON.stringify(newData))
+              this.getCourseDetail()
+              this.setContent2(false)
+            }
 
 
-            this.getCourseDetail()
-
-            this.setContent2(false)
+            
           }
           }
         } else {
         } else {
         }
         }
@@ -20634,6 +20662,8 @@ export default {
     window.onresize = null;
     window.onresize = null;
     clearInterval(this.timer);
     clearInterval(this.timer);
     this.timer = null;
     this.timer = null;
+    clearInterval(this.timer2);
+    this.timer2 = null;
     clearInterval(this.opertimer);
     clearInterval(this.opertimer);
     this.opertimer = null;
     this.opertimer = null;
 		this.updateSplitScreenData(1);
 		this.updateSplitScreenData(1);

+ 63 - 5
src/components/studySutdentClass/studyStudent.vue

@@ -15469,6 +15469,7 @@ export default {
       isHovered2: false,
       isHovered2: false,
 			commentTagShow:0,
 			commentTagShow:0,
       timer: null,
       timer: null,
+      timer2: null,
       opertimer: null,
       opertimer: null,
       showType: '',
       showType: '',
       fileType: 0,
       fileType: 0,
@@ -16465,6 +16466,8 @@ export default {
         this.selectPz();
         this.selectPz();
         this.getHomeWork();
         this.getHomeWork();
         this.getCourseDetail(2);
         this.getCourseDetail(2);
+        this.changeSplitScreenBehavior({form:{courseType:this.courseType,taskCount:this.taskCount,toolType:k}})
+
 				if(flag){
 				if(flag){
 					if(flag2){
 					if(flag2){
 						this.insertMemorandum(`选择<span class="variable">工具${k+1}:${this.toolsList[this.navList[i].task[j].tool[k].tool]}</span>`)
 						this.insertMemorandum(`选择<span class="variable">工具${k+1}:${this.toolsList[this.navList[i].task[j].tool[k].tool]}</span>`)
@@ -16598,6 +16601,7 @@ export default {
         this.videoDetail.sources[0].src = "";
         this.videoDetail.sources[0].src = "";
       }
       }
       this.commentIndexJson = {};
       this.commentIndexJson = {};
+      this.changeSplitScreenBehavior({code:99})
       done();
       done();
     },
     },
     fullTools() {
     fullTools() {
@@ -20080,6 +20084,8 @@ export default {
       this.courseType = s;
       this.courseType = s;
       this.navId = i;
       this.navId = i;
       this.taskCount = n;
       this.taskCount = n;
+      this.changeSplitScreenBehavior({form:{courseType:this.courseType,taskCount:this.taskCount,navId:this.navId}})
+
       this.navList[this.courseType].task[this.taskCount].isOpen =
       this.navList[this.courseType].task[this.taskCount].isOpen =
         !this.navList[this.courseType].task[this.taskCount].isOpen;
         !this.navList[this.courseType].task[this.taskCount].isOpen;
       if (this.IsLookOpen) {
       if (this.IsLookOpen) {
@@ -20706,7 +20712,10 @@ export default {
             clearInterval(_this.timer);
             clearInterval(_this.timer);
             _this.timer = null;
             _this.timer = null;
           }
           }
-
+          // if (_this.timer2) {
+          //   clearInterval(_this.timer2);
+          //   _this.timer2 = null;
+          // }
           if (_this.tcid) {
           if (_this.tcid) {
             _this.getCourseGroup(gindex);
             _this.getCourseGroup(gindex);
           } else {
           } else {
@@ -20742,7 +20751,6 @@ export default {
             _this.selectStudent();
             _this.selectStudent();
             _this.selectSLook();
             _this.selectSLook();
             _this.getPick();
             _this.getPick();
-						_this.getSplitScreenData();//获取分屏数据
             if (_this.courseDetail.userid == _this.userid && _this.IsFollow) {
             if (_this.courseDetail.userid == _this.userid && _this.IsFollow) {
               _this.setCTask();
               _this.setCTask();
             }
             }
@@ -20757,6 +20765,13 @@ export default {
               _this.selectPz();
               _this.selectPz();
             }
             }
           }, 5000);
           }, 5000);
+          if (_this.timer2 == null) {
+            _this.timer2 = setInterval(()=> {
+              _this.getSplitScreenData();//获取分屏数据
+            },  5000);
+          }
+
+         
           _this.$nextTick(function () {
           _this.$nextTick(function () {
             setTimeout(() => {
             setTimeout(() => {
               // var a =
               // var a =
@@ -24043,6 +24058,7 @@ export default {
         this.splitScreenData.uid = this.splitScreenData.myUid;
         this.splitScreenData.uid = this.splitScreenData.myUid;
         this.splitScreenData.behavior = null;
         this.splitScreenData.behavior = null;
         let status = await this.updateSplitScreenData(0);
         let status = await this.updateSplitScreenData(0);
+        this.changeSplitScreenBehavior({form:{}})
 
 
         if (status == 1) {
         if (status == 1) {
           this.$message.success("已开启分屏");
           this.$message.success("已开启分屏");
@@ -24090,6 +24106,13 @@ export default {
       if (!document.fullscreenElement) {
       if (!document.fullscreenElement) {
         this.enterFullScreen();
         this.enterFullScreen();
       } 
       } 
+        if (this.timer2) {
+          clearInterval(this.timer2);
+          this.timer2 = null;
+        } 
+        this.timer2 = setInterval(()=> {
+          this.getSplitScreenData();//获取分屏数据
+        }, 1000);
       this.$message.success("分屏模式已开启");
       this.$message.success("分屏模式已开启");
     },
     },
     getSplitScreenData() {
     getSplitScreenData() {
@@ -24139,6 +24162,13 @@ export default {
               this.splitScreenData.uid = "";
               this.splitScreenData.uid = "";
               this.splitScreenData.behavior = null;
               this.splitScreenData.behavior = null;
               this.$message.error("已结束分屏模式");
               this.$message.error("已结束分屏模式");
+              if (this.timer2) {
+                clearInterval(this.timer2);
+                this.timer2 = null;
+              }
+              this.timer2 = setInterval(()=> {
+                this.getSplitScreenData();//获取分屏数据
+              }, 5000);
               this.$confirm("教师已结束分屏,确定后自由预览。", "提示", {
               this.$confirm("教师已结束分屏,确定后自由预览。", "提示", {
                 confirmButtonText: '确定', //确认按钮的文字
                 confirmButtonText: '确定', //确认按钮的文字
                 showCancelButton: false, //是否显示取消按钮
                 showCancelButton: false, //是否显示取消按钮
@@ -24214,6 +24244,10 @@ export default {
             this.$refs.statisticalAnalysisRef.close();
             this.$refs.statisticalAnalysisRef.close();
           }
           }
           if(behavior.form.taskCount!=="" && behavior.form.courseType !==""){
           if(behavior.form.taskCount!=="" && behavior.form.courseType !==""){
+
+            let oldData = [parseInt(this.courseType),parseInt(this.taskCount)]
+            let newData = [parseInt(behavior.form.courseType),parseInt(behavior.form.taskCount)]
+
             if(this.courseType !=behavior.form.courseType){
             if(this.courseType !=behavior.form.courseType){
               this.courseType = behavior.form.courseType;
               this.courseType = behavior.form.courseType;
             }
             }
@@ -24233,9 +24267,14 @@ export default {
             if(behavior.form.navId){
             if(behavior.form.navId){
               this.navId = behavior.form.navId
               this.navId = behavior.form.navId
             }
             }
-            this.getCourseDetail()
+            // console.log("分屏阶段和任务",JSON.stringify(oldData),JSON.stringify(newData))
+            if(JSON.stringify(oldData)!=JSON.stringify(newData)){
+              // console.log("分屏测试====",JSON.stringify(oldData),JSON.stringify(newData))
+              this.getCourseDetail()
+              this.setContent2(false)
+            }
 
 
-            this.setContent2(false)
+            
           }
           }
         } else {
         } else {
         }
         }
@@ -24305,7 +24344,22 @@ export default {
         this.splitScreenData.isOpen &&
         this.splitScreenData.isOpen &&
         this.splitScreenData.uid == this.splitScreenData.myUid
         this.splitScreenData.uid == this.splitScreenData.myUid
       ) {
       ) {
-        this.splitScreenData.behavior = newValue;
+        let _behavior = null;
+        if(!newValue){
+          _behavior = {}
+        }else{
+          _behavior = newValue
+        }
+        if(_behavior.form){
+          _behavior.form.taskCount = this.taskCount;
+          _behavior.form.courseType = this.courseType
+        }else{
+          _behavior.form = {
+            taskCount:this.taskCount,
+            courseType:this.courseType
+          }
+        }
+        this.splitScreenData.behavior = _behavior;
         this.updateSplitScreenData(0);
         this.updateSplitScreenData(0);
       }
       }
     },
     },
@@ -24362,7 +24416,11 @@ export default {
   beforeDestroy() {
   beforeDestroy() {
     window.onresize = null;
     window.onresize = null;
     clearInterval(this.timer);
     clearInterval(this.timer);
+    clearInterval(this.timer2);
+
     this.timer = null;
     this.timer = null;
+    this.timer2 = null;
+
     clearInterval(this.opertimer);
     clearInterval(this.opertimer);
     this.opertimer = null;
     this.opertimer = null;
 		this.updateSplitScreenData(1); 
 		this.updateSplitScreenData(1);