SanHQin 2 月之前
父节点
当前提交
a95ffb22c0
共有 1 个文件被更改,包括 81 次插入41 次删除
  1. 81 41
      src/components/classRoomHelper/studentIndex.vue

+ 81 - 41
src/components/classRoomHelper/studentIndex.vue

@@ -1,18 +1,27 @@
 <template>
   <div class="ch_box" ref="ch_box">
     <div class="ch_content_box" v-show="type == 1">
-      <workFlowIframe v-show="itemType == 7 && iframeSrc2.length" :iframeSrc="iframeSrc2"></workFlowIframe>
+      <workFlowIframe
+        v-show="itemType == 7 && iframeSrc2.length"
+        :iframeSrc="iframeSrc2"
+      ></workFlowIframe>
     </div>
     <div class="ch_nav_box">
-
       <div class="ch_nav_box_top">
         <div @click="$emit('backPage')" class="ch_nav_box_top_item">
-        <img :src="require('../../assets/icon/course/return.png')" alt="" />
-      </div>
+          <el-tooltip class="item" effect="dark" content="返回" placement="top">
+            <img :src="require('../../assets/icon/course/return.png')" alt="" />
+          </el-tooltip>
+        </div>
 
-      <div @click="$emit('refresh')" class="ch_nav_box_top_item">
-        <img :src="require('../../assets/icon/course/refresh.png')" alt="" />
-      </div>
+        <div @click="$emit('refresh')" class="ch_nav_box_top_item">
+          <el-tooltip class="item" effect="dark" content="刷新" placement="top">
+            <img
+              :src="require('../../assets/icon/course/refresh.png')"
+              alt=""
+            />
+          </el-tooltip>
+        </div>
       </div>
 
       <div class="ch_nav_box_middle">
@@ -26,17 +35,26 @@
         >
           <img
             v-if="itemType == 7"
-            :src="require('../../assets/icon/course/teachingAssistant_active.svg')"
+            :src="
+              require('../../assets/icon/course/teachingAssistant_active.svg')
+            "
           />
           <img
             v-if="itemType != 7"
-            :src="require('../../assets/icon/course/teachingAssistant_default.svg')"
+            :src="
+              require('../../assets/icon/course/teachingAssistant_default.svg')
+            "
           />
           <div>助教</div>
         </div>
       </div>
       <div class="ch_nav_box_bottom">
-        <div @click.stop="$emit('goStep', 0)">
+        <div
+          @click.stop="goStep(0)"
+          :class="{
+            disableBtn: IsFollow || IsLookOpen || splitScreenData.isOpen
+          }"
+        >
           <el-tooltip
             class="item"
             effect="dark"
@@ -47,7 +65,12 @@
           </el-tooltip>
         </div>
 
-        <div @click.stop="$emit('goStep', 1)">
+        <div
+          @click.stop="goStep(1)"
+          :class="{
+            disableBtn: IsFollow || IsLookOpen || splitScreenData.isOpen
+          }"
+        >
           <el-tooltip
             class="item"
             effect="dark"
@@ -86,12 +109,10 @@
         <span>刷新</span>
       </div>
     </div> -->
-
   </div>
 </template>
 
 <script>
-
 import workFlowIframe from "./component/workFlowIframe.vue";
 export default {
   emits: [
@@ -169,7 +190,7 @@ export default {
   },
   data() {
     return {
-      isBtn:false,
+      isBtn: false,
       userid: this.$route.query.userid,
       oid: this.$route.query.oid,
       courseId: this.$route.query.courseId,
@@ -195,30 +216,37 @@ export default {
         loading: false
       },
       iframeSrc2: [],
-      canUseCourseId: ['bfbe1913-2f87-11ef-bf55-005056b86db5','3a64b199-d2eb-11ef-a2d1-005056b86db5', 'bb0b1995-0207-11ef-b534-005056b86db5', 'f77921c8-d2f1-11ef-a2d1-005056b86db5']
+      canUseCourseId: [
+        "bfbe1913-2f87-11ef-bf55-005056b86db5",
+        "3a64b199-d2eb-11ef-a2d1-005056b86db5",
+        "bb0b1995-0207-11ef-b534-005056b86db5",
+        "f77921c8-d2f1-11ef-a2d1-005056b86db5"
+      ]
     };
   },
-	computed:{
-		showPopover:{
-			get(){
-				// return this.Annot
-				return (this.splitScreenData.isOpen && this.splitScreenData.uid === this.splitScreenData.myUid);
-			},
-			set(newValue){
-				console.log(newValue)
-
-				// this.AnnotationCanvasShow = newValue
-			}
-		}
-	},
+  computed: {
+    showPopover: {
+      get() {
+        // return this.Annot
+        return (
+          this.splitScreenData.isOpen &&
+          this.splitScreenData.uid === this.splitScreenData.myUid
+        );
+      },
+      set(newValue) {
+        console.log(newValue);
+
+        // this.AnnotationCanvasShow = newValue
+      }
+    }
+  },
   watch: {
     courseType(newValue, oldValue) {
-      this.getAiApp()
-    },
-    taskCount(newValue){
-      this.getAiApp()
+      this.getAiApp();
     },
-
+    taskCount(newValue) {
+      this.getAiApp();
+    }
   },
   mounted() {
     let setting = this.courseDetail.setting;
@@ -282,21 +310,28 @@ export default {
       }
       return lang;
     },
-    getAiApp(){
+    getAiApp() {
       try {
         let _chapters = JSON.parse(this.courseDetail.chapters);
-        let _list = _chapters[this.courseType].chapterInfo[0].taskJson[this.taskCount].chapterData;
-        let _app = _list.find(i=>i.type==15);
-        if(_app){
+        let _list =
+          _chapters[this.courseType].chapterInfo[0].taskJson[this.taskCount]
+            .chapterData;
+        let _app = _list.find(i => i.type == 15);
+        if (_app) {
           _app.src = _app.url;
-          this.iframeSrc2 = [_app]
-        }else{
+          this.iframeSrc2 = [_app];
+        } else {
           this.iframeSrc2 = [];
         }
       } catch (error) {
-        console.log("👉==",error)
+        console.log("👉==", error);
         this.iframeSrc2 = [];
       }
+    },
+    goStep(type) {
+      if (this.IsFollow || this.IsLookOpen || this.splitScreenData.isOpen)
+        return;
+      this.$emit("goStep", type);
     }
   }
 };
@@ -342,6 +377,11 @@ export default {
   flex-direction: column;
 }
 
+.disableBtn {
+  opacity: 0.5;
+  cursor: not-allowed !important;
+}
+
 .ch_nav_box_middle {
   width: 100%;
   box-sizing: border-box;
@@ -398,7 +438,7 @@ export default {
   width: 100%;
   height: 65px;
   display: flex;
-  flex-direction:column;
+  flex-direction: column;
   justify-content: center;
   align-items: center;
   cursor: pointer;