lsc 2 years ago
parent
commit
fdd25e19b5

+ 1 - 1
dist/index.html

@@ -18,7 +18,7 @@
       border-radius: 10px;
       -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
       background-color: rgba(0, 0, 0, 0.1);
-    }</style><link href=./static/css/app.9817d27ccafa8bcf462ad58ce8ed8863.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.e81042531bab735dba9a.js></script><script type=text/javascript src=./static/js/app.14bc8bb5552ea257a238.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.8d675debefdc0b61a4a6910e024db287.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.e81042531bab735dba9a.js></script><script type=text/javascript src=./static/js/app.c79f9705cd59e17e44b6.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.8d675debefdc0b61a4a6910e024db287.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.8d675debefdc0b61a4a6910e024db287.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.14bc8bb5552ea257a238.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.c79f9705cd59e17e44b6.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.c79f9705cd59e17e44b6.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


+ 77 - 29
src/components/easy2/studyStudent.vue

@@ -99,7 +99,8 @@
                                                 box-shadow: 0px 9px 0 0 #f2f2f2;
                                               " :class="{ navLeftCss: !mlDialog }">
           <div class="courseIndex">
-            <div v-show="chapInfoList[courseType].chapterInfo[0].taskJson[taskCount].task">{{chapInfoList[courseType].chapterInfo[0].taskJson[taskCount].task}}</div>
+            <div v-show="chapInfoList[courseType].chapterInfo[0].taskJson[taskCount].task">
+              {{ chapInfoList[courseType].chapterInfo[0].taskJson[taskCount].task }}</div>
             <!-- <el-tooltip effect="light" :content="chapInfoList[courseType].dyName" placement="top">
               <div>{{ chapInfoList[courseType].dyName }}</div>
             </el-tooltip> -->
@@ -836,7 +837,8 @@
                   <div class="bzBox">
                     <div></div>
                     <div>步骤{{ toolIndex + 1 }}</div>
-                    <div style="margin: 0 72px 0 auto;" v-if="courseDetail.userid == userid"><el-button type="primary" size="mini" @click="updateToolDetail">{{!isUpdateToolDetail ? '编辑' : '确认修改'}}</el-button>
+                    <div style="margin: 0 72px 0 auto;" v-if="courseDetail.userid == userid"><el-button type="primary"
+                        size="mini" @click="updateToolDetail">{{ !isUpdateToolDetail ? '编辑' : '确认修改' }}</el-button>
                     </div>
                   </div>
 
@@ -1067,9 +1069,11 @@
                     </div>
                     <div class="tooldetail">
                       <!-- <div class="toolTitle">工具描述</div> -->
-                      <div style="height:100%" v-html="contentConvent(tool.toolDetail ? tool.toolDetail : '暂无描述')" v-if="!isUpdateToolDetail"  @click="updateToolDetail"></div>
+                      <div style="height:100%" v-html="contentConvent(tool.toolDetail ? tool.toolDetail : '暂无描述')"
+                        v-if="!isUpdateToolDetail" @click="updateToolDetail"></div>
                       <div v-else>
-                        <el-input type="textarea" :rows="3" resize="none" v-model="updateToolDetailInner" placeholder="请输入任务描述"></el-input>
+                        <el-input type="textarea" :rows="3" resize="none" v-model="updateToolDetailInner"
+                          placeholder="请输入任务描述"></el-input>
                       </div>
                     </div>
                     <el-button type="primary" v-if="tool.tool[0] == 32" style="
@@ -1078,12 +1082,12 @@
                                                             transform: translateY(-130%);
                                                           " @click="addImg($event)">上传作业<input type="file" accept="*"
                         style="display: none" @change="beforeUpload1($event, 7, toolIndex)" /></el-button>
-                    <el-button type="primary" v-if="tool.tool[0] == 57" style="
+                    <!-- <el-button type="primary" v-if="tool.tool[0] == 57" style="
                                                             position: absolute;
                                                             right: 30px;
                                                             transform: translateY(-130%);
                                                           " @click="addImg($event)">上传作业<input type="file" accept="*"
-                        style="display: none" @change="beforeUpload1($event, 8, toolIndex)" /></el-button>
+                        style="display: none" @change="beforeUpload1($event, 8, toolIndex)" /></el-button> -->
                   </div>
                 </div>
               </div>
