Forráskód Böngészése

文本分析设置拼音位置

natasha 1 éve
szülő
commit
dab8b9c7e2

+ 10 - 1
src/views/Textanalysis/index.vue

@@ -205,7 +205,7 @@
                 inactive-text="分词"
               />
               <el-switch v-model="pinyinShow" active-color="#735CFF" :width="26" inactive-text="显示拼音"/>
-              <el-switch v-if="pinyinShow" v-model="pinyinBottom" active-color="#735CFF" :width="26" inactive-text="拼音在下" style="margin-left: 24px" />
+              <el-switch v-if="pinyinShow" @change="changePinyinPosition" v-model="pinyinBottom" active-color="#735CFF" :width="26" inactive-text="拼音在下" style="margin-left: 24px" />
             </div>
           </div>
           <div class="right_main">
@@ -1798,6 +1798,7 @@ export default {
                 this.difficulty.pinyinDifficulty = res.record.pinyin_difficulty;
                 this.difficulty.vocabularyDifficulty = res.record.vocabulary_difficulty;
                 this.difficulty.wordDifficulty = res.record.word_difficulty;
+                this.pinyinBottom = res.record.pinyin_mark_position === 0 ? false : true
                 this.loading = false;
             }
           
@@ -1826,6 +1827,14 @@ export default {
                 id: this.id
             },
         });
+    },
+    // 切换保存拼音位置
+    changePinyinPosition(value){
+        publicMethods('/TeachingServer/TextAnalyser/SetPinyinMarkPosition',{
+          analyse_record_id: this.id,
+          pinyin_mark_position: value ? 1 : 0
+        }
+      )
     }
   },
 };

+ 1 - 0
src/views/corpus/Result.vue

@@ -545,6 +545,7 @@ export default {
     },
     getdata(flag) {
       this.loading = true;
+      this.scoreAHitNumber = 0
       let Mname = 'book-courseware_manager-GetCoursewareWordExampleSentenceList';
       let data = {
         // courseware_id: "003-20211012-17-BDUZ1JVCAN",

+ 1 - 1
src/views/corpus/seekPage.vue

@@ -9,7 +9,7 @@
       <input type="text" v-model="keyword" />
       <button @click="seekEvent">搜索</button>
     </div>
-    <div class="txt">请搜索汉字,例如:好</div>
+    <!-- <div class="txt">请搜索汉字,例如:好</div> -->
   </div>
 </template>