Browse Source

交互视频更改提交

SanHQin 1 year ago
parent
commit
93e44eb9d5

+ 28 - 7
src/components/Choice/index.vue

@@ -30,7 +30,7 @@
                         </div>
                         <div class="a_add_body">
                             <div class="a_add_input">
-                                <el-radio-group v-model="radio[index1]" v-if="testJson.testJson[index1].type == '1'">
+                                <el-radio-group v-model="radio[index1]" v-if="testJson.testJson[index1].type == '1'" :disabled="videoType==1" >
                                     <div class="radioBox">
                                         <el-radio v-for="(item2, checkIndex) in testJson.testJson[index1]
                                             .checkList" :key="checkIndex" :label="checkIndex"
@@ -41,11 +41,11 @@
                                                     <img :src="item2.src" alt="" />
                                                 </div>
                                             </div>
-                                            <span v-else v-html="item2"></span>
+                                            <span :class="[radio[index1]==checkIndex?'showLight':'']" v-else v-html="item2"></span>
                                         </el-radio>
                                     </div>
                                 </el-radio-group>
-                                <el-checkbox-group v-model="radio[index1]" v-if="testJson.testJson[index1].type == '2'">
+                                <el-checkbox-group v-model="radio[index1]" v-if="testJson.testJson[index1].type == '2'" :disabled="videoType==1">
                                     <div class="radioBox">
                                         <el-checkbox v-for="(item2, checkIndex) in testJson.testJson[index1]
                                             .checkList" :key="checkIndex" :label="checkIndex"
@@ -56,7 +56,7 @@
                                                     <img :src="item2.src" alt="" />
                                                 </div>
                                             </div>
-                                            <span v-else v-html="item2"></span>
+                                            <span :class="[radio[index1].includes(checkIndex)?'showLight':'']" v-else v-html="item2"></span>
                                         </el-checkbox>
                                     </div>
                                 </el-checkbox-group>
@@ -90,7 +90,7 @@ export default {
             type: String,
         },
         courseType: {
-            type: String,
+            type: String || Number,
         },
         taskCount: {
             type: Number,
@@ -100,13 +100,19 @@ export default {
         },
         videoTime: {
             type: Number,
-        }
+        },
+				userChooseAnswer:{
+					type:Array,
+				},
+				videoType:{
+					type:Number,
+					default:0
+				}
     },
     data() {
         return {
             testJson: {},
             radio: []
-
         }
     },
     watch: {
@@ -120,6 +126,7 @@ export default {
                     this.radio.push("");
                 }
             }
