Просмотр исходного кода

Merge branch 'master' of http://gcls-git.helxsoft.cn/GCLS/eep_page

zq 2 месяцев назад
Родитель
Сommit
2a075315aa
20 измененных файлов с 76 добавлено и 137 удалено
  1. 2 12
      src/views/book/courseware/preview/components/article/NormalModelChs.vue
  2. 9 36
      src/views/book/courseware/preview/components/article/PhraseModelChs.vue
  3. 2 4
      src/views/book/courseware/preview/components/article/Practicechs.vue
  4. 2 2
      src/views/book/courseware/preview/components/article/components/Freewrite.vue
  5. 1 1
      src/views/book/courseware/preview/components/article/components/Strockplay.vue
  6. 1 1
      src/views/book/courseware/preview/components/article/components/Strockplayredline.vue
  7. 2 2
      src/views/book/courseware/preview/components/article/components/Strockred.vue
  8. 0 10
      src/views/book/courseware/preview/components/article/index.vue
  9. 1 2
      src/views/book/courseware/preview/components/dialogue_article/Practicechs.vue
  10. 0 5
      src/views/book/courseware/preview/components/dialogue_article/index.vue
  11. 22 7
      src/views/book/courseware/preview/components/drawing/DrawingPreview.vue
  12. 2 12
      src/views/book/courseware/preview/components/h5_games/H5GamesPreview.vue
  13. 24 2
      src/views/book/courseware/preview/components/image_text/ImageTextPreview.vue
  14. 1 1
      src/views/book/courseware/preview/components/newWord_template/components/Strockplayredline.vue
  15. 1 16
      src/views/book/courseware/preview/components/new_word/NewWordPreview.vue
  16. 0 1
      src/views/book/courseware/preview/components/new_word/components/writeTableZoom.vue
  17. 1 1
      src/views/book/courseware/preview/components/notes/NotesPreview.vue
  18. 2 8
      src/views/book/courseware/preview/components/table/TablePreview.vue
  19. 1 7
      src/views/book/courseware/preview/components/upload_preview/UploadPreviewPreview.vue
  20. 2 7
      src/views/book/courseware/preview/components/video_interaction/VideoInteractionPreview.vue

+ 2 - 12
src/views/book/courseware/preview/components/article/NormalModelChs.vue

@@ -1181,7 +1181,7 @@
           left: windowWidth > 642 ? '' : '0px',
         }"
       >
-        <Notecard :item="curNoteCon" :change-card="changeCard" :attrib="attrib" :isMobile="isMobile" />
+        <Notecard :item="curNoteCon" :change-card="changeCard" :attrib="attrib" />
       </div>
     </template>
   </div>
@@ -1196,17 +1196,7 @@ export default {
     AudioLine,
     Notecard,
   },
-  props: [
-    'curQue',
-    'noFont',
-    'config',
-    'NNPEAnnotationList',
-    'colLength',
-    'themeColor',
-    'multilingual',
-    'attrib',
-    'isMobile',
-  ],
+  props: ['curQue', 'noFont', 'config', 'NNPEAnnotationList', 'colLength', 'themeColor', 'multilingual', 'attrib'],
   data() {
     return {
       resArr: [],

+ 9 - 36
src/views/book/courseware/preview/components/article/PhraseModelChs.vue

@@ -128,6 +128,7 @@
                               v-for="(wItem, wIndex) in pItem.leg"
                               :key="'ci' + wIndex + pIndex + index"
                               :class="[
+                                isPlaying &&
                                 pItem.chstimeList &&
                                 pItem.chstimeList[wIndex] &&
                                 curTime >= pItem.chstimeList[wIndex].wordBg &&
@@ -137,6 +138,7 @@
                               ]"
                               :style="{
                                 color:
+                                  isPlaying &&
                                   pItem.chstimeList &&
                                   pItem.chstimeList[wIndex] &&
                                   curTime >= pItem.chstimeList[wIndex].wordBg &&
@@ -145,7 +147,7 @@
                                     ? attrib.topic_color
                                     : '',
                               }"
-                              @click.stop="viewNotes($event, pItem.chs[wIndex], pItem.chs)"
+                              @click.stop="viewNotes($event, pItem.chs[wIndex])"
                               >{{ pItem.chs[wIndex] }}</span
                             ></span
                           >
@@ -349,6 +351,7 @@
                             v-for="(wItem, wIndex) in pItem.leg"
                             :key="'ci' + wIndex + pIndex + index"
                             :class="[
