Browse Source

生字主题色

natasha 1 day ago
parent
commit
56a0fbf5e3

+ 1 - 1
src/views/book/courseware/data/character.js

@@ -18,7 +18,7 @@ export const modelList = [
   },
   {
     value: 'write',
-    label: '汉字书写',
+    label: '汉字展示',
   },
 ];
 

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

@@ -394,6 +394,16 @@ export default {
       }
     },
     handleData() {
+      if (this.data.new_word_list) {
+        this.$set(this.data.new_word_list, 'unified_attrib', this.data.unified_attrib);
+      }
+      if (this.data.other_word_list) {
+        this.$set(this.data.other_word_list, 'unified_attrib', this.data.unified_attrib);
+      }
+      if (this.data.notes_list) {
+        this.$set(this.data.notes_list, 'unified_attrib', this.data.unified_attrib);
+      }
+
       if (this.showLang) {
         this.data.multilingual.forEach((item) => {
           let trans_arr = item.translation.split('\n');
@@ -414,7 +424,6 @@ export default {
           this.data.mp3_list[0].url = url_map[this.data.mp3_list[0].file_id];
         });
       }
-
       this.NNPENewWordList = (
         this.data.new_word_list_other_component_input ? this.data.new_word_list_other_component_input : []
       )

+ 85 - 14
src/views/book/courseware/preview/components/character_structure/CharacterStructurePreview.vue

@@ -4,7 +4,12 @@
     <SerialNumberPosition v-if="isEnable(data.property.sn_display_mode)" :property="data.property" />
 
     <div class="main">
-      <div class="option">
+      <div
+        class="option"
+        :style="{
+          background: data.unified_attrib && data.unified_attrib.assist_color ? data.unified_attrib.assist_color : '',
+        }"
+      >
         <draggable
           v-model="SortArr"
           animation="300"
@@ -33,28 +38,54 @@
           :class="[!items.pinyin ? 'one_nopy' : '']"
           :style="{ marginRight: (row + 1) % 3 == 0 ? '' : '16px' }"
         >
-          <div class="number">
+          <div
+            class="number"
+            :style="{
+              background: data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : '',
+            }"
+          >
             {{ row + 1 }}
           </div>
           <div class="hzpinyin">
-            <div class="pinyin" v-if="isEnable(data.property.view_pinyin)">
+            <div
+              class="pinyin"
+              v-if="isEnable(data.property.view_pinyin)"
+              :style="{
+                fontSize: data.unified_attrib && data.unified_attrib.pinyin_size ? data.unified_attrib.pinyin_size : '',
+              }"
+            >
               {{ items.pinyin }}
             </div>
             <template v-if="items.hz_info.length > 0">
               <!-- @click="writeWord(conItem, items.pinyin)" -->
-              <div class="strockplay-newWord">
+              <div
+                class="strockplay-newWord"
+                :style="{
+                  borderColor:
+                    data.unified_attrib && data.unified_attrib.topic_color
+                      ? data.unified_attrib.topic_color
+                      : '#346CDA',
+                }"
+              >
                 <Strockplay
                   class-name="adult-strockplay"
                   :Book_text="items.hz_info[0].con"
                   :play-storkes="true"
-                  :stroke-play-color="'#346CDA'"
+                  :stroke-play-color="
+                    data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : '#346CDA'
+                  "
                   :stroke-color="'#000000'"
                   :paly-width="'18px'"
                   :BoxbgType="'0'"
                   :cur-item="items.hz_info[0].hzDetail.hz_json"
                   :target-div="'writeTops-item-' + '-' + items.hz_info[0].con"
                   class="writeTop-item"
-                  :style="{ borderColor: '#346CDA' }"
+                  :style="{
+                    borderColor:
+                      data.unified_attrib && data.unified_attrib.topic_color
+                        ? data.unified_attrib.topic_color
+                        : '#346CDA',
+                  }"
                 />
               </div>
             </template>
@@ -80,6 +111,10 @@
                   class="option_one"
                   :class="[items.is_example ? 'option_one_example' : classNameJudge(items, row)]"
                   :index="'form' + i"
+                  :style="{
+                    borderColor:
+                      data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : '',
+                  }"
                 >
                   <img
                     v-if="answer.img_url || answer.value"
@@ -98,6 +133,10 @@
                   :class="[isJudgingRightWrong && items.answer ? 'wrong' : '']"
                   :key="row"
                   v-if="answer.answer_list[row].answer_list.length == 0"
+                  :style="{
+                    borderColor:
+                      data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : '',
+                  }"
                 ></div>
               </transition-group>
             </draggable>
@@ -114,7 +153,13 @@
             :class="[!items.pinyin ? 'one_nopy' : '']"
             :style="{ marginRight: (row + 1) % 3 == 0 ? '' : '16px' }"
           >
-            <div class="number">
+            <div
+              class="number"
+              :style="{
+                background:
+                  data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : '#346CDA',
+              }"
+            >
               {{ row + 1 }}
             </div>
             <div class="hzpinyin">
@@ -122,19 +167,36 @@
                 {{ items.pinyin }}
               </div>
               <template v-if="items.hz_info.length > 0">
-                <div class="strockplay-newWord">
+                <div
+                  class="strockplay-newWord"
+                  :style="{
+                    borderColor:
+                      data.unified_attrib && data.unified_attrib.topic_color
+                        ? data.unified_attrib.topic_color
+                        : '#346CDA',
+                  }"
+                >
                   <Strockplay
                     class-name="adult-strockplay"
                     :Book_text="items.hz_info[0].con"
                     :play-storkes="true"
