Browse Source

修改样式问题

zengyicheng 2 years ago
parent
commit
ffb01c6304
1 changed files with 119 additions and 79 deletions
  1. 119 79
      src/components/study.vue

+ 119 - 79
src/components/study.vue

@@ -621,7 +621,9 @@
                           >
                             <div v-if="tooC == 1">
                               <img
-                                @click="addTools(tooC, toolIndex,jdIndex, rwIndex)"
+                                @click="
+                                  addTools(tooC, toolIndex, jdIndex, rwIndex)
+                                "
                                 src="../assets/icon/secondToolList/whiteBoard.png"
                                 alt
                               />
@@ -633,7 +635,9 @@
                             </div>
                             <div v-if="tooC == 3">
                               <img
-                                @click="addTools(tooC, toolIndex,jdIndex, rwIndex)"
+                                @click="
+                                  addTools(tooC, toolIndex, jdIndex, rwIndex)
+                                "
                                 src="../assets/icon/secondToolList/mindMapping.png"
                                 alt
                               />
@@ -646,7 +650,9 @@
                             </div>
                             <div v-if="tooC == 6">
                               <img
-                                @click="addTools(tooC, toolIndex,jdIndex, rwIndex)"
+                                @click="
+                                  addTools(tooC, toolIndex, jdIndex, rwIndex)
+                                "
                                 src="../assets/icon/secondToolList/doc.png"
                                 alt
                               />
@@ -659,7 +665,9 @@
                             </div>
                             <div v-if="tooC == 7">
                               <img
-                                @click="addTools(tooC, toolIndex,jdIndex, rwIndex)"
+                                @click="
+                                  addTools(tooC, toolIndex, jdIndex, rwIndex)
+                                "
                                 src="../assets/icon/secondToolList/mindNetwork.png"
                                 alt
                               />
@@ -686,7 +694,9 @@
                             </div>
                             <div v-if="tooC == 2">
                               <img
-                                @click="addTools(tooC, toolIndex,jdIndex, rwIndex)"
+                                @click="
+                                  addTools(tooC, toolIndex, jdIndex, rwIndex)
+                                "
                                 src="../assets/icon/secondToolList/note.png"
                                 alt
                               />
@@ -713,7 +723,9 @@
                             </div>
                             <div v-if="tooC == 32">
                               <img
-                                @click="addTools(tooC, toolIndex,jdIndex, rwIndex)"
+                                @click="
+                                  addTools(tooC, toolIndex, jdIndex, rwIndex)
+                                "
                                 src="../assets/icon/thirdToolList/code.png"
                                 alt
                               />
@@ -725,7 +737,9 @@
                             </div>
                             <div v-if="tooC == 31">
                               <img
-                                @click="addTools(tooC, toolIndex,jdIndex, rwIndex)"
+                                @click="
+                                  addTools(tooC, toolIndex, jdIndex, rwIndex)
+                                "
                                 src="../assets/icon/secondToolList/networkPanel.png"
                                 alt
                               />
@@ -737,7 +751,9 @@
                             </div>
                             <div v-if="tooC == 28">
                               <img
-                                @click="addTools(tooC, toolIndex,jdIndex, rwIndex)"
+                                @click="
+                                  addTools(tooC, toolIndex, jdIndex, rwIndex)
+                                "
                                 src="../assets/icon/secondToolList/translation.png"
                                 alt
                               />
@@ -749,7 +765,9 @@
                             </div>
                             <div v-if="tooC == 37">
                               <img
-                                @click="addTools(tooC, toolIndex,jdIndex, rwIndex)"
+                                @click="
+                                  addTools(tooC, toolIndex, jdIndex, rwIndex)
+                                "
                                 src="../assets/icon/secondToolList/mohe.png"
                                 alt
                               />
@@ -761,7 +779,9 @@
                             </div>
                             <div v-if="tooC == 38">
                               <img
-                                @click="addTools(tooC, toolIndex,jdIndex, rwIndex)"
+                                @click="
+                                  addTools(tooC, toolIndex, jdIndex, rwIndex)
+                                "
                                 src="../assets/icon/secondToolList/24game.png"
                                 alt
                               />