+                              isPlaying &&
                               pItem.chstimeList &&
                               pItem.chstimeList[wIndex] &&
                               curTime >= pItem.chstimeList[wIndex].wordBg &&
@@ -358,6 +361,7 @@
                             ]"
                             :style="{
                               color:
+                                isPlaying &&
                                 pItem.chstimeList &&
                                 pItem.chstimeList[wIndex] &&
                                 curTime >= pItem.chstimeList[wIndex].wordBg &&
@@ -366,7 +370,7 @@
                                   ? attrib.topic_color
                                   : '',
                             }"
-                            @click.stop="viewNotes($event, pItem.chs[wIndex], pItem.chs)"
+                            @click.stop="viewNotes($event, pItem.chs[wIndex])"
                             >{{ pItem.chs[wIndex] }}</span
                           ></span
                         >
@@ -495,7 +499,7 @@
                                 lineHeight:
                                   attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
                               }"
-                              @click.stop="viewNotes($event, pItem.words ? pItem.words : pItem.chs[wIndex], pItem.chs)"
+                              @click.stop="viewNotes($event, pItem.words ? pItem.words : pItem.chs[wIndex])"
                               >{{ pItem.chs[wIndex] }}</span
                             >
                           </template>
@@ -709,7 +713,7 @@
                               lineHeight:
                                 attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
                             }"
-                            @click.stop="viewNotes($event, pItem.words ? pItem.words : pItem.chs[wIndex], pItem.chs)"
+                            @click.stop="viewNotes($event, pItem.words ? pItem.words : pItem.chs[wIndex])"
                             >{{ pItem.chs[wIndex] }}</span
                           >
                         </template>
@@ -1401,7 +1405,7 @@ export default {
         }
       }
     },
