浏览代码

字词卡片

natasha 1 年之前
父节点
当前提交
e54a3eba44

+ 4 - 2
src/views/Textanalysis/CheckWord.vue

@@ -9,7 +9,9 @@
             返回
           </a>
           <b>校对分词</b>
-          <p class="tips">分词:在需要分开的内容中间插入两个空格;分句:将句子另起一行;分段:两段中间加入空行。</p>
+          <p class="tips">
+            分词:在需要分开的内容中间插入两个空格;分句:将句子另起一行;分段:两段中间加入空行。校对分词后请校对拼音。
+          </p>
         </div>
         <div class="btn-box">
           <!-- <el-switch
@@ -152,7 +154,7 @@ export default {
       })
         .then((res) => {
           if (res.status === 1) {
-            this.$message.success('保存成功');
+            this.$message.success('保存成功,请校对拼音');
             reparse({ analyse_record_id })
               .then(({ record }) => {
                 this.getArticleData();

+ 5 - 6
src/views/corpus/seekPage.vue

@@ -54,10 +54,9 @@
     <div class="cx-list" v-if="showResult">
       <div class="cx-list-box">
         <span style="color: #de4444">{{ oldKey }}</span>
-        <span>{{ allList.word_level_name }}</span>
         <label v-for="(items, indexs) in allList.word_cx_list" :key="indexs"
-          ><span>{{ items.code }}</span
-          ><span>{{ items.name }}</span></label
+          ><span>{{ items.cx_name }}</span
+          ><span>{{ items.level_name }}</span></label
         >
       </div>
       <template v-if="editLiju">
@@ -152,7 +151,7 @@
             </template>
             <template v-else>
               <div style="display: flex">
-                <div
+                <!--<div
                   class="lang_sort"
                   :class="[sortType === 'zflength' ? 'active' : '']"
                   @click="sortEvent('zflength')"
@@ -169,7 +168,7 @@
                     alt=""
                   />
                   <img v-else src="../../assets/teacherdev/ylk-sort-no.png" alt="" />
-                </div>
+                </div>-->
                 <div
                   class="lang_sort"
                   :class="[sortType === 'pclength' ? 'active' : '']"
@@ -1046,7 +1045,7 @@ export default {
             stat_list_sentence_source_book_series_code: res.stat_list_sentence_source_book_series_code,
             stat_list_word_definition: res.stat_list_word_definition,
             word_level_name: res.word_level_name,
-            word_cx_list: res.word_cx_list,
+            word_cx_list: res.word_cx_level_list,
           };
 
           res.stat_list_sentence_source_book.forEach((itesb) => {

+ 15 - 14
src/views/wordcard/cread.vue

@@ -254,6 +254,7 @@ export default {
     // 预览
     previewEvent() {
       this.previewIndex = 0;
+      this.showLeft = true;
       this.isPreview = true;
     },
     // 关闭预览
@@ -322,23 +323,23 @@ export default {
       this.loading = false;
       this.newEditTable = [
         {
-          borderColor: '#165dff',
-          fontColor: '#165dff',
-          fontAlign: 'left',
-          label: '',
-          headerCon: '',
+          borderColor: '#165dff', // 卡片边框颜色
+          fontColor: '#165dff', // 字体颜色
+          fontAlign: 'left', // 页眉对齐方式
+          label: '', // 标签内容
+          headerCon: '', // 页眉内容
           left: {
-            fileList: [],
-            con: '',
+            fileList: [], // 上传文件
+            con: '', // 字词卡片内容(即卡片显示的字词)
           },
           right: {
-            definition: '',
-            collocation: '',
-            exampleSent: '',
-            hz_info: [],
-            pinyin: '',
-            audio_file: '',
-            cixing: '',
+            definition: '', // 释义
+            collocation: '', // 搭配
+            exampleSent: '', // 例句
+            hz_info: [], // 汉字笔顺等内容
+            pinyin: '', // 拼音
+            audio_file: '', // 字词生成的音频
+            cixing: '', // 词性
           },
         },
       ];

+ 63 - 36
src/views/wordcard/printNew.vue

@@ -24,45 +24,72 @@
           </h2>
         </div>
         <div class="right right-preview left-preview" :style="{ borderColor: data.borderColor }">
-          <div style="width: max-content">
-            <AudioPlay
-              :file-id="data.right.audio_file"
-              v-if="data.right.audio_file"
-              :style="{ background: data.borderColor }"
-            />
-            <div class="hz-box">
-              <div class="hz-item" v-for="(itemh, indexh) in data.right.hz_info" :key="indexh">
-                <p :style="{ color: data.borderColor }">
-                  {{ data.right.pinyin.split(' ')[indexh] ? data.right.pinyin.split(' ')[indexh] : '' }}
-                </p>
-                <Strockplay
-                  className="adult-strockplay"
-                  :Book_text="itemh.con"
-                  :playStorkes="true"
-                  :strokePlayColor="data.borderColor"
-                  :strokeColor="'#000000'"
-                  :palyWidth="'18px'"
-                  :BoxbgType="'0'"
-                  :curItem="itemh.hzDetail.hz_json"
-                  :targetDiv="'writeTops-item-' + '-' + indexh + '-' + itemh.con"
-                  :class="[indexh !== 0 ? 'writeTop-item-noLeft' : '']"
-                  class="writeTop-item"
-                  :style="{ borderColor: data.borderColor }"
-                />
+          <div
+            :style="{
+              display: 'flex',
+              justifyContent: !(data.right.collocation && data.right.exampleSent) ? 'center' : 'auto',
+            }"
+          >
+            <div style="width: max-content">
+              <AudioPlay
+                :file-id="data.right.audio_file"
+                v-if="data.right.audio_file"
+                :style="{ background: data.borderColor }"
+              />
+              <div class="hz-box">
+                <div class="hz-item" v-for="(itemh, indexh) in data.right.hz_info" :key="indexh">
+                  <p :style="{ color: data.borderColor }">
+                    {{ data.right.pinyin.split(' ')[indexh] ? data.right.pinyin.split(' ')[indexh] : '' }}
+                  </p>
+                  <Strockplay
+                    className="adult-strockplay"
+                    :Book_text="itemh.con"
+                    :playStorkes="true"
+                    :strokePlayColor="data.borderColor"
+                    :strokeColor="'#000000'"
+                    :palyWidth="'18px'"
+                    :BoxbgType="'0'"
+                    :curItem="itemh.hzDetail.hz_json"
+                    :targetDiv="'writeTops-item-' + '-' + indexh + '-' + itemh.con"
+                    :class="[indexh !== 0 ? 'writeTop-item-noLeft' : '']"
+                    class="writeTop-item"
+                    :style="{ borderColor: data.borderColor }"
+                  />
+                </div>
               </div>
             </div>
-          </div>
-
-          <div class="definition-box">
-            <div v-if="data.right.cixing">
-              <label class="card-label">词性:</label>
-              <p>{{ data.right.cixing }}</p>
-            </div>
-
-            <div v-if="data.right.definition">
-              <label class="card-label">释义:</label>
-              <p>{{ data.right.definition }}</p>
+            <div
+              class="definition-box"
+              v-if="data.right.collocation || data.right.exampleSent"
+              style="flex: 1; margin: 100px 0 0 16px"
+            >
+              <div v-if="data.right.cixing">
+                <label class="card-label">词性:</label>
+                <p>{{ data.right.cixing }}</p>
+              </div>
+              <div v-if="data.right.definition">
+                <label class="card-label">释义:</label>
+                <p>{{ data.right.definition }}</p>
+              </div>
             </div>
+          </div>
+          <div
+            class="definition-box"
+            :style="{
+              width: !(data.right.collocation && data.right.exampleSent) ? data.right.hz_info.length * 98 + 'px' : '',
+              margin: !(data.right.collocation && data.right.exampleSent) ? '16px auto 0 auto' : '',
+            }"
+          >
+            <template v-if="!(data.right.collocation && data.right.exampleSent)">
+              <div v-if="data.right.cixing">
+                <label class="card-label">词性:</label>
+                <p>{{ data.right.cixing }}</p>
+              </div>
+              <div v-if="data.right.definition">
+                <label class="card-label">释义:</label>
+                <p>{{ data.right.definition }}</p>
+              </div>
+            </template>
             <div v-if="data.right.collocation">
               <label class="card-label">搭配:</label>
               <p>{{ data.right.collocation }}</p>

+ 63 - 34
src/views/wordcard/writeTableNew.vue

@@ -93,44 +93,73 @@
             <h5 :style="{ textAlign: data.fontAlign }">{{ data.headerCon }}</h5>
             <label :style="{ background: data.borderColor }">{{ data.label }}</label>
           </div>
-          <div style="width: max-content">
-            <AudioPlay
-              :style="{ background: data.borderColor }"
-              :file-id="data.right.audio_file"
-              v-if="data.right.audio_file"
-            />
-            <div class="hz-box">
-              <div class="hz-item" v-for="(itemh, indexh) in data.right.hz_info" :key="indexh">
-                <p :style="{ color: data.borderColor }">
-                  {{ data.right.pinyin.split(' ')[indexh] ? data.right.pinyin.split(' ')[indexh] : '' }}
-                </p>
-                <Strockplay
-                  className="adult-strockplay"
-                  :Book_text="itemh.con"
-                  :playStorkes="true"
-                  :strokePlayColor="data.borderColor"
-                  :strokeColor="'#000000'"
-                  :palyWidth="'18px'"
-                  :BoxbgType="'0'"
-                  :curItem="itemh.hzDetail.hz_json"
-                  :targetDiv="'writeTops-item-' + pageNumber + '-' + indexh + '-' + itemh.con"
-                  :class="[indexh !== 0 ? 'writeTop-item-noLeft' : '']"
-                  class="writeTop-item"
-                  :style="{ borderColor: data.borderColor }"
-                />
+          <div
+            :style="{
+              display: 'flex',
+              justifyContent: !(data.right.collocation && data.right.exampleSent) ? 'center' : 'auto',
+            }"
+          >
+            <div style="width: max-content">
+              <AudioPlay
+                :style="{ background: data.borderColor }"
+                :file-id="data.right.audio_file"
+                v-if="data.right.audio_file"
+              />
+              <div class="hz-box">
+                <div class="hz-item" v-for="(itemh, indexh) in data.right.hz_info" :key="indexh">
+                  <p :style="{ color: data.borderColor }">
+                    {{ data.right.pinyin.split(' ')[indexh] ? data.right.pinyin.split(' ')[indexh] : '' }}
+                  </p>
+                  <Strockplay
+                    className="adult-strockplay"
+                    :Book_text="itemh.con"
+                    :playStorkes="true"
+                    :strokePlayColor="data.borderColor"
+                    :strokeColor="'#000000'"
+                    :palyWidth="'18px'"
+                    :BoxbgType="'0'"
+                    :curItem="itemh.hzDetail.hz_json"
+                    :targetDiv="'writeTops-item-' + pageNumber + '-' + indexh + '-' + itemh.con"
+                    :class="[indexh !== 0 ? 'writeTop-item-noLeft' : '']"
+                    class="writeTop-item"
+                    :style="{ borderColor: data.borderColor }"
+                  />
+                </div>
               </div>
             </div>
-          </div>
 
-          <div class="definition-box">
-            <div v-if="data.right.cixing">
-              <label class="card-label">词性:</label>
-              <p>{{ data.right.cixing }}</p>
-            </div>
-            <div v-if="data.right.definition">
-              <label class="card-label">释义:</label>
-              <p>{{ data.right.definition }}</p>
+            <div
+              class="definition-box"
+              v-if="data.right.collocation || data.right.exampleSent"
+              style="flex: 1; margin: 100px 0 0 16px"
+            >
+              <div v-if="data.right.cixing">
+                <label class="card-label">词性:</label>
+                <p>{{ data.right.cixing }}</p>
+              </div>
+              <div v-if="data.right.definition">
+                <label class="card-label">释义:</label>
+                <p>{{ data.right.definition }}</p>
+              </div>
             </div>
+          </div>
+          <div
+            class="definition-box"
+            :style="{
+              width: !(data.right.collocation && data.right.exampleSent) ? data.right.hz_info.length * 98 + 'px' : '',
+              margin: !(data.right.collocation && data.right.exampleSent) ? '16px auto 0 auto' : '',
+            }"
+          >
+            <template v-if="!(data.right.collocation && data.right.exampleSent)">
+              <div v-if="data.right.cixing">
+                <label class="card-label">词性:</label>
+                <p>{{ data.right.cixing }}</p>
+              </div>
+              <div v-if="data.right.definition">
+                <label class="card-label">释义:</label>
+                <p>{{ data.right.definition }}</p>
+              </div>
+            </template>
             <div v-if="data.right.collocation">
               <label class="card-label">搭配:</label>
               <p>{{ data.right.collocation }}</p>