-                    :stroke-play-color="'#346CDA'"
+                    :stroke-play-color="
+                      data.unified_attrib && data.unified_attrib.topic_color
+                        ? data.unified_attrib.topic_color
+                        : '#346CDA'
+                    "
                     :stroke-color="'#000000'"
                     :paly-width="'18px'"
                     :BoxbgType="'0'"
                     :cur-item="items.hz_info[0].hzDetail.hz_json"
                     :target-div="'writeTops-item-right' + '-' + items.hz_info[0].con"
                     class="writeTop-item"
-                    :style="{ borderColor: '#346CDA' }"
+                    :style="{
+                      borderColor:
+                        data.unified_attrib && data.unified_attrib.topic_color
+                          ? data.unified_attrib.topic_color
+                          : '#346CDA',
+                    }"
                   />
                 </div>
               </template>
@@ -143,7 +205,16 @@
               <img src="@/assets/drag-arrows.png" alt="" />
             </div>
             <div class="answer">
-              <div class="option_one" :class="[items.is_example ? 'option_one_example' : '']">
+              <div
+                class="option_one"
+                :class="[items.is_example ? 'option_one_example' : '']"
+                :style="{
+                  borderColor:
+                    data.unified_attrib && data.unified_attrib.topic_color
+                      ? data.unified_attrib.topic_color
+                      : '#346CDA',
+                }"
+              >
                 <img
                   v-if="items.answer"
                   :src="
@@ -420,12 +491,12 @@ export default {
         border-radius: 8px;
 
         &.right {
-          background: #e9f7f2;
-          border-color: $right-color;
+          background: #e9f7f2 !important;
+          border-color: $right-color !important;
         }
 
         &.wrong {
-          border-color: $error-color;
+          border-color: $error-color !important;
         }
 
         img {

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

@@ -386,6 +386,15 @@ export default {
       }
     },
     handleData() {
+      if (this.data.new_word_list) {
+        this.$set(this.data.new_word_list, 'unified_attrib', this.data.unified_attrib);
+      }
+      if (this.data.other_word_list) {
+        this.$set(this.data.other_word_list, 'unified_attrib', this.data.unified_attrib);
+      }
+      if (this.data.notes_list) {
+        this.$set(this.data.notes_list, 'unified_attrib', this.data.unified_attrib);
+      }
       if (this.showLang) {
         this.data.multilingual.forEach((item) => {
           let trans_arr = item.translation.split('\n');

+ 8 - 0
src/views/book/courseware/preview/components/newWord_template/NewWordTemplatePreview.vue

@@ -107,6 +107,10 @@
                     v-if="items.file_list[0]"
                     :src="items.file_list[0].file_url"
                     fit="contain"
+                    :style="{
+                      borderColor:
+                        data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : '',
+                    }"
                   ></el-image>
                 </template>
                 <template v-else-if="items && items.type === 'lian'">
@@ -281,6 +285,10 @@
                       v-if="items.file_list[0]"
                       :src="items.file_list[0].file_url"
                       fit="contain"
+                      :style="{
+                        borderColor:
+                          data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : '',
+                      }"
                     ></el-image>
                   </template>
                   <template v-else-if="items && items.type === 'lian'">

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

@@ -840,7 +840,8 @@ export default {
     this.width =
       document.querySelector('.preview-main').offsetWidth -
       73 -
-      (this.data.property.sn_display_mode === 'true' ? 15 : 0) +
+      (this.data.property.sn_display_mode === 'true' ? 15 : 0) -
+      (this.newData ? 16 : 0) +
       'px';
   },
 };

+ 11 - 4
src/views/book/courseware/preview/components/pinyin_base/PinyinBasePreview.vue

@@ -141,6 +141,7 @@
             :answer-record-list="data.record_list"
             :task-model="isJudgingRightWrong ? 'ANSWER' : ''"
             @handleWav="handleWav"
+            :attrib="data.unified_attrib"
           />
         </template>
       </div>
@@ -284,7 +285,7 @@ export default {
         this.answer.answer_list = [];
       }
       if (this.data.property.fun_type === 'input') {
-        let arr = this.data.content.split(/_{3,}/g);
+        let arr = this.data.matically_pinyin_str[this.data.mark].split(/_{3,}/g);
         let inputIndex = 0;
         arr.forEach((item, index) => {
           let obj = {
@@ -474,7 +475,11 @@ export default {
     },
     // 判断对错
     judgeRight() {
-      this.con_preview = [];
+      if (this.data.property.fun_type === 'input') {
+      } else {
+        this.con_preview = [];
+      }
+
       this.show_preview = false;
       // this.data.option_list.forEach((item, index) => {
       let con_arr = JSON.parse(JSON.stringify(this.data.content_view));
@@ -605,7 +610,8 @@ export default {
   .items-hz {
     margin-right: 4px;
     font-size: 16px;
-    font-weight: 500;
+
+    // font-weight: 500;
     line-height: 24px;
     color: #000;
   }
@@ -613,7 +619,8 @@ export default {
   .item-con,
   .items-con {
     font-family: 'League';
-    font-weight: 500;
+
+    // font-weight: 500;
     color: #000;
     cursor: pointer;
 

+ 11 - 1
src/views/book/courseware/preview/components/video_interaction/VideoInteractionPreview.vue

@@ -14,7 +14,17 @@
       ></video>
     </div>
     <!-- v-if="Object.keys(this.userAnswer).length === data.file_info_list.length" -->
-    <el-button type="primary" @click="lookReport">查看答题报告</el-button>
+    <el-button
+      type="primary"
+      @click="lookReport"
+      :style="{
+        background:
+          data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : '#165dff',
+        borderColor:
+          data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : '#165dff',
+      }"
+      >查看答题报告</el-button
+    >
     <el-dialog
       v-if="visible"
       :visible.sync="visible"