|
|
@@ -2,13 +2,21 @@
|
|
|
<ModuleBase ref="base" :type="data.type">
|
|
|
<template #content>
|
|
|
<div :style="{ width: data.note_list.length > 0 ? '' : '100%' }">
|
|
|
- <RichText ref="richText" v-model="data.content" :is-view-note="true"
|
|
|
- :is-title="isEnable(data.property.is_title)" :is-view-pinyin="isEnable(data.property.view_pinyin)"
|
|
|
- :font-size="data?.unified_attrib?.font_size" :font-family="data?.unified_attrib?.font" placeholder="输入内容"
|
|
|
- @view-explanatory-note="viewExplanatoryNote" @selectContentSetMemo="selectContentSetMemo"
|
|
|
+ <RichText
|
|
|
+ ref="richText"
|
|
|
+ v-model="data.content"
|
|
|
+ :is-view-note="true"
|
|
|
+ :is-title="isEnable(data.property.is_title)"
|
|
|
+ :is-view-pinyin="isEnable(data.property.view_pinyin)"
|
|
|
+ :font-size="data?.unified_attrib?.font_size"
|
|
|
+ :font-family="data?.unified_attrib?.font"
|
|
|
+ placeholder="输入内容"
|
|
|
+ @view-explanatory-note="viewExplanatoryNote"
|
|
|
+ @selectContentSetMemo="selectContentSetMemo"
|
|
|
@createParsedTextInfoPinyin="createParsedTextInfoPinyin"
|
|
|
@createParsedTextStyleForTitle="createParsedTextStyleForTitle"
|
|
|
- @compareAnnotationAndSave="compareAnnotationAndSave" />
|
|
|
+ @compareAnnotationAndSave="compareAnnotationAndSave"
|
|
|
+ />
|
|
|
|
|
|
<!-- 生成音频 -->
|
|
|
<template v-if="data.property.is_enable_voice === 'true'">
|
|
|
@@ -17,13 +25,21 @@
|
|
|
</div>
|
|
|
<template v-else>
|
|
|
<div :class="['upload-audio-play']">
|
|
|
- <UploadAudio v-if="data.property.audio_generation_method === 'upload'" :file-id="data.audio_file_id"
|
|
|
- :show-upload="!data.audio_file_id" @upload="uploads" @deleteFile="deleteFiles" />
|
|
|
- <div v-else-if="data.property.audio_generation_method === 'auto'" class="auto-matic"
|
|
|
- @click="handleMatic(data.content)">
|
|
|
+ <UploadAudio
|
|
|
+ v-if="data.property.audio_generation_method === 'upload'"
|
|
|
+ :file-id="data.audio_file_id"
|
|
|
+ :show-upload="!data.audio_file_id"
|
|
|
+ @upload="uploads"
|
|
|
+ @deleteFile="deleteFiles"
|
|
|
+ />
|
|
|
+ <div
|
|
|
+ v-else-if="data.property.audio_generation_method === 'auto'"
|
|
|
+ class="auto-matic"
|
|
|
+ @click="handleMatic(data.content)"
|
|
|
+ >
|
|
|
<SvgIcon icon-class="voiceprint-line" class="record" />
|
|
|
- <span class="auto-btn">{{ data.audio_file_id ? '已生成' : '生成音频' }}</span>{{ data.audio_file_id ? '成功' : ''
|
|
|
- }}
|
|
|
+ <span class="auto-btn">{{ data.audio_file_id ? '已生成' : '生成音频' }}</span
|
|
|
+ >{{ data.audio_file_id ? '成功' : '' }}
|
|
|
</div>
|
|
|
<SoundRecord v-else :wav-blob.sync="data.audio_file_id" />
|
|
|
</div>
|
|
|
@@ -32,31 +48,68 @@
|
|
|
|
|
|
<el-button class="btn" @click="openMultilingual">多语言</el-button>
|
|
|
|
|
|
- <MultilingualFill :visible.sync="multilingualVisible" :text="data.content" :translations="data.multilingual"
|
|
|
- @SubmitTranslation="handleMultilingualTranslation" />
|
|
|
+ <MultilingualFill
|
|
|
+ :visible.sync="multilingualVisible"
|
|
|
+ :text="data.content"
|
|
|
+ :translations="data.multilingual"
|
|
|
+ @SubmitTranslation="handleMultilingualTranslation"
|
|
|
+ />
|
|
|
|
|
|
- <el-button v-show="isEnable(data.property.view_pinyin)" style="margin-left: 10px" class="btn"
|
|
|
- @click.native="showWordFlag = true">分词校对</el-button>
|
|
|
+ <el-button
|
|
|
+ v-show="isEnable(data.property.view_pinyin)"
|
|
|
+ style="margin-left: 10px"
|
|
|
+ class="btn"
|
|
|
+ @click.native="showWordFlag = true"
|
|
|
+ >分词校对</el-button
|
|
|
+ >
|
|
|
|
|
|
- <el-dialog v-if="showWordFlag" :visible.sync="showWordFlag" :show-close="true" :close-on-click-modal="true"
|
|
|
- :modal-append-to-body="true" :append-to-body="true" :lock-scroll="true" width="80%" class="practiceBox">
|
|
|
+ <el-dialog
|
|
|
+ v-if="showWordFlag"
|
|
|
+ :visible.sync="showWordFlag"
|
|
|
+ :show-close="true"
|
|
|
+ :close-on-click-modal="true"
|
|
|
+ :modal-append-to-body="true"
|
|
|
+ :append-to-body="true"
|
|
|
+ :lock-scroll="true"
|
|
|
+ width="80%"
|
|
|
+ class="practiceBox"
|
|
|
+ >
|
|
|
<CheckWord :data="wordData" @saveWord="saveWord" />
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-button v-show="isEnable(data.property.view_pinyin)" style="margin-left: 10px" class="btn"
|
|
|
- @click.native="generatPinyin">生成拼音</el-button>
|
|
|
+ <el-button
|
|
|
+ v-show="isEnable(data.property.view_pinyin)"
|
|
|
+ style="margin-left: 10px"
|
|
|
+ class="btn"
|
|
|
+ @click.native="generatPinyin"
|
|
|
+ >生成拼音</el-button
|
|
|
+ >
|
|
|
|
|
|
<el-divider v-if="isEnable(data.property.view_pinyin)" content-position="left">拼音效果</el-divider>
|
|
|
- <PinyinText v-if="isEnable(data.property.view_pinyin)" :id="richId + '_pinyin_text'" ref="PinyinText"
|
|
|
- :paragraph-list="data.paragraph_list" :rich-text-list="data.rich_text_list"
|
|
|
- :paragraph-version="paragraphVersion" :pinyin-position="data.property.pinyin_position"
|
|
|
+ <PinyinText
|
|
|
+ v-if="isEnable(data.property.view_pinyin)"
|
|
|
+ :id="richId + '_pinyin_text'"
|
|
|
+ ref="PinyinText"
|
|
|
+ :paragraph-list="data.paragraph_list"
|
|
|
+ :rich-text-list="data.rich_text_list"
|
|
|
+ :paragraph-version="paragraphVersion"
|
|
|
+ :pinyin-position="data.property.pinyin_position"
|
|
|
:pinyin-overall-position="data.property.pinyin_overall_position"
|
|
|
- :pinyin-size="data?.unified_attrib?.pinyin_size" :font-size="data?.unified_attrib?.font_size"
|
|
|
- :font-family="data?.unified_attrib?.font" :component-type="data.type"
|
|
|
- :pinyin-padding="data.property.pinyin_padding" @fillCorrectPinyin="fillCorrectPinyin" />
|
|
|
+ :pinyin-size="data?.unified_attrib?.pinyin_size"
|
|
|
+ :font-size="data?.unified_attrib?.font_size"
|
|
|
+ :font-family="data?.unified_attrib?.font"
|
|
|
+ :component-type="data.type"
|
|
|
+ :pinyin-padding="data.property.pinyin_padding"
|
|
|
+ @fillCorrectPinyin="fillCorrectPinyin"
|
|
|
+ />
|
|
|
</div>
|
|
|
- <ExplanatoryNoteDialog ref="explanatoryNote" :open.sync="isViewExplanatoryNoteDialog" :init-data="oldRichData"
|
|
|
- @confirm="confirmExplanatoryNote" @cancel="cancelExplanatoryNote" />
|
|
|
+ <ExplanatoryNoteDialog
|
|
|
+ ref="explanatoryNote"
|
|
|
+ :open.sync="isViewExplanatoryNoteDialog"
|
|
|
+ :init-data="oldRichData"
|
|
|
+ @confirm="confirmExplanatoryNote"
|
|
|
+ @cancel="cancelExplanatoryNote"
|
|
|
+ />
|
|
|
</template>
|
|
|
</ModuleBase>
|
|
|
</template>
|
|
|
@@ -163,7 +216,7 @@ export default {
|
|
|
this.data.audio_file_id = file_id;
|
|
|
}
|
|
|
})
|
|
|
- .catch(() => { });
|
|
|
+ .catch(() => {});
|
|
|
},
|
|
|
|
|
|
async saveWord(saveArr) {
|
|
|
@@ -181,7 +234,7 @@ export default {
|
|
|
let isCreate =
|
|
|
this.data.paragraph_list.length <= 0 ||
|
|
|
this.data.paragraph_list_parameter.is_first_sentence_first_hz_pinyin_first_char_upper_case !==
|
|
|
- property.is_first_sentence_first_hz_pinyin_first_char_upper_case;
|
|
|
+ property.is_first_sentence_first_hz_pinyin_first_char_upper_case;
|
|
|
if (text && isCreate) {
|
|
|
this.data.paragraph_list_parameter.text = text;
|
|
|
this.data.paragraph_list_parameter.is_first_sentence_first_hz_pinyin_first_char_upper_case =
|