Browse Source

作业管理新增导航栏没有作业提示该任务暂时没提交作业

zengyicheng 1 year ago
parent
commit
f61fd99d9a

+ 14 - 10
src/components/pages/components/classStudentComponents/worksDetail3.vue

@@ -39,7 +39,7 @@
                 >
                   <div
                     class="navTask"
-                    @click="openTask(dy.id, nav.id)"
+                    @click="openTask(dy.id, nav.id, dyIndex, navIndex)"
                     :class="{
                       openTaskActive:
                         nav.id == taskCount &&
@@ -2650,15 +2650,19 @@ export default {
       // this.stageIndex = s;
       this.dyList2[s].isOpen = !this.dyList2[s].isOpen;
     },
-    openTask(s, i) {
-      var a = s + "-" + i;
-      var b = document.getElementById(a);
-      var d = b.getAttribute("scrollindex");
-      var c = document.getElementsByClassName("shuBox")[0];
-      c.scrollTop = parseInt(d) * 375;
-      this.stageIndex = s;
-      this.taskCount = i;
-      this.navId = a;
+    openTask(s, i, dyi, navi) {
+      if (!this.dyList2[dyi].taskList[navi].isWork) {
+        this.$message.warning("该任务暂时没提交作业");
+      } else {
+        var a = s + "-" + i;
+        var b = document.getElementById(a);
+        var d = b.getAttribute("scrollindex");
+        var c = document.getElementsByClassName("shuBox")[0];
+        c.scrollTop = parseInt(d) * 375;
+        this.stageIndex = s;
+        this.taskCount = i;
+        this.navId = a;
+      }
     },
     async generate(a) {
       // 将html文件中需要用到的数据挂载到store上

+ 14 - 10
src/components/pages/components/studentWorksDetail.vue

@@ -257,7 +257,7 @@
                       >
                         <div
                           class="navTask"
-                          @click="openTask(dy.id, nav.id)"
+                          @click="openTask(dy.id, nav.id, dyIndex, navIndex)"
                           :class="{
                             openTaskActive:
                               nav.id == taskCount &&
@@ -3363,15 +3363,19 @@ export default {
       // this.stageIndex = s;
       this.dyList2[s].isOpen = !this.dyList2[s].isOpen;
     },
-    openTask(s, i) {
-      var a = s + "-" + i;
-      var b = document.getElementById(a);
-      var d = b.getAttribute("scrollindex");
-      var c = document.getElementsByClassName("shuBox")[0];
-      c.scrollTop = parseInt(d) * 375;
-      this.stageIndex = s;
-      this.taskCount = i;
-      this.navId = a;
+    openTask(s, i, dyi, navi) {
+      if (!this.dyList2[dyi].taskList[navi].isWork) {
+        this.$message.warning("该任务暂时没提交作业");
+      } else {
+        var a = s + "-" + i;
+        var b = document.getElementById(a);
+        var d = b.getAttribute("scrollindex");
+        var c = document.getElementsByClassName("shuBox")[0];
+        c.scrollTop = parseInt(d) * 375;
+        this.stageIndex = s;
+        this.taskCount = i;
+        this.navId = a;
+      }
     },
     async generate(a) {
       // 将html文件中需要用到的数据挂载到store上

+ 14 - 10
src/components/pages/components/worksDetail2.vue

@@ -255,7 +255,7 @@
                       >
                         <div
                           class="navTask"
-                          @click="openTask(dy.id, nav.id)"
+                          @click="openTask(dy.id, nav.id, dyIndex, navIndex)"
                           :class="{
                             openTaskActive:
                               nav.id == taskCount &&
@@ -3453,15 +3453,19 @@ export default {
       // this.stageIndex = s;
       this.dyList2[s].isOpen = !this.dyList2[s].isOpen;
     },
-    openTask(s, i) {
-      var a = s + "-" + i;
-      var b = document.getElementById(a);
-      var d = b.getAttribute("scrollindex");
-      var c = document.getElementsByClassName("shuBox")[0];
-      c.scrollTop = parseInt(d) * 375;
-      this.stageIndex = s;
-      this.taskCount = i;
-      this.navId = a;
+    openTask(s, i, dyi, navi) {
+      if (!this.dyList2[dyi].taskList[navi].isWork) {
+        this.$message.warning("该任务暂时没提交作业");
+      } else {
+        var a = s + "-" + i;
+        var b = document.getElementById(a);
+        var d = b.getAttribute("scrollindex");
+        var c = document.getElementsByClassName("shuBox")[0];
+        c.scrollTop = parseInt(d) * 375;
+        this.stageIndex = s;
+        this.taskCount = i;
+        this.navId = a;
+      }
     },
     async generate(a) {
       // 将html文件中需要用到的数据挂载到store上

+ 14 - 10
src/components/pages/components/worksDetail3.vue

@@ -39,7 +39,7 @@
                 >
                   <div
                     class="navTask"
-                    @click="openTask(dy.id, nav.id)"
+                    @click="openTask(dy.id, nav.id, dyIndex, navIndex)"
                     :class="{
                       openTaskActive:
                         nav.id == taskCount &&
@@ -2653,15 +2653,19 @@ export default {
       // this.stageIndex = s;
       this.dyList2[s].isOpen = !this.dyList2[s].isOpen;
     },
-    openTask(s, i) {
-      var a = s + "-" + i;
-      var b = document.getElementById(a);
-      var d = b.getAttribute("scrollindex");
-      var c = document.getElementsByClassName("shuBox")[0];
-      c.scrollTop = parseInt(d) * 375;
-      this.stageIndex = s;
-      this.taskCount = i;
-      this.navId = a;
+    openTask(s, i, dyi, navi) {
+      if (!this.dyList2[dyi].taskList[navi].isWork) {
+        this.$message.warning("该任务暂时没提交作业");
+      } else {
+        var a = s + "-" + i;
+        var b = document.getElementById(a);
+        var d = b.getAttribute("scrollindex");
+        var c = document.getElementsByClassName("shuBox")[0];
+        c.scrollTop = parseInt(d) * 375;
+        this.stageIndex = s;
+        this.taskCount = i;
+        this.navId = a;
+      }
     },
     async generate(a) {
       // 将html文件中需要用到的数据挂载到store上

+ 14 - 10
src/components/pages/myReport/components/MyLookComponent/worksDetail3.vue

@@ -39,7 +39,7 @@
                 >
                   <div
                     class="navTask"
-                    @click="openTask(dy.id, nav.id)"
+                    @click="openTask(dy.id, nav.id, dyIndex, navIndex)"
                     :class="{
                       openTaskActive:
                         nav.id == taskCount &&
@@ -2652,15 +2652,19 @@ export default {
       // this.stageIndex = s;
       this.dyList2[s].isOpen = !this.dyList2[s].isOpen;
     },
-    openTask(s, i) {
-      var a = s + "-" + i;
-      var b = document.getElementById(a);
-      var d = b.getAttribute("scrollindex");
-      var c = document.getElementsByClassName("shuBox")[0];
-      c.scrollTop = parseInt(d) * 375;
-      this.stageIndex = s;
-      this.taskCount = i;
-      this.navId = a;
+    openTask(s, i, dyi, navi) {
+      if (!this.dyList2[dyi].taskList[navi].isWork) {
+        this.$message.warning("该任务暂时没提交作业");
+      } else {
+        var a = s + "-" + i;
+        var b = document.getElementById(a);
+        var d = b.getAttribute("scrollindex");
+        var c = document.getElementsByClassName("shuBox")[0];
+        c.scrollTop = parseInt(d) * 375;
+        this.stageIndex = s;
+        this.taskCount = i;
+        this.navId = a;
+      }
     },
     async generate(a) {
       // 将html文件中需要用到的数据挂载到store上