@@ -1342,7 +1346,9 @@
                                                             " v-for="(w, wIndex) in worksTeacher[toolIndex]"
                       :key="wIndex" :class="w.type == 1 ? 'isTypeOne' : ''">
                       <div class="workImg">
-                        <img :src="word2" @click="downloadFile(w.works)" alt />
+                        <img :src="word2" @click="downloadFile(w.works)" v-if="w.type == 12" alt />
+                        <img :src="word2" @click="openCocoPi(57, toolIndex, w.userid, w.sName)" v-else-if="w.type == 15"
+                          alt />
                         <div class="answerScore" v-if="w.score" @click.stop="openScore(w)" :class="{
                           rightW:
                             w.userid == userid ||
@@ -2589,7 +2595,9 @@
                                                               : worksStudent2[toolIndex].slice(0, 6)" :key="wIndex"
                       :class="w.type == 1 ? 'isTypeOne' : ''">
                       <div class="workImg">
-                        <img :src="word2" @click="downloadFile(w.works)" alt />
+                        <img :src="word2" @click="downloadFile(w.works)" v-if="w.type == 12" alt />
+                        <img :src="word2" @click="openCocoPi(57, toolIndex, w.userid, w.sName)" v-else-if="w.type == 15"
+                          alt />
                         <div class="answerScore" v-if="w.score" @click.stop="openScore(w)" :class="{
                           rightW:
                             w.userid == userid ||
@@ -4333,6 +4341,11 @@
           <img src="../../assets/icon/codeFile.png" />
           <div>点击下载文件</div>
         </div>
+        <div class="worksAnswer codeFileBox" v-if="commentDetail.works && commentDetail.type == 15"
+          @click="openCocoPi(15, commentIndexJson.toolIndex, commentDetail.userid, commentDetail.sName)">
+          <img src="../../assets/icon/codeFile.png" />
+          <div>点击打开CocoPi</div>
+        </div>
         <div class="worksAnswer" v-if="commentDetail.works && commentDetail.type == 13">
           <div v-html="JSON.parse(commentDetail.works).text"></div>
         </div>
@@ -4709,6 +4722,11 @@
           <img src="../../assets/icon/codeFile.png" />
           <div>点击下载文件</div>
         </div>
+        <div class="worksAnswer codeFileBox" v-if="commentDetail.works && commentDetail.type == 15"
+          @click="openCocoPi(15, commentIndexJson.toolIndex, commentDetail.userid, commentDetail.sName)">
+          <img src="../../assets/icon/codeFile.png" />
+          <div>点击打开CocoPi</div>
+        </div>
         <div class="worksAnswer" v-if="commentDetail.works && commentDetail.type == 13">
           <div v-html="JSON.parse(commentDetail.works).text"></div>
         </div>