+						
         }
     },
     methods: {
@@ -134,6 +141,14 @@ export default {
         previewImg(url) {
             this.$hevueImgPreview(url);
         },
+				setUserAnswer(userAnswer){
+					this.radio = userAnswer;
+					// if(userAnswer.find(i=>i.testJson[0].teststitle==this.testJson[0].teststitle)){
+					// 	console.log("有答案了")
+					// }else{
+					// 	console.log("没有答案")
+					// }
+				},
         addStudentTest() {
             if (!this.radio.length) {
                 this.$message.error("请选择选项");
@@ -148,6 +163,8 @@ export default {
                     return;
                 }
             }
+						this.videoType==0?this.$emit("success",{answer:this.radio,json:this.testJson}):'';
+
             this.close();
             // let askList = []
             // askList.push({ testJson: this.testJson, anwer: this.radio,type:8,tool:45 });
@@ -350,4 +367,8 @@ export default {
     height: 100%;
     object-fit: cover;
 }
+
+.showLight{
+	color: #0061FF !important;
+}
 </style>

+ 180 - 0
src/components/easy2/studyStudent.vue

@@ -1780,6 +1780,141 @@
                       </div> -->
                     </div>
                   </div>
+                  <div
+									v-if="
+                      tType &&
+                      ((tType == 2 && sIsOpen == true) ||
+                        tType == 1 ||
+                        tType == 4) &&
+                      tool.tool.indexOf(62) != -1
+                    "
+                    class="worksBox"
+                  >
+                    <div
+                      class="zuoyeYulan"
+                      v-if="
+                        worksStudent.length &&
+                        worksStudent[toolIndex].length > 0
+                      "
+                    >
+                      <div class="worksTop">
+                        <div>作业预览</div>
+                        <div
+                          class="corOpen"
+                          @click="contract(toolIndex)"
+                          v-if="
+                            (isCloseList[toolIndex].isCloseBoolean) &&
+                            isCloseList[toolIndex].isClose == 0
+                          "
+                        >
+                          折叠
+                        </div>
+                        <div
+                          class="corOpen"
+                          @click="contract(toolIndex)"
+                          v-if="isCloseList[toolIndex].isClose == 1"
+                        >
+                          展开
+                        </div>
+                      </div>
+                      <!-- <el-button type="text" @click="jump()" v-if="tType == 2" class="buttonA">我的评价</el-button> -->
+                    </div>
+                    <div>
+                      <div
+                        :id="'tool-' + toolIndex"
+                        :style="{
+                          height:isCloseList[toolIndex].isClose == 1 ? retrnToolHeight('tool-' + toolIndex) : 'auto',
+                          overflow: isCloseList[toolIndex].isClose == 1 ? 'hidden' : 'unset'
+                        }"
+                        class="worksDetailBox"
+                        v-if="
+                          worksStudent.length &&
+                          worksStudent[toolIndex].length > 0
+                        "
+                      >
+                        <div
+                          v-for="(w, wIndex) in worksStudent[toolIndex]"
+                          :key="wIndex"
+                          class="isWorksName2"
+                          @click="
+                            openTools(
+                              62,
+                              toolIndex,
+                              taskCount,
+                              w.works,
+                              w.sName
+                            )
+                          "
+                        >
+                          {{ w.sName }}
+                          <img
+                            class="deleteImg deleteImg2"
+                            src="../../assets/deleteworks.png"
+                            v-if="
+                              w.userid == userid || tType == 1 || tType == 4
+                            "
+                            @click.stop="deleteWorks(w.wid)"
+                            alt
+                          />
+                        </div>
+                      </div>
+                    </div>
+
+                    <div style="font-size: 18px" v-if="courseDetail.juri != ''">
+                      未提交
+                    </div>
+                    <div
+                      class="noWorksS"
+                      v-if="noWorksS && noWorksS[toolIndex].length"
+                    >
+                      <div
+                        v-for="(s, sIndex) in noWorksS[toolIndex]"
+                        :key="sIndex"
+                        class="noWorksName"
+                      >
+                        {{ s.student }}
+                      </div>
+                    </div>
+                  </div>
+									<div
+                    v-if="
+                      tType &&
+                      tType == 2 &&
+                      !sIsOpen &&
+                      tool.tool.indexOf(62) != -1
+                    "
+                    class="worksBox"
+                  >
+                    <div
+                      class="zuoyeYulan"
+                      v-if="workStudent[toolIndex].length > 0"
+                    >
+                      <span class="worksTitle">作业预览</span>
+                      <!-- <el-button type="text" @click="jump()" v-if="tType == 2" class="buttonA">我的评价</el-button> -->
+                    </div>
+                    <div
+                      class="worksDetailBox"
+                      v-if="workStudent[toolIndex].length > 0"
+                    >
+                      <div
+                        class="isWorksName2"
+                        v-for="(w, wIndex) in workStudent[toolIndex]"
+                        :key="wIndex"
+                        @click="
+                          openTools(62, toolIndex, taskCount, w.works, w.sName)
+                        "
+                      >
+                        {{ w.sName }}
+                        <img
+                          class="deleteImg deleteImg2"
+                          src="../../assets/deleteworks.png"
+                          v-if="w.userid == userid || tType == 1 || tType == 4"
+                          @click.stop="deleteWorks(w.wid)"
+                          alt
+                        />
+                      </div>
+                    </div>
+                  </div>
                   <div
                     v-if="
                       tType &&
@@ -11625,6 +11760,7 @@
       :courseType="courseType"
       :taskCount="taskCount"
       :toolindex="toolindex"
+			:videoType="videoType"
     ></interVideo>
     <UpdateMore
       :dialogVisibleMember.sync="dialogVisibleMember"
@@ -12038,6 +12174,7 @@ export default {
         askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
       },
       testJson: {},
+			videoType:0,
       checkJson: [],
       askList: [],
       answerList: [],
@@ -13727,6 +13864,18 @@ export default {
                     time: b[j].time,
                     userid: b[j].userid,
                     wid: b[j].id,
+                  });
+								} else if (b[j].type == 14 && a[i].tool[0] == 62) {
+                  //英语口语
+                  this.workStudent[i].push({
+                    works: b[j].content,
+                    sName: b[j].name,
+                    score: b[j].score,
+                    img: b[j].img,
+                    type: 14,
+                    time: b[j].time,
+                    userid: b[j].userid,
+                    wid: b[j].id,
                   });
                 }
               }
