|
|
@@ -543,405 +543,493 @@
|
|
|
</template>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <template v-if="col.new_rich_text_list && col.new_rich_text_list.length !== 0">
|
|
|
- <div
|
|
|
- v-for="(item, index) in col.new_rich_text_list"
|
|
|
- :key="index"
|
|
|
- class="pinyin-text pinyin-text-sentence"
|
|
|
- :class="[
|
|
|
- index === 0 ? 'pinyin-text-left' : '',
|
|
|
- item.type === 'audio' ? 'pinyin-text-audio' : '',
|
|
|
- item.type === 'newline' ? 'pinyin-text-br' : '',
|
|
|
- ]"
|
|
|
- >
|
|
|
- <!-- 文字块:包含 word_list -->
|
|
|
- <span
|
|
|
- v-if="item.type === 'text'"
|
|
|
- :key="'text-' + index"
|
|
|
- class="pinyin-sentence"
|
|
|
- :style="[
|
|
|
- { 'align-items': data.property.pinyin_position === 'top' ? 'flex-end' : 'flex-start' },
|
|
|
+ <template v-if="isHasInput">
|
|
|
+ <!-- 有填空情况下 -->
|
|
|
+ <template v-if="col.new_rich_text_list && col.new_rich_text_list.length !== 0">
|
|
|
+ <div
|
|
|
+ v-for="(item, index) in col.new_rich_text_list"
|
|
|
+ :key="index"
|
|
|
+ class="pinyin-text pinyin-text-sentence"
|
|
|
+ :class="[
|
|
|
+ index === 0 ? 'pinyin-text-left' : '',
|
|
|
+ item.type === 'audio' ? 'pinyin-text-audio' : '',
|
|
|
+ item.type === 'newline' ? 'pinyin-text-br' : '',
|
|
|
]"
|
|
|
>
|
|
|
- <span v-for="(word, wIndex) in item.new_text_list" :key="wIndex" class="pinyin-text">
|
|
|
- <span v-if="word.isShow" class="table-words-box">
|
|
|
- <span
|
|
|
- v-if="
|
|
|
- item.new_text_list[wIndex - 1] &&
|
|
|
- item.new_text_list[wIndex - 1].text &&
|
|
|
- firstFhlist.indexOf(item.new_text_list[wIndex - 1].text) > -1 &&
|
|
|
- item.new_text_list[wIndex - 2] &&
|
|
|
- item.new_text_list[wIndex - 2].text &&
|
|
|
- firstFhlist.indexOf(item.new_text_list[wIndex - 2].text) > -1
|
|
|
- "
|
|
|
- :style="{
|
|
|
- flexDirection:
|
|
|
- data.property.pinyin_position === 'top' ? 'column' : 'column-reverse',
|
|
|
- 'align-items': getWordAlignItems(item.new_text_list[wIndex - 2], item),
|
|
|
- ...item.new_text_list[wIndex - 2].last_styleObj,
|
|
|
- }"
|
|
|
- >
|
|
|
- <span class="py-char" :style="getCharStyle(item.new_text_list[wIndex - 2], item)">{{
|
|
|
- convertText(item.new_text_list[wIndex - 2].text).trim()
|
|
|
- ? convertText(item.new_text_list[wIndex - 2].text)
|
|
|
- : ' '
|
|
|
- }}</span>
|
|
|
- </span>
|
|
|
- <span
|
|
|
- v-if="
|
|
|
- item.new_text_list[wIndex - 1] &&
|
|
|
- item.new_text_list[wIndex - 1].text &&
|
|
|
- firstFhlist.indexOf(item.new_text_list[wIndex - 1].text) > -1
|
|
|
- "
|
|
|
- >
|
|
|
+ <!-- 文字块:包含 word_list -->
|
|
|
+ <span
|
|
|
+ v-if="item.type === 'text'"
|
|
|
+ :key="'text-' + index"
|
|
|
+ class="pinyin-sentence"
|
|
|
+ :style="[
|
|
|
+ { 'align-items': data.property.pinyin_position === 'top' ? 'flex-end' : 'flex-start' },
|
|
|
+ ]"
|
|
|
+ >
|
|
|
+ <span v-for="(word, wIndex) in item.new_text_list" :key="wIndex" class="pinyin-text">
|
|
|
+ <span v-if="word.isShow" class="table-words-box">
|
|
|
<span
|
|
|
+ v-if="
|
|
|
+ item.new_text_list[wIndex - 1] &&
|
|
|
+ item.new_text_list[wIndex - 1].text &&
|
|
|
+ firstFhlist.indexOf(item.new_text_list[wIndex - 1].text) > -1 &&
|
|
|
+ item.new_text_list[wIndex - 2] &&
|
|
|
+ item.new_text_list[wIndex - 2].text &&
|
|
|
+ firstFhlist.indexOf(item.new_text_list[wIndex - 2].text) > -1
|
|
|
+ "
|
|
|
:style="{
|
|
|
flexDirection:
|
|
|
data.property.pinyin_position === 'top' ? 'column' : 'column-reverse',
|
|
|
- 'align-items': getWordAlignItems(item.new_text_list[wIndex - 1], item),
|
|
|
- ...item.new_text_list[wIndex - 1].last_styleObj,
|
|
|
+ 'align-items': getWordAlignItems(item.new_text_list[wIndex - 2], item),
|
|
|
+ ...item.new_text_list[wIndex - 2].last_styleObj,
|
|
|
}"
|
|
|
>
|
|
|
- <span class="py-char" :style="getCharStyle(item.new_text_list[wIndex - 1], item)">{{
|
|
|
- convertText(item.new_text_list[wIndex - 1].text).trim()
|
|
|
- ? convertText(item.new_text_list[wIndex - 1].text)
|
|
|
+ <span class="py-char" :style="getCharStyle(item.new_text_list[wIndex - 2], item)">{{
|
|
|
+ convertText(item.new_text_list[wIndex - 2].text).trim()
|
|
|
+ ? convertText(item.new_text_list[wIndex - 2].text)
|
|
|
: ' '
|
|
|
}}</span>
|
|
|
</span>
|
|
|
- </span>
|
|
|
- <span v-if="word.type === 'text'">
|
|
|
<span
|
|
|
- :style="{
|
|
|
- flexDirection:
|
|
|
- data.property.pinyin_position === 'top' ? 'column' : 'column-reverse',
|
|
|
- 'align-items': getWordAlignItems(word, item),
|
|
|
- ...word.last_styleObj,
|
|
|
- }"
|
|
|
+ v-if="
|
|
|
+ item.new_text_list[wIndex - 1] &&
|
|
|
+ item.new_text_list[wIndex - 1].text &&
|
|
|
+ firstFhlist.indexOf(item.new_text_list[wIndex - 1].text) > -1
|
|
|
+ "
|
|
|
>
|
|
|
- <span class="py-char" :style="getCharStyle(word, item)">{{
|
|
|
- convertText(word.text).trim() ? convertText(word.text) : ' '
|
|
|
- }}</span>
|
|
|
- </span>
|
|
|
- </span>
|
|
|
- <template v-else-if="word.type === 'input'">
|
|
|
- <template v-if="data.property.fill_type === fillTypeList[0].value">
|
|
|
- <el-input
|
|
|
- :key="index"
|
|
|
- v-model="word.value"
|
|
|
- :disabled="disabled"
|
|
|
- :class="[...computedAnswerClass(word, i, j)]"
|
|
|
- :style="getInputStyle(word.last_styleObj, word)"
|
|
|
- />
|
|
|
- </template>
|
|
|
- <template v-else-if="data.property.fill_type === fillTypeList[1].value">
|
|
|
- <el-popover :key="index" placement="top" trigger="click">
|
|
|
- <div class="word-list">
|
|
|
- <span
|
|
|
- v-for="{ content, mark } in data.word_list"
|
|
|
- :key="mark"
|
|
|
- class="word-item"
|
|
|
- @click="handleSelectWord(content, mark, word)"
|
|
|
- >
|
|
|
- {{ convertText(content) }}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <el-input
|
|
|
- slot="reference"
|
|
|
- v-model="word.value"
|
|
|
- :readonly="true"
|
|
|
- :class="[...computedAnswerClass(word, i, j)]"
|
|
|
- :style="getInputStyle(word.last_styleObj, word)"
|
|
|
- />
|
|
|
- </el-popover>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-else-if="data.property.fill_type === fillTypeList[2].value">
|
|
|
- <span :key="j" class="write-click" @click="handleWriteClick(word)">
|
|
|
- <img
|
|
|
- v-show="word.write_base64"
|
|
|
- style="background-color: #f4f4f4"
|
|
|
- :src="word.write_base64"
|
|
|
- alt="write-show"
|
|
|
- />
|
|
|
- </span>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-else-if="data.property.fill_type === fillTypeList[3].value">
|
|
|
- <SoundRecordBox
|
|
|
- ref="record"
|
|
|
- :key="j"
|
|
|
- type="mini"
|
|
|
- :many-times="false"
|
|
|
- class="record-box"
|
|
|
- :answer-record-list="data.audio_answer_list"
|
|
|
- :task-model="isJudgingRightWrong ? 'ANSWER' : ''"
|
|
|
- :attrib="data.unified_attrib"
|
|
|
- @handleWav="handleMiniWav($event, word)"
|
|
|
- />
|
|
|
- </template>
|
|
|
- </template>
|
|
|
- <template
|
|
|
- v-if="
|
|
|
- item.new_text_list[wIndex + 1] &&
|
|
|
- item.new_text_list[wIndex + 1].text &&
|
|
|
- chsFhList.indexOf(item.new_text_list[wIndex + 1].text) > -1
|
|
|
- "
|
|
|
- >
|
|
|
- <span>
|
|
|
<span
|
|
|
:style="{
|
|
|
flexDirection:
|
|
|
data.property.pinyin_position === 'top' ? 'column' : 'column-reverse',
|
|
|
- 'align-items': getWordAlignItems(item.new_text_list[wIndex + 1], item),
|
|
|
- ...item.new_text_list[wIndex + 1].last_styleObj,
|
|
|
+ 'align-items': getWordAlignItems(item.new_text_list[wIndex - 1], item),
|
|
|
+ ...item.new_text_list[wIndex - 1].last_styleObj,
|
|
|
}"
|
|
|
>
|
|
|
<span
|
|
|
class="py-char"
|
|
|
- :style="getCharStyle(item.new_text_list[wIndex + 1], item)"
|
|
|
+ :style="getCharStyle(item.new_text_list[wIndex - 1], item)"
|
|
|
>{{
|
|
|
- convertText(item.new_text_list[wIndex + 1].text).trim()
|
|
|
- ? convertText(item.new_text_list[wIndex + 1].text)
|
|
|
+ convertText(item.new_text_list[wIndex - 1].text).trim()
|
|
|
+ ? convertText(item.new_text_list[wIndex - 1].text)
|
|
|
: ' '
|
|
|
}}</span
|
|
|
>
|
|
|
</span>
|
|
|
</span>
|
|
|
- <span
|
|
|
- v-if="
|
|
|
- item.new_text_list[wIndex + 2] &&
|
|
|
- item.new_text_list[wIndex + 2].text &&
|
|
|
- chsFhList.indexOf(item.new_text_list[wIndex + 2].text) > -1
|
|
|
- "
|
|
|
- >
|
|
|
+ <span v-if="word.type === 'text'">
|
|
|
<span
|
|
|
:style="{
|
|
|
flexDirection:
|
|
|
data.property.pinyin_position === 'top' ? 'column' : 'column-reverse',
|
|
|
- 'align-items': getWordAlignItems(item.new_text_list[wIndex + 2], item),
|
|
|
- ...item.new_text_list[wIndex + 2].last_styleObj,
|
|
|
+ 'align-items': getWordAlignItems(word, item),
|
|
|
+ ...word.last_styleObj,
|
|
|
}"
|
|
|
>
|
|
|
+ <span class="py-char" :style="getCharStyle(word, item)">{{
|
|
|
+ convertText(word.text).trim() ? convertText(word.text) : ' '
|
|
|
+ }}</span>
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ <template v-else-if="word.type === 'input'">
|
|
|
+ <template v-if="data.property.fill_type === fillTypeList[0].value">
|
|
|
+ <el-input
|
|
|
+ :key="index"
|
|
|
+ v-model="word.value"
|
|
|
+ :disabled="disabled"
|
|
|
+ :class="[...computedAnswerClass(word, i, j)]"
|
|
|
+ :style="getInputStyle(word.last_styleObj, word)"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template v-else-if="data.property.fill_type === fillTypeList[1].value">
|
|
|
+ <el-popover :key="index" placement="top" trigger="click">
|
|
|
+ <div class="word-list">
|
|
|
+ <span
|
|
|
+ v-for="{ content, mark } in data.word_list"
|
|
|
+ :key="mark"
|
|
|
+ class="word-item"
|
|
|
+ @click="handleSelectWord(content, mark, word)"
|
|
|
+ >
|
|
|
+ {{ convertText(content) }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-input
|
|
|
+ slot="reference"
|
|
|
+ v-model="word.value"
|
|
|
+ :readonly="true"
|
|
|
+ :class="[...computedAnswerClass(word, i, j)]"
|
|
|
+ :style="getInputStyle(word.last_styleObj, word)"
|
|
|
+ />
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-else-if="data.property.fill_type === fillTypeList[2].value">
|
|
|
+ <span :key="j" class="write-click" @click="handleWriteClick(word)">
|
|
|
+ <img
|
|
|
+ v-show="word.write_base64"
|
|
|
+ style="background-color: #f4f4f4"
|
|
|
+ :src="word.write_base64"
|
|
|
+ alt="write-show"
|
|
|
+ />
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-else-if="data.property.fill_type === fillTypeList[3].value">
|
|
|
+ <SoundRecordBox
|
|
|
+ ref="record"
|
|
|
+ :key="j"
|
|
|
+ type="mini"
|
|
|
+ :many-times="false"
|
|
|
+ class="record-box"
|
|
|
+ :answer-record-list="data.audio_answer_list"
|
|
|
+ :task-model="isJudgingRightWrong ? 'ANSWER' : ''"
|
|
|
+ :attrib="data.unified_attrib"
|
|
|
+ @handleWav="handleMiniWav($event, word)"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ <template
|
|
|
+ v-if="
|
|
|
+ item.new_text_list[wIndex + 1] &&
|
|
|
+ item.new_text_list[wIndex + 1].text &&
|
|
|
+ chsFhList.indexOf(item.new_text_list[wIndex + 1].text) > -1
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <span>
|
|
|
<span
|
|
|
- class="py-char"
|
|
|
- :style="getCharStyle(item.new_text_list[wIndex + 2], item)"
|
|
|
- >{{
|
|
|
- convertText(item.new_text_list[wIndex + 2].text).trim()
|
|
|
- ? convertText(item.new_text_list[wIndex + 2].text)
|
|
|
- : ' '
|
|
|
- }}</span
|
|
|
+ :style="{
|
|
|
+ flexDirection:
|
|
|
+ data.property.pinyin_position === 'top' ? 'column' : 'column-reverse',
|
|
|
+ 'align-items': getWordAlignItems(item.new_text_list[wIndex + 1], item),
|
|
|
+ ...item.new_text_list[wIndex + 1].last_styleObj,
|
|
|
+ }"
|
|
|
>
|
|
|
+ <span
|
|
|
+ class="py-char"
|
|
|
+ :style="getCharStyle(item.new_text_list[wIndex + 1], item)"
|
|
|
+ >{{
|
|
|
+ convertText(item.new_text_list[wIndex + 1].text).trim()
|
|
|
+ ? convertText(item.new_text_list[wIndex + 1].text)
|
|
|
+ : ' '
|
|
|
+ }}</span
|
|
|
+ >
|
|
|
+ </span>
|
|
|
</span>
|
|
|
- </span>
|
|
|
- </template>
|
|
|
+ <span
|
|
|
+ v-if="
|
|
|
+ item.new_text_list[wIndex + 2] &&
|
|
|
+ item.new_text_list[wIndex + 2].text &&
|
|
|
+ chsFhList.indexOf(item.new_text_list[wIndex + 2].text) > -1
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ :style="{
|
|
|
+ flexDirection:
|
|
|
+ data.property.pinyin_position === 'top' ? 'column' : 'column-reverse',
|
|
|
+ 'align-items': getWordAlignItems(item.new_text_list[wIndex + 2], item),
|
|
|
+ ...item.new_text_list[wIndex + 2].last_styleObj,
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ class="py-char"
|
|
|
+ :style="getCharStyle(item.new_text_list[wIndex + 2], item)"
|
|
|
+ >{{
|
|
|
+ convertText(item.new_text_list[wIndex + 2].text).trim()
|
|
|
+ ? convertText(item.new_text_list[wIndex + 2].text)
|
|
|
+ : ' '
|
|
|
+ }}</span
|
|
|
+ >
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </span>
|
|
|
</span>
|
|
|
</span>
|
|
|
- </span>
|
|
|
- <!-- 图片块 -->
|
|
|
- <div
|
|
|
- v-else-if="item.type === 'image'"
|
|
|
- :key="'image-' + index"
|
|
|
- :style="item.containerStyle"
|
|
|
- class="image-container"
|
|
|
- >
|
|
|
- <img
|
|
|
- :src="item.src"
|
|
|
- :alt="item.alt"
|
|
|
- :width="item.width"
|
|
|
- :height="item.height"
|
|
|
- :style="item.imageStyle"
|
|
|
- class="inline-image"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <!-- 视频块 -->
|
|
|
- <div
|
|
|
- v-else-if="item.type === 'video'"
|
|
|
- :key="'video-' + index"
|
|
|
- :style="item.containerStyle"
|
|
|
- class="video-container"
|
|
|
- >
|
|
|
- <video
|
|
|
- :poster="item.poster"
|
|
|
- :width="item.width"
|
|
|
- :height="item.height"
|
|
|
- :style="item.mediaStyle"
|
|
|
- controls
|
|
|
- class="inline-video"
|
|
|
+ <!-- 图片块 -->
|
|
|
+ <div
|
|
|
+ v-else-if="item.type === 'image'"
|
|
|
+ :key="'image-' + index"
|
|
|
+ :style="item.containerStyle"
|
|
|
+ class="image-container"
|
|
|
>
|
|
|
- <source :src="item.src" :type="item.videoType" />
|
|
|
- 您的浏览器不支持视频播放
|
|
|
- </video>
|
|
|
+ <img
|
|
|
+ :src="item.src"
|
|
|
+ :alt="item.alt"
|
|
|
+ :width="item.width"
|
|
|
+ :height="item.height"
|
|
|
+ :style="item.imageStyle"
|
|
|
+ class="inline-image"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <!-- 视频块 -->
|
|
|
+ <div
|
|
|
+ v-else-if="item.type === 'video'"
|
|
|
+ :key="'video-' + index"
|
|
|
+ :style="item.containerStyle"
|
|
|
+ class="video-container"
|
|
|
+ >
|
|
|
+ <video
|
|
|
+ :poster="item.poster"
|
|
|
+ :width="item.width"
|
|
|
+ :height="item.height"
|
|
|
+ :style="item.mediaStyle"
|
|
|
+ controls
|
|
|
+ class="inline-video"
|
|
|
+ >
|
|
|
+ <source :src="item.src" :type="item.videoType" />
|
|
|
+ 您的浏览器不支持视频播放
|
|
|
+ </video>
|
|
|
+ </div>
|
|
|
+ <!-- 音频块 -->
|
|
|
+ <div
|
|
|
+ v-else-if="item.type === 'audio'"
|
|
|
+ :key="'audio-' + index"
|
|
|
+ :style="item.containerStyle"
|
|
|
+ class="audio-container"
|
|
|
+ >
|
|
|
+ <audio :src="item.src" :style="item.mediaStyle" controls class="inline-audio">
|
|
|
+ 您的浏览器不支持音频播放
|
|
|
+ </audio>
|
|
|
+ </div>
|
|
|
+ <!-- 换行符 -->
|
|
|
+ <br v-else-if="item.type === 'newline'" :key="'newline-' + index" />
|
|
|
</div>
|
|
|
- <!-- 音频块 -->
|
|
|
+ </template>
|
|
|
+ <template v-else-if="col.rich_text_list && col.rich_text_list.length !== 0">
|
|
|
<div
|
|
|
- v-else-if="item.type === 'audio'"
|
|
|
- :key="'audio-' + index"
|
|
|
- :style="item.containerStyle"
|
|
|
- class="audio-container"
|
|
|
- >
|
|
|
- <audio :src="item.src" :style="item.mediaStyle" controls class="inline-audio">
|
|
|
- 您的浏览器不支持音频播放
|
|
|
- </audio>
|
|
|
- </div>
|
|
|
- <!-- 换行符 -->
|
|
|
- <br v-else-if="item.type === 'newline'" :key="'newline-' + index" />
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <template v-else-if="col.rich_text_list && col.rich_text_list.length !== 0">
|
|
|
- <div
|
|
|
- v-for="(item, index) in col.rich_text_list"
|
|
|
- :key="index"
|
|
|
- class="pinyin-text pinyin-text-sentence"
|
|
|
- :class="[
|
|
|
- index === 0 ? 'pinyin-text-left' : '',
|
|
|
- item.type === 'audio' ? 'pinyin-text-audio' : '',
|
|
|
- item.type === 'newline' ? 'pinyin-text-br' : '',
|
|
|
- ]"
|
|
|
- >
|
|
|
- <!-- 文字块:包含 word_list -->
|
|
|
- <span
|
|
|
- v-if="item.type === 'text'"
|
|
|
- :key="'text-' + index"
|
|
|
- class="pinyin-sentence"
|
|
|
- :style="[
|
|
|
- { 'align-items': data.property.pinyin_position === 'top' ? 'flex-end' : 'flex-start' },
|
|
|
+ v-for="(item, index) in col.rich_text_list"
|
|
|
+ :key="index"
|
|
|
+ class="pinyin-text pinyin-text-sentence"
|
|
|
+ :class="[
|
|
|
+ index === 0 ? 'pinyin-text-left' : '',
|
|
|
+ item.type === 'audio' ? 'pinyin-text-audio' : '',
|
|
|
+ item.type === 'newline' ? 'pinyin-text-br' : '',
|
|
|
]"
|
|
|
>
|
|
|
+ <!-- 文字块:包含 word_list -->
|
|
|
<span
|
|
|
- v-for="(word, wIndex) in item.word_list"
|
|
|
- :key="wIndex"
|
|
|
- class="pinyin-text"
|
|
|
- :style="item.styleObj"
|
|
|
+ v-if="item.type === 'text'"
|
|
|
+ :key="'text-' + index"
|
|
|
+ class="pinyin-sentence"
|
|
|
+ :style="[
|
|
|
+ { 'align-items': data.property.pinyin_position === 'top' ? 'flex-end' : 'flex-start' },
|
|
|
+ ]"
|
|
|
>
|
|
|
- <span v-if="word.type === 'text'">
|
|
|
- <span
|
|
|
- :style="{
|
|
|
- flexDirection:
|
|
|
- data.property.pinyin_position === 'top' ? 'column' : 'column-reverse',
|
|
|
- 'align-items': getWordAlignItems(word, item),
|
|
|
- }"
|
|
|
- >
|
|
|
- <span class="py-char" :style="getCharStyle(word, item)">{{
|
|
|
- convertText(word.text).trim() ? convertText(word.text) : ' '
|
|
|
- }}</span>
|
|
|
+ <span
|
|
|
+ v-for="(word, wIndex) in item.word_list"
|
|
|
+ :key="wIndex"
|
|
|
+ class="pinyin-text"
|
|
|
+ :style="item.styleObj"
|
|
|
+ >
|
|
|
+ <span v-if="word.type === 'text'">
|
|
|
+ <span
|
|
|
+ :style="{
|
|
|
+ flexDirection:
|
|
|
+ data.property.pinyin_position === 'top' ? 'column' : 'column-reverse',
|
|
|
+ 'align-items': getWordAlignItems(word, item),
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <span class="py-char" :style="getCharStyle(word, item)">{{
|
|
|
+ convertText(word.text).trim() ? convertText(word.text) : ' '
|
|
|
+ }}</span>
|
|
|
+ </span>
|
|
|
</span>
|
|
|
- </span>
|
|
|
- <template v-else-if="word.type === 'input'">
|
|
|
- <template v-if="data.property.fill_type === fillTypeList[0].value">
|
|
|
- <el-input
|
|
|
- :key="index"
|
|
|
- v-model="word.value"
|
|
|
- :disabled="disabled"
|
|
|
- :class="[...computedAnswerClass(word, i, j)]"
|
|
|
- :style="getInputStyle(item.styleObj, word)"
|
|
|
- />
|
|
|
- </template>
|
|
|
- <template v-else-if="data.property.fill_type === fillTypeList[1].value">
|
|
|
- <el-popover :key="index" placement="top" trigger="click">
|
|
|
- <div class="word-list">
|
|
|
- <span
|
|
|
- v-for="{ content, mark } in data.word_list"
|
|
|
- :key="mark"
|
|
|
- class="word-item"
|
|
|
- @click="handleSelectWord(content, mark, word)"
|
|
|
- >
|
|
|
- {{ convertText(content) }}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
-
|
|
|
+ <template v-else-if="word.type === 'input'">
|
|
|
+ <template v-if="data.property.fill_type === fillTypeList[0].value">
|
|
|
<el-input
|
|
|
- slot="reference"
|
|
|
+ :key="index"
|
|
|
v-model="word.value"
|
|
|
- :readonly="true"
|
|
|
+ :disabled="disabled"
|
|
|
:class="[...computedAnswerClass(word, i, j)]"
|
|
|
:style="getInputStyle(item.styleObj, word)"
|
|
|
/>
|
|
|
- </el-popover>
|
|
|
- </template>
|
|
|
+ </template>
|
|
|
+ <template v-else-if="data.property.fill_type === fillTypeList[1].value">
|
|
|
+ <el-popover :key="index" placement="top" trigger="click">
|
|
|
+ <div class="word-list">
|
|
|
+ <span
|
|
|
+ v-for="{ content, mark } in data.word_list"
|
|
|
+ :key="mark"
|
|
|
+ class="word-item"
|
|
|
+ @click="handleSelectWord(content, mark, word)"
|
|
|
+ >
|
|
|
+ {{ convertText(content) }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
|
|
|
- <template v-else-if="data.property.fill_type === fillTypeList[2].value">
|
|
|
- <span :key="j" class="write-click" @click="handleWriteClick(word)">
|
|
|
- <img
|
|
|
- v-show="word.write_base64"
|
|
|
- style="background-color: #f4f4f4"
|
|
|
- :src="word.write_base64"
|
|
|
- alt="write-show"
|
|
|
+ <el-input
|
|
|
+ slot="reference"
|
|
|
+ v-model="word.value"
|
|
|
+ :readonly="true"
|
|
|
+ :class="[...computedAnswerClass(word, i, j)]"
|
|
|
+ :style="getInputStyle(item.styleObj, word)"
|
|
|
+ />
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-else-if="data.property.fill_type === fillTypeList[2].value">
|
|
|
+ <span :key="j" class="write-click" @click="handleWriteClick(word)">
|
|
|
+ <img
|
|
|
+ v-show="word.write_base64"
|
|
|
+ style="background-color: #f4f4f4"
|
|
|
+ :src="word.write_base64"
|
|
|
+ alt="write-show"
|
|
|
+ />
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-else-if="data.property.fill_type === fillTypeList[3].value">
|
|
|
+ <SoundRecordBox
|
|
|
+ ref="record"
|
|
|
+ :key="j"
|
|
|
+ type="mini"
|
|
|
+ :many-times="false"
|
|
|
+ class="record-box"
|
|
|
+ :answer-record-list="data.audio_answer_list"
|
|
|
+ :task-model="isJudgingRightWrong ? 'ANSWER' : ''"
|
|
|
+ :attrib="data.unified_attrib"
|
|
|
+ @handleWav="handleMiniWav($event, word)"
|
|
|
/>
|
|
|
- </span>
|
|
|
+ </template>
|
|
|
</template>
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ <!-- 图片块 -->
|
|
|
+ <div
|
|
|
+ v-else-if="item.type === 'image'"
|
|
|
+ :key="'image-' + index"
|
|
|
+ :style="item.containerStyle"
|
|
|
+ class="image-container"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ :src="item.src"
|
|
|
+ :alt="item.alt"
|
|
|
+ :width="item.width"
|
|
|
+ :height="item.height"
|
|
|
+ :style="item.imageStyle"
|
|
|
+ class="inline-image"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <!-- 视频块 -->
|
|
|
+ <div
|
|
|
+ v-else-if="item.type === 'video'"
|
|
|
+ :key="'video-' + index"
|
|
|
+ :style="item.containerStyle"
|
|
|
+ class="video-container"
|
|
|
+ >
|
|
|
+ <video
|
|
|
+ :poster="item.poster"
|
|
|
+ :width="item.width"
|
|
|
+ :height="item.height"
|
|
|
+ :style="item.mediaStyle"
|
|
|
+ controls
|
|
|
+ class="inline-video"
|
|
|
+ >
|
|
|
+ <source :src="item.src" :type="item.videoType" />
|
|
|
+ 您的浏览器不支持视频播放
|
|
|
+ </video>
|
|
|
+ </div>
|
|
|
+ <!-- 音频块 -->
|
|
|
+ <div
|
|
|
+ v-else-if="item.type === 'audio'"
|
|
|
+ :key="'audio-' + index"
|
|
|
+ :style="item.containerStyle"
|
|
|
+ class="audio-container"
|
|
|
+ >
|
|
|
+ <audio :src="item.src" :style="item.mediaStyle" controls class="inline-audio">
|
|
|
+ 您的浏览器不支持音频播放
|
|
|
+ </audio>
|
|
|
+ </div>
|
|
|
+ <!-- 换行符 -->
|
|
|
+ <br v-else-if="item.type === 'newline'" :key="'newline-' + index" />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template v-else-if="col.model_essay && col.model_essay.length !== 0">
|
|
|
+ <div v-for="(item, index) in col.model_essay" :key="index" :style="[tdStyle]">
|
|
|
+ <span
|
|
|
+ v-if="item.type === 'text'"
|
|
|
+ :key="index"
|
|
|
+ :style="{
|
|
|
+ fontSize:
|
|
|
+ data.unified_attrib && data.unified_attrib.font_size
|
|
|
+ ? data.unified_attrib.font_size
|
|
|
+ : '',
|
|
|
+ fontFamily:
|
|
|
+ data.unified_attrib && data.unified_attrib.font ? data.unified_attrib.font : '',
|
|
|
+ }"
|
|
|
+ v-html="convertText(sanitizeHTML(item.value))"
|
|
|
+ ></span>
|
|
|
+ <template v-if="item.type === 'input'">
|
|
|
+ <template v-if="data.property.fill_type === fillTypeList[0].value">
|
|
|
+ <el-input
|
|
|
+ :key="index"
|
|
|
+ v-model="item.value"
|
|
|
+ :disabled="disabled"
|
|
|
+ :class="[...computedAnswerClass(item, i, j)]"
|
|
|
+ :style="[
|
|
|
+ {
|
|
|
+ width: Math.max(40, item.value.length * 21.3) + 'px',
|
|
|
+ fontSize:
|
|
|
+ data.unified_attrib && data.unified_attrib.font_size
|
|
|
+ ? data.unified_attrib.font_size
|
|
|
+ : '',
|
|
|
+ fontFamily:
|
|
|
+ data.unified_attrib && data.unified_attrib.font ? data.unified_attrib.font : '',
|
|
|
+ },
|
|
|
+ ]"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template v-else-if="data.property.fill_type === fillTypeList[1].value">
|
|
|
+ <el-popover :key="index" placement="top" trigger="click">
|
|
|
+ <div class="word-list">
|
|
|
+ <span
|
|
|
+ v-for="{ content, mark } in data.word_list"
|
|
|
+ :key="mark"
|
|
|
+ class="word-item"
|
|
|
+ @click="handleSelectWord(content, mark, item)"
|
|
|
+ >
|
|
|
+ {{ convertText(content) }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
|
|
|
- <template v-else-if="data.property.fill_type === fillTypeList[3].value">
|
|
|
- <SoundRecordBox
|
|
|
- ref="record"
|
|
|
- :key="j"
|
|
|
- type="mini"
|
|
|
- :many-times="false"
|
|
|
- class="record-box"
|
|
|
- :answer-record-list="data.audio_answer_list"
|
|
|
- :task-model="isJudgingRightWrong ? 'ANSWER' : ''"
|
|
|
- :attrib="data.unified_attrib"
|
|
|
- @handleWav="handleMiniWav($event, word)"
|
|
|
+ <el-input
|
|
|
+ slot="reference"
|
|
|
+ v-model="item.value"
|
|
|
+ :readonly="true"
|
|
|
+ :class="[...computedAnswerClass(item, i, j)]"
|
|
|
+ :style="[{ width: Math.max(40, item.value.length * 21.3) + 'px' }]"
|
|
|
/>
|
|
|
- </template>
|
|
|
+ </el-popover>
|
|
|
</template>
|
|
|
- </span>
|
|
|
- </span>
|
|
|
- <!-- 图片块 -->
|
|
|
- <div
|
|
|
- v-else-if="item.type === 'image'"
|
|
|
- :key="'image-' + index"
|
|
|
- :style="item.containerStyle"
|
|
|
- class="image-container"
|
|
|
- >
|
|
|
- <img
|
|
|
- :src="item.src"
|
|
|
- :alt="item.alt"
|
|
|
- :width="item.width"
|
|
|
- :height="item.height"
|
|
|
- :style="item.imageStyle"
|
|
|
- class="inline-image"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <!-- 视频块 -->
|
|
|
- <div
|
|
|
- v-else-if="item.type === 'video'"
|
|
|
- :key="'video-' + index"
|
|
|
- :style="item.containerStyle"
|
|
|
- class="video-container"
|
|
|
- >
|
|
|
- <video
|
|
|
- :poster="item.poster"
|
|
|
- :width="item.width"
|
|
|
- :height="item.height"
|
|
|
- :style="item.mediaStyle"
|
|
|
- controls
|
|
|
- class="inline-video"
|
|
|
- >
|
|
|
- <source :src="item.src" :type="item.videoType" />
|
|
|
- 您的浏览器不支持视频播放
|
|
|
- </video>
|
|
|
+
|
|
|
+ <template v-else-if="data.property.fill_type === fillTypeList[2].value">
|
|
|
+ <span :key="j" class="write-click" @click="handleWriteClick(item)">
|
|
|
+ <img
|
|
|
+ v-show="item.write_base64"
|
|
|
+ style="background-color: #f4f4f4"
|
|
|
+ :src="item.write_base64"
|
|
|
+ alt="write-show"
|
|
|
+ />
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-else-if="data.property.fill_type === fillTypeList[3].value">
|
|
|
+ <SoundRecordBox
|
|
|
+ ref="record"
|
|
|
+ :key="j"
|
|
|
+ type="mini"
|
|
|
+ :many-times="false"
|
|
|
+ class="record-box"
|
|
|
+ :answer-record-list="data.audio_answer_list"
|
|
|
+ :task-model="isJudgingRightWrong ? 'ANSWER' : ''"
|
|
|
+ :attrib="data.unified_attrib"
|
|
|
+ @handleWav="handleMiniWav($event, item)"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
- <!-- 音频块 -->
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
<div
|
|
|
- v-else-if="item.type === 'audio'"
|
|
|
- :key="'audio-' + index"
|
|
|
- :style="item.containerStyle"
|
|
|
- class="audio-container"
|
|
|
- >
|
|
|
- <audio :src="item.src" :style="item.mediaStyle" controls class="inline-audio">
|
|
|
- 您的浏览器不支持音频播放
|
|
|
- </audio>
|
|
|
- </div>
|
|
|
- <!-- 换行符 -->
|
|
|
- <br v-else-if="item.type === 'newline'" :key="'newline-' + index" />
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <template v-else-if="col.model_essay && col.model_essay.length !== 0">
|
|
|
- <div v-for="(item, index) in col.model_essay" :key="index" :style="[tdStyle]">
|
|
|
- <span
|
|
|
- v-if="item.type === 'text'"
|
|
|
- :key="index"
|
|
|
:style="{
|
|
|
fontSize:
|
|
|
data.unified_attrib && data.unified_attrib.font_size
|
|
|
@@ -950,77 +1038,10 @@
|
|
|
fontFamily:
|
|
|
data.unified_attrib && data.unified_attrib.font ? data.unified_attrib.font : '',
|
|
|
}"
|
|
|
- v-html="convertText(sanitizeHTML(item.value))"
|
|
|
- ></span>
|
|
|
- <template v-if="item.type === 'input'">
|
|
|
- <template v-if="data.property.fill_type === fillTypeList[0].value">
|
|
|
- <el-input
|
|
|
- :key="index"
|
|
|
- v-model="item.value"
|
|
|
- :disabled="disabled"
|
|
|
- :class="[...computedAnswerClass(item, i, j)]"
|
|
|
- :style="[
|
|
|
- {
|
|
|
- width: Math.max(40, item.value.length * 21.3) + 'px',
|
|
|
- fontSize:
|
|
|
- data.unified_attrib && data.unified_attrib.font_size
|
|
|
- ? data.unified_attrib.font_size
|
|
|
- : '',
|
|
|
- fontFamily:
|
|
|
- data.unified_attrib && data.unified_attrib.font ? data.unified_attrib.font : '',
|
|
|
- },
|
|
|
- ]"
|
|
|
- />
|
|
|
- </template>
|
|
|
- <template v-else-if="data.property.fill_type === fillTypeList[1].value">
|
|
|
- <el-popover :key="index" placement="top" trigger="click">
|
|
|
- <div class="word-list">
|
|
|
- <span
|
|
|
- v-for="{ content, mark } in data.word_list"
|
|
|
- :key="mark"
|
|
|
- class="word-item"
|
|
|
- @click="handleSelectWord(content, mark, item)"
|
|
|
- >
|
|
|
- {{ convertText(content) }}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <el-input
|
|
|
- slot="reference"
|
|
|
- v-model="item.value"
|
|
|
- :readonly="true"
|
|
|
- :class="[...computedAnswerClass(item, i, j)]"
|
|
|
- :style="[{ width: Math.max(40, item.value.length * 21.3) + 'px' }]"
|
|
|
- />
|
|
|
- </el-popover>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-else-if="data.property.fill_type === fillTypeList[2].value">
|
|
|
- <span :key="j" class="write-click" @click="handleWriteClick(item)">
|
|
|
- <img
|
|
|
- v-show="item.write_base64"
|
|
|
- style="background-color: #f4f4f4"
|
|
|
- :src="item.write_base64"
|
|
|
- alt="write-show"
|
|
|
- />
|
|
|
- </span>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-else-if="data.property.fill_type === fillTypeList[3].value">
|
|
|
- <SoundRecordBox
|
|
|
- ref="record"
|
|
|
- :key="j"
|
|
|
- type="mini"
|
|
|
- :many-times="false"
|
|
|
- class="record-box"
|
|
|
- :answer-record-list="data.audio_answer_list"
|
|
|
- :task-model="isJudgingRightWrong ? 'ANSWER' : ''"
|
|
|
- :attrib="data.unified_attrib"
|
|
|
- @handleWav="handleMiniWav($event, item)"
|
|
|
- />
|
|
|
- </template>
|
|
|
- </template>
|
|
|
- </div>
|
|
|
+ class="original-text"
|
|
|
+ v-html="col.content"
|
|
|
+ ></div>
|
|
|
+ </template>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<div
|
|
|
@@ -1029,6 +1050,7 @@
|
|
|
data.unified_attrib && data.unified_attrib.font_size ? data.unified_attrib.font_size : '',
|
|
|
fontFamily: data.unified_attrib && data.unified_attrib.font ? data.unified_attrib.font : '',
|
|
|
}"
|
|
|
+ class="original-text"
|
|
|
v-html="col.content"
|
|
|
></div>
|
|
|
</template>
|
|
|
@@ -3122,4 +3144,10 @@ $border-color: #e6e6e6;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.original-text {
|
|
|
+ :deep p {
|
|
|
+ margin: 0;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|