Browse Source

展示代码编辑器

11wqe1 2 months ago
parent
commit
9f90eb31fe

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

@@ -623,6 +623,16 @@
                       :src="pptImgUrl1"
                     ></iframe>
                   </div>
+                  <div
+                    class="wheel"
+                    v-if="showType === 16"
+                    style="width: 95%; margin: 0 auto"
+                  >
+                    <iframe
+                      style="width: 100%; height: 100%; border: none"
+                      :src="pptImgUrl1"
+                    ></iframe>
+                  </div>
                   <div
                     class="wheel"
                     v-if="showType == 3"
@@ -823,6 +833,24 @@
                               />
                             </div>
                           </div>
+                          <div class="navListItem" v-if="vitem.type == 16">
+                            <div
+                              class="navText"
+                              @click="checkHtml(vitem, vindex)"
+                              :class="isClickNav == vindex ? 'isClickNav' : ''"
+                            >
+                              {{ vitem.name }}
+                            </div>
+                            <div
+                              class="downIcon"
+                              @click="checkFileFull1(vitem.type, vitem)"
+                            >
+                              <img
+                                src="../../assets/icon/newIcon/allScreen.png"
+                                alt
+                              />
+                            </div>
+                          </div>
                         </div>
                         <div
                           class="fileC_box"
@@ -13887,6 +13915,13 @@
           :pdfUrl="fullUrl"
           style="width: 100%; height: 100%; overflow: auto"
         ></pdf>
+        <iframe
+          style="width: 100%; height: 100%; border: none"
+          security="restricted"
+          v-if="(fulltype == 16)"
+          sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
+          :src="fullUrl"
+        ></iframe>
         <div
           class="wheel"
           v-if="fulltype == 1"
