Browse Source

生词添加主题色 句子填空修改

秦鹏 3 years ago
parent
commit
af8f13b7c1

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

@@ -34,11 +34,18 @@
           <el-radio-group v-model="curQueItem.pinyin_site" @change="forupdata">
             <el-radio label="first">前面</el-radio>
             <el-radio label="last">后面</el-radio>
-             <el-radio label="top">上面</el-radio>
+            <el-radio label="top">上面</el-radio>
             <el-radio label="bottom">下面</el-radio>
           </el-radio-group>
         </div>
         <div class="adult-book-input-item">
+          <span class="adult-book-lable">主题色:</span>
+          <el-radio-group v-model="curQueItem.motif_color" @change="forupdata">
+            <el-radio :label="true">需要</el-radio>
+            <el-radio :label="false">不需要</el-radio>
+          </el-radio-group>
+        </div>
+        <div class="adult-book-input-item">
           <span class="adult-book-lable">词性:</span>
           <el-input
             placeholder="请输入词性"

+ 2 - 1
src/components/Adult/common/SentenceModule.vue

@@ -224,7 +224,7 @@ export default {
         cancelButtonText: "取消",
         type: "warning",
       }).then(() => {
-        // this.deleteOptionOne(this.index);
+        this.deleteOptionOne(this.index);
       });
     },
     changeMp3(fileList) {
@@ -252,6 +252,7 @@ export default {
         this.$message.warning("请先填写完整");
         return;
       }
+      console.log(this.curQueItem);
       this.curQueItem.answer.push("");
     },
     delAnswer(ansIndex) {

+ 4 - 0
src/components/Adult/inputModules/Neword.vue

@@ -93,6 +93,7 @@ export default {
               img_list: [],
               mp3_list: [],
               pinyin_site: "first", //拼音位置
+              motif_color: false, //主题色
             },
           ],
         ],
@@ -154,6 +155,9 @@ export default {
         if (!item[0].pinyin_site) {
           item[0].pinyin_site = "first"; //拼音位置
         }
+        if (!item[0].motif_color) {
+          item[0].motif_color = false; //主题色
+        }
       });
       // this.curQue = JSON.parse(JSON.stringify(data));
     }

+ 10 - 3
src/components/Adult/inputModules/Sentence.vue

@@ -455,6 +455,14 @@ export default {
         if (item.type == type) {
           item.isFn = true;
         }
+        if (type == "sentence_input_chs") {
+          if (
+            item.type == "sentence_record_chs" ||
+            item.type == "sentence_input_chs"
+          ) {
+            item.isFn = true;
+          }
+        }
         if (type == "sentence_input_record_chs") {
           if (
             item.type == "sentence_record_chs" ||
@@ -512,9 +520,8 @@ export default {
     if (!this.curQue) {
       this.initcurQue();
     } else {
-      this.curQue.option.forEach((item) => {
-        item.answer = `${item.answer}`;
-      });
+      let data = this.handleStructure(this.type);
+      this.curQue.fn_list = JSON.parse(JSON.stringify(data.fn_list));
       if (this.type == "recordHZ_inputPY_chs") {
         if (!this.curQue.lrc_list) {
           this.curQue.lrc_list = [];

+ 86 - 7
src/components/Adult/preview/SentenceInput.vue

@@ -82,7 +82,46 @@
             </template>
             <b class="content-en" v-if="items.en">{{ items.en }}</b>
           </template>
-          <template v-else> </template>
+          <template v-else>
+            <div class="chs_pinyin">
+              <div
+                v-for="(conent, conIndex) in items.detail.wordsList"
+                :key="conIndex + 'con'"
+              >
+                <template v-if="items.detail.pyPosition == 'top'">
+                  <div
+                    v-if="conent.pinyin == '__'"
+                    contenteditable
+                    class="input pinyin"
+                  ></div>
+                  <p class="pinyin" v-else>
+                    {{ conent.pinyin }}
+                  </p>
+                </template>
+                <template v-if="conent.chs == '__'">
+                  <div contenteditable class="input chs"></div>
+                </template>
+                <template v-else>
+                  <p class="chs">
+                    {{ conent.chs }}
+                  </p>
+                </template>
+
+                <template
+                  v-if="items.detail.pyPosition == 'bottom' && conent.pinyin"
+                >
+                  <div
+                    v-if="conent.pinyin == '__'"
+                    contenteditable
+                    class="input pinyin"
+                  ></div>
+                  <p class="pinyin" v-else>
+                    {{ conent.pinyin }}
+                  </p>
+                </template>
+              </div>
+            </div>
+          </template>
         </div>
         <template v-if="dataType.indexOf('sentence_answer_chs') > -1">
           <input
@@ -111,12 +150,21 @@
           </div>
         </template>
         <template v-if="dataType.indexOf('sentence_record_chs') > -1">
-          <Soundrecord
-            @handleWav="handleWav"
-            type="mini"
-            class="luyin-box"
-            v-if="items.IsRecord"
-          />
+          <template v-if="dataType.indexOf('sentence_input_chs') != -1">
+            <Soundrecord
+              @handleWav="handleWav"
+              type="normal"
+              v-if="items.IsRecord"
+            />
+          </template>
+          <template v-else>
+            <Soundrecord
+              @handleWav="handleWav"
+              type="mini"
+              class="luyin-box"
+              v-if="items.IsRecord"
+            />
+          </template>
         </template>
       </li>
     </ul>
@@ -304,6 +352,37 @@ export default {
       }
       .item-content {
         flex: 1;
+        .chs_pinyin {
+          display: flex;
+          margin-left: 8px;
+
+          .input {
+            margin-left: 16px;
+            margin-right: 8px;
+            min-width: 50px;
+            border-bottom: 1px solid black;
+          }
+          .pinyin {
+            font-weight: "GB-PINYINOK-B";
+            font-size: 14px;
+            line-height: 130%;
+            color: rgba(0, 0, 0, 0.6);
+            margin-top: 8px;
+          }
+          .chs {
+            font-family: "FZJCGFKTK";
+            font-style: normal;
+            font-weight: normal;
+            font-size: 20px;
+            line-height: 150%;
+            /* identical to box height, or 30px */
+
+            color: #000000;
+          }
+          p {
+            margin: 0;
+          }
+        }
         .content-con {
           font-size: 20px;
           line-height: 150%;

+ 2 - 2
src/views/adultInput.vue

@@ -175,7 +175,7 @@
                     />
                   </template>
                   <template v-else>
-                    <ArticleView :cur-que="topicIitem.data" />
+                    <!-- <ArticleView :cur-que="topicIitem.data" /> -->
                   </template>
                 </template>
                 <template v-if="topicIitem.type == 'sentence_segword_chs'">
@@ -186,7 +186,7 @@
                     />
                   </template>
                   <template v-else>
-                    <ArticleView :cur-que="topicIitem.data" />
+                    <!-- <ArticleView :cur-que="topicIitem.data" /> -->
                   </template>
                 </template>
                 <template v-if="topicIitem.type == 'dialogue_article_chs'">