|
@@ -39,7 +39,12 @@
|
|
|
cellpadding="0"
|
|
|
v-if="isEnable(data.property.auto_wrap)"
|
|
|
>
|
|
|
- <li v-for="(item, index) in data.option_list" :key="'curQue.option' + index" class="NPC-word-tr">
|
|
|
+ <li
|
|
|
+ v-for="(item, index) in data.option_list"
|
|
|
+ :key="'curQue.option' + index"
|
|
|
+ class="NPC-word-tr"
|
|
|
+ :style="{ width: rowWidth + 'px' }"
|
|
|
+ >
|
|
|
<div
|
|
|
v-for="(sItem, sIndex) in item"
|
|
|
:key="'curQue.option.child' + sIndex"
|
|
@@ -64,7 +69,7 @@
|
|
|
</template>
|
|
|
|
|
|
<template v-else>
|
|
|
- <span style="width: 16px; height: 16px"></span>
|
|
|
+ <span style="flex-shrink: 0; width: 16px; height: 16px"></span>
|
|
|
</template>
|
|
|
<div class="tabNum-box">
|
|
|
<template v-if="sItem.mIndex == 0">
|
|
@@ -83,13 +88,20 @@
|
|
|
v-if="data.property.pinyin_position == 'top'"
|
|
|
class="NPC-word-tab-common NPC-word-tab-pinyin"
|
|
|
v-html="sItem.pinyin"
|
|
|
+ :style="{ width: data.col_width[0].value + 'px' }"
|
|
|
+ >
|
|
|
+ </span>
|
|
|
+ <span
|
|
|
+ :style="{ width: data.col_width[0].value + 'px' }"
|
|
|
+ class="NPC-word-tab-common NPC-word-tab-word"
|
|
|
+ v-html="sItem.new_word"
|
|
|
>
|
|
|
</span>
|
|
|
- <span class="NPC-word-tab-common NPC-word-tab-word" v-html="sItem.new_word"> </span>
|
|
|
<span
|
|
|
v-if="data.property.pinyin_position == 'bottom'"
|
|
|
class="NPC-word-tab-common NPC-word-tab-pinyin"
|
|
|
v-html="sItem.pinyin"
|
|
|
+ :style="{ width: data.col_width[0].value + 'px' }"
|
|
|
>
|
|
|
</span>
|
|
|
</div>
|
|
@@ -97,50 +109,74 @@
|
|
|
class="NPC-word-tab-common NPC-word-tab-cixing"
|
|
|
:class="[/[\u4E00-\u9FA5\uF900-\uFA2D]/.test(sItem.cixing) ? 'hasCn' : '']"
|
|
|
v-html="sItem.cixing"
|
|
|
+ :style="{ width: data.col_width[2].value + 'px' }"
|
|
|
+ ></span>
|
|
|
+ <span
|
|
|
+ class="NPC-word-tab-common NPC-word-tab-def"
|
|
|
+ v-html="sItem.def_str"
|
|
|
+ :style="{ width: data.col_width[3].value + 'px' }"
|
|
|
></span>
|
|
|
- <span class="NPC-word-tab-common NPC-word-tab-def" v-html="sItem.def_str"></span>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<span
|
|
|
v-if="!data.property.pinyin_position || data.property.pinyin_position == 'front'"
|
|
|
class="NPC-word-tab-common NPC-word-tab-pinyin"
|
|
|
v-html="sItem.pinyin"
|
|
|
+ :style="{ width: data.col_width[1].value + 'px' }"
|
|
|
+ >
|
|
|
+ </span>
|
|
|
+ <span
|
|
|
+ class="NPC-word-tab-common NPC-word-tab-word"
|
|
|
+ :style="{ width: data.col_width[0].value + 'px' }"
|
|
|
+ v-html="sItem.new_word"
|
|
|
>
|
|
|
</span>
|
|
|
- <span class="NPC-word-tab-common NPC-word-tab-word" v-html="sItem.new_word"> </span>
|
|
|
<span
|
|
|
v-if="data.property.pinyin_position == 'back'"
|
|
|
class="NPC-word-tab-common NPC-word-tab-pinyin"
|
|
|
v-html="sItem.pinyin"
|
|
|
+ :style="{ width: data.col_width[1].value + 'px' }"
|
|
|
>
|
|
|
</span>
|
|
|
<span
|
|
|
class="NPC-word-tab-common NPC-word-tab-cixing"
|
|
|
:class="[/[\u4E00-\u9FA5\uF900-\uFA2D]/.test(sItem.cixing) ? 'hasCn' : '']"
|
|
|
v-html="sItem.cixing"
|
|
|
+ :style="{ width: data.col_width[2].value + 'px' }"
|
|
|
+ ></span>
|
|
|
+ <span
|
|
|
+ class="NPC-word-tab-common NPC-word-tab-def"
|
|
|
+ v-html="sItem.def_str"
|
|
|
+ :style="{ width: data.col_width[3].value + 'px' }"
|
|
|
></span>
|
|
|
- <span class="NPC-word-tab-common NPC-word-tab-def" v-html="sItem.def_str"></span>
|
|
|
</template>
|
|
|
- <span>
|
|
|
- <!-- :answerRecordList="data.answer.answer_list[index][sIndex].recordList" -->
|
|
|
- <SoundRecord
|
|
|
- :tm-index="index"
|
|
|
- :tms-index="sIndex"
|
|
|
- :task-model="isJudgingRightWrong ? 'ANSWER' : ''"
|
|
|
- :answer-record-list="[]"
|
|
|
- type="mini"
|
|
|
- class="luyin-box-wordphrase"
|
|
|
- :style="{ marginLeft: '8px' }"
|
|
|
- @handleWav="handleWav"
|
|
|
- />
|
|
|
- </span>
|
|
|
- <span v-if="isEnable(data.property.is_has_infor)">
|
|
|
- <img src="@/assets/detail-icon.png" class="detail-icon" @click="showDetail(sItem)" />
|
|
|
- </span>
|
|
|
- <div v-if="sItem.collocation" class="collocation">
|
|
|
+ <div class="right-box">
|
|
|
+ <span>
|
|
|
+ <!-- :answerRecordList="data.answer.answer_list[index][sIndex].recordList" -->
|
|
|
+ <SoundRecord
|
|
|
+ :tm-index="index"
|
|
|
+ :tms-index="sIndex"
|
|
|
+ :task-model="isJudgingRightWrong ? 'ANSWER' : ''"
|
|
|
+ :answer-record-list="[]"
|
|
|
+ type="mini"
|
|
|
+ class="luyin-box-wordphrase"
|
|
|
+ :style="{ marginLeft: '8px' }"
|
|
|
+ @handleWav="handleWav"
|
|
|
+ />
|
|
|
+ </span>
|
|
|
+ <span v-if="isEnable(data.property.is_has_infor)">
|
|
|
+ <img src="@/assets/detail-icon.png" class="detail-icon" @click="showDetail(sItem)" />
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div
|
|
|
+ v-if="sItem.collocation"
|
|
|
+ class="collocation"
|
|
|
+ :style="{ width: data.col_width[4].value + 'px' }"
|
|
|
+ >
|
|
|
<span>搭配:</span><b v-html="sItem.collocation"></b>
|
|
|
</div>
|
|
|
- <div v-if="sItem.liju_list" class="collocation">
|
|
|
+ <div v-if="sItem.liju_list" class="collocation" :style="{ width: data.col_width[5].value + 'px' }">
|
|
|
<span>例句:</span>
|
|
|
<div>
|
|
|
<b v-html="sItem.liju_list"></b>
|
|
@@ -149,128 +185,6 @@
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
- <!-- <el-table
|
|
|
- v-else
|
|
|
- :data="data.new_word_list"
|
|
|
- v-fit-columns
|
|
|
- style="width: 100%"
|
|
|
- class="newWord-table NPC-word-table"
|
|
|
- >
|
|
|
- <el-table-column fixed prop="" width="16px">
|
|
|
- <template slot-scope="scope">
|
|
|
- <template v-if="scope.row.bg || scope.row.ed">
|
|
|
- <a
|
|
|
- :class="[
|
|
|
- 'play-btn',
|
|
|
- curTime >= scope.row.bg && curTime < scope.row.ed && stopAudioS ? 'active' : '',
|
|
|
- ]"
|
|
|
- @click="handleChangeTime(scope.row.bg, scope.row.ed)"
|
|
|
- ></a>
|
|
|
- </template>
|
|
|
- <template v-else-if="scope.row.mp3_list">
|
|
|
- <span
|
|
|
- :class="['play-btn', playClass && mp3_index === scope.row.sIndex ? 'active' : '']"
|
|
|
- @click="palyAudio(scope.row.mp3_list_url, scope.row.sIndex)"
|
|
|
- ></span>
|
|
|
- <audio :id="'word' + indexStr + scope.row.sIndex" :src="scope.row.mp3_list_url"></audio>
|
|
|
- </template>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column fixed prop="">
|
|
|
- <template slot-scope="scope">
|
|
|
- <b class="tabNum" :style="{ backgroundColor: bookInfo.theme_color }">{{ scope.row.number }}</b>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column
|
|
|
- fixed
|
|
|
- prop=""
|
|
|
- v-if="!data.property.pinyin_position || data.property.pinyin_position == 'front'"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <span class="NPC-word-tab-common NPC-word-tab-pinyin" v-html="scope.row.pinyin"> </span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column fixed prop="new_word">
|
|
|
- <template slot-scope="scope">
|
|
|
- <template
|
|
|
- v-if="
|
|
|
- data.property.pinyin_position &&
|
|
|
- (data.property.pinyin_position == 'top' || data.property.pinyin_position == 'bottom')
|
|
|
- "
|
|
|
- >
|
|
|
- <div class="NPC-word-tab-box">
|
|
|
- <span
|
|
|
- v-if="data.property.pinyin_position == 'top'"
|
|
|
- class="NPC-word-tab-common NPC-word-tab-pinyin"
|
|
|
- v-html="scope.row.pinyin"
|
|
|
- >
|
|
|
- </span>
|
|
|
- <span class="NPC-word-tab-common NPC-word-tab-word" v-html="scope.row.new_word"> </span>
|
|
|
- <span
|
|
|
- v-if="data.property.pinyin_position == 'bottom'"
|
|
|
- class="NPC-word-tab-common NPC-word-tab-pinyin"
|
|
|
- v-html="scope.row.pinyin"
|
|
|
- >
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <span class="NPC-word-tab-common NPC-word-tab-word" v-html="scope.row.new_word"> </span>
|
|
|
- </template>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column fixed prop="" v-if="data.property.pinyin_position == 'back'">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span class="NPC-word-tab-common NPC-word-tab-pinyin" v-html="scope.row.pinyin"> </span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="cixing">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span
|
|
|
- class="NPC-word-tab-common NPC-word-tab-cixing"
|
|
|
- :class="[/[\u4E00-\u9FA5\uF900-\uFA2D]/.test(scope.row.cixing) ? 'hasCn' : '']"
|
|
|
- v-html="scope.row.cixing"
|
|
|
- ></span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="def_str">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span class="NPC-word-tab-common NPC-word-tab-def" v-html="scope.row.def_str"></span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="collocation">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div class="collocation"><span>搭配:</span><b v-html="scope.row.collocation"></b></div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="collocation">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div class="collocation"><span>例句:</span><b v-html="scope.row.liju_list"></b></div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="def_str" fixed="right">
|
|
|
- <template slot-scope="scope">
|
|
|
- <SoundRecord
|
|
|
- :tm-index="scope.$index"
|
|
|
- :tms-index="0"
|
|
|
- :task-model="isJudgingRightWrong ? 'ANSWER' : ''"
|
|
|
- :answer-record-list="[]"
|
|
|
- type="mini"
|
|
|
- class="luyin-box-wordphrase"
|
|
|
- :style="{ marginLeft: '8px' }"
|
|
|
- @handleWav="handleWav"
|
|
|
- />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="def_str" fixed="right">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span v-if="isEnable(data.property.is_has_infor)">
|
|
|
- <img src="@/assets/detail-icon.png" class="detail-icon" @click="showDetail(scope.row)" />
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
<template v-else>
|
|
@@ -498,6 +412,7 @@ export default {
|
|
|
is_change: false,
|
|
|
is_list: true, // 列表还是卡片展示
|
|
|
courseware_id: this.$route.params.id,
|
|
|
+ rowWidth: 0,
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -618,6 +533,11 @@ export default {
|
|
|
this.$refs.newwordAudio.pause();
|
|
|
},
|
|
|
initData() {
|
|
|
+ this.rowWidth = 0;
|
|
|
+ this.data.col_width.forEach((item) => {
|
|
|
+ this.rowWidth += Number(item.value);
|
|
|
+ });
|
|
|
+ this.rowWidth += 132;
|
|
|
this.is_change = true;
|
|
|
let resIndex = 0;
|
|
|
let optionRes = [];
|
|
@@ -714,6 +634,8 @@ export default {
|
|
|
@include preview-base;
|
|
|
|
|
|
.NPC-zhedie {
|
|
|
+ width: 1007px;
|
|
|
+
|
|
|
// width: 780px;
|
|
|
margin-bottom: 24px;
|
|
|
|
|
@@ -735,7 +657,14 @@ export default {
|
|
|
}
|
|
|
|
|
|
.NPC-word-list {
|
|
|
+ overflow: auto;
|
|
|
background: #f7f7f7;
|
|
|
+
|
|
|
+ .NPC-word-tab-common,
|
|
|
+ .collocation,
|
|
|
+ .tabNum-box {
|
|
|
+ flex-shrink: 0;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.NPC-word-table {
|
|
@@ -751,10 +680,13 @@ export default {
|
|
|
border-radius: 8px;
|
|
|
|
|
|
.NPC-word-row {
|
|
|
+ position: relative;
|
|
|
display: flex;
|
|
|
- flex-flow: wrap;
|
|
|
+
|
|
|
+ // flex-flow: wrap;
|
|
|
justify-content: flex-start;
|
|
|
padding: 8px 13px 8px 12px;
|
|
|
+ padding-right: 80px;
|
|
|
cursor: pointer;
|
|
|
border-radius: 8px;
|
|
|
|
|
@@ -762,6 +694,14 @@ export default {
|
|
|
background: linear-gradient(0deg, rgba(0, 0, 0, 8%), rgba(0, 0, 0, 8%)), #fff;
|
|
|
}
|
|
|
|
|
|
+ .right-box {
|
|
|
+ position: absolute;
|
|
|
+ top: 8px;
|
|
|
+ right: 5px;
|
|
|
+ display: flex;
|
|
|
+ gap: 5px;
|
|
|
+ }
|
|
|
+
|
|
|
> span {
|
|
|
font-size: 16px;
|
|
|
line-height: 150%;
|
|
@@ -917,7 +857,8 @@ export default {
|
|
|
|
|
|
.NPC-word-tab-def {
|
|
|
box-sizing: border-box;
|
|
|
- flex: 1;
|
|
|
+
|
|
|
+ // flex: 1;
|
|
|
font-family: 'robot', 'alabo';
|
|
|
word-break: break-word;
|
|
|
white-space: pre-wrap;
|
|
@@ -938,7 +879,8 @@ export default {
|
|
|
.collocation {
|
|
|
display: flex;
|
|
|
width: 100%;
|
|
|
- padding-top: 8px;
|
|
|
+
|
|
|
+ // padding-top: 8px;
|
|
|
|
|
|
> span {
|
|
|
flex-shrink: 0;
|