natasha 2 rokov pred
rodič
commit
a74352dea6

+ 3 - 3
src/components/Adult/common/LigatureModule.vue

@@ -66,7 +66,7 @@
               src="../../../assets/adult/del-close.png"
               alt=""
             /> -->
-            <SentenceSegwordChs :curQue="curQueItem.detail" />
+            <SentenceSegwordChs :curQue="curQueItem.detail" :type="modelType" />
           </div>
           <div class="adult-book-input-item">
             <Upload
@@ -142,7 +142,7 @@
               src="../../../assets/adult/del-close.png"
               alt=""
             /> -->
-            <SentenceSegwordChs :curQue="curQueItem.detail" />
+            <SentenceSegwordChs :curQue="curQueItem.detail" :type="modelType"/>
           </div>
           <div class="adult-book-input-item">
             <Upload
@@ -169,7 +169,7 @@ export default {
     Upload,
     SentenceSegwordChs,
   },
-  props: ["curQueItem", "index", "deleteOptionOne", "type"],
+  props: ["curQueItem", "index", "deleteOptionOne", "type", "modelType"],
   data() {
     return {
       imgNumber: 1,

+ 3 - 3
src/components/Adult/common/SegwordConfig.vue

@@ -1,7 +1,7 @@
 <!--  -->
 <template>
   <div class="seg-word-config">
-    <div class="adult-book-input-item" v-if="curQue" style="margin-top:10px">
+    <div class="adult-book-input-item" v-if="curQue&&type!='sentence_segtemp_chs'&&type!='sort_chs'&&type!='CourseStart_chs'&&type!='ligature_chs'" style="margin-top:10px">
         <span class="adult-book-lable">字的大小:</span>
         <el-radio-group v-model="curQue.resetFontsize" @input="changeResetFontsize">
             <el-radio label="12px">12px</el-radio>
@@ -11,7 +11,7 @@
             <el-radio label="28px">28px</el-radio>
         </el-radio-group>
     </div>
-    <div class="adult-book-input-item" v-if="curQue">
+    <div class="adult-book-input-item" v-if="curQue&&type!='sentence_segtemp_chs'&&type!='sort_chs'&&type!='CourseStart_chs'&&type!='ligature_chs'">
             <span class="adult-book-lable">字体:</span>
             <el-radio-group v-model="curQue.resetFontfamily" @input="changeResetFontfamily">
               <el-radio
@@ -41,7 +41,7 @@
           </div>
         </template>
       </el-table-column>
-      <el-table-column label="配置">
+      <el-table-column label="配置" v-if="type!='sort_chs'&&type!='CourseStart_chs'&&type!='ligature_chs'">
         <template slot-scope="scope">
           <div class="adult-book-input-item">
             <span class="adult-book-lable">字的大小:</span>

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

@@ -74,7 +74,7 @@
         >
       </div>
       <template>
-        <SentenceSegwordChs :curQue="dItem" :segModel="segModel" name="元素" />
+        <SentenceSegwordChs :curQue="dItem" :segModel="segModel" name="元素" :type="type" />
       </template>
       <template>
         <div class="adult-book-input-item adult-book-input-item-center">
@@ -105,7 +105,7 @@
             <el-radio label="28px">28px</el-radio>
           </el-radio-group>
         </div>
-        <div class="adult-book-input-item adult-book-input-item-center">
+        <!-- <div class="adult-book-input-item adult-book-input-item-center">
           <span class="adult-book-lable">字的颜色:</span>
           <el-radio-group v-model="dItem.config.fontColor">
             <el-radio
@@ -122,7 +122,7 @@
               >
             </el-radio>
           </el-radio-group>
-        </div>
+        </div> -->
 
         <div class="adult-book-input-item adult-book-input-item-center">
           <span class="adult-book-lable">设置间距:</span>
@@ -174,7 +174,7 @@ export default {
     SentenceSegwordChs,
     FnConfig,
   },
-  props: ["detail", "segModel"],
+  props: ["detail", "segModel", "type"],
   data() {
     return {
       inputLegOptions: [

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

@@ -26,7 +26,7 @@
         ></el-input>
       </div>
       <div>
-        <SentenceSegwordChs :curQue="curQue.detail" />
+        <SentenceSegwordChs :curQue="curQue.detail" :type="type" />
       </div>
       <div class="adult-book-input-item">
         <span class="adult-book-lable">英文:</span>

+ 3 - 1
src/components/Adult/inputModules/Ligature.vue

@@ -38,6 +38,7 @@
               :index="index"
               :deleteOptionOne="deleteOptionOne"
               :type="'con'"
+              :modelType="type"
             />
           </div>
           <div class="addoption" @click="addOption('con')">添加问题</div>
@@ -62,6 +63,7 @@
               :index="index"
               :deleteOptionOne="deleteOptionOne"
               :type="'option'"
+              :modelType="type"
             />
           </div>
           <div class="addoption" @click="addOption('option')">添加选项</div>
@@ -99,7 +101,7 @@ import LigatureModule from "../common/LigatureModule.vue";
 
 export default {
   name: "Single",
-  props: ["curQue", "fn_data", "changeCurQue"],
+  props: ["curQue", "fn_data", "changeCurQue", "type"],
   components: {
     LigatureModule,
   },

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

@@ -525,7 +525,7 @@
       :visible.sync="addStemVisible"
       width="50%"
     >
-      <SentenceSegTemp :detail="optionItemDetail" :segModel="curQue.segModel" />
+      <SentenceSegTemp :detail="optionItemDetail" :segModel="curQue.segModel" :type="type" />
       <span slot="footer" class="dialog-footer">
         <el-button @click="addStemVisible = false">取 消</el-button>
         <el-button type="primary" @click="saveOptionDetail">确 定</el-button>
@@ -572,7 +572,7 @@ export default {
     SentenceSegTemp,
     Wordcard,
   },
-  props: ["curQue", "changeCurQue", "tmIndex"],
+  props: ["curQue", "changeCurQue", "tmIndex", "type"],
   filters: {
     getFnName(type, fn_list) {
       let name = "";

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

@@ -25,7 +25,7 @@
         style="border-bottom: 1px #ccc solid; margin-bottom: 20px"
       >
         <div class="NPC-sentence-Segword" style="position: relative">
-          <SentenceSegwordChs :curQue="item.detail" />
+          <SentenceSegwordChs :curQue="item.detail" :type="type" />
           <img
             style="position: absolute; right: 202px;top: 0;"
             @click="deleteOption(index)"

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

@@ -198,7 +198,7 @@
                                 ? 'wordActive'
                                 : '',
                             ]"
-                            :style="hengStyle(pItem.config)"
+                            :style="hengStyle(item.wordsList[pIndex + 1].config)"
                             >{{ item.wordsList[pIndex + 1].chs }}</span
                           >
 
@@ -264,7 +264,7 @@
                                 ? 'wordActive'
                                 : '',
                             ]"
-                            :style="hengStyle(pItem.config)"
+                            :style="hengStyle(item.wordsList[pIndex + 2].config)"
                             >{{ item.wordsList[pIndex + 2].chs }}</span
                           >
                           <span

+ 32 - 10
src/components/Adult/preview/InputHasRecord.vue

@@ -50,7 +50,7 @@
                         ]"
                         >{{ itemCon.pinyin }}</span
                       >
-                      <span class="hanzi content-con">{{ itemCon.chs }}</span>
+                      <span class="hanzi content-con" :style="wordStyle(itemCon.config)">{{ itemCon.chs }}</span>
                       <span
                         v-if="items.detail.pyPosition == 'bottom'"
                         class="pinyin"
@@ -73,7 +73,7 @@
                         ]"
                         >{{ items.detail.wordsList[indexCon + 1].pinyin }}</span
                       >
-                      <span class="hanzi content-con">{{
+                      <span class="hanzi content-con" :style="wordStyle(items.detail.wordsList[indexCon + 1].config)">{{
                         items.detail.wordsList[indexCon + 1].chs
                       }}</span>
                       <span
@@ -100,7 +100,7 @@
                     ]"
                     >{{ itemCon.pinyin }}</span
                   >
-                  <span class="hanzi content-con">{{ itemCon.chs }}</span>
+                  <span class="hanzi content-con" :style="wordStyle(itemCon.config)">{{ itemCon.chs }}</span>
                   <span
                     v-if="items.detail.pyPosition == 'bottom'"
                     class="pinyin"
@@ -213,7 +213,7 @@
                               ]"
                               >{{ itemCon.pinyin }}</span
                             >
-                            <span class="hanzi content-con">{{
+                            <span class="hanzi content-con" :style="wordStyle(itemCon.config)">{{
                               itemCon.chs
                             }}</span>
                             <span
@@ -242,7 +242,7 @@
                                 items.detail.wordsList[indexCon + 1].pinyin
                               }}</span
                             >
-                            <span class="hanzi content-con">{{
+                            <span class="hanzi content-con" :style="wordStyle(items.detail.wordsList[indexCon + 1].config)">{{
                               items.detail.wordsList[indexCon + 1].chs
                             }}</span>
                             <span
@@ -271,7 +271,7 @@
                           ]"
                           >{{ itemCon.pinyin }}</span
                         >
-                        <span class="hanzi content-con">{{ itemCon.chs }}</span>
+                        <span class="hanzi content-con" :style="wordStyle(itemCon.config)">{{ itemCon.chs }}</span>
                         <span
                           v-if="items.detail.pyPosition == 'bottom'"
                           class="pinyin"
@@ -370,7 +370,7 @@
                           ]"
                           >{{ itemCon.pinyin }}</span
                         >
-                        <span class="hanzi content-con">{{ itemCon.chs }}</span>
+                        <span class="hanzi content-con" :style="wordStyle(itemCon.config)">{{ itemCon.chs }}</span>
                         <span
                           v-if="items.detail.pyPosition == 'bottom'"
                           class="pinyin"
@@ -395,7 +395,7 @@
                             items.detail.wordsList[indexCon + 1].pinyin
                           }}</span
                         >
-                        <span class="hanzi content-con">{{
+                        <span class="hanzi content-con" :style="wordStyle(items.detail.wordsList[indexCon + 1].config)">{{
                           items.detail.wordsList[indexCon + 1].chs
                         }}</span>
                         <span
@@ -424,7 +424,7 @@
                       ]"
                       >{{ itemCon.pinyin }}</span
                     >
-                    <span class="hanzi content-con">{{ itemCon.chs }}</span>
+                    <span class="hanzi content-con" :style="wordStyle(itemCon.config)">{{ itemCon.chs }}</span>
                     <span
                       v-if="items.detail.pyPosition == 'bottom'"
                       class="pinyin"
@@ -503,7 +503,22 @@ export default {
       userErrList: [],
     };
   },
-  computed: {},
+  computed: {
+    wordStyle() {
+      return function (config) {
+        if(config){
+            let sizeVal = config.fontSize.replace("px", "");
+            return {
+                minHeight: Number(sizeVal) + 9 + "px",
+                lineHeight: Number(sizeVal) + 8 + "px",
+                fontSize: config.fontSize,
+                fontFamily: config.fontFamily
+            };
+        }
+        
+      };
+    },
+  },
   watch: {},
   //方法集合
   methods: {
@@ -553,6 +568,13 @@ export default {
             pinyin: sItem.pinyin,
             chs: sItem.chs,
             isShow: sItem.isShow,
+            config: {
+                fontColor: sItem.fontColor,
+                fontFamily: sItem.fontFamily,
+                fontSize: sItem.fontSize,
+                underLine: sItem.underLine,
+                wordPadding: sItem.wordPadding,
+            },
           };
           paraArr.push(obj);
         });

+ 0 - 2
src/components/Adult/preview/SentenceInput.vue

@@ -310,7 +310,6 @@ export default {
     wordStyle() {
       return function (config) {
         if(config){
-            console.log(config)
             let sizeVal = config.fontSize.replace("px", "");
             return {
                 minHeight: Number(sizeVal) + 9 + "px",
@@ -446,7 +445,6 @@ export default {
         });
         this.$set(_this.curQue.option[dIndex].detail, "resArr", paraArr);
       });
-      console.log(_this.curQue.option);
 
       // 把错误的答案挑出来
       if (this.judgeAnswer == "standardAnswer") {

+ 0 - 2
src/components/Adult/preview/SentenceModule.vue

@@ -1326,8 +1326,6 @@ export default {
               }
             });
             sdItem.maxFontsize = maxFontsize;
-            console.log("sdItem");
-            console.log(sdItem);
             items.pyNumber.push(isHasPY);
           });
           if (!this.curQue.Bookanswer && !items.Isexample) {

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

@@ -199,7 +199,6 @@ export default {
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
-    console.log(this.curQue);
     let data = JSON.parse(JSON.stringify(this.curQue.option));
     data.forEach((item) => {
       item.userAnswerJudge = "[JUDGE##F##JUDGE]";

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

@@ -200,7 +200,6 @@ export default {
     handleWav(list, tmIndex) {
       tmIndex = tmIndex ? tmIndex : 0;
       this.$set(this.curQue.Bookanswer[tmIndex], "recordList", list);
-      console.log(this.curQue.Bookanswer);
     },
     changeuserAnswerJudge(index) {
       if (this.curQue.option[index].answer) {

+ 28 - 4
src/components/Adult/preview/TextProblem.vue

@@ -13,12 +13,12 @@
                                   <div class="synthesis-box">
                                       <div>
                                             <span class="pinyin" :class="[noFont.indexOf(itemCon.pinyin)>-1?'noFont':'']" v-if="item.detail.pyPosition=='top'">{{itemCon.pinyin}}</span>
-                                            <span class="hanzi content-con">{{itemCon.chs}}</span>
+                                            <span class="hanzi content-con" :style="wordStyle(itemCon.config)">{{itemCon.chs}}</span>
                                             <span class="pinyin" :class="[noFont.indexOf(itemCon.pinyin)>-1?'noFont':'']" v-if="item.detail.pyPosition=='bottom'">{{itemCon.pinyin}}</span>
                                         </div>
                                         <div style="text-align: left">
                                             <span class="pinyin" :class="[noFont.indexOf(item.detail.wordsList[indexCon + 1].pinyin)>-1?'noFont':'']" v-if="item.detail.pyPosition=='top'">{{item.detail.wordsList[indexCon + 1].pinyin}}</span>
-                                            <span class="hanzi content-con">{{item.detail.wordsList[indexCon + 1].chs}}</span>
+                                            <span class="hanzi content-con" :style="wordStyle(item.detail.wordsList[indexCon + 1].config)">{{item.detail.wordsList[indexCon + 1].chs}}</span>
                                             <span class="pinyin" :class="[noFont.indexOf(item.detail.wordsList[indexCon + 1].pinyin)>-1?'noFont':'']" v-if="item.detail.pyPosition=='bottom'">{{item.detail.wordsList[indexCon + 1].pinyin}}</span>
                                         </div>
                                   </div>
@@ -26,7 +26,7 @@
                               </template>
                               <template v-else>
                                     <span class="pinyin" :class="[noFont.indexOf(itemCon.pinyin)>-1?'noFont':'']" v-if="item.detail.pyPosition=='top'">{{itemCon.pinyin}}</span>
-                                    <span class="hanzi content-con">{{itemCon.chs}}</span>
+                                    <span class="hanzi content-con" :style="wordStyle(itemCon.config)">{{itemCon.chs}}</span>
                                     <span class="pinyin" :class="[noFont.indexOf(itemCon.pinyin)>-1?'noFont':'']" v-if="item.detail.pyPosition=='bottom'">{{itemCon.pinyin}}</span>
                               </template>
                           </div>
@@ -54,7 +54,22 @@ export default {
         noFont: ['~','!','@','#','$','%','^','&','*','(',')'], // 对应不要拼音字体
     };
   },
-  computed: {},
+  computed: {
+    wordStyle() {
+      return function (config) {
+        if(config){
+            let sizeVal = config.fontSize.replace("px", "");
+            return {
+                minHeight: Number(sizeVal) + 9 + "px",
+                lineHeight: Number(sizeVal) + 8 + "px",
+                fontSize: config.fontSize,
+                fontFamily: config.fontFamily
+            };
+        }
+        
+      };
+    },
+  },
   watch: {},
   //方法集合
   methods: {
@@ -71,6 +86,13 @@ export default {
                         pinyin: sItem.pinyin,
                         chs: sItem.chs,
                         isShow: sItem.isShow,
+                        config: {
+                            fontColor: sItem.fontColor,
+                            fontFamily: sItem.fontFamily,
+                            fontSize: sItem.fontSize,
+                            underLine: sItem.underLine,
+                            wordPadding: sItem.wordPadding,
+                        },
                     };
                     paraArr.push(obj);
                 })
@@ -87,6 +109,8 @@ export default {
             } else {
                 wItem.isShow = true;
             }
+        }else{
+            wItem.isShow = true;
         }
     },
   },

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

@@ -849,6 +849,7 @@ export default {
   font-size: 20px;
   line-height: 150%;
   color: #000000;
+  word-break: break-word;
   &.sentenceColor {
     //@include font_color("sub_color");
   }

+ 1 - 0
src/views/adultInput.vue

@@ -440,6 +440,7 @@
                           :cur-que="topicIitem.data"
                           :fn_data="fn_data"
                           :change-cur-que="changeCurQue"
+                          :type="topicIitem.type"
                           v-if="refresh"
                         />
                       </template>