Browse Source

Merge branch 'master' of http://60.205.254.193:3000/GCLS/eep_page

zq 1 month ago
parent
commit
02cd3f6072

+ 10 - 1
src/views/book/courseware/create/components/question/article/Article.vue

@@ -1252,7 +1252,15 @@ export default {
     },
     surePinyin() {
       this.oldInput = JSON.parse(JSON.stringify(this.checkPinyinInput.trim()));
-      this.handleReplaceTone(this.checkPinyinInput.trim());
+      if (this.oldInput) {
+        this.handleReplaceTone(this.checkPinyinInput.trim());
+      } else {
+        this.itemActive.pinyin = ' ';
+        this.itemActive.pinyin_up = ' ';
+        this.$message.success('保存成功');
+        // this.itemActive = null;
+        this.dialogFlag = false;
+      }
     },
     handleReplaceTone(e) {
       let _this = this;
@@ -1669,6 +1677,7 @@ export default {
   .pinyin {
     display: block;
     font-family: 'PINYIN-B';
+    white-space: pre;
   }
 
   .word {

+ 7 - 1
src/views/book/courseware/create/components/question/article/CheckWord.vue

@@ -311,7 +311,13 @@ export default {
     },
     surePinyin() {
       this.oldInput = JSON.parse(JSON.stringify(this.checkPinyinInput.trim()));
-      this.handleReplaceTone(this.checkPinyinInput.trim());
+      if (this.oldInput) {
+        this.handleReplaceTone(this.checkPinyinInput.trim());
+      } else {
+        this.ArticelData[this.itemActive.saveIndex].pinyin = ' ';
+        this.itemActive.pinyin = ' ';
+        this.savePinyin();
+      }
     },
     handleReplaceTone(e) {
       let _this = this;

+ 11 - 1
src/views/book/courseware/create/components/question/dialogue_article/Article.vue

@@ -1700,7 +1700,16 @@ export default {
     },
     surePinyin() {
       this.oldInput = JSON.parse(JSON.stringify(this.checkPinyinInput.trim()));
-      this.handleReplaceTone(this.checkPinyinInput.trim());
+
+      if (this.oldInput) {
+        this.handleReplaceTone(this.checkPinyinInput.trim());
+      } else {
+        this.itemActive.pinyin = ' ';
+        this.itemActive.pinyin_up = ' ';
+        this.$message.success('保存成功');
+        // this.itemActive = null;
+        this.dialogFlag = false;
+      }
     },
     handleReplaceTone(e) {
       let _this = this;
@@ -2052,6 +2061,7 @@ export default {
   .pinyin {
     display: block;
     font-family: 'PINYIN-B';
+    white-space: pre;
   }
 
   .word {

+ 6 - 1
src/views/book/courseware/create/components/question/image_text/CheckWord.vue

@@ -183,7 +183,12 @@ export default {
     },
     surePinyin() {
       this.oldInput = JSON.parse(JSON.stringify(this.checkPinyinInput.trim()));
-      this.handleReplaceTone(this.checkPinyinInput.trim());
+      if (this.oldInput) {
+        this.handleReplaceTone(this.checkPinyinInput.trim());
+      } else {
+        this.itemActive.pinyin = ' ';
+        this.savePinyin();
+      }
     },
     handleReplaceTone(e) {
       let _this = this;

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

@@ -1663,6 +1663,14 @@ export default {
           ) {
             // this.wordShow = isEnable(this.data.property.is_word_show);
             this.initData();
+            this.$nextTick(() => {
+              setTimeout(() => {
+                let totalWidth = document.querySelector('.newWord-preview').offsetWidth;
+                this.width = `${totalWidth - (this.data.property.sn_display_mode === 'true' ? 15 : 0) - 1}`;
+              }, 200);
+            });
+
+            this.dataHeight = this.$refs.previewContainer ? this.$refs.previewContainer.style.height : 0;
           }
         }
       },
@@ -1692,7 +1700,7 @@ export default {
     this.$nextTick(() => {
       setTimeout(() => {
         let totalWidth = document.querySelector('.newWord-preview').offsetWidth;
-        this.width = `${totalWidth - (this.data.property.sn_display_mode === 'true' ? 15 : 0)}`;
+        this.width = `${totalWidth - (this.data.property.sn_display_mode === 'true' ? 15 : 0) - 1}`;
       }, 200);
     });
 

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

@@ -1459,7 +1459,7 @@ $border-color: #e6e6e6;
       font-size: 16px;
 
       span {
-        text-align: center;
+        // text-align: center; // 注释掉是为了带拼音分词后折行左对齐显示了居中对齐
       }
 
       .pinyin {