lsc 2 years ago
parent
commit
f6e0841d55
2 changed files with 77 additions and 45 deletions
  1. 24 8
      src/components/study.vue
  2. 53 37
      src/components/studyStudent.vue

+ 24 - 8
src/components/study.vue

@@ -888,6 +888,17 @@
                         </div>
                       </div>
                     </div>
+                    <div class="xuan_right_box" style="background:unset" v-if="
+                      worksStudent[jdIndex] &&
+                      worksStudent[jdIndex][rwIndex] &&
+                      tType &&
+                      tType == 3 &&
+                      tool.tool.indexOf(4) != -1
+                    ">
+                      <AskStatic v-if="
+                        worksStudent[jdIndex][rwIndex][toolIndex].length > 0
+                      " :askJSON="tool.askJson" :checkJson="checkJson[jdIndex][rwIndex][toolIndex]"></AskStatic>
+                    </div>
                     <div v-if="
                       worksStudent[jdIndex] &&
                       worksStudent[jdIndex][rwIndex] &&
@@ -940,9 +951,6 @@
                           {{ s.student }}
                         </div>
                       </div>
-                      <AskStatic v-if="
-                        worksStudent[jdIndex][rwIndex][toolIndex].length > 0
-                      " :askJSON="tool.askJson" :checkJson="checkJson[jdIndex][rwIndex][toolIndex]"></AskStatic>
                     </div>
                     <div v-if="
                       worksStudent[jdIndex] &&
@@ -1389,6 +1397,19 @@
                         </div>
                       </div>
                     </div>
+                    <div class="xuan_right_box" style="background:unset" v-if="
+                      worksStudent[jdIndex] &&
+                      worksStudent[jdIndex][rwIndex] &&
+                      tType &&
+                      tType == 3 &&
+                      tool.tool.indexOf(41) != -1
+                    ">
+                      <AnswerData2 v-if="
+                        worksStudent.length &&
+                        worksStudent[jdIndex][rwIndex][toolIndex].length > 0
+                      " :problemJson="tool.selectJson.answer" :people="worksStudent[jdIndex][rwIndex][toolIndex]">
+                      </AnswerData2>
+                    </div>
                     <div v-if="
                       worksStudent[jdIndex] &&
                       worksStudent[jdIndex][rwIndex] &&
@@ -1428,11 +1449,6 @@
                           {{ s.student }}
                         </div>
                       </div>
-                      <AnswerData2 v-if="
-                        worksStudent.length &&
-                        worksStudent[jdIndex][rwIndex][toolIndex].length > 0
-                      " :problemJson="tool.selectJson.answer" :people="worksStudent[jdIndex][rwIndex][toolIndex]">
-                      </AnswerData2>
                     </div>
                   </div>
                   <!-- <div class="upload_toolBtn" @click="addImg($event)">

+ 53 - 37
src/components/studyStudent.vue

@@ -134,14 +134,14 @@
                       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