@@ -5853,8 +5871,8 @@ export default {
       toolType: 0,
       checktoolArray: [],
       vChapterData: [],
-      isUpdateToolDetail:false,
-      updateToolDetailInner:''
+      isUpdateToolDetail: false,
+      updateToolDetailInner: ''
     };
   },
   methods: {
@@ -6407,7 +6425,7 @@ export default {
     },
     addCourseWorksTeacher(i) {
       var typesql;
-      if (this.sTool == 32 || this.sTool == 57) {
+      if (this.sTool == 32) {
         this.addCourseWorksGongTeacher(this.toolindex, this.studyJuri[0].cover[0].url, this.sTool);
         return;
       }
@@ -7648,8 +7666,8 @@ export default {
                   }
                   this.worksStudent[i].push(_works);
                   this.isWorksS[i].push({ uid: b[j].userid, sName: b[j].name });
-                } else if (a[i].tool[0] == 57 && b[j].atool == 57) {
-                  let _works = {
+                } else if (a[i].tool[0] == 57 && b[j].atool == 57 && b[j].type == 12) {
+                  _worksStudent[i].push({
                     userid: b[j].userid,
                     ateacher: b[j].ateacher,
                     wid: b[j].id,
@@ -7663,13 +7681,24 @@ export default {
                     commentCount: commentCount,
                     isLikes: isLikes,
                     commentJson: commentJson,
-                  }
-                  if (b[j].ttype == 1) {
-                    this.worksTeacher[i].push(_works);
-                  } else {
-                    this.worksStudent2[i].push(_works);
-                  }
-                  this.worksStudent[i].push(_works);
+                  });
+                  this.isWorksS[i].push({ uid: b[j].userid, sName: b[j].name });
+                } else if (a[i].tool[0] == 57 && b[j].atool == 57 && b[j].type == 15) {
+                  _worksStudent[i].push({
+                    userid: b[j].userid,
+                    ateacher: b[j].ateacher,
+                    wid: b[j].id,
+                    works: b[j].content,
+                    sName: b[j].name ? b[j].name : b[j].userid,
+                    type: 15,
+                    time: b[j].time,
+                    score: b[j].score,
+                    img: b[j].img,
+                    likesCount: likesCount,
+                    commentCount: commentCount,
+                    isLikes: isLikes,
+                    commentJson: commentJson,
+                  });
                   this.isWorksS[i].push({ uid: b[j].userid, sName: b[j].name });
                 }
               }
@@ -10397,7 +10426,7 @@ export default {
       if (this.tType !== "1" && this.tType !== "4") {
         return;
       }
-      if (t == 16 || t == 32 || t == 57 || t == 50) {
+      if (t == 16 || t == 32 || t == 50) {
         this.dialogVisibleWorks = true; //作业提交
       } else if (t == 15) {
         this.answerQ = this.chapInfoList[this.courseType].chapterInfo[0]
@@ -10580,7 +10609,7 @@ export default {
 
         this.isStar = false;
         this.studentEvalDialogVisibleTeacher = true;
-      } else if (t == 3 || t == 1 || t == 7) {
+      } else if (t == 3 || t == 1 || t == 7 || t == 57) {
         window.parent.postMessage(
           {
             tools: t + 'teacher',
@@ -10594,6 +10623,25 @@ export default {
         );
       }
     },
+    openCocoPi(tool, i, uid, uname) {
+      let student = {
+        userid: uid,
+        student: uname,
+      }
+      if (tool == 57) {
+        window.parent.postMessage(
+          {
+            tools: tool + "teacher",
+            cid: this.id,
+            stage: this.courseType,
+            task: this.taskCount,
+            tool: i,
+            student: student,
+          },
+          "*"
+        );
+      }
+    },
     setRightAnswer(s, i, j) {
       for (var q = 0; q < this.sentenceList[i].chooseSenList.length; q++) {
         if (
@@ -11427,18 +11475,18 @@ export default {
           });
           this.checktoolArray = []
           this.getCourseDetail(3)
-          this.checkBz(this.chapInfoList[this.courseType].chapterInfo[0].taskJson[this.taskCount].toolChoose.length-1)
+          this.checkBz(this.chapInfoList[this.courseType].chapterInfo[0].taskJson[this.taskCount].toolChoose.length - 1)
           this.$forceUpdate()
         })
         .catch((err) => {
           console.error(err);
         });
     },
-    updateToolDetail(){
-      if(!this.isUpdateToolDetail){
+    updateToolDetail() {
+      if (!this.isUpdateToolDetail) {
         this.isUpdateToolDetail = true
         this.updateToolDetailInner = JSON.parse(JSON.stringify(this.tool.toolDetail))
-      }else{
+      } else {
         this.chapInfoList[this.courseType].chapterInfo[0].taskJson[this.taskCount].toolChoose[this.toolIndex].toolDetail = JSON.parse(JSON.stringify(this.updateToolDetailInner))
         let params = [
           {
@@ -11464,7 +11512,7 @@ export default {
             console.error(err);
           });
       }
-     
+
     },
   },
   directives: {
@@ -14292,6 +14340,7 @@ export default {
 ol {
   margin: 10px 0 10px 20px;
 }
+
 .addPzCheck {
   display: flex;
   flex-direction: row;
@@ -15104,5 +15153,4 @@ ol {
 .check img {
   width: 20px;
   height: 20px;
-}
-</style>
+}</style>

+ 77 - 29
src/components/easy3/studyStudent.vue

@@ -99,7 +99,8 @@
                                                 box-shadow: 0px 9px 0 0 #f2f2f2;
                                               " :class="{ navLeftCss: !mlDialog }">
           <div class="courseIndex">
-            <div v-show="chapInfoList[courseType].chapterInfo[0].taskJson[taskCount].task">{{chapInfoList[courseType].chapterInfo[0].taskJson[taskCount].task}}</div>
+            <div v-show="chapInfoList[courseType].chapterInfo[0].taskJson[taskCount].task">
+              {{ chapInfoList[courseType].chapterInfo[0].taskJson[taskCount].task }}</div>
             <!-- <el-tooltip effect="light" :content="chapInfoList[courseType].dyName" placement="top">
               <div>{{ chapInfoList[courseType].dyName }}</div>
             </el-tooltip> -->
@@ -834,7 +835,8 @@
                   <div class="bzBox">
                     <div></div>
                     <div>步骤{{ toolIndex + 1 }}</div>
-                    <div style="margin: 0 72px 0 auto;" v-if="courseDetail.userid == userid"><el-button type="primary" size="mini" @click="updateToolDetail">{{!isUpdateToolDetail ? '编辑' : '确认修改'}}</el-button>
+                    <div style="margin: 0 72px 0 auto;" v-if="courseDetail.userid == userid"><el-button type="primary"
+                        size="mini" @click="updateToolDetail">{{ !isUpdateToolDetail ? '编辑' : '确认修改' }}</el-button>
                     </div>
                   </div>
 
@@ -1065,9 +1067,11 @@
                     </div>
                     <div class="tooldetail">
                       <!-- <div class="toolTitle">工具描述</div> -->
-                      <div style="height:100%" v-html="contentConvent(tool.toolDetail ? tool.toolDetail : '暂无描述')" v-if="!isUpdateToolDetail"  @click="updateToolDetail"></div>
+                      <div style="height:100%" v-html="contentConvent(tool.toolDetail ? tool.toolDetail : '暂无描述')"
+                        v-if="!isUpdateToolDetail" @click="updateToolDetail"></div>
                       <div v-else>
-                        <el-input type="textarea" :rows="3" resize="none" v-model="updateToolDetailInner" placeholder="请输入任务描述"></el-input>
+                        <el-input type="textarea" :rows="3" resize="none" v-model="updateToolDetailInner"
+                          placeholder="请输入任务描述"></el-input>
                       </div>
                     </div>
                     <el-button type="primary" v-if="tool.tool[0] == 32" style="
@@ -1076,12 +1080,12 @@
                                                             transform: translateY(-130%);
                                                           " @click="addImg($event)">上传作业<input type="file" accept="*"
                         style="display: none" @change="beforeUpload1($event, 7, toolIndex)" /></el-button>
-                    <el-button type="primary" v-if="tool.tool[0] == 57" style="
+                    <!-- <el-button type="primary" v-if="tool.tool[0] == 57" style="
                                                             position: absolute;
                                                             right: 30px;
                                                             transform: translateY(-130%);
                                                           " @click="addImg($event)">上传作业<input type="file" accept="*"
-                        style="display: none" @change="beforeUpload1($event, 8, toolIndex)" /></el-button>
+                        style="display: none" @change="beforeUpload1($event, 8, toolIndex)" /></el-button> -->
                   </div>
                 </div>
               </div>
@@ -1340,7 +1344,9 @@
                                                             " v-for="(w, wIndex) in worksTeacher[toolIndex]"
                       :key="wIndex" :class="w.type == 1 ? 'isTypeOne' : ''">
                       <div class="workImg">
-                        <img :src="word2" @click="downloadFile(w.works)" alt />
+                        <img :src="word2" @click="downloadFile(w.works)" v-if="w.type == 12" alt />
+                        <img :src="word2" @click="openCocoPi(57, toolIndex, w.userid, w.sName)" v-else-if="w.type == 15"
+                          alt />
                         <div class="answerScore" v-if="w.score" @click.stop="openScore(w)" :class="{
                           rightW:
                             w.userid == userid ||
@@ -2587,7 +2593,9 @@
                                                               : worksStudent2[toolIndex].slice(0, 6)" :key="wIndex"
                       :class="w.type == 1 ? 'isTypeOne' : ''">
                       <div class="workImg">
-                        <img :src="word2" @click="downloadFile(w.works)" alt />
+                        <img :src="word2" @click="downloadFile(w.works)" v-if="w.type == 12" alt />
+                        <img :src="word2" @click="openCocoPi(57, toolIndex, w.userid, w.sName)" v-else-if="w.type == 15"
+                          alt />
                         <div class="answerScore" v-if="w.score" @click.stop="openScore(w)" :class="{
                           rightW:
                             w.userid == userid ||
@@ -4331,6 +4339,11 @@
           <img src="../../assets/icon/codeFile.png" />
           <div>点击下载文件</div>
         </div>
+        <div class="worksAnswer codeFileBox" v-if="commentDetail.works && commentDetail.type == 15"
+          @click="openCocoPi(15, commentIndexJson.toolIndex, commentDetail.userid, commentDetail.sName)">
+          <img src="../../assets/icon/codeFile.png" />
+          <div>点击打开CocoPi</div>
+        </div>
         <div class="worksAnswer" v-if="commentDetail.works && commentDetail.type == 13">
           <div v-html="JSON.parse(commentDetail.works).text"></div>
         </div>
@@ -4707,6 +4720,11 @@
           <img src="../../assets/icon/codeFile.png" />
           <div>点击下载文件</div>
         </div>
+        <div class="worksAnswer codeFileBox" v-if="commentDetail.works && commentDetail.type == 15"
+          @click="openCocoPi(15, commentIndexJson.toolIndex, commentDetail.userid, commentDetail.sName)">
+          <img src="../../assets/icon/codeFile.png" />
+          <div>点击打开CocoPi</div>
+        </div>
         <div class="worksAnswer" v-if="commentDetail.works && commentDetail.type == 13">
           <div v-html="JSON.parse(commentDetail.works).text"></div>
         </div>
@@ -5851,8 +5869,8 @@ export default {
       toolType: 0,
       checktoolArray: [],
       vChapterData: [],
-      isUpdateToolDetail:false,
-      updateToolDetailInner:''
+      isUpdateToolDetail: false,
+      updateToolDetailInner: ''
     };
   },
   methods: {
@@ -6405,7 +6423,7 @@ export default {
     },
     addCourseWorksTeacher(i) {
       var typesql;
-      if (this.sTool == 32 || this.sTool == 57) {
+      if (this.sTool == 32) {
         this.addCourseWorksGongTeacher(this.toolindex, this.studyJuri[0].cover[0].url, this.sTool);
         return;
       }
@@ -7646,8 +7664,8 @@ export default {
                   }
                   this.worksStudent[i].push(_works);
                   this.isWorksS[i].push({ uid: b[j].userid, sName: b[j].name });
-                } else if (a[i].tool[0] == 57 && b[j].atool == 57) {
-                  let _works = {
+                } else if (a[i].tool[0] == 57 && b[j].atool == 57 && b[j].type == 12) {
+                  _worksStudent[i].push({
                     userid: b[j].userid,
                     ateacher: b[j].ateacher,
                     wid: b[j].id,
@@ -7661,13 +7679,24 @@ export default {
                     commentCount: commentCount,
                     isLikes: isLikes,
                     commentJson: commentJson,
-                  }
-                  if (b[j].ttype == 1) {
-                    this.worksTeacher[i].push(_works);
-                  } else {
-                    this.worksStudent2[i].push(_works);
-                  }
-                  this.worksStudent[i].push(_works);
+                  });
+                  this.isWorksS[i].push({ uid: b[j].userid, sName: b[j].name });
+                } else if (a[i].tool[0] == 57 && b[j].atool == 57 && b[j].type == 15) {
+                  _worksStudent[i].push({
+                    userid: b[j].userid,
+                    ateacher: b[j].ateacher,
+                    wid: b[j].id,
+                    works: b[j].content,
+                    sName: b[j].name ? b[j].name : b[j].userid,
+                    type: 15,
+                    time: b[j].time,
+                    score: b[j].score,
+                    img: b[j].img,
+                    likesCount: likesCount,
+                    commentCount: commentCount,
+                    isLikes: isLikes,
+                    commentJson: commentJson,
+                  });
                   this.isWorksS[i].push({ uid: b[j].userid, sName: b[j].name });
                 }
               }
@@ -10264,7 +10293,7 @@ export default {
       if (this.tType !== "1" && this.tType !== "4") {
         return;
       }
-      if (t == 16 || t == 32 || t == 57 || t == 50) {
+      if (t == 16 || t == 32 || t == 50) {
         this.dialogVisibleWorks = true; //作业提交
       } else if (t == 15) {
         this.answerQ = this.chapInfoList[this.courseType].chapterInfo[0]
@@ -10447,7 +10476,7 @@ export default {
 
         this.isStar = false;
         this.studentEvalDialogVisibleTeacher = true;
-      } else if (t == 3 || t == 1 || t == 7) {
+      } else if (t == 3 || t == 1 || t == 7 || t == 57) {
         window.parent.postMessage(
           {
             tools: t + 'teacher',
@@ -10461,6 +10490,25 @@ export default {
         );
       }
     },
+    openCocoPi(tool, i, uid, uname) {
+      let student = {
+        userid: uid,
+        student: uname,
+      }
+      if (tool == 57) {
+        window.parent.postMessage(
+          {
+            tools: tool + "teacher",
+            cid: this.id,
+            stage: this.courseType,
+            task: this.taskCount,
+            tool: i,
+            student: student,
+          },
+          "*"
+        );
+      }
+    },
     setRightAnswer(s, i, j) {
       for (var q = 0; q < this.sentenceList[i].chooseSenList.length; q++) {
         if (
@@ -11294,18 +11342,18 @@ export default {
           });
           this.checktoolArray = []
           this.getCourseDetail(2)
-          this.checkBz(this.chapInfoList[this.courseType].chapterInfo[0].taskJson[this.taskCount].toolChoose.length-1)
+          this.checkBz(this.chapInfoList[this.courseType].chapterInfo[0].taskJson[this.taskCount].toolChoose.length - 1)
           this.$forceUpdate()
         })
         .catch((err) => {
           console.error(err);
         });
     },
-    updateToolDetail(){
-      if(!this.isUpdateToolDetail){
+    updateToolDetail() {
+      if (!this.isUpdateToolDetail) {
         this.isUpdateToolDetail = true
         this.updateToolDetailInner = JSON.parse(JSON.stringify(this.tool.toolDetail))
-      }else{
+      } else {
         this.chapInfoList[this.courseType].chapterInfo[0].taskJson[this.taskCount].toolChoose[this.toolIndex].toolDetail = JSON.parse(JSON.stringify(this.updateToolDetailInner))
         let params = [
           {
@@ -11331,7 +11379,7 @@ export default {
             console.error(err);
           });
       }
-     
+
     },
   },
   directives: {
@@ -14913,6 +14961,7 @@ export default {
   width: 20px;
   height: 20px;
 }
+
 /* code 样式 */
 .cont {
   /* -webkit-user-modify: read-write; */
@@ -14973,5 +15022,4 @@ export default {
 .cont>>>ul,
 ol {
   margin: 10px 0 10px 20px;
-}
-</style>
+}</style>

+ 80 - 18
src/components/studyStudent.vue

@@ -136,7 +136,7 @@
             .taskJson"
         :key="index"-->
         <div class="isNoMessage" v-if="chapInfoList[courseType].chapterInfo[0].taskJson[taskCount]
-            .chapterData.length == 0 &&
+          .chapterData.length == 0 &&
           chapInfoList[courseType].chapterInfo[0].taskJson[taskCount]
             .toolChoose[0].tool.length == 0 &&
           chapInfoList[courseType].chapterInfo[0].video.length == 0 &&
@@ -148,7 +148,7 @@
         </div>
         <div class="study_top" :class="{ pzClass: pzDialog }">
           <div class="vedioBox" v-if="chapInfoList[courseType].chapterInfo[0].taskJson[taskCount]
-              .taskDetail != '' ||
+            .taskDetail != '' ||
             vChapterData[taskCount].length > 0
             ">
             <div class="checkbox">
@@ -175,15 +175,15 @@
                       line-height: 29px;
                       font-size: 18px;
                     " class="cont" v-if="chapInfoList[courseType].chapterInfo[0].taskJson[
-                        taskCount
-                      ].taskDetail != ''
+                      taskCount
+                    ].taskDetail != ''
                       " v-html="chapInfoList[courseType].chapterInfo[0].taskJson[
+    taskCount
+  ].taskDetail
+    ? chapInfoList[courseType].chapterInfo[0].taskJson[
       taskCount
     ].taskDetail
-      ? chapInfoList[courseType].chapterInfo[0].taskJson[
-        taskCount
-      ].taskDetail
-      : '暂无描述'
+    : '暂无描述'
     "></div>
                 </div>
               </div>
@@ -349,7 +349,7 @@
               <div class="upFile" v-if="type == 3">提交</div>
             </div>-->
             <div class="vedioBox" v-if="chapInfoList[courseType].chapterInfo[0].taskJson[taskCount]
-                .toolChoose[0].tool &&
+              .toolChoose[0].tool &&
               chapInfoList[courseType].chapterInfo[0].taskJson[taskCount]
                 .toolChoose[0].tool.length &&
               chapInfoList[courseType].chapterInfo[0].taskJson[taskCount]
@@ -629,12 +629,12 @@
                         transform: translateY(-130%);
                       " @click="addImg($event)">上传作业<input type="file" accept="*" style="display: none"
                         @change="beforeUpload1($event, 7, toolIndex)" /></el-button>
-                    <el-button type="primary" v-if="tool.tool[0] == 57" style="
+                    <!-- <el-button type="primary" v-if="tool.tool[0] == 57" style="
                         position: absolute;
                         right: 30px;
                         transform: translateY(-130%);
                       " @click="addImg($event)">上传作业<input type="file" accept="*" style="display: none"
-                        @change="beforeUpload1($event, 8, toolIndex)" /></el-button>
+                        @change="beforeUpload1($event, 8, toolIndex)" /></el-button> -->
                   </div>
                   <div v-if="tType &&
                     tType == 2 &&
@@ -785,7 +785,9 @@
                           box-shadow: 0 0 6px 1px #dfdada;
                         " v-for="(w, wIndex) in workStudent[toolIndex]" :key="wIndex">
                         <div class="workImg">
-                          <img :src="word2" @click="downloadFile(w.works)" alt />
+                          <img :src="word2" @click="downloadFile(w.works)" v-if="w.type == 12" alt />
+                          <img :src="word2" @click="openCocoPi(57, toolIndex, w.userid, w.sName)" v-else-if="w.type == 15"
+                            alt />
                           <div class="answerScore" v-if="w.score" @click.stop="openScore(w)" :class="{
                             rightW:
                               w.userid == userid || tType == 1 || tType == 4,
@@ -1568,7 +1570,9 @@
                           ? worksStudent[toolIndex]
                           : worksStudent[toolIndex].slice(0, 6)" :key="wIndex" :class="w.type == 1 ? 'isTypeOne' : ''">
                         <div class="workImg">
-                          <img :src="word2" @click="downloadFile(w.works)" alt />
+                          <img :src="word2" @click="downloadFile(w.works)" v-if="w.type == 12" alt />
+                          <img :src="word2" @click="openCocoPi(57, toolIndex, w.userid, w.sName)" v-else-if="w.type == 15"
+                            alt />
                           <div class="answerScore" v-if="w.score" @click.stop="openScore(w)" :class="{
                             rightW:
                               w.userid == userid ||
@@ -3611,7 +3615,7 @@
               </div>
             </div>
             <div class="vedioBox" v-if="chapInfoList[courseType].chapterInfo[0].taskJson[taskCount]
-                .eList &&
+              .eList &&
               chapInfoList[courseType].chapterInfo[0].taskJson[taskCount]
                 .eList.length &&
               chapInfoList[courseType].chapterInfo[0].taskJson[taskCount]
@@ -4353,6 +4357,11 @@
           <img src="../assets/icon/codeFile.png" />
           <div>点击下载文件</div>
         </div>
+        <div class="worksAnswer codeFileBox" v-if="commentDetail.works && commentDetail.type == 15"
+          @click="openCocoPi(15, commentIndexJson.toolIndex, commentDetail.userid, commentDetail.sName)">
+          <img src="../assets/icon/codeFile.png" />
+          <div>点击打开CocoPi</div>
+        </div>
         <div class="worksAnswer" v-if="commentDetail.works && commentDetail.type == 13">
           <div v-html="JSON.parse(commentDetail.works).text"></div>
         </div>
@@ -4734,6 +4743,11 @@
           <img src="../assets/icon/codeFile.png" />
           <div>点击下载文件</div>
         </div>
+        <div class="worksAnswer codeFileBox" v-if="commentDetail.works && commentDetail.type == 15"
+          @click="openCocoPi(15, commentIndexJson.toolIndex, commentDetail.userid, commentDetail.sName)">
+          <img src="../assets/icon/codeFile.png" />
+          <div>点击打开CocoPi</div>
+        </div>
         <div class="worksAnswer" v-if="commentDetail.works && commentDetail.type == 13">
           <div v-html="JSON.parse(commentDetail.works).text"></div>
         </div>
@@ -6460,7 +6474,7 @@ export default {
     },
     addCourseWorksTeacher(i) {
       var typesql;
-      if (this.sTool == 32 || this.sTool == 57) {
+      if (this.sTool == 32) {
         this.addCourseWorksGongTeacher(
           this.toolindex,
           this.studyJuri[0].cover[0].url,
@@ -6977,6 +6991,18 @@ export default {
                     userid: b[j].userid,
                     wid: b[j].id,
                   });
+                } else if (b[j].type == 15 && a[i].tool[0] == 57) {
+                  //选择题
+                  this.workStudent[i].push({
+                    works: b[j].content,
+                    sName: b[j].name,
+                    score: b[j].score,
+                    img: b[j].img,
+                    type: 15,
+                    time: b[j].time,
+                    userid: b[j].userid,
+                    wid: b[j].id,
+                  });
                 }
               }
             }
@@ -8067,7 +8093,7 @@ export default {
                     commentJson: commentJson,
                   });
                   this.isWorksS[i].push({ uid: b[j].userid, sName: b[j].name });
-                } else if (a[i].tool[0] == 57 && b[j].atool == 57) {
+                } else if (a[i].tool[0] == 57 && b[j].atool == 57 && b[j].type == 12) {
                   _worksStudent[i].push({
                     userid: b[j].userid,
                     ateacher: b[j].ateacher,
@@ -8084,6 +8110,23 @@ export default {
                     commentJson: commentJson,
                   });
                   this.isWorksS[i].push({ uid: b[j].userid, sName: b[j].name });
+                } else if (a[i].tool[0] == 57 && b[j].atool == 57 && b[j].type == 15) {
+                  _worksStudent[i].push({
+                    userid: b[j].userid,
+                    ateacher: b[j].ateacher,
+                    wid: b[j].id,
+                    works: b[j].content,
+                    sName: b[j].name ? b[j].name : b[j].userid,
+                    type: 15,
+                    time: b[j].time,
+                    score: b[j].score,
+                    img: b[j].img,
+                    likesCount: likesCount,
+                    commentCount: commentCount,
+                    isLikes: isLikes,
+                    commentJson: commentJson,
+                  });
+                  this.isWorksS[i].push({ uid: b[j].userid, sName: b[j].name });
                 }
               }
             }
@@ -10902,7 +10945,7 @@ export default {
       if (this.tType !== "1" && this.tType !== "4") {
         return;
       }
-      if (t == 16 || t == 32 || t == 57 || t == 50) {
+      if (t == 16 || t == 32 || t == 50) {
         this.dialogVisibleWorks = true;
       } else if (t == 15) {
         this.answerQ = this.chapInfoList[this.courseType].chapterInfo[0]
@@ -11093,7 +11136,7 @@ export default {
 
         this.isStar = false;
         this.studentEvalDialogVisibleTeacher = true;
-      } else if (t == 3 || t == 1 || t == 7) {
+      } else if (t == 3 || t == 1 || t == 7 || t == 57) {
         window.parent.postMessage(
           {
             tools: t + "teacher",
@@ -11107,6 +11150,25 @@ export default {
         );
       }
     },
+    openCocoPi(tool, i, uid, uname) {
+      let student = {
+        userid: uid,
+        student: uname,
+      }
+      if (tool == 57) {
+        window.parent.postMessage(
+          {
+            tools: tool + "teacher",
+            cid: this.id,
+            stage: this.courseType,
+            task: this.taskCount,
+            tool: i,
+            student: student,
+          },
+          "*"
+        );
+      }
+    },
     setRightAnswer(s, i, j) {
       for (var q = 0; q < this.sentenceList[i].chooseSenList.length; q++) {
         if (

Some files were not shown because too many files changed in this diff