@@ -14831,6 +14980,26 @@ export default {
                   };
                   _worksStudent[i].push(_work);
                   _worksStudent2[i].push(_work);
+                  this.isWorksS[i].push({ uid: b[j].userid, sName: b[j].name });
+								} else if (b[j].type == 14 && a[i].tool[0] == 62) {
+                  //交互视频
+                  let _work = {
+                    userid: b[j].userid,
+                    ateacher: b[j].ateacher,
+                    wid: b[j].id,
+                    works: b[j].content,
+                    sName: b[j].name,
+                    type: 14,
+                    time: b[j].time,
+                    score: b[j].score,
+                    img: b[j].img,
+                    likesCount: likesCount,
+                    commentCount: commentCount,
+                    isLikes: isLikes,
+                    commentJson: commentJson,
+                  };
+                  _worksStudent[i].push(_work);
+                  _worksStudent2[i].push(_work);
                   this.isWorksS[i].push({ uid: b[j].userid, sName: b[j].name });
                 } else if (b[j].type == 11 && a[i].tool[0] == 49) {
                   let _gindex = JSON.parse(b[j].content);
@@ -17492,6 +17661,15 @@ export default {
         this.newEnglishList = { engTitle:"",engText:"" }
         this.newEnglishList1 = []
         this.selectEngC(id,z);
+			}else if(t == 62){
+				this.videoType = 1;
+				this.videoJson = {};
+				this.videoJson = JSON.parse(c);
+				// this.videoJson =
+        //   this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
+        //     index
+        //   ].toolChoose[i].videoJson;
+				this.dialogVisibleVideo = true;
       }
       //  else if (t == 15) {
       //   this.answerQ = "";
@@ -18011,6 +18189,8 @@ export default {
         this.islock = this.groupJson.islock == 1 ? true : false;
         this.dialogVisibleGroup = true;
       } else if (t == 62) {
+				this.videoType = 0;
+				this.videoJson = {};
         this.videoJson =
           this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
             index

+ 181 - 0
src/components/easy3/studyStudent.vue

@@ -1767,6 +1767,141 @@
                       </div> -->
                     </div>
                   </div>
+                  <div
+									v-if="
+                      tType &&
+                      ((tType == 2 && sIsOpen == true) ||
+                        tType == 1 ||
+                        tType == 4) &&
+                      tool.tool.indexOf(62) != -1
+                    "
+                    class="worksBox"
+                  >
+                    <div
+                      class="zuoyeYulan"
+                      v-if="
+                        worksStudent.length &&
+                        worksStudent[toolIndex].length > 0
+                      "
+                    >
+                      <div class="worksTop">
+                        <div>作业预览</div>
+                        <div
+                          class="corOpen"
+                          @click="contract(toolIndex)"
+                          v-if="
+                            (isCloseList[toolIndex].isCloseBoolean) &&
+                            isCloseList[toolIndex].isClose == 0
+                          "
+                        >
+                          折叠
+                        </div>
+                        <div
+                          class="corOpen"
+                          @click="contract(toolIndex)"
+                          v-if="isCloseList[toolIndex].isClose == 1"
+                        >
+                          展开
+                        </div>
+                      </div>
+                      <!-- <el-button type="text" @click="jump()" v-if="tType == 2" class="buttonA">我的评价</el-button> -->
+                    </div>
+                    <div>
+                      <div
+                        :id="'tool-' + toolIndex"
+                        :style="{
+                          height:isCloseList[toolIndex].isClose == 1 ? retrnToolHeight('tool-' + toolIndex) : 'auto',
+                          overflow: isCloseList[toolIndex].isClose == 1 ? 'hidden' : 'unset'
+                        }"
+                        class="worksDetailBox"
+                        v-if="
+                          worksStudent.length &&
+                          worksStudent[toolIndex].length > 0
+                        "
+                      >
+                        <div
+                          v-for="(w, wIndex) in worksStudent[toolIndex]"
+                          :key="wIndex"
+                          class="isWorksName2"
+                          @click="
+                            openTools(
+                              62,
+                              toolIndex,
+                              taskCount,
+                              w.works,
+                              w.sName
+                            )
+                          "
+                        >
+                          {{ w.sName }}
+                          <img
+                            class="deleteImg deleteImg2"
+                            src="../../assets/deleteworks.png"
+                            v-if="
+                              w.userid == userid || tType == 1 || tType == 4
+                            "
+                            @click.stop="deleteWorks(w.wid)"
+                            alt
+                          />
+                        </div>
+                      </div>
+                    </div>
+
+                    <div style="font-size: 18px" v-if="courseDetail.juri != ''">
+                      未提交
+                    </div>
+                    <div
+                      class="noWorksS"
+                      v-if="noWorksS && noWorksS[toolIndex].length"
+                    >
+                      <div
+                        v-for="(s, sIndex) in noWorksS[toolIndex]"
+                        :key="sIndex"
+                        class="noWorksName"
+                      >
+                        {{ s.student }}
+                      </div>
+                    </div>
+                  </div>
+									<div
+                    v-if="
+                      tType &&
+                      tType == 2 &&
+                      !sIsOpen &&
+                      tool.tool.indexOf(62) != -1
+                    "
+                    class="worksBox"
+                  >
+                    <div
+                      class="zuoyeYulan"
+                      v-if="workStudent[toolIndex].length > 0"
+                    >
+                      <span class="worksTitle">作业预览</span>
+                      <!-- <el-button type="text" @click="jump()" v-if="tType == 2" class="buttonA">我的评价</el-button> -->
+                    </div>
+                    <div
+                      class="worksDetailBox"
+                      v-if="workStudent[toolIndex].length > 0"
+                    >
+                      <div
+                        class="isWorksName2"
+                        v-for="(w, wIndex) in workStudent[toolIndex]"
+                        :key="wIndex"
+                        @click="
+                          openTools(62, toolIndex, taskCount, w.works, w.sName)
+                        "
+                      >
+                        {{ w.sName }}
+                        <img
+                          class="deleteImg deleteImg2"
+                          src="../../assets/deleteworks.png"
+                          v-if="w.userid == userid || tType == 1 || tType == 4"
+                          @click.stop="deleteWorks(w.wid)"
+                          alt
+                        />
+                      </div>
+                    </div>
+                  </div>
                   <div
                     v-if="
                       tType &&
@@ -11613,6 +11748,7 @@
       :courseType="courseType"
       :taskCount="taskCount"
       :toolindex="toolindex"
+			:videoType="videoType"
     ></interVideo>
     <UpdateMore
       :dialogVisibleMember.sync="dialogVisibleMember"
@@ -12108,6 +12244,7 @@ export default {
         16, 32, 57, 4, 45, 15, 1, 3, 6, 7, 26, 41, 47, 48, 52, 50, 40,
       ], //, 40
       videoJson: {},
+			videoType:0,
       toolType: 0,
       checktoolArray: [],
       vChapterData: [],
@@ -13717,6 +13854,18 @@ export default {
                     time: b[j].time,
                     userid: b[j].userid,
                     wid: b[j].id,
+                  });
+								} else if (b[j].type == 14 && a[i].tool[0] == 62) {
+                  //交互视频
+                  this.workStudent[i].push({
+                    works: b[j].content,
+                    sName: b[j].name,
+                    score: b[j].score,
+                    img: b[j].img,
+                    type: 14,
+                    time: b[j].time,
+                    userid: b[j].userid,
+                    wid: b[j].id,
                   });
                 }
               }
