瀏覽代碼

生词加星号

natasha 1 年之前
父節點
當前提交
f50ed3360b

二進制
src/assets/NPC/asterisk-brown.png


二進制
src/assets/NPC/asterisk-green.png


二進制
src/assets/NPC/asterisk-red.png


+ 7 - 1
src/components/Adult/common/NewordPhraseModule.vue

@@ -32,7 +32,13 @@
                 >下移</el-button
             >
         </div>
-
+        <div class="adult-book-input-item">
+          <span class="adult-book-lable">星号标识:</span>
+          <el-radio-group v-model="curQueItem.starFlag" @change="forupdata">
+            <el-radio :label="true">需要</el-radio>
+            <el-radio :label="false">不需要</el-radio>
+          </el-radio-group>
+        </div>
         <div
           class="adult-book-input-item"
           v-if="

+ 1 - 1
src/components/Adult/common/SentenceSegTemp.vue

@@ -346,7 +346,7 @@ export default {
         wordsList: [],
         hengList: [],
         config: {
-          fontSize: "16px",
+          fontSize: "20px",
           fontColor: "#000",
           fontFamily: "FZJCGFKTK",
           wordPadding: [],

+ 1 - 1
src/components/Adult/common/SentenceSegwordChs/index.vue

@@ -112,7 +112,7 @@ export default {
         let obj = {
           chs: item,
           pinyin: "",
-          fontSize: "16px",
+          fontSize: "20px",
           fontColor: "#000",
           fontFamily: "FZJCGFKTK",
           wordPadding: [],

+ 19 - 6
src/components/Adult/inputModules/Neword.vue

@@ -183,6 +183,7 @@ export default {
           [
             {
               new_word: "",
+              starFlag: false,
               cixing: "", //词性
               definition_list: [""], //需要增加词性
               pinyin: "",
@@ -224,6 +225,7 @@ export default {
     saddoption(item) {
       let con = {
         new_word: "",
+        starFlag: false,
         cixing: "", //词性
         definition_list: [""], //需要增加词性
         pinyin: "",
@@ -429,12 +431,23 @@ export default {
 
       // let data = JSON.parse(JSON.stringify(this.curQue));
       this.curQue.option.forEach((item) => {
-        if (!item[0].pinyin_site) {
-          item[0].pinyin_site = "first"; //拼音位置
-        }
-        if (!item[0].motif_color) {
-          item[0].motif_color = false; //主题色
-        }
+        // if (!item[0].pinyin_site) {
+        //   item[0].pinyin_site = "first"; //拼音位置
+        // }
+        // if (!item[0].motif_color) {
+        //   item[0].motif_color = false; //主题色
+        // }
+        item.forEach(items=>{
+            if(!items.hasOwnProperty("starFlag")){
+                this.$set(items, "starFlag", false);
+            }
+            if(!items.hasOwnProperty("pinyin_site")){
+                this.$set(items, "pinyin_site", "first");
+            }
+            if(!items.hasOwnProperty("motif_color")){
+                this.$set(items, "motif_color", false);
+            }
+        })
       });
       // this.curQue = JSON.parse(JSON.stringify(data));
     }

+ 1 - 1
src/components/Adult/inputModules/SentenceModule.vue

@@ -1122,7 +1122,7 @@ export default {
               wordsList: [],
               hengList: [],
               config: {
-                fontSize: "16px",
+                fontSize: "20px",
                 fontColor: "#000",
                 fontFamily: "FZJCGFKTK",
                 wordPadding: [],

+ 2 - 2
src/components/Adult/inputModules/SentenceMulModule.vue

@@ -750,7 +750,7 @@ export default {
               font: "",
               detail: [],
               numbertotal: '', // 总题干序号
-              numberfontSize: '16px', // 序号大小
+              numberfontSize: '20px', // 序号大小
               options:[
                 {
                     mp3_list: [],
@@ -1173,7 +1173,7 @@ export default {
               wordsList: [],
               hengList: [],
               config: {
-                fontSize: "16px",
+                fontSize: "20px",
                 fontColor: "#000",
                 fontFamily: "FZJCGFKTK",
                 wordPadding: [],

+ 7 - 2
src/components/Adult/preview/ArticleViewChs/NormalModelChs.vue

@@ -826,6 +826,7 @@ export default {
       isNoteShow: false,
       oldNoteNum: "",
       clientY: 0,
+      contentWidth: 732,
     };
   },
   computed: {
@@ -1137,9 +1138,13 @@ export default {
       let width = 642;
 
       if (left - this.bodyLeft > this.contentWidth / 2) {
-        _this.left = left - width + 10;
+        _this.left = 500;
       } else {
-        _this.left = left - 200;
+        if(left - 200>500){
+            _this.left = 500
+        }else{
+            _this.left = left - 200;
+        }
       }
     },
     // 处理分词数据

+ 5 - 1
src/components/Adult/preview/ArticleViewChs/PhraseModelChs.vue

@@ -1041,7 +1041,11 @@ export default {
       if (left - this.bodyLeft > this.contentWidth / 2) {
         _this.left = left - width + 10;
       } else {
-        _this.left = left - 200;
+        if(left - 200>500){
+            _this.left = 500
+        }else{
+            _this.left = left - 200;
+        }
       }
     },
     // 处理注释数据

+ 12 - 12
src/components/Adult/preview/DialogueArticleViewChs/AnswerModel.vue

@@ -824,8 +824,8 @@ export default {
       return function (config) {
         let sizeVal = config && config.fontSize ? config.fontSize.replace("px", "") : 20;
         return {
-          minHeight: Number(sizeVal) + 9 + "px",
-          lineHeight: Number(sizeVal) + 8 + "px",
+          minHeight: Number(sizeVal) + 13 + "px",
+          lineHeight: Number(sizeVal) + 12 + "px",
           fontSize: config ? config.fontSize : '20px',
           fontFamily: config ? config.fontFamily : 'FZJCGFKTK',
         };
@@ -835,7 +835,7 @@ export default {
         return function (config,isHasPY) {
         let sizeVal = config && config.fontSize ? config.fontSize.replace("px", "") : 20;
         return {
-          minHeight: (Number(sizeVal) + 9) + (isHasPY?22:0) + "px",
+          minHeight: (Number(sizeVal) + 13) + (isHasPY?18:0) + "px",
         };
       };
     }
@@ -1217,9 +1217,9 @@ export default {
             font-family: "GB-PINYINOK-B";
             font-weight: normal;
             font-size: 14px;
-            line-height: 22px;
+            line-height: 18px;
             color: #000000;
-            height: 22px;
+            height: 18px;
             display: block;
             &.noFont {
               font-family: initial;
@@ -1240,8 +1240,8 @@ export default {
           &.NNPE-chs {
             font-family: "FZJCGFKTK";
             font-size: 20px;
-            line-height: 28px;
-            min-height: 29px;
+            line-height: 32px;
+            min-height: 33px;
             color: #000000;
             &.active {
               background: rgba(60, 200, 99, 0.2);
@@ -1279,9 +1279,9 @@ export default {
           font-family: "GB-PINYINOK-B";
           font-weight: normal;
           font-size: 14px;
-          line-height: 22px;
+          line-height: 18px;
           color: #000000;
-          height: 22px;
+          height: 18px;
           display: block;
           &.noFont {
             font-family: initial;
@@ -1302,8 +1302,8 @@ export default {
         &.NNPE-chs {
           font-family: "FZJCGFKTK";
           font-size: 20px;
-          line-height: 28px;
-          min-height: 29px;
+          line-height: 32px;
+          min-height: 33px;
           color: #000000;
           &.active {
             background: rgba(60, 200, 99, 0.2);
@@ -1368,7 +1368,7 @@ export default {
         .pinyin {
           font-family: "GB-PINYINOK-B";
           font-size: 14px;
-          line-height: 22px;
+          line-height: 18px;
           color: rgba(0, 0, 0, 0.85);
           margin-right: 4px;
         }

+ 6 - 2
src/components/Adult/preview/DialogueArticleViewChs/NormalModelChs.vue

@@ -812,7 +812,11 @@ export default {
       if (left - this.bodyLeft > this.contentWidth / 2) {
         _this.left = left - width + 10;
       } else {
-        _this.left = left - 200;
+        if(left - 200>500){
+            _this.left = 500
+        }else{
+            _this.left = left - 200;
+        }
       }
     },
 
@@ -927,7 +931,7 @@ export default {
   }
   .NNPE-detail {
     clear: both;
-    overflow: hidden;
+    // overflow: hidden; // 为了不遮挡备注内容
     display: flex;
     justify-content: flex-start;
     align-items: flex-start;

+ 1 - 1
src/components/Adult/preview/DialogueArticleViewChs/PhraseModelChs.vue

@@ -947,7 +947,7 @@ export default {
   }
   .NNPE-detail {
     clear: both;
-    overflow: hidden;
+    // overflow: hidden; // 为了不遮挡备注内容
     display: flex;
     justify-content: flex-start;
     align-items: flex-start;

+ 5 - 1
src/components/Adult/preview/DialogueArticleViewChs/WordModelChs.vue

@@ -738,7 +738,11 @@ export default {
       if (left - this.bodyLeft > this.contentWidth / 2) {
         _this.left = left - width + 10;
       } else {
-        _this.left = left;
+        if(left - 200>500){
+            _this.left = 500
+        }else{
+            _this.left = left - 200;
+        }
       }
     },
     // 处理注释数据

+ 1 - 0
src/components/Adult/preview/InputHasRecord.vue

@@ -839,6 +839,7 @@ export default {
       border: none;
       height: 64px;
       padding: 8px 16px;
+      overflow: auto;
     }
   }
 }

+ 51 - 9
src/components/Adult/preview/WordPhrase.vue

@@ -104,13 +104,16 @@
               <template v-else>
                 <span style="width: 16px; height: 16px"></span>
               </template>
-              <template v-if="sItem.mIndex == 0">
-                <b class="tabNum">{{ index + 1 }}</b>
-              </template>
-              <div
-                v-else
-                style="width: 16px; height: 16px; margin-left: 8px"
-              ></div>
+              <div class="tabNum-box">
+                <template v-if="sItem.mIndex == 0">
+                    <b class="tabNum">{{ index + 1 }}</b>
+                </template>
+                <div
+                    v-else
+                    style="width: 16px; height: 16px; margin-left: 8px"
+                ></div>
+                <img v-if="sItem.starFlag" class="star-label" :src="require('../../../assets/NPC/asterisk-'+themeColor+'.png')" />
+              </div>
               <template
                 v-if="
                   sItem.pinyin_site &&
@@ -154,11 +157,16 @@
                 </div>
                 <span
                   class="NPC-word-tab-common NPC-word-tab-cixing"
-                  :class="[/[\u4E00-\u9FA5\uF900-\uFA2D]/.test(sItem.cixing) ? 'hasCn' : '']"
+                  :class="[/[\u4E00-\u9FA5\uF900-\uFA2D]/.test(sItem.cixing) ? 'hasCn' : '',sItem.motif_color
+                        ? 'NPC-word-tab-cixing-' + themeColor
+                        : '',]"
                   v-html="sItem.cixing"
                 ></span>
                 <span
                   class="NPC-word-tab-common NPC-word-tab-def"
+                  :class="[sItem.motif_color
+                        ? 'NPC-word-tab-def-' + themeColor
+                        : '',]"
                   v-html="sItem.def_str"
                 ></span>
               </template>
@@ -196,11 +204,16 @@
                 </span>
                 <span
                   class="NPC-word-tab-common NPC-word-tab-cixing"
-                  :class="[/[\u4E00-\u9FA5\uF900-\uFA2D]/.test(sItem.cixing) ? 'hasCn' : '']"
+                  :class="[/[\u4E00-\u9FA5\uF900-\uFA2D]/.test(sItem.cixing) ? 'hasCn' : '',sItem.motif_color
+                        ? 'NPC-word-tab-cixing-' + themeColor
+                        : '']"
                   v-html="sItem.cixing"
                 ></span>
                 <span
                   class="NPC-word-tab-common NPC-word-tab-def"
+                  :class="[sItem.motif_color
+                        ? 'NPC-word-tab-def-' + themeColor
+                        : '']"
                   v-html="sItem.def_str"
                 ></span>
               </template>
@@ -595,6 +608,16 @@ export default {
           color: #000000;
         }
       }
+      .tabNum-box{
+        position: relative;
+        .star-label{
+            position: absolute;
+            right: -6px;
+            top: 1px;
+            width: 6px;
+            height: 6px;
+        }
+      }
       .tabNum {
         background: #de4444;
         text-align: center;
@@ -607,6 +630,7 @@ export default {
         line-height: 16px;
         margin-top: 4px;
         margin-left: 8px;
+        display: block;
       }
       .NPC-word-tab-box {
         width: 240px;
@@ -663,6 +687,15 @@ export default {
         box-sizing: border-box;
         text-align: left;
         // font-style: italic;  // 要求改为正体
+        &.NPC-word-tab-cixing-red {
+          color: #e35454;
+        }
+        &.NPC-word-tab-cixing-green {
+          color: #24b99e;
+        }
+        &.NPC-word-tab-cixing-brown {
+          color: #bd8865;
+        }
         &.hasCn{
             font-size: 13px;
         }
@@ -673,6 +706,15 @@ export default {
         word-break: break-word;
         box-sizing: border-box;
         white-space: pre-wrap;
+        &.NPC-word-tab-def-red {
+          color: #e35454;
+        }
+        &.NPC-word-tab-def-green {
+          color: #24b99e;
+        }
+        &.NPC-word-tab-def-brown {
+          color: #bd8865;
+        }
       }
     }
   }