@@ -773,7 +793,9 @@
                             </div>
                             <div v-if="tooC == 39">
                               <img
-                                @click="addTools(tooC, toolIndex,jdIndex, rwIndex)"
+                                @click="
+                                  addTools(tooC, toolIndex, jdIndex, rwIndex)
+                                "
                                 src="../assets/icon/secondToolList/GeoGebra.png"
                                 alt
                               />
@@ -785,7 +807,9 @@
                             </div>
                             <div v-if="tooC == 4">
                               <img
-                                @click="addTools(tooC, toolIndex,jdIndex, rwIndex)"
+                                @click="
+                                  addTools(tooC, toolIndex, jdIndex, rwIndex)
+                                "
                                 src="../assets/icon/thirdToolList/ask.png"
                                 alt
                               />
@@ -869,7 +893,9 @@
                             </div> -->
                             <div v-if="tooC == 10">
                               <img
-                                @click="addTools(tooC, toolIndex,jdIndex, rwIndex)"
+                                @click="
+                                  addTools(tooC, toolIndex, jdIndex, rwIndex)
+                                "
                                 src="../assets/icon/thirdToolList/time.png"
                                 alt
                               />
@@ -914,7 +940,9 @@
                             </div>
                             <div v-if="tooC == 26">
                               <img
-                                @click="addTools(tooC, toolIndex,jdIndex, rwIndex)"
+                                @click="
+                                  addTools(tooC, toolIndex, jdIndex, rwIndex)
+                                "
                                 src="../assets/icon/thirdToolList/courseDesign.png"
                                 alt
                               />
@@ -927,7 +955,9 @@
                             </div>
                             <div v-if="tooC == 18">
                               <img
-                                @click="addTools(tooC, toolIndex,jdIndex, rwIndex)"
+                                @click="
+                                  addTools(tooC, toolIndex, jdIndex, rwIndex)
+                                "
                                 src="../assets/icon/thirdToolList/trainPlatform.png"
                                 alt
                               />
@@ -939,7 +969,9 @@
                             </div>
                             <div v-if="tooC == 16">
                               <img
-                                @click="addTools(tooC, toolIndex,jdIndex, rwIndex)"
+                                @click="
+                                  addTools(tooC, toolIndex, jdIndex, rwIndex)
+                                "
                                 src="../assets/icon/thirdToolList/work.png"
                                 alt
                               />
@@ -949,7 +981,9 @@
                             </div>
                             <div v-if="tooC == 21">
                               <img
-                                @click="addTools(tooC, toolIndex,jdIndex, rwIndex)"
+                                @click="
+                                  addTools(tooC, toolIndex, jdIndex, rwIndex)
+                                "
                                 src="../assets/icon/fourthToolList/program.png"
                                 alt
                               />
@@ -961,7 +995,9 @@
                             </div>
                             <div v-if="tooC == 22">
                               <img
-                                @click="addTools(tooC, toolIndex,jdIndex, rwIndex)"
+                                @click="
+                                  addTools(tooC, toolIndex, jdIndex, rwIndex)
+                                "
                                 src="../assets/icon/fourthToolList/AIprogram2.png"
                                 alt
                               />
@@ -973,7 +1009,9 @@
                             </div>
                             <div v-if="tooC == 23">
                               <img
-                                @click="addTools(tooC, toolIndex,jdIndex, rwIndex)"
+                                @click="
+                                  addTools(tooC, toolIndex, jdIndex, rwIndex)
+                                "
                                 src="../assets/icon/fourthToolList/Pythonprogram.png"
                                 alt
                               />
@@ -985,7 +1023,9 @@
                             </div>
                             <div v-if="tooC == 24">
                               <img
-                                @click="addTools(tooC, toolIndex,jdIndex, rwIndex)"
+                                @click="
+                                  addTools(tooC, toolIndex, jdIndex, rwIndex)
+                                "
                                 src="../assets/icon/fourthToolList/program.png"
                                 alt
                               />
@@ -997,7 +1037,9 @@
                             </div>
                             <div v-if="tooC == 40">
                               <img
