lsc 1 year ago
parent
commit
6634bdfa6d
3 changed files with 3047 additions and 28 deletions
  1. 1504 8
      src/components/easy2/studyStudent.vue
  2. 1504 8
      src/components/easy3/studyStudent.vue
  3. 39 12
      src/components/studyStudent.vue

File diff suppressed because it is too large
+ 1504 - 8
src/components/easy2/studyStudent.vue


File diff suppressed because it is too large
+ 1504 - 8
src/components/easy3/studyStudent.vue


+ 39 - 12
src/components/studyStudent.vue

@@ -149,7 +149,7 @@
         <div class="study_top" :class="{ pzClass: pzDialog }">
           <div class="vedioBox" v-if="chapInfoList[courseType].chapterInfo[0].taskJson[taskCount]
             .taskDetail != '' ||
-            vChapterData[taskCount].length > 0
+            vChapterData[taskCount].length > 0 || fileC[taskCount].length > 0
             ">
             <div class="checkbox">
               <div class="check" style="font-size: 25px" :id="chapInfoList[courseType].chapterInfo[0].taskJson[taskCount].id
@@ -159,7 +159,7 @@
                 学一学
               </div>
             </div>
-            <div class="student_head" v-if="vChapterData[taskCount].length > 0 ||
+            <div class="student_head" v-if="vChapterData[taskCount].length > 0 || fileC[taskCount].length > 0 ||
               chapInfoList[courseType].chapterInfo[0].taskJson[taskCount]
                 .taskDetail != ''
               ">
@@ -247,9 +247,9 @@
                   <img src="../assets/navBtn2.png" style="width: 25px" alt="" />
                 </div>
                 <div v-if="contentDialog == true" :style="{
-                  width: (vChapterData[taskCount].length > 0 && showType === '') ? 'calc(100%)' : 'calc(100% - 83%)', margin: (vChapterData[taskCount].length > 0 && showType === '') ? '0 15px' : '0 15px 0 0'
+                  width: ((vChapterData[taskCount].length > 0 || fileC[taskCount].length > 0) && showType === '') ? 'calc(100%)' : 'calc(100% - 83%)', margin: ((vChapterData[taskCount].length > 0 || fileC[taskCount].length > 0) && showType === '') ? '0 15px' : '0 15px 0 0'
                 }">
-                  <div class="vedioList" v-if="vChapterData[taskCount].length > 0" style="height: 650px">
+                  <div class="vedioList" v-if="vChapterData[taskCount].length > 0 || fileC[taskCount].length > 0" style="height: 650px">
                     <div class="navCorOpenBox">
                       <div class="navTitile">内容列表:</div>
                       <div class="navCorOpen" @click="setContent(false)">
@@ -257,7 +257,7 @@
                       </div>
                     </div>
                     <div class="navBox">
-                      <div v-show="vChapterData[taskCount].length > 0
+                      <div v-show="vChapterData[taskCount].length > 0  || fileC[taskCount].length > 0
                         ">
                         <div class="vedioTimeBox" v-for="(vitem, vindex) in vChapterData[taskCount]" :key="vindex + '1'">
                           <div @click="lookVedio(vitem.url, vindex)" v-if="vitem.type == 2" class="vedioName" :class="isClickNav == vindex
@@ -307,6 +307,16 @@
                             </div>
                           </div>
                         </div>
+                        <div class="fileC_box" v-if="fileC[taskCount].length > 0">
+                          <div class="fileC_title">以下文件不支持预览</div>
+                          <div class="vedioTimeBox" v-for="(vitem, vindex) in fileC[taskCount]" :key="vindex + '1'">
+                            <div style="width: calc(100% - 0px)" @click="downloadFile2(vitem)" v-if="vitem.type == 12">
+                              <div class="navText">
+                                <span v-if="vitem.text">{{ vitem.text }}-</span>{{ vitem.name }}
+                              </div>
+                            </div>
+                          </div>
+                        </div>
                       </div>
                     </div>
                   </div>
@@ -9199,7 +9209,15 @@ export default {
               this.chapToolList[i] = [];
               this.file[i] = [];
               this.fileC[i] = [];
-              _chapterData[i] = c
+              _chapterData[i] = c.filter(el => {
+                return el.type != 12
+              })
+              this.fileC[i] = c.filter(el => {
+                return el.type == 12
+              })
+              // else if (c[j].type == 12) {
+              //     this.fileC[i].push(c[j]);
+              //   }
               for (var j = 0; j < c.length; j++) {
                 if (c[j].type == 7) {
                   this.chapToolList[i].push(c[j]);
@@ -9207,8 +9225,6 @@ export default {
                   this.lineList[i].push(c[j]);
                 } else if (c[j].type == 6) {
                   this.textList[i].push(c[j]);
-                } else if (c[j].type == 12) {
-                  this.fileC[i].push(c[j]);
                 } else {
                   if (
                     b.indexOf(
@@ -9379,7 +9395,12 @@ export default {
               this.chapToolList[i] = [];
               this.file[i] = [];
               this.fileC[i] = [];
-              _chapterData[i] = c
+              _chapterData[i] = c.filter(el => {
+                return el.type != 12
+              })
+              this.fileC[i] = c.filter(el => {
+                return el.type == 12
+              })
               for (var j = 0; j < c.length; j++) {
                 if (c[j].type == 7) {
                   this.chapToolList[i].push(c[j]);
@@ -9387,9 +9408,7 @@ export default {
                   this.lineList[i].push(c[j]);
                 } else if (c[j].type == 6) {
                   this.textList[i].push(c[j]);
-                } else if (c[j].type == 12) {
-                  this.fileC[i].push(c[j]);
-                } else {
+                }else {
                   if (
                     b.indexOf(
                       c[j].url
@@ -15378,4 +15397,12 @@ ol {
 .group_switch>span {
   margin-right: 5px;
 }
+
+
+.fileC_box > .fileC_title{
+  padding: 10px 5px;
+  border-top: 1px solid #cdcdcd;
+  font-size: 14px;
+  color: #868686;
+}
 </style>

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