-    viewNotes(e, noteNum, noteNums) {
+    viewNotes(e, noteNum) {
       let _this = this;
       _this.clickType = 'note';
       _this.activeWord = null;
@@ -1445,37 +1449,6 @@ export default {
         } else {
           _this.left = left;
         }
-      } else if (this.newWordList.indexOf(noteNums) > -1) {
-        if (_this.oldHz != noteNums) {
-          this.isShow = false;
-          _this.NNPENewWordList.forEach((items) => {
-            // item.forEach((items) => {
-            if (items.new_word === noteNums) {
-              this.activeWord = items;
-            }
-            // });
-          });
-          setTimeout(() => {
-            _this.hz = noteNums;
-          }, 50);
-        }
-        _this.clientY = e.clientY;
-        let left = e.clientX;
-        let width = 0;
-
-        if (noteNums.length == 1 || noteNums.length == 2) {
-          width = 304;
-        } else if (noteNums.length == 3 || noteNums.length == 4) {
-          width = 432;
-        } else if (noteNums.length > 3) {
-          width = 560;
-        }
-
-        if (left - this.bodyLeft > this.contentWidth / 2) {
-          _this.left = left - width + 10;
-        } else {
-          _this.left = left;
-        }
       }
     },
     showNoteDetail(e, noteNum) {

+ 2 - 4
src/views/book/courseware/preview/components/article/Practicechs.vue

@@ -1228,8 +1228,7 @@ export default {
       display: flex;
       align-items: center;
       justify-content: flex-start;
-
-      // width: 304px;
+      width: 304px;
       padding: 4px 12px;
       background: #fff;
       border: 1px solid rgba(0, 0, 0, 10%);
@@ -1237,8 +1236,7 @@ export default {
 
       .luyin-box {
         width: 280px;
-
-        // max-width: 280px;
+        max-width: 280px;
       }
 
       .compare-box {

+ 2 - 2
src/views/book/courseware/preview/components/article/components/Freewrite.vue

@@ -187,7 +187,7 @@ export default {
         .generate()
         .then((res) => {
           let Book_img = res.replace('data:image/png;base64,', '');
-          let write_img = `data:image/png;base64,${Book_img}`;
+          let write_img = `data:image/png;base64,${  Book_img}`;
           let answer = {};
           answer = {
             hz,
@@ -315,7 +315,7 @@ export default {
     margin: 0 auto;
 
     .character-target-div {
-      z-index: 1;
+      z-index: 99999;
       display: flex;
       align-items: center;
       justify-content: center;

+ 1 - 1
src/views/book/courseware/preview/components/article/components/Strockplay.vue

@@ -86,7 +86,7 @@ export default {
 }
 
 .character-target-div {
-  z-index: 1;
+  z-index: 99999;
   display: flex;
   align-items: center;
   justify-content: center;

+ 1 - 1
src/views/book/courseware/preview/components/article/components/Strockplayredline.vue

@@ -103,7 +103,7 @@ export default {
 }
 
 .character-target-div {
-  z-index: 1;
+  z-index: 99999;
   display: flex;
   align-items: center;
   justify-content: center;

+ 2 - 2
src/views/book/courseware/preview/components/article/components/Strockred.vue

@@ -63,7 +63,7 @@ export default {
     initHanziwrite() {
       let _this = this;
       let options = {
-        charDataLoader(char, onComplete) {
+        charDataLoader (char, onComplete) {
           let MethodName = 'hz_resource_manager-GetHZStrokesContent';
           let data = {
             hz: char,
@@ -108,7 +108,7 @@ export default {
 
   //chinawrite220.png
   .character-target-div {
-    z-index: 1;
+    z-index: 99999;
     display: flex;
     align-items: center;
     justify-content: center;

+ 0 - 10
src/views/book/courseware/preview/components/article/index.vue

@@ -122,7 +122,6 @@
             :col-length="colLength"
             :multilingual="showLang && getLang() ? getLang() : ''"
             :attrib="data.unified_attrib"
-            :isMobile="isMobile"
             @changeConfig="changeConfig"
           />
           <PhraseModel
@@ -142,7 +141,6 @@
             :NpcNewWordMp3="NpcNewWordMp3"
             :multilingual="showLang && getLang() ? getLang() : ''"
             :attrib="data.unified_attrib"
-            :isMobile="isMobile"
             @changeConfig="changeConfig"
           />
           <Practice
@@ -162,7 +160,6 @@
             :is-full="isFull"
             :multilingual="showLang && getLang() ? getLang() : ''"
             :attrib="data.unified_attrib"
-            :isMobile="isMobile"
             @changeConfig="changeConfig"
           />
           <WordModel
@@ -181,7 +178,6 @@
             :col-length="colLength"
             :multilingual="showLang && getLang() ? getLang() : ''"
             :attrib="data.unified_attrib"
-            :isMobile="isMobile"
             @changeConfig="changeConfig"
           />
         </div>
@@ -202,7 +198,6 @@
             :TaskModel="isJudgingRightWrong ? 'ANSWER' : ''"
             :NpcNewWordMp3="NpcNewWordMp3"
             :attrib="data.unified_attrib"
-            :isMobile="isMobile"
             @handleWav="handleWav"
             @changePinyin="changePinyins"
             @changeEN="changeENs"
@@ -874,10 +869,5 @@ export default {
       border-bottom: none !important;
     }
   }
-
-  .el-slider {
-    flex: 1;
-    width: auto !important;
-  }
 }
 </style>

+ 1 - 2
src/views/book/courseware/preview/components/dialogue_article/Practicechs.vue

@@ -1486,8 +1486,7 @@ export default {
       display: flex;
       align-items: center;
       justify-content: flex-start;
-
-      // width: 304px;
+      width: 304px;
       padding: 4px 12px;
       background: #fff;
       border: 1px solid rgba(0, 0, 0, 10%);

+ 0 - 5
src/views/book/courseware/preview/components/dialogue_article/index.vue

@@ -863,10 +863,5 @@ export default {
       border-bottom: none;
     }
   }
-
-  .el-slider {
-    flex: 1;
-    width: auto !important;
-  }
 }
 </style>

+ 22 - 7
src/views/book/courseware/preview/components/drawing/DrawingPreview.vue

@@ -1,14 +1,14 @@
 <!-- eslint-disable vue/no-v-html -->
 <template>
-  <div class="imageText-preview" :style="getAreaStyle()">
+  <div class="drawimg-preview" :style="getAreaStyle()">
     <SerialNumberPosition v-if="isEnable(data.property.sn_display_mode)" :property="data.property" />
 
     <div
       class="img-box"
       :style="{
         background: image_url ? '' : '#DCDFE6',
-        width: data.image_width + 'px',
-        height: data.image_height + 'px',
+        width: isMobile ? '100%' : data.image_width + 'px',
+        height: isMobile ? mobileHeight + 'px' : data.image_height + 'px',
         border: '1px dotted #DCDFE6',
       }"
     >
@@ -21,7 +21,10 @@
           :src="image_url"
           draggable="false"
           alt="背景图"
-          :style="{ width: `${data.imgData.width}px`, height: `${data.imgData.height}px` }"
+          :style="{
+            width: isMobile ? '100%' : `${data.imgData.width}px`,
+            height: isMobile ? mobileHeight + 'px' : `${data.imgData.height}px`,
+          }"
         />
       </div>
       <!-- 如果是查看答案模式 v-if 下面画画的vue-esign不显示 -->
@@ -37,8 +40,8 @@
       /> -->
       <VueSignaturePad
         class="esign-canvas"
-        :width="data.image_width + 'px'"
-        :height="data.image_height + 'px'"
+        :width="isMobile ? '100%' : data.image_width + 'px'"
+        :height="isMobile ? mobileHeight + 'px' : data.image_height + 'px'"
         ref="signaturePad"
         :options="options"
       />
@@ -67,7 +70,12 @@ import { GetFileURLMap } from '@/api/app';
 import vueEsign from 'vue-esign';
 export default {
   name: 'DrawingPreview',
-
+  props: {
+    isMobile: {
+      type: Boolean,
+      default: false,
+    },
+  },
   components: { vueEsign },
   mixins: [PreviewMixin],
   data() {
@@ -99,6 +107,7 @@ export default {
       isActive3: false,
       imgSrc: '',
       signData: null,
+      mobileHeight: 0,
     };
   },
   created() {
@@ -168,6 +177,12 @@ export default {
         //   this.image_url = url_map[item.file_id];
         // });
       });
+      if (this.isMobile) {
+        setTimeout(() => {
+          let totalWidth = document.querySelector('.drawimg-preview').offsetWidth;
+          this.mobileHeight = (totalWidth / this.data.image_width) * this.data.image_height;
+        }, 50);
+      }
     },
     // 保存图片
     handleGenerate() {

+ 2 - 12
src/views/book/courseware/preview/components/h5_games/H5GamesPreview.vue

@@ -16,12 +16,7 @@
         @click="toggleFullScreen"
         >{{ full_type ? '退出全屏' : '进入全屏' }}</el-button
       >
-      <iframe
-        :src="games_url"
-        width="100%"
-        :height="full_type ? '100%' : isMobile ? '400px' : '580px'"
-        style="border: none"
-      ></iframe>
+      <iframe :src="games_url" width="100%" :height="full_type ? '100%' : '580px'" style="border: none"></iframe>
     </div>
   </div>
 </template>
@@ -32,12 +27,7 @@ import { getH5GamesData } from '@/views/book/courseware/data/h5Games';
 import { H5StartupFile } from '@/api/app';
 export default {
   name: 'H5GamesPreview',
-  props: {
-    isMobile: {
-      type: Boolean,
-      default: false,
-    },
-  },
+
   components: {},
   mixins: [PreviewMixin],
   data() {

+ 24 - 2
src/views/book/courseware/preview/components/image_text/ImageTextPreview.vue

@@ -95,8 +95,9 @@
       :visible.sync="mageazineDetailShow"
       :show-close="false"
       :close-on-click-modal="false"
-      width="80%"
+      :width="isMobile ? '100%' : '80%'"
       class="login-dialog magazine-detail-dialog"
+      :class="[isMobile ? 'magazine-detail-dialog-phone' : '']"
       :modal="false"
     >
       <magazine-sentence
@@ -123,7 +124,12 @@ import { GetFileURLMap } from '@/api/app';
 import MagazineSentence from './components/MagazineSentence.vue';
 export default {
   name: 'ImageTextPreview',
-
+  props: {
+    isMobile: {
+      type: Boolean,
+      default: false,
+    },
+  },
   components: { AudioLine, MagazineSentence },
   mixins: [PreviewMixin],
   data() {
@@ -252,6 +258,11 @@ export default {
 <style lang="scss" scoped>
 @use '@/styles/mixin.scss' as *;
 
+.imageText-preview {
+  max-width: 100%;
+  overflow: auto;
+}
+
 .position-item {
   position: absolute;
   z-index: 1;
@@ -307,6 +318,11 @@ export default {
     margin: 24px 0;
   }
 }
+
+:deep .el-slider {
+  flex: 1;
+  width: auto !important;
+}
 </style>
 <style lang="scss">
 .magazine-detail-dialog {
@@ -327,5 +343,11 @@ export default {
       0 16px 24px 2px rgba(0, 0, 0, 4%),
       0 8px 10px -5px rgba(0, 0, 0, 8%);
   }
+
+  &-phone {
+    .el-dialog {
+      margin-left: -50%;
+    }
+  }
 }
 </style>

+ 1 - 1
src/views/book/courseware/preview/components/newWord_template/components/Strockplayredline.vue

@@ -178,7 +178,7 @@ export default {
 
 .character-target-div {
   position: absolute;
-  z-index: 1;
+  z-index: 999;
   display: flex;
   align-items: center;
   justify-content: center;

+ 1 - 16
src/views/book/courseware/preview/components/new_word/NewWordPreview.vue

@@ -444,12 +444,7 @@
                   @handleListenRead="handleListenRead"
                 />
               </div>
-              <div
-                v-for="(item, index) in data.new_word_list"
-                :key="index"
-                class="NPC-word-tile-item"
-                :class="[isMobile ? 'NPC-word-tile-item-phone' : '']"
-              >
+              <div v-for="(item, index) in data.new_word_list" :key="index" class="NPC-word-tile-item">
                 <div class="writeTop" :class="{ flipped: item.isFlipped }">
                   <div
                     v-if="item.show_left"
@@ -1732,15 +1727,6 @@ export default {
     }
   }
 
-  .NPC-word-tile-item-phone {
-    width: calc(50% - 10px);
-
-    .writeTop {
-      width: 100%;
-      min-height: 160px;
-    }
-  }
-
   .flipped {
     transform: rotateY(180deg);
   }
@@ -1751,7 +1737,6 @@ export default {
 
   .hz-box {
     display: flex;
-    flex-flow: wrap;
     width: max-content;
   }
 

+ 0 - 1
src/views/book/courseware/preview/components/new_word/components/writeTableZoom.vue

@@ -794,7 +794,6 @@ export default {
 
   .hz-box {
     display: flex;
-    flex-flow: wrap;
     width: max-content;
   }
 

+ 1 - 1
src/views/book/courseware/preview/components/notes/NotesPreview.vue

@@ -170,7 +170,7 @@ export default {
   name: 'NotesPreview',
   components: {},
   mixins: [PreviewMixin],
-  props: ['notesData', 'isMobile'],
+  props: ['notesData'],
   data() {
     return {
       data: this.notesData ? this.notesData : getNotesData(),

+ 2 - 8
src/views/book/courseware/preview/components/table/TablePreview.vue

@@ -7,13 +7,13 @@
       <div
         class="table-box"
         :style="{
-          width: isMobile ? '100%' : data.property.width + 'px',
+          width: data.property.width + 'px',
           height: data.property.height + 'px',
         }"
       >
         <table
           :style="{
-            width: isMobile ? '100%' : table_width + 'px',
+            width: table_width + 'px',
             height: data.property.height + 'px',
           }"
         >
@@ -240,12 +240,6 @@ export default {
   name: 'TablePreview',
   components: { SoundRecordBox, WriteDialog },
   mixins: [PreviewMixin],
-  props: {
-    isMobile: {
-      type: Boolean,
-      default: false,
-    },
-  },
   data() {
     return {
       data: getTableData(),

+ 1 - 7
src/views/book/courseware/preview/components/upload_preview/UploadPreviewPreview.vue

@@ -88,7 +88,7 @@
       :modal-append-to-body="true"
       :append-to-body="true"
       :lock-scroll="true"
-      :width="isMobile ? '100%' : '80%'"
+      width="80%"
       top="0"
     >
       <iframe v-if="visible" :src="newpath" width="100%" :height="iframeHeight" frameborder="0"></iframe>
@@ -107,12 +107,6 @@ import { getUploadPreviewData } from '@/views/book/courseware/data/uploadPreview
 export default {
   name: 'UploadPreviewPreview',
   mixins: [PreviewMixin],
-  props: {
-    isMobile: {
-      type: Boolean,
-      default: false,
-    },
-  },
   data() {
     return {
       data: getUploadPreviewData(),

+ 2 - 7
src/views/book/courseware/preview/components/video_interaction/VideoInteractionPreview.vue

@@ -46,7 +46,7 @@
       :modal-append-to-body="true"
       :append-to-body="true"
       :lock-scroll="true"
-      :width="isMobile ? '100%' : '80%'"
+      width="80%"
       @close="handleClose"
     >
       <Report
@@ -68,12 +68,7 @@ import { getVideoInteractionData } from '@/views/book/courseware/data/videoInter
 import { getConfig } from '@/utils/auth';
 export default {
   name: 'VideoInteractionPreview',
-  props: {
-    isMobile: {
-      type: Boolean,
-      default: false,
-    },
-  },
+
   components: { ExercisePreview, Report },
   mixins: [PreviewMixin],
   data() {