Ver Fonte

对话课文生词

natasha há 4 dias atrás
pai
commit
58dc83bb49

+ 7 - 5
src/views/book/courseware/create/components/question/dialogue_article/Article.vue

@@ -116,7 +116,7 @@
         <div class="btn-box" v-if="data.detail.length > 0">
           <a @click="handleChangeContent">生成分词</a>
           <a @click="checkArticle">文章校对</a>
-          <!-- <a @click="editWordsFlag = true">编辑生词短语注释</a> -->
+          <a @click="editWordsFlag = !editWordsFlag">编辑生词短语注释</a>
           <template v-if="data.wordTime && data.wordTime.length > 0">
             <!-- <span>已有字幕时间节点</span> -->
             <a type="text" @click="againWordTime">重新生成字幕时间</a>
@@ -226,11 +226,12 @@
           <el-button :loading="compareloading" type="primary" @click="saveCompare">确 定</el-button>
         </span>
       </el-dialog>
-      <el-dialog title="" :visible.sync="editWordsFlag" width="80%" :close-on-click-modal="true" top="0">
+      <!-- <el-dialog title="" :visible.sync="editWordsFlag" width="80%" :close-on-click-modal="true" top="0"> -->
+      <template v-if="editWordsFlag">
         <div class="tabs-box">
           <a :class="[editWordIndex === 0 ? 'active' : '']" @click="editWordIndex = 0">生词</a>
-          <a :class="[editWordIndex === 1 ? 'active' : '']" @click="editWordIndex = 1">注释</a>
           <a :class="[editWordIndex === 2 ? 'active' : '']" @click="editWordIndex = 2">其他词汇</a>
+          <a :class="[editWordIndex === 1 ? 'active' : '']" @click="editWordIndex = 1">注释</a>
         </div>
         <NewWord
           v-if="editWordIndex === 0"
@@ -245,7 +246,8 @@
           :dataNewWord="data.other_word_list"
           @sureNewWords="sureOtherNewWords"
         ></NewWord>
-      </el-dialog>
+      </template>
+      <!-- </el-dialog> -->
     </template>
   </ModuleBase>
 </template>
@@ -912,7 +914,7 @@ export default {
 .tabs-box {
   display: flex;
   column-gap: 12px;
-  margin-bottom: 12px;
+  margin: 12px 0;
 
   a {
     padding: 5px 16px;

+ 8 - 8
src/views/book/courseware/data/bookType.js

@@ -247,14 +247,14 @@ export const bookTypeOption = [
         set: ArticleSetting,
         preview: ArticlePreview,
       },
-      // {
-      //   value: 'dialogue_article',
-      //   label: '对话课文',
-      //   icon: '',
-      //   component: DialogueArticlePage,
-      //   set: DialogueArticleSetting,
-      //   preview: DialogueArticlePreview,
-      // },
+      {
+        value: 'dialogue_article',
+        label: '对话课文',
+        icon: '',
+        component: DialogueArticlePage,
+        set: DialogueArticleSetting,
+        preview: DialogueArticlePreview,
+      },
       {
         value: 'select',
         label: '选择组件',

+ 88 - 37
src/views/book/courseware/data/dialogueArticle.js

@@ -24,6 +24,40 @@ export const positionList = [
   },
 ];
 
+export const wordShowList = [
+  { value: 'true', label: '是' },
+  { value: 'false', label: '否' },
+];
+
+export const inforList = [
+  { value: 'true', label: '有' },
+  { value: 'false', label: '没有' },
+];
+
+// 拼音位置
+export const pinyinPositionList = [
+  { value: 'front', label: '前面' },
+  { value: 'back', label: '后面' },
+  { value: 'top', label: '上面' },
+  { value: 'bottom', label: '下面' },
+];
+
+// 读音生成方式
+export const audioGenerationMethodList = [
+  {
+    value: 'upload',
+    label: '上传',
+  },
+  {
+    value: 'auto',
+    label: '自动生成',
+  },
+  {
+    value: 'record',
+    label: '录音',
+  },
+];
+
 // 头像类型
 export const roleTypeList = [
   {
@@ -87,16 +121,13 @@ export function getArticleData() {
 
     new_word_list: {
       title_con: '',
-      option: [{
-        number: '',
-        new_word: '',
-        cixing: '', // 词性
-        definition_list: '', // 需要增加词性
-        pinyin: '',
-        mp3_list: '',
-        collocation: '', // 搭配
-        liju_list: '', // 例句
-      }],
+      property: {
+        audio_generation_method: audioGenerationMethodList[0].value,
+        pinyin_position: pinyinPositionList[0].value,
+        auto_wrap: switchOption[0].value, // 自动换行
+        is_has_infor: inforList[0].value,
+      },
+      new_word_list: [],
       lrc_arr: [], // lrc 文件解析后的数据
       // lrc 文件数据
       lrc_data: {
@@ -113,34 +144,34 @@ export function getArticleData() {
         url: '',
         file_id: '',
       },
-      answer: {
-        answer_list: [],
-      },
-    }, // 生词列表
-    notes_list: {
-      title_con:'',
-      option: [
+      wordTime: [], // 字幕时间节点
+      taskId:'',
+      file_id_list: [], // 文件 id
+      col_width: [
         {
-          number:'',
-          con: "",
-          interpret: "", //翻译
-          note: "", //注释
-          img_list: []
+          value:125  // 生词
+        },{
+          value:125  // 拼音
+        },{
+          value:125  // 词性
+        },{
+          value:125  // 释义
+        },{
+          value:150  // 搭配
+        },{
+          value:300  // 例句
         }
-      ],
-    },
+      ], // 列宽
+    }, // 生词列表
     other_word_list: {
       title_con: '',
-      option: [{
-        number: '',
-        new_word: '',
-        cixing: '', // 词性
-        definition_list: '', // 需要增加词性
-        pinyin: '',
-        mp3_list: '',
-        collocation: '', // 搭配
-        liju_list: '', // 例句
-      }],
+      property: {
+        audio_generation_method: audioGenerationMethodList[0].value,
+        pinyin_position: pinyinPositionList[0].value,
+        auto_wrap: switchOption[0].value, // 自动换行
+        is_has_infor: inforList[0].value,
+      },
+      new_word_list: [],
       lrc_arr: [], // lrc 文件解析后的数据
       // lrc 文件数据
       lrc_data: {
@@ -157,9 +188,29 @@ export function getArticleData() {
         url: '',
         file_id: '',
       },
-      answer: {
-        answer_list: [],
-      },
+      wordTime: [], // 字幕时间节点
+      taskId:'',
+      file_id_list: [], // 文件 id
+      col_width: [
+        {
+          value:125  // 生词
+        },{
+          value:125  // 拼音
+        },{
+          value:125  // 词性
+        },{
+          value:125  // 释义
+        },{
+          value:150  // 搭配
+        },{
+          value:300  // 例句
+        }
+      ], // 列宽
+    },
+    notes_list: {
+      title_con: '',
+      option: [],
+      property:{}
     },
     sentence_list_mp: [], //句子+分词数组
     pinyin_type: 'pinyin', // 拼音类型