@@ -22984,6 +23019,12 @@ export default {
         }</span>`
       );
     },
+    checkHtml(f, i){
+      this.showType = 16;
+      this.pptImgUrl1 = f.url;
+      this.isClickNav = i;
+      this.$forceUpdate();
+    },
     async downFile(f, i) {
       this.isClickNav = "";
       this.pptImgUrl1 = "";
@@ -24397,6 +24438,9 @@ export default {
       }else if (t == 15) {
         this.fulltype = 4;
         this.fullUrl = f.url;
+      } else if (t == 16) {
+        this.fulltype = 16;
+        this.fullUrl = f.url;
       } else if (
         t == 3 &&
         f.url.split(".")[f.url.split(".").length - 1].toLocaleUpperCase() ==

+ 53 - 9
src/components/easy3/studyStudent.vue

@@ -633,6 +633,16 @@
                       :src="pptImgUrl1"
                     ></iframe>
 
+                  </div>
+                   <div
+                    class="wheel"
+                    v-if="showType === 16"
+                    style="width: 95%; margin: 0 auto"
+                  >
+                    <iframe
+                      style="width: 100%; height: 100%; border: none"
+                      :src="pptImgUrl1"
+                    ></iframe>
                   </div>
                   <div
                     class="wheel"
@@ -827,6 +837,24 @@
                               />
                             </div>
                           </div>
+                          <div class="navListItem" v-if="vitem.type == 16">
+                            <div
+                              class="navText"
+                              @click="checkHtml(vitem, vindex)"
+                              :class="isClickNav == vindex ? 'isClickNav' : ''"
+                            >
+                              {{ vitem.name }}
+                            </div>
+                            <div
+                              class="downIcon"
+                              @click="checkFileFull1(vitem.type, vitem)"
+                            >
+                              <img
+                                src="../../assets/icon/newIcon/allScreen.png"
+                                alt
+                              />
+                            </div>
+                          </div>
                         </div>
                         <div class="fileC_box" v-if="fileC[0].length > 0">
                           <div class="fileC_title">以下文件不支持预览</div>
@@ -10503,19 +10531,26 @@
 						allow="camera *; microphone *;display-capture;midi;encrypted-media;"
             v-else-if="(fulltype == 2 || fulltype == 4) && (fullUrl.indexOf('knowledge.cocorobo.cn')!=-1 || fullUrl.indexOf('cloud.cocorobo.cn')!=-1) || fullUrl.indexOf('app.cocorobo.cn')!=-1"
             :src="fullUrl"
-          ></iframe>
-          <iframe
-            style="width: 100%; height: 100%; border: none"
-            security="restricted"
-            v-else-if="(fulltype == 2 || fulltype == 4)"
-            sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
-            :src="fullUrl"
-          ></iframe>
+        ></iframe>
+        <iframe
+          style="width: 100%; height: 100%; border: none"
+          security="restricted"
+          v-else-if="(fulltype == 2 || fulltype == 4)"
+          sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
+          :src="fullUrl"
+        ></iframe>
         <pdf
           v-else-if="fulltype == 3"
           :pdfUrl="fullUrl"
           style="width: 100%; height: 100%; overflow: auto"
         ></pdf>
+        <iframe
+          style="width: 100%; height: 100%; border: none"
+          security="restricted"
+          v-if="(fulltype == 16)"
+          sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
+          :src="fullUrl"
+        ></iframe>
         <div
           class="wheel"
           v-if="fulltype == 1"
@@ -18459,6 +18494,12 @@ export default {
       this.$forceUpdate();
 			this.insertMemorandum(`查看文件<span class="variable">任务${this.taskCount+1}:${this.vChapterData[this.taskCount][i].name}</span>`)
     },
+    checkHtml(f, i){
+      this.showType = 16;
+      this.pptImgUrl1 = f.url;
+      this.isClickNav = i;
+      this.$forceUpdate();
+    },
     async downFile(f, i) {
       this.isClickNav = "";
       this.pptImgUrl1 = "";
@@ -19868,7 +19909,10 @@ export default {
       } else if (t == 8) {
         this.fulltype = 2;
         this.fullUrl = f.url;
-      }else if (t == 15) {
+      } else if (t == 16) {
+        this.fulltype = 16;
+        this.fullUrl = f.url;
+      } else if (t == 15) {
         this.fulltype = 4;
         this.fullUrl = f.url;
       } else if (

+ 45 - 0
src/components/studyStudent.vue

@@ -598,6 +598,16 @@
                       :src="pptImgUrl1"
                     ></iframe>
                   </div>
+                  <div
+                    class="wheel"
+                    v-if="showType === 16"
+                    style="width: 95%; margin: 0 auto"
+                  >
+                    <iframe
+                      style="width: 100%; height: 100%; border: none"
+                      :src="pptImgUrl1"
+                    ></iframe>
+                  </div>
                   <div
                     class="wheel"
                     v-if="showType == 3"
@@ -783,7 +793,26 @@
                               <img src="../assets/icon/newIcon/down.png" alt />
                             </div>
                           </div>
+                            <div class="navListItem" v-if="vitem.type == 16">
+                              <div
+                                class="navText"
+                                @click="checkHtml(vitem, vindex)"
+                                :class="isClickNav == vindex ? 'isClickNav' : ''"
+                              >
+                                {{ vitem.name }}
+                              </div>
+                              <div
+                                class="downIcon"
+                                @click="checkFileFull1(vitem.type, vitem)"
+                              >
+                                <img
+                                  src="../assets/icon/newIcon/allScreen.png"
+                                  alt
+                                />
+                              </div>
+                          </div>
                         </div>
+                        
                         <div
                           class="fileC_box"
                           v-if="fileC[taskCount].length > 0"
@@ -10458,6 +10487,13 @@
           :pdfUrl="fullUrl"
           style="width: 100%; height: 100%; overflow: auto"
         ></pdf>
+        <iframe
+          style="width: 100%; height: 100%; border: none"
+          security="restricted"
+          v-if="(fulltype == 16)"
+          sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
+          :src="fullUrl"
+        ></iframe>
         <div
           class="wheel"
           v-if="fulltype == 1"
@@ -18399,6 +18435,12 @@ export default {
       this.$forceUpdate();
 			this.insertMemorandum(`查看文件<span class="variable">任务${this.taskCount+1}:${this.vChapterData[this.taskCount][i].name}</span>`)
     },
+    checkHtml(f, i){
+      this.showType = 16;
+      this.pptImgUrl1 = f.url;
+      this.isClickNav = i;
+      this.$forceUpdate();
+    },
     async downFile(f, i) {
       this.isClickNav = "";
       this.pptImgUrl1 = "";
@@ -19815,6 +19857,9 @@ export default {
         this.diffKey = new Date().getTime();
         this.fulltype = 4;
         this.fullUrl = f.url;
+      } else if (t == 16) {
+        this.fulltype = 16;
+        this.fullUrl = f.url;
       } else if (
         t == 3 &&
         f.url.split(".")[f.url.split(".").length - 1].toLocaleUpperCase() ==

+ 44 - 0
src/components/studySutdentClass/studyStudent.vue

@@ -633,6 +633,16 @@
                       :src="pptImgUrl1"
                     ></iframe>
                   </div>
+                  <div
+                    class="wheel"
+                    v-if="showType === 16"
+                    style="width: 95%; margin: 0 auto"
+                  >
+                    <iframe
+                      style="width: 100%; height: 100%; border: none"
+                      :src="pptImgUrl1"
+                    ></iframe>
+                  </div>
                   <div
                     class="wheel"
                     v-if="showType == 3"
@@ -826,6 +836,24 @@
                               />
                             </div>
                           </div>
+                          <div class="navListItem" v-if="vitem.type == 16">
+                            <div
+                              class="navText"
+                              @click="checkHtml(vitem, vindex)"
+                              :class="isClickNav == vindex ? 'isClickNav' : ''"
+                            >
+                              {{ vitem.name }}
+                            </div>
+                            <div
+                              class="downIcon"
+                              @click="checkFileFull1(vitem.type, vitem)"
+                            >
+                              <img
+                                src="../../assets/icon/newIcon/allScreen.png"
+                                alt
+                              />
+                            </div>
+                          </div>
                         </div>
                         <div class="fileC_box" v-if="fileC[0].length > 0">
                           <div class="fileC_title">以下文件不支持预览</div>
@@ -13697,6 +13725,13 @@
           :pdfUrl="fullUrl"
           style="width: 100%; height: 100%; overflow: auto"
         ></pdf>
+        <iframe
+          style="width: 100%; height: 100%; border: none"
+          security="restricted"
+          v-if="(fulltype == 16)"
+          sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
+          :src="fullUrl"
+        ></iframe>
         <div
           class="wheel"
           v-if="fulltype == 1"
@@ -22430,6 +22465,12 @@ export default {
       this.$forceUpdate();
 			this.insertMemorandum(`查看文件<span class="variable">任务${this.taskCount+1}:${this.vChapterData[this.taskCount][i].name}</span>`)
     },
+    checkHtml(f, i){
+      this.showType = 16;
+      this.pptImgUrl1 = f.url;
+      this.isClickNav = i;
+      this.$forceUpdate();
+    },
     async downFile(f, i) {
       this.isClickNav = "";
       this.pptImgUrl1 = "";
@@ -23843,6 +23884,9 @@ export default {
         this.fulltype = 4;
         this.fullUrl = f.url;
 
+      } else if (t == 16) {
+        this.fulltype = 16;
+        this.fullUrl = f.url;
       } else if (
         t == 3 &&
         f.url.split(".")[f.url.split(".").length - 1].toLocaleUpperCase() ==