@@ -14843,6 +14992,26 @@ export default {
                   };
                   _worksStudent[i].push(_work);
                   _worksStudent2[i].push(_work);
+                  this.isWorksS[i].push({ uid: b[j].userid, sName: b[j].name });
+								} else if (b[j].type == 14 && a[i].tool[0] == 62) {
+                  //交互视频
+                  let _work = {
+                    userid: b[j].userid,
+                    ateacher: b[j].ateacher,
+                    wid: b[j].id,
+                    works: b[j].content,
+                    sName: b[j].name,
+                    type: 14,
+                    time: b[j].time,
+                    score: b[j].score,
+                    img: b[j].img,
+                    likesCount: likesCount,
+                    commentCount: commentCount,
+                    isLikes: isLikes,
+                    commentJson: commentJson,
+                  };
+                  _worksStudent[i].push(_work);
+                  _worksStudent2[i].push(_work);
                   this.isWorksS[i].push({ uid: b[j].userid, sName: b[j].name });
                 } else if (b[j].type == 11 && a[i].tool[0] == 49) {
                   let _gindex = JSON.parse(b[j].content);
@@ -17508,6 +17677,16 @@ export default {
         this.newEnglishList = { engTitle:"",engText:"" }
         this.newEnglishList1 = []
         this.selectEngC(id,z);
+			}else if(t == 62){
+				this.videoType = 1;
+				this.videoJson = {};
+				this.videoJson = JSON.parse(c);
+				// this.videoJson =
+        //   this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
+        //     index
+        //   ].toolChoose[i].videoJson;
+				this.dialogVisibleVideo = true;
+				
       }
       //  else if (t == 15) {
       //   this.answerQ = "";
@@ -18027,6 +18206,8 @@ export default {
         this.islock = this.groupJson.islock == 1 ? true : false;
         this.dialogVisibleGroup = true;
       } else if (t == 62) {
+				this.videoType = 0;
+				this.videoJson = {};
         this.videoJson =
           this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
             index

+ 201 - 3
src/components/interVideo/index.vue

@@ -6,15 +6,34 @@
                 <div class="videoBox">
                     <video-player class="video-player vjs-custom-skin" ref="videoPlayer" :playsinline="true"
                         :options="playerO" v-if="this.json.video" @timeupdate="onPlayerTimeupdate($event)"></video-player>
+										
+										<div class="chooseNodeBox">
+											<div class="chooseNodeItem" v-for="(item,index) in json.setting" @click.stop="chooseNode(item)">
+												<!-- <div v-if="userChooseAnswer.find(i=>i.testJson[0].teststitle==item.tool.toolJson.testJson[0].teststitle)" class="el-icon-circle-check"></div> -->
+												<div v-if="userChooseAnswer[index]" class="el-icon-circle-check"></div>
+												<div v-else>{{ index+1 }}</div>
+											</div>
+										</div>
                 </div>
+								<div class="accuracy" v-if="accuracyList.length>0">
+									<span>准确率:</span>
+									<div class="accuracyItem" v-for="(item,index) in accuracyList">
+										<div class="accuracyTitle">第 {{ index+1 }} 题:</div>
+										<div class="accuracyValue">正确率{{item}}%</div>
+									</div>
+								</div>
             </div>
+						
             <span slot="footer" class="dialog-footer">
                 <el-button @click="close">关 闭</el-button>
+								<el-button @click.stop="submitBtn" type="primary">确认</el-button>
             </span>
         </el-dialog>
         <choiceD 
+				ref="choiceD"
         :dialogVisibleChoice.sync="dialogVisibleChoice" 
-        :json="toolJson" 
+        :json="toolJson"
+				:userChooseAnswer:="userChooseAnswer"
         @play="gotoPlay"
         :userid="userid"
         :id="id"
@@ -22,6 +41,8 @@
         :taskCount="taskCount"
         :toolindex="toolindex"
         :videoTime="stopTime"
+				:videoType="videoType"
+				@success="choiceAnswer"
         ></choiceD>
     </div>
 </template>
@@ -30,6 +51,7 @@
 import choiceD from '../Choice/index.vue'
 
 export default {
+		emits:['success'],
     props: {
         dialogVisibleVideo: {
             type: Boolean,
@@ -45,14 +67,18 @@ export default {
             type: String,
         },
         courseType: {
-            type: String,
+            type: String || Number,
         },
         taskCount: {
             type: Number,
         },
         toolindex: {
             type: Number,
-        }
+        },
+				videoType:{
+					type:Number,
+					default:0
+				}
     },
     components: {
         choiceD,
@@ -60,6 +86,8 @@ export default {
     data() {
         return {
             json: {},
+						userChooseAnswer:[],
+						accuracyList:[],
             playerOptions: {
                 playbackRates: [0.7, 1.0, 1.5, 2.0], //播放速度
                 autoplay: false, //如果true,浏览器准备好时开始回放。
@@ -98,12 +126,15 @@ export default {
             if (this.json.video) {
                 this.playerO = JSON.parse(JSON.stringify(this.playerOptions));
                 this.playerO.sources[0].src = this.json.video
+								this.videoType==1?this.userChooseAnswer = this.json.setting.map(i=>i.tool.toolJson):[];
+								this.getAccuracyList();
                 this.$nextTick(() => {
                     setTimeout(() => {
                         this.videoTime = Math.round(this.$refs['videoPlayer'].player.cache_.duration)
                     }, 500)
                 })
             }
+						if(!newValue)this.json = [];
         }
     },
     methods: {
@@ -124,6 +155,10 @@ export default {
                     if (this.json.setting[i].tool.tool == 45) {
                         this.dialogVisibleChoice = true
                         this.toolJson = this.json.setting[i].tool.toolJson
+												let answerIndex = this.json.setting.findIndex(i=>JSON.stringify(i.tool.toolJson)==JSON.stringify(this.toolJson))
+												if(answerIndex!=-1 && this.userChooseAnswer[answerIndex]){
+													this.$refs['choiceD'].setUserAnswer(this.userChooseAnswer[answerIndex].testJson.map(i=>i.answer2))
+												}
                     }
                 }
             }
@@ -134,6 +169,92 @@ export default {
             this.$refs['videoPlayer'].player.currentTime(this.stopTime + 1)
             this.$refs['videoPlayer'].player.play()
         },
+				// 点击了节点
+				chooseNode(setting){
+					this.$refs['videoPlayer'].player.currentTime(setting.time)
+					this.stopTime = setting.time;
+          this.$refs['videoPlayer'].player.pause()
+          if (setting.tool.tool == 45) {
+              this.dialogVisibleChoice = true
+              this.toolJson = setting.tool.toolJson
+							let answerIndex = this.json.setting.findIndex(i=>JSON.stringify(i.tool.toolJson)==JSON.stringify(this.toolJson))
+							if(answerIndex!=-1 && this.userChooseAnswer[answerIndex]){
+								this.$refs['choiceD'].setUserAnswer(this.userChooseAnswer[answerIndex].testJson.map(i=>i.answer2))
+							}
+          }
+				},
+				// 选择答案并且确定
+				choiceAnswer(data){
+					let answer = data.answer;
+					let testJson = data.json;
+					let changeIndex = this.json.setting.findIndex(i=>JSON.stringify(i.tool.toolJson)==JSON.stringify(testJson))
+					if(changeIndex!=-1){
+						testJson.testJson.forEach((i,index)=>{
+							i.answer2 = answer[index];
+						})
+						this.userChooseAnswer[changeIndex] = testJson;
+					}
+					this.getAccuracyList();
+				},
+				getAccuracyList(){
+					if(this.userChooseAnswer.length<0)return;
+					let score = [];
+					this.json.setting.forEach((item,index)=>{
+						if(this.userChooseAnswer[index]){
+							let count = 0;
+							let type = item.tool.toolJson.testJson.map(i=>i.type)
+							let userAnswer = this.userChooseAnswer[index].testJson.map(i=>i.answer2);
+							let rightAnswer = this.userChooseAnswer[index].testJson.map(i=>i.answer);
+							let num = item.tool.toolJson.testJson.length;
+
+							userAnswer.forEach((item2,index2)=>{
+								if(type[index2]=='2'){
+									if(JSON.stringify(userAnswer[index2].sort((a,b)=>a-b))==JSON.stringify(rightAnswer[index2].sort((a,b)=>a-b))){
+										count++
+									}
+								}else if(type[index2]=='1'){
+									if(userAnswer[index2]==rightAnswer[index2]){
+										count++;
+									}
+								}
+							})
+
+							score.push((count/num).toFixed(2)*100)
+						}else{
+							score.push(0)
+						}
+					})
+					this.accuracyList = score;
+					this.$forceUpdate();
+				},
+				submitBtn(){
+					if(this.videoType==1)return this.close();
+					if(this.userChooseAnswer<this.json.setting.length)return this.$message.info("请答题");
+					let data = this.json;
+					data.setting.forEach((i,index)=>i.tool.toolJson = this.userChooseAnswer[index])
+					let params = [{
+						uid:this.userid,
+						cid:this.id,
+						stage:this.courseType,
+						task:this.taskCount,
+						tool:this.toolindex,
+						content:encodeURIComponent(JSON.stringify(data)),
+						type:14,
+						atool:62,
+						text:"",
+					}]
+					// return;
+					this.ajax
+        	.post(this.$store.state.api + "addCourseWorks5", params)
+        	.then((res) => {
+        	  this.$message.success("提交成功");
+        	  this.close();
+        	})
+        	.catch((err) => {
+        	  this.$message.error("提交失败");
+        	  console.error(err);
+        	});
+				},
     },
     mounted() {
         this.json = JSON.parse(JSON.stringify(this.videoJson));
@@ -185,6 +306,35 @@ export default {
     position: relative;
 }
 
+.chooseNodeBox{
+	width: auto;
+	height:50px;
+	position:absolute;
+	bottom:45px;
+	left:50%;
+	transform:translateX(-50%);
+	display:flex;
+	justify-content: center;
+	align-items: center;
+	background-color: none;
+}
+
+.chooseNodeBox>.chooseNodeItem{
+	width: 40px;
+	height: 40px;
+	background: black;
+	margin: 0 10px;
+	border-radius: 50%;
+	cursor: pointer;
+	z-index: 9;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	color: white;
+	font-size: 1.5em;
+	font-weight: bold;
+}
+
 .videoBox>.content {
     /* position: absolute; */
     line-height: 600px;
@@ -202,4 +352,52 @@ export default {
     padding: 0 !important;
     height: 100%;
 }
+
+.accuracy{
+	width: 300px;
+	height: auto;
+	background-color: #d4dde1;
+	border-radius: 5px;
+	margin: 10px 0;
+	box-sizing: border-box;
+	padding: 10px;
+}
+
+.accuracy>span{
+	font-size: 22px;
+	font-weight: bold;
+	margin: 10px 0;
+}
+
+.accuracy>.accuracyItem{
+	width: 100%;
+	height: 40px;
+	margin-top: 10px;
+	display: flex;
+	align-items: center;
+}
+
+.accuracyItem>.accuracyTitle{
+	width: 120px;
+	height: 100%;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	font-weight: bold;
+	font-size:1.3em;
+	background-color: #2c2f3b;
+	color: white;
+	border-radius: 5px;
+}
+
+.accuracyItem>.accuracyValue{
+	width:120px;
+	margin-left: 20px;
+	font-size: 16px;
+	box-sizing: border-box;
+	padding: 5px;
+	border-radius: 5px;
+	border:solid 1px #0061FF;
+	color:#0061FF;
+}
 </style>

+ 183 - 1
src/components/studyStudent.vue

@@ -1775,6 +1775,141 @@
                         </div>
                       </div> -->
                     </div>
+                  </div>
+									<div
+                    v-if="
+                      tType &&
+                      ((tType == 2 && sIsOpen == true) ||
+                        tType == 1 ||
+                        tType == 4) &&
+                      tool.tool.indexOf(62) != -1
+                    "
+                    class="worksBox"
+                  >
+                    <div
+                      class="zuoyeYulan"
+                      v-if="
+                        worksStudent.length &&
+                        worksStudent[toolIndex].length > 0
+                      "
+                    >
+                      <div class="worksTop">
+                        <div>作业预览</div>
+                        <div
+                          class="corOpen"
+                          @click="contract(toolIndex)"
+                          v-if="
+                            (isCloseList[toolIndex].isCloseBoolean) &&
+                            isCloseList[toolIndex].isClose == 0
+                          "
+                        >
+                          折叠
+                        </div>
+                        <div
+                          class="corOpen"
+                          @click="contract(toolIndex)"
+                          v-if="isCloseList[toolIndex].isClose == 1"
+                        >
+                          展开
+                        </div>
+                      </div>
+                      <!-- <el-button type="text" @click="jump()" v-if="tType == 2" class="buttonA">我的评价</el-button> -->
+                    </div>
+                    <div>
+                      <div
+                        :id="'tool-' + toolIndex"
+                        :style="{
+                          height:isCloseList[toolIndex].isClose == 1 ? retrnToolHeight('tool-' + toolIndex) : 'auto',
+                          overflow: isCloseList[toolIndex].isClose == 1 ? 'hidden' : 'unset'
+                        }"
+                        class="worksDetailBox"
+                        v-if="
+                          worksStudent.length &&
+                          worksStudent[toolIndex].length > 0
+                        "
+                      >
+                        <div
+                          v-for="(w, wIndex) in worksStudent[toolIndex]"
+                          :key="wIndex"
+                          class="isWorksName2"
+                          @click="
+                            openTools(
+                              62,
+                              toolIndex,
+                              taskCount,
+                              w.works,
+                              w.sName
+                            )
+                          "
+                        >
+                          {{ w.sName }}
+                          <img
+                            class="deleteImg deleteImg2"
+                            src="../assets/deleteworks.png"
+                            v-if="
+                              w.userid == userid || tType == 1 || tType == 4
+                            "
+                            @click.stop="deleteWorks(w.wid)"
+                            alt
+                          />
+                        </div>
+                      </div>
+                    </div>
+
+                    <div style="font-size: 18px" v-if="courseDetail.juri != ''">
+                      未提交
+                    </div>
+                    <div
+                      class="noWorksS"
+                      v-if="noWorksS && noWorksS[toolIndex].length"
+                    >
+                      <div
+                        v-for="(s, sIndex) in noWorksS[toolIndex]"
+                        :key="sIndex"
+                        class="noWorksName"
+                      >
+                        {{ s.student }}
+                      </div>
+                    </div>
+                  </div>
+									<div
+                    v-if="
+                      tType &&
+                      tType == 2 &&
+                      !sIsOpen &&
+                      tool.tool.indexOf(62) != -1
+                    "
+                    class="worksBox"
+                  >
+                    <div
+                      class="zuoyeYulan"
+                      v-if="workStudent[toolIndex].length > 0"
+                    >
+                      <span class="worksTitle">作业预览</span>
+                      <!-- <el-button type="text" @click="jump()" v-if="tType == 2" class="buttonA">我的评价</el-button> -->
+                    </div>
+                    <div
+                      class="worksDetailBox"
+                      v-if="workStudent[toolIndex].length > 0"
+                    >
+                      <div
+                        class="isWorksName2"
+                        v-for="(w, wIndex) in workStudent[toolIndex]"
+                        :key="wIndex"
+                        @click="
+                          openTools(62, toolIndex, taskCount, w.works, w.sName)
+                        "
+                      >
+                        {{ w.sName }}
+                        <img
+                          class="deleteImg deleteImg2"
+                          src="../assets/deleteworks.png"
+                          v-if="w.userid == userid || tType == 1 || tType == 4"
+                          @click.stop="deleteWorks(w.wid)"
+                          alt
+                        />
+                      </div>
+                    </div>
                   </div>
                   <div
                     v-if="
@@ -11598,6 +11733,7 @@
       :courseType="courseType"
       :taskCount="taskCount"
       :toolindex="toolindex"
+			:videoType="videoType"
     ></interVideo>
     <UpdateMore
       :dialogVisibleMember.sync="dialogVisibleMember"
@@ -12007,6 +12143,7 @@ export default {
         askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
       },
       testJson: {},
+			videoType:0,
       checkJson: [],
       askList: [],
       answerList: [],
@@ -13699,6 +13836,18 @@ export default {
                     userid: b[j].userid,
                     wid: b[j].id,
                   });
+                } else if (b[j].type == 14 && a[i].tool[0] == 62) {
+                  //英语口语
+                  this.workStudent[i].push({
+                    works: b[j].content,
+                    sName: b[j].name,
+                    score: b[j].score,
+                    img: b[j].img,
+                    type: 14,
+                    time: b[j].time,
+                    userid: b[j].userid,
+                    wid: b[j].id,
+                  });
                 }
               }
             }
@@ -14825,6 +14974,26 @@ export default {
                   _worksStudent[i].push(_work);
                   _worksStudent2[i].push(_work);
                   this.isWorksS[i].push({ uid: b[j].userid, sName: b[j].name });
+                } else if (b[j].type == 14 && a[i].tool[0] == 62) {
+                  //交互视频
+                  let _work = {
+                    userid: b[j].userid,
+                    ateacher: b[j].ateacher,
+                    wid: b[j].id,
+                    works: b[j].content,
+                    sName: b[j].name,
+                    type: 14,
+                    time: b[j].time,
+                    score: b[j].score,
+                    img: b[j].img,
+                    likesCount: likesCount,
+                    commentCount: commentCount,
+                    isLikes: isLikes,
+                    commentJson: commentJson,
+                  };
+                  _worksStudent[i].push(_work);
+                  _worksStudent2[i].push(_work);
+                  this.isWorksS[i].push({ uid: b[j].userid, sName: b[j].name });
                 } else if (b[j].type == 11 && a[i].tool[0] == 49) {
                   let _gindex = JSON.parse(b[j].content);
                   if (
@@ -17490,7 +17659,17 @@ export default {
         this.newEnglishList = { engTitle:"",engText:"" }
         this.newEnglishList1 = []
         this.selectEngC(id,z);
-      }
+      }else if(t == 62){
+				this.videoType = 1;
+				this.videoJson = {};
+				this.videoJson = JSON.parse(c);
+				// this.videoJson =
+        //   this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
+        //     index
+        //   ].toolChoose[i].videoJson;
+				this.dialogVisibleVideo = true;
+				//this.dialog
+			}
       //  else if (t == 15) {
       //   this.answerQ = "";
       //   this.questionAnswer = "";
@@ -18009,6 +18188,8 @@ export default {
         this.islock = this.groupJson.islock == 1 ? true : false;
         this.dialogVisibleGroup = true;
       } else if (t == 62) {
+				this.videoType = 0;
+				this.videoJson = {};
         this.videoJson =
           this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
             index
@@ -19667,6 +19848,7 @@ export default {
         return c;
       };
     },
+
   },
   mounted() {
     document.body.addEventListener("click", (e) => {