|
@@ -18,11 +18,10 @@
|
|
|
<span class="question-number" title="双击切换序号类型" @dblclick="changeOptionType(data)">
|
|
|
{{ computedQuestionNumber(i, data.option_number_show_mode) }}
|
|
|
</span>
|
|
|
+ <el-input v-model="item.character" :placeholder="'汉字'" style="flex-shrink: 0; width: 80px" />
|
|
|
<el-input
|
|
|
v-model="item.content"
|
|
|
- placeholder="
|
|
|
- 拼音间用空格隔开,如:ni3 hao3
|
|
|
- "
|
|
|
+ placeholder="拼音间用空格隔开,如:ni3 hao3"
|
|
|
@blur="handleItemAnswer(item)"
|
|
|
@change="changePinyin(item)"
|
|
|
/>
|
|
@@ -263,27 +262,33 @@ export default {
|
|
|
},
|
|
|
// 自动生成音频
|
|
|
handleMatically(item, i) {
|
|
|
- if (item.content.trim()) {
|
|
|
- this.loading_list[i].loading = true;
|
|
|
+ let MethodName = 'tool-TextToVoiceFile';
|
|
|
+ let data = {};
|
|
|
+ if (item.character.trim() || item.content_hz) {
|
|
|
+ data = {
|
|
|
+ text: item.character.trim() || item.content_hz,
|
|
|
+ };
|
|
|
+ } else if (item.content.trim()) {
|
|
|
if (!this.matically_pinyin_obj[item.mark]) {
|
|
|
this.handleItemAnswer(item);
|
|
|
}
|
|
|
- let MethodName = 'tool-PinyinToVoiceFile';
|
|
|
- let data = {
|
|
|
+ MethodName = 'tool-PinyinToVoiceFile';
|
|
|
+ data = {
|
|
|
pinyin: this.matically_pinyin_obj[item.mark],
|
|
|
};
|
|
|
- GetStaticResources(MethodName, data)
|
|
|
- .then((res) => {
|
|
|
- this.loading_list[i].loading = false;
|
|
|
- if (res.status === 1) {
|
|
|
- item.audio_file_id = res.file_id;
|
|
|
- this.data.file_id_list.push(res.file_id);
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- this.loading_list[i].loading = false;
|
|
|
- });
|
|
|
}
|
|
|
+ this.loading_list[i].loading = true;
|
|
|
+ GetStaticResources(MethodName, data)
|
|
|
+ .then((res) => {
|
|
|
+ this.loading_list[i].loading = false;
|
|
|
+ if (res.status === 1) {
|
|
|
+ item.audio_file_id = res.file_id;
|
|
|
+ this.data.file_id_list.push(res.file_id);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.loading_list[i].loading = false;
|
|
|
+ });
|
|
|
},
|
|
|
handleReplaceTone(value, mark, itemIndex) {
|
|
|
if (!value) return;
|