|
@@ -18,7 +18,12 @@
|
|
|
<span class="question-number" title="双击切换序号类型" @dblclick="changeOptionType(data)">
|
|
|
{{ computedQuestionNumber(i, data.option_number_show_mode) }}
|
|
|
</span>
|
|
|
- <el-input v-model="item.content" :placeholder="'输入汉字或词汇'" />
|
|
|
+ <el-input
|
|
|
+ v-loading="loading_list[i] ? loading_list[i].loadings : false"
|
|
|
+ v-model="item.content"
|
|
|
+ :placeholder="'输入汉字或词汇'"
|
|
|
+ @blur="handleChineseStrokes(item, i)"
|
|
|
+ />
|
|
|
<el-input
|
|
|
v-model="item.pinyin"
|
|
|
:placeholder="'拼音间用空格隔开,如: ni3 hao3'"
|
|
@@ -60,12 +65,6 @@
|
|
|
<SvgIcon icon-class="add-circle" size="14" /> <span>增加汉字</span>
|
|
|
</span>
|
|
|
</div>
|
|
|
- <RichText
|
|
|
- v-if="isEnable(data.property.is_enable_reference_answer)"
|
|
|
- v-model="data.reference_answer"
|
|
|
- :font-size="14"
|
|
|
- placeholder="输入参考答案"
|
|
|
- />
|
|
|
</template>
|
|
|
|
|
|
<template #property>
|
|
@@ -98,16 +97,6 @@
|
|
|
{{ label }}
|
|
|
</el-radio>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="参考答案">
|
|
|
- <el-radio
|
|
|
- v-for="{ value, label } in switchOption"
|
|
|
- :key="value"
|
|
|
- v-model="data.property.is_enable_reference_answer"
|
|
|
- :label="value"
|
|
|
- >
|
|
|
- {{ label }}
|
|
|
- </el-radio>
|
|
|
- </el-form-item>
|
|
|
<el-form-item label="分值">
|
|
|
<el-radio
|
|
|
v-for="{ value, label } in scoreTypeList"
|
|
@@ -146,7 +135,6 @@ import UploadAudio from '../common/UploadAudio.vue';
|
|
|
import SoundRecord from '../common/SoundRecord.vue';
|
|
|
import { GetStaticResources } from '@/api/app';
|
|
|
import { changeOptionType, handleInputNumber, addTone } from '@/views/exercise_questions/data/common';
|
|
|
-import { getRandomNumber } from '@/utils/index';
|
|
|
|
|
|
import {
|
|
|
wordDictationData,
|
|
@@ -171,12 +159,15 @@ export default {
|
|
|
loading_list: [
|
|
|
{
|
|
|
loading: false,
|
|
|
+ loadings: false,
|
|
|
},
|
|
|
{
|
|
|
loading: false,
|
|
|
+ loadings: false,
|
|
|
},
|
|
|
{
|
|
|
loading: false,
|
|
|
+ loadings: false,
|
|
|
},
|
|
|
],
|
|
|
matically_pinyin_obj: {}, // 存放转成声调的拼音
|
|
@@ -189,6 +180,7 @@ export default {
|
|
|
for (let i = 0; i < val; i++) {
|
|
|
let obj = {
|
|
|
loading: false,
|
|
|
+ loadings: false,
|
|
|
};
|
|
|
this.loading_list.push(obj);
|
|
|
}
|
|
@@ -323,6 +315,37 @@ export default {
|
|
|
item.audio_file_id = '';
|
|
|
}
|
|
|
},
|
|
|
+ // 生成汉字
|
|
|
+ handleChineseStrokes(item, i) {
|
|
|
+ if (item.content.trim()) {
|
|
|
+ this.loading_list[i].loadings = true;
|
|
|
+ let content_arr = item.content.trim().split('');
|
|
|
+ let content_arrs = [];
|
|
|
+ let content_arr_strokes = [];
|
|
|
+ content_arr.forEach((itemc) => {
|
|
|
+ if (itemc.trim()) {
|
|
|
+ content_arrs.push(itemc.trim());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ content_arrs.forEach((itemc, indexc) => {
|
|
|
+ content_arr_strokes.push(null);
|
|
|
+ let MethodName = 'hz_resource_manager-GetHZStrokesContent';
|
|
|
+ let data = {
|
|
|
+ hz: itemc,
|
|
|
+ };
|
|
|
+ GetStaticResources(MethodName, data).then((res) => {
|
|
|
+ let obj = {
|
|
|
+ hz: itemc.trim(),
|
|
|
+ strokes: res,
|
|
|
+ };
|
|
|
+ content_arr_strokes[indexc] = obj;
|
|
|
+ });
|
|
|
+ });
|
|
|
+ this.loading_list[i].loadings = false;
|
|
|
+
|
|
|
+ item.hz_strokes_list = content_arr_strokes;
|
|
|
+ }
|
|
|
+ },
|
|
|
/**
|
|
|
* 智能识别
|
|
|
* @param {String} text 识别数据
|