-                                @click="addTools(tooC, toolIndex,jdIndex, rwIndex)"
+                                @click="
+                                  addTools(tooC, toolIndex, jdIndex, rwIndex)
+                                "
                                 src="../assets/icon/secondToolList/eval.png"
                                 alt
                               />
@@ -1007,7 +1049,9 @@
                             </div>
                             <div v-if="tooC == 41">
                               <img
-                                @click="addTools(tooC, toolIndex,jdIndex, rwIndex)"
+                                @click="
+                                  addTools(tooC, toolIndex, jdIndex, rwIndex)
+                                "
                                 src="../assets/icon/thirdToolList/select.png"
                                 alt
                               />
@@ -1200,6 +1244,7 @@
                               width: 200px;
                               height: 140px;
                               border-radius: 10px;
+                              margin: 10px 10px 10px 0;
                               box-shadow: 0 0 6px 1px #dfdada;
                               overflow: hidden;
                             "
@@ -5149,18 +5194,18 @@ export default {
       }
       window.open(url);
     },
-    addTools(t, i, jdIndex,index) {
+    addTools(t, i, jdIndex, index) {
       var a = 0;
       this.courseType = jdIndex;
       this.taskCount = index;
       this.toolindex = i;
       if (t == 1) {
         if (this.wbCount > 0) {
-          this.updateCount(this.wbCount, t,jdIndex);
+          this.updateCount(this.wbCount, t, jdIndex);
         } else {
           this.wbCount++;
           a = this.wbCount;
-          this.toolsCount(a, t,jdIndex);
+          this.toolsCount(a, t, jdIndex);
         }
         // window.parent.postMessage(
         //   {
@@ -5174,20 +5219,20 @@ export default {
         // );
       } else if (t == 2) {
         if (this.wordCount > 0) {
-          this.updateCount(this.wordCount, t,jdIndex);
+          this.updateCount(this.wordCount, t, jdIndex);
         } else {
           this.wordCount++;
           a = this.wordCount;
-          this.toolsCount(a, t,jdIndex);
+          this.toolsCount(a, t, jdIndex);
         }
         window.parent.postMessage({ tools: "2" }, "*");
       } else if (t == 3) {
         if (this.mindCount > 0) {
-          this.updateCount(this.mindCount, t,jdIndex);
+          this.updateCount(this.mindCount, t, jdIndex);
         } else {
           this.mindCount++;
           a = this.mindCount;
-          this.toolsCount(a, t,jdIndex,jdIndex);
+          this.toolsCount(a, t, jdIndex, jdIndex);
         }
         window.parent.postMessage(
           {
@@ -5204,11 +5249,11 @@ export default {
         this.noteName = "";
         this.isAnswer = false;
         if (this.askCount > 0) {
-          this.updateCount(this.askCount, t,jdIndex);
+          this.updateCount(this.askCount, t, jdIndex);
         } else {
           this.askCount++;
           a = this.askCount;
-          this.toolsCount(a, t,jdIndex,jdIndex);
+          this.toolsCount(a, t, jdIndex, jdIndex);
         }
         if (!this.dialogVisible2) {
           this.askJson.askJson =
@@ -5233,21 +5278,21 @@ export default {
         // window.parent.postMessage({ tools: "4" }, "*");
       } else if (t == 5) {
         if (this.scoreCount > 0) {
-          this.updateCount(this.scoreCount, t,jdIndex);
+          this.updateCount(this.scoreCount, t, jdIndex);
         } else {
           this.scoreCount++;
           a = this.scoreCount;
-          this.toolsCount(a, t,jdIndex);
+          this.toolsCount(a, t, jdIndex);
         }
         this.dialogVisible4 = true;
         // window.parent.postMessage({ tools: "5" }, "*");
       } else if (t == 6) {
         if (this.noteCount > 0) {
-          this.updateCount(this.noteCount, t,jdIndex);
+          this.updateCount(this.noteCount, t, jdIndex);
         } else {
           this.noteCount++;
           a = this.noteCount;
-          this.toolsCount(a, t,jdIndex);
+          this.toolsCount(a, t, jdIndex);
         }
         window.parent.postMessage(
           {
@@ -5261,11 +5306,11 @@ export default {
         );
       } else if (t == 7) {
         if (this.mindNetWorkCount > 0) {
-          this.updateCount(this.mindNetWorkCount, t,jdIndex);
+          this.updateCount(this.mindNetWorkCount, t, jdIndex);
         } else {
           this.mindNetWorkCount++;
           a = this.mindNetWorkCount;
-          this.toolsCount(a, t,jdIndex);
+          this.toolsCount(a, t, jdIndex);
         }
         window.parent.postMessage(
           {
@@ -5279,61 +5324,61 @@ export default {
         );
       } else if (t == 16) {
         if (this.workCount > 0) {
-          this.updateCount(this.workCount, t,jdIndex);
+          this.updateCount(this.workCount, t, jdIndex);
         } else {
           this.workCount++;
           a = this.workCount;
-          this.toolsCount(a, t,jdIndex);
+          this.toolsCount(a, t, jdIndex);
         }
         this.dialogVisible = true;
       } else if (t == 8) {
         if (this.libraryCount > 0) {
-          this.updateCount(this.libraryCount, t,jdIndex);
+          this.updateCount(this.libraryCount, t, jdIndex);
         } else {
           this.libraryCount++;
           a = this.libraryCount;
-          this.toolsCount(a, t,jdIndex);
+          this.toolsCount(a, t, jdIndex);
         }
         window.parent.postMessage({ tools: "8" }, "*");
       } else if (t == 17) {
         if (this.libraryCount > 0) {
-          this.updateCount(this.libraryCount, t,jdIndex);
+          this.updateCount(this.libraryCount, t, jdIndex);
         } else {
           this.libraryCount++;
           a = this.libraryCount;
-          this.toolsCount(a, t,jdIndex);
+          this.toolsCount(a, t, jdIndex);
         }
         window.parent.postMessage({ tools: "17" }, "*");
       } else if (t == 18) {
         if (this.trainCount > 0) {
-          this.updateCount(this.trainCount, t,jdIndex);
+          this.updateCount(this.trainCount, t, jdIndex);
         } else {
           this.trainCount++;
           a = this.trainCount;
-          this.toolsCount(a, t,jdIndex);
+          this.toolsCount(a, t, jdIndex);
         }
         window.parent.postMessage({ tools: "18" }, "*");
       } else if (t == 10) {
         if (this.timeCount > 0) {
-          this.updateCount(this.timeCount, t,jdIndex);
+          this.updateCount(this.timeCount, t, jdIndex);
         } else {
           this.timeCount++;
           a = this.timeCount;
-          this.toolsCount(a, t,jdIndex);
+          this.toolsCount(a, t, jdIndex);
         }
         this.timeDialogVisible = true;
       } else if (t == 15) {
         this.answerQ = "";
         this.questionAnswer = "";
         if (this.answerCount > 0) {
-          this.updateCount(this.answerCount, t,jdIndex);
+          this.updateCount(this.answerCount, t, jdIndex);
         } else {
           this.answerCount++;
           a = this.answerCount;
-          this.toolsCount(a, t,jdIndex);
+          this.toolsCount(a, t, jdIndex);
         }
-        this.answerQ = this.chapInfoList[jdIndex].chapterInfo[0]
-          .taskJson[index].toolChoose[i].answerQ
+        this.answerQ = this.chapInfoList[jdIndex].chapterInfo[0].taskJson[index]
+          .toolChoose[i].answerQ
           ? this.chapInfoList[jdIndex].chapterInfo[0].taskJson[index]
               .toolChoose[i].answerQ
           : "";
@@ -5359,11 +5404,11 @@ export default {
         );
       } else if (t == 40) {
         if (this.evalCount > 0) {
-          this.updateCount(this.evalCount, t,jdIndex);
+          this.updateCount(this.evalCount, t, jdIndex);
         } else {
           this.evalCount++;
           a = this.evalCount;
-          this.toolsCount(a, t,jdIndex);
+          this.toolsCount(a, t, jdIndex);
         }
         if (this.worksStudent[jdIndex][index][i].length) {
           for (
@@ -5371,10 +5416,7 @@ export default {
             k < this.worksStudent[jdIndex][index][i].length;
             k++
           ) {
-            if (
-              this.userid ==
-              this.worksStudent[jdIndex][index][i][k].userid
-            ) {
+            if (this.userid == this.worksStudent[jdIndex][index][i][k].userid) {
               this.eScore = JSON.parse(
                 this.worksStudent[jdIndex][index][i][k].works
               );
@@ -5400,13 +5442,13 @@ export default {
         this.isStar = false;
         this.studentEvalDialogVisible = true;
       } else if (t == 41) {
-        this.selectJson = this.chapInfoList[jdIndex].chapterInfo[0]
-          .taskJson[index].toolChoose[i].selectJson
+        this.selectJson = this.chapInfoList[jdIndex].chapterInfo[0].taskJson[
+          index
+        ].toolChoose[i].selectJson
           ? JSON.parse(
               JSON.stringify(
-                this.chapInfoList[jdIndex].chapterInfo[0].taskJson[
-                  index
-                ].toolChoose[i].selectJson
+                this.chapInfoList[jdIndex].chapterInfo[0].taskJson[index]
+                  .toolChoose[i].selectJson
               )
             )
           : { url: "", select: [], answer: [] };
@@ -5416,14 +5458,8 @@ export default {
             k < this.worksStudent[jdIndex][index][i].length;
             k++
           ) {
-            if (
-              this.userid ==
-              this.worksStudent[jdIndex][index][i][k].userid
-            ) {
-              var a =
-                this.worksStudent[jdIndex][index][i][k].works.split(
-                  ","
-                );
+            if (this.userid == this.worksStudent[jdIndex][index][i][k].userid) {
+              var a = this.worksStudent[jdIndex][index][i][k].works.split(",");
               for (var ki = 0; ki < a.length; ki++) {
                 a[ki] = parseInt(a[ki]);
               }
@@ -5499,7 +5535,7 @@ export default {
         ].rateJson;
       this.studentEvalDialogVisible = true;
     },
-    toolsCount(a, t,jdIndex) {
+    toolsCount(a, t, jdIndex) {
       let params = {
         cid: this.id,
         chid: jdIndex,
@@ -5516,7 +5552,7 @@ export default {
           console.error(err);
         });
     },
-    updateCount(c, t,jdIndex) {
+    updateCount(c, t, jdIndex) {
       c++;
       let params = {
         cid: this.id,
@@ -7785,8 +7821,10 @@ export default {
 .newDialogCss {
   position: fixed;
   right: 7%;
-  top: 19%;
+  top: 50%;
   width: 340px;
+  transform: translateY(-50%);
+  height: 60%;
 }
 .pzTop {
   color: #fff;
@@ -7813,7 +7851,7 @@ export default {
   height: 100%;
 }
 .pzBox {
-  height: 650px;
+  height: 100%;
   background: #ededed;
   border-radius: 0 0 15px 15px;
 }
@@ -7849,7 +7887,7 @@ export default {
 }
 .pzListBox {
   padding-top: 15px;
-  height: calc(550px - 15px);
+  height: calc(100% - 60px);
   overflow: auto;
 }
 .addPz {
@@ -7858,7 +7896,7 @@ export default {
   color: #fff;
   font-size: 12px;
   height: 30px;
-  margin: 30px auto 0;
+  margin: 0 auto;
   text-align: center;
   line-height: 30px;
   border-radius: 10px;
@@ -7867,8 +7905,10 @@ export default {
 .addDialogCss {
   position: fixed;
   right: 37%;
-  top: 30%;
+  top: 50%;
   width: 600px;
+  transform: translateY(-50%);
+  height: 60%;
 }
 .teacherPz {
   display: flex;
@@ -7885,7 +7925,7 @@ export default {
   height: 100%;
 }
 .addPzBox {
-  height: 450px;
+  height: 100%;
   background: #ededed;
 }
 .pzConText {
@@ -7903,7 +7943,7 @@ export default {
   color: #fff;
   line-height: 30px;
   border-radius: 10px;
-  margin: 15px auto 0;
+  margin: 10px auto 0;
   cursor: pointer;
 }
 .pzConText:focus-visible {