+                      ? chapInfoList[courseType].chapterInfo[0].taskJson[
+                          taskCount
+                        ].taskDetail
+                      : '暂无描述'
+                  ">
                     <!-- <span style="color: #cbcbcb">任务描述</span> -->
                     <!-- {{
                         chapInfoList[courseType].chapterInfo[0].taskJson[
@@ -220,19 +220,19 @@
                     ? 'listNoVedio'
                     : ''
                 " v-if="
-                    (vedio.length &&
-                      vedio[taskCount] &&
-                      vedio[taskCount].length > 0) ||
-                    (textList.length &&
-                      textList[taskCount] &&
-                      textList[taskCount].length > 0) ||
-                    (lineList.length &&
-                      lineList[taskCount] &&
-                      lineList[taskCount].length > 0) ||
-                    (file.length &&
-                      file[taskCount] &&
-                      file[taskCount].length > 0)
-                  ">
+                  (vedio.length &&
+                    vedio[taskCount] &&
+                    vedio[taskCount].length > 0) ||
+                  (textList.length &&
+                    textList[taskCount] &&
+                    textList[taskCount].length > 0) ||
+                  (lineList.length &&
+                    lineList[taskCount] &&
+                    lineList[taskCount].length > 0) ||
+                  (file.length &&
+                    file[taskCount] &&
+                    file[taskCount].length > 0)
+                ">
                   <div class="navTitile">内容列表:</div>
                   <div class="navBox">
                     <div v-show="
@@ -904,6 +904,18 @@
                       </div>
                     </div>
                   </div>
+                  <div class="xuan_right_box" style="background:unset" v-if="
+                    tType &&
+                    ((tType == 2 && sIsOpen == true) ||
+                      tType == 1 ||
+                      tType == 4) &&
+                    tool.tool.indexOf(4) != -1
+                  ">
+                    <AskStatic v-if="
+                      worksStudent.length &&
+                      worksStudent[toolIndex].length > 0
+                    " :askJSON="tool" :checkJson="checkJson[toolIndex]"></AskStatic>
+                  </div>
                   <div v-if="
                     tType &&
                     ((tType == 2 && sIsOpen == true) ||
@@ -956,10 +968,6 @@
                         {{ s.student }}
                       </div>
                     </div>
-                    <AskStatic v-if="
-                      worksStudent.length &&
-                      worksStudent[toolIndex].length > 0
-                    " :askJSON="tool" :checkJson="checkJson[toolIndex]"></AskStatic>
                   </div>
                   <div v-if="
                     tType &&
@@ -1379,6 +1387,18 @@
                       </div>
                     </div>
                   </div>
+                  <div v-if="
+                    tType &&
+                    ((tType == 2 && sIsOpen == true) ||
+                      tType == 1 ||
+                      tType == 4) &&
+                    tool.tool.indexOf(41) != -1
+                  ">
+                    <AnswerData2 v-if="
+                      worksStudent.length &&
+                      worksStudent[toolIndex].length > 0
+                    " :problemJson="tool.selectJson.answer" :people="worksStudent[toolIndex]"></AnswerData2>
+                  </div>
                   <div v-if="
                     tType &&
                     ((tType == 2 && sIsOpen == true) ||
@@ -1452,10 +1472,6 @@
                         {{ s.student }}
                       </div>
                     </div>
-                    <AnswerData2 v-if="
-                      worksStudent.length &&
-                      worksStudent[toolIndex].length > 0
-                    " :problemJson="tool.selectJson.answer" :people="worksStudent[toolIndex]"></AnswerData2>
                   </div>
                   <div v-if="tType && tType == 2 && tool.tool.indexOf(41) != -1" class="worksBox">
                     <div class="zuoyeYulan" v-if="workStudent[toolIndex].length > 0">
@@ -2193,7 +2209,7 @@
                   </el-select>
                 </div>
               </div>
-              <div class="rightAnswerCss" v-if="isSelect && tType == 1">
+              <div class="rightAnswerCss" v-if="isSelect && (tType == 1 || tType == 4)">
                 <div v-for="(a, aIndex) in selectJson.answer" :key="aIndex" class="rightAnswer">
                   <div v-if="selectAnswer.answer[aIndex] === a" style="color: #767de1">
                     回答正确
@@ -2481,8 +2497,8 @@ export default {
       }
     },
     handleClose(done) {
-      if(this.videoDetail.sources&&this.videoDetail.sources[0]){
-        this.videoDetail.sources[0].src=''
+      if (this.videoDetail.sources && this.videoDetail.sources[0]) {
+        this.videoDetail.sources[0].src = ''
       }
       this.commentIndexJson = {};
       done();
@@ -7035,11 +7051,11 @@ export default {
   height: 100%;
 }
 
-.pzList .time{
+.pzList .time {
   text-align: right;
-    box-sizing: border-box;
-    padding: 0 10px 10px 0px;
-    color: #949494;
-    font-size: 14px;
+  box-sizing: border-box;
+  padding: 0 10px 10px 0px;
+  color: #949494;
+  font-size: 14px;
 }
 </style>