|
@@ -121,6 +121,36 @@
|
|
|
<svg-icon size="16" icon-class="eye-invisible" />
|
|
<svg-icon size="16" icon-class="eye-invisible" />
|
|
|
</i>
|
|
</i>
|
|
|
</li>
|
|
</li>
|
|
|
|
|
+ <li v-if="isHasTraditional" @click="handleShow('traditional')">
|
|
|
|
|
+ <span>繁体</span
|
|
|
|
|
+ ><i
|
|
|
|
|
+ v-if="showObj.traditional"
|
|
|
|
|
+ slot="suffix"
|
|
|
|
|
+ class="el-icon-view show-icon"
|
|
|
|
|
+ size="16"
|
|
|
|
|
+ :style="{
|
|
|
|
|
+ color:
|
|
|
|
|
+ data.unified_attrib && data.unified_attrib.topic_color
|
|
|
|
|
+ ? data.unified_attrib.topic_color
|
|
|
|
|
+ : '#de4444',
|
|
|
|
|
+ marginLeft: '5px',
|
|
|
|
|
+ }"
|
|
|
|
|
+ ></i>
|
|
|
|
|
+ <i
|
|
|
|
|
+ v-else
|
|
|
|
|
+ slot="suffix"
|
|
|
|
|
+ class="show-icon"
|
|
|
|
|
+ :style="{
|
|
|
|
|
+ color:
|
|
|
|
|
+ data.unified_attrib && data.unified_attrib.topic_color
|
|
|
|
|
+ ? data.unified_attrib.topic_color
|
|
|
|
|
+ : '#de4444',
|
|
|
|
|
+ marginLeft: '5px',
|
|
|
|
|
+ }"
|
|
|
|
|
+ >
|
|
|
|
|
+ <svg-icon size="16" icon-class="eye-invisible" />
|
|
|
|
|
+ </i>
|
|
|
|
|
+ </li>
|
|
|
<li v-if="colHasContent[2]" @click="handleShow('cixing')">
|
|
<li v-if="colHasContent[2]" @click="handleShow('cixing')">
|
|
|
<span>词性</span
|
|
<span>词性</span
|
|
|
><i
|
|
><i
|
|
@@ -526,6 +556,25 @@
|
|
|
>
|
|
>
|
|
|
</span>
|
|
</span>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <span
|
|
|
|
|
+ v-if="showObj.traditional && isHasTraditional"
|
|
|
|
|
+ :style="{
|
|
|
|
|
+ width: data.col_width[0].value + 'px',
|
|
|
|
|
+ flex: !data.col_width[0].value || data.col_width[0].value === '0' ? '1' : '',
|
|
|
|
|
+ }"
|
|
|
|
|
+ >
|
|
|
|
|
+ <p
|
|
|
|
|
+ class="NPC-word-tab-common NPC-word-tab-word"
|
|
|
|
|
+ :style="{
|
|
|
|
|
+ fontSize:
|
|
|
|
|
+ data.unified_attrib && data.unified_attrib.font_size
|
|
|
|
|
+ ? data.unified_attrib.font_size
|
|
|
|
|
+ : '',
|
|
|
|
|
+ fontFamily: '楷体',
|
|
|
|
|
+ }"
|
|
|
|
|
+ v-html="sItem.word_traditional"
|
|
|
|
|
+ ></p>
|
|
|
|
|
+ </span>
|
|
|
<span>
|
|
<span>
|
|
|
<p
|
|
<p
|
|
|
v-if="showObj.cixing"
|
|
v-if="showObj.cixing"
|
|
@@ -600,6 +649,25 @@
|
|
|
</span>
|
|
</span>
|
|
|
</span>
|
|
</span>
|
|
|
<span
|
|
<span
|
|
|
|
|
+ v-if="showObj.traditional && isHasTraditional"
|
|
|
|
|
+ :style="{
|
|
|
|
|
+ width: data.col_width[0].value + 'px',
|
|
|
|
|
+ flex: !data.col_width[0].value || data.col_width[0].value === '0' ? '1' : '',
|
|
|
|
|
+ }"
|
|
|
|
|
+ >
|
|
|
|
|
+ <p
|
|
|
|
|
+ class="NPC-word-tab-common NPC-word-tab-word"
|
|
|
|
|
+ :style="{
|
|
|
|
|
+ fontSize:
|
|
|
|
|
+ data.unified_attrib && data.unified_attrib.font_size
|
|
|
|
|
+ ? data.unified_attrib.font_size
|
|
|
|
|
+ : '',
|
|
|
|
|
+ fontFamily: '楷体',
|
|
|
|
|
+ }"
|
|
|
|
|
+ v-html="convertText(sanitizeHTML(sItem.word_traditional))"
|
|
|
|
|
+ ></p>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span
|
|
|
v-if="data.property.pinyin_position == 'back' && showObj.pinyin"
|
|
v-if="data.property.pinyin_position == 'back' && showObj.pinyin"
|
|
|
class="NPC-word-tab-common NPC-word-tab-pinyin"
|
|
class="NPC-word-tab-common NPC-word-tab-pinyin"
|
|
|
:style="{
|
|
:style="{
|
|
@@ -1024,6 +1092,25 @@
|
|
|
</span>
|
|
</span>
|
|
|
</div>
|
|
</div>
|
|
|
<span
|
|
<span
|
|
|
|
|
+ v-if="showObj.traditional && isHasTraditional"
|
|
|
|
|
+ :style="{
|
|
|
|
|
+ width: data.col_width[0].value + 'px',
|
|
|
|
|
+ flex: !data.col_width[0].value || data.col_width[0].value === '0' ? '1' : '',
|
|
|
|
|
+ }"
|
|
|
|
|
+ >
|
|
|
|
|
+ <p
|
|
|
|
|
+ class="NPC-word-tab-common NPC-word-tab-word"
|
|
|
|
|
+ :style="{
|
|
|
|
|
+ fontSize:
|
|
|
|
|
+ data.unified_attrib && data.unified_attrib.font_size
|
|
|
|
|
+ ? data.unified_attrib.font_size
|
|
|
|
|
+ : '',
|
|
|
|
|
+ fontFamily: '楷体',
|
|
|
|
|
+ }"
|
|
|
|
|
+ v-html="sItem.word_traditional"
|
|
|
|
|
+ ></p>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span
|
|
|
v-if="showObj.cixing && colHasContent[2]"
|
|
v-if="showObj.cixing && colHasContent[2]"
|
|
|
:style="{
|
|
:style="{
|
|
|
width: data.col_width[2].value + 'px',
|
|
width: data.col_width[2].value + 'px',
|
|
@@ -1145,6 +1232,25 @@
|
|
|
</span>
|
|
</span>
|
|
|
</span>
|
|
</span>
|
|
|
<span
|
|
<span
|
|
|
|
|
+ v-if="showObj.traditional && isHasTraditional"
|
|
|
|
|
+ :style="{
|
|
|
|
|
+ width: data.col_width[0].value + 'px',
|
|
|
|
|
+ flex: !data.col_width[0].value || data.col_width[0].value === '0' ? '1' : '',
|
|
|
|
|
+ }"
|
|
|
|
|
+ >
|
|
|
|
|
+ <p
|
|
|
|
|
+ class="NPC-word-tab-common NPC-word-tab-word"
|
|
|
|
|
+ :style="{
|
|
|
|
|
+ fontSize:
|
|
|
|
|
+ data.unified_attrib && data.unified_attrib.font_size
|
|
|
|
|
+ ? data.unified_attrib.font_size
|
|
|
|
|
+ : '',
|
|
|
|
|
+ fontFamily: '楷体',
|
|
|
|
|
+ }"
|
|
|
|
|
+ v-html="sItem.word_traditional"
|
|
|
|
|
+ ></p>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span
|
|
|
v-if="data.property.pinyin_position == 'back' && showObj.pinyin && colHasContent[0]"
|
|
v-if="data.property.pinyin_position == 'back' && showObj.pinyin && colHasContent[0]"
|
|
|
class="NPC-word-tab-common NPC-word-tab-pinyin"
|
|
class="NPC-word-tab-common NPC-word-tab-pinyin"
|
|
|
:style="{
|
|
:style="{
|
|
@@ -1696,7 +1802,13 @@
|
|
|
? item.hz_info.length * 86 + 'px'
|
|
? item.hz_info.length * 86 + 'px'
|
|
|
: '', -->
|
|
: '', -->
|
|
|
<div
|
|
<div
|
|
|
- v-if="item.collocation || item.liju_list || item.definition_list || item.cixing"
|
|
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ item.collocation ||
|
|
|
|
|
+ item.liju_list ||
|
|
|
|
|
+ item.definition_list ||
|
|
|
|
|
+ item.cixing ||
|
|
|
|
|
+ item.word_traditional
|
|
|
|
|
+ "
|
|
|
class="definition_list-box"
|
|
class="definition_list-box"
|
|
|
:style="{
|
|
:style="{
|
|
|
width: !(item.collocation || item.liju_list) && item.new_word.length < 4 ? '160px' : '',
|
|
width: !(item.collocation || item.liju_list) && item.new_word.length < 4 ? '160px' : '',
|
|
@@ -1704,6 +1816,9 @@
|
|
|
!(item.collocation || item.liju_list) && item.new_word.length < 4 ? '16px auto 0 auto' : '',
|
|
!(item.collocation || item.liju_list) && item.new_word.length < 4 ? '16px auto 0 auto' : '',
|
|
|
}"
|
|
}"
|
|
|
>
|
|
>
|
|
|
|
|
+ <div v-if="item.word_traditional">
|
|
|
|
|
+ <p style="font-family: '楷体'" v-html="item.word_traditional"></p>
|
|
|
|
|
+ </div>
|
|
|
<template v-if="!(item.collocation || item.liju_list) || item.new_word.length >= 4">
|
|
<template v-if="!(item.collocation || item.liju_list) || item.new_word.length >= 4">
|
|
|
<div v-if="item.cixing">
|
|
<div v-if="item.cixing">
|
|
|
<p v-html="convertText(sanitizeHTML(item.cixing))"></p>
|
|
<p v-html="convertText(sanitizeHTML(item.cixing))"></p>
|
|
@@ -1896,6 +2011,7 @@ export default {
|
|
|
shiyi: true,
|
|
shiyi: true,
|
|
|
collocation: true,
|
|
collocation: true,
|
|
|
liju: true,
|
|
liju: true,
|
|
|
|
|
+ traditional: true,
|
|
|
},
|
|
},
|
|
|
colHasContent: [],
|
|
colHasContent: [],
|
|
|
sentIndex: 0,
|
|
sentIndex: 0,
|
|
@@ -1916,6 +2032,7 @@ export default {
|
|
|
assessmentMode: false, // 是否开启录音评分模式
|
|
assessmentMode: false, // 是否开启录音评分模式
|
|
|
isShowScoreBtn: false, // 是否显示评分按钮
|
|
isShowScoreBtn: false, // 是否显示评分按钮
|
|
|
isRecording: false, // 整体录音是否在开启中
|
|
isRecording: false, // 整体录音是否在开启中
|
|
|
|
|
+ isHasTraditional: false, // 繁体列是否含有内容
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -1981,6 +2098,10 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
this.rowWidth += 180;
|
|
this.rowWidth += 180;
|
|
|
|
|
+ if (this.isHasTraditional) {
|
|
|
|
|
+ // 如果有繁体列并且有内容
|
|
|
|
|
+ this.rowWidth += Number(this.data.col_width[0].value);
|
|
|
|
|
+ }
|
|
|
if (this.rowWidth < this.width - 2) {
|
|
if (this.rowWidth < this.width - 2) {
|
|
|
this.rowWidth = this.width - 2;
|
|
this.rowWidth = this.width - 2;
|
|
|
}
|
|
}
|
|
@@ -2033,7 +2154,10 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
this.rowWidth += 180;
|
|
this.rowWidth += 180;
|
|
|
-
|
|
|
|
|
|
|
+ if (this.isHasTraditional) {
|
|
|
|
|
+ // 如果有繁体列并且有内容
|
|
|
|
|
+ this.rowWidth += Number(this.data.col_width[0].value);
|
|
|
|
|
+ }
|
|
|
this.rowWidth += 138; // 加上评分分数的宽度
|
|
this.rowWidth += 138; // 加上评分分数的宽度
|
|
|
if (this.rowWidth < this.width - 2) {
|
|
if (this.rowWidth < this.width - 2) {
|
|
|
this.rowWidth = this.width - 2;
|
|
this.rowWidth = this.width - 2;
|
|
@@ -2065,7 +2189,10 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
this.rowWidth += 180;
|
|
this.rowWidth += 180;
|
|
|
-
|
|
|
|
|
|
|
+ if (this.isHasTraditional) {
|
|
|
|
|
+ // 如果有繁体列并且有内容
|
|
|
|
|
+ this.rowWidth += Number(this.data.col_width[0].value);
|
|
|
|
|
+ }
|
|
|
// 有评分按钮
|
|
// 有评分按钮
|
|
|
this.rowWidth += 50;
|
|
this.rowWidth += 50;
|
|
|
if (this.isHasScore) {
|
|
if (this.isHasScore) {
|
|
@@ -2095,6 +2222,10 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
this.rowWidth += 180;
|
|
this.rowWidth += 180;
|
|
|
|
|
+ if (this.isHasTraditional) {
|
|
|
|
|
+ // 如果有繁体列并且有内容
|
|
|
|
|
+ this.rowWidth += Number(this.data.col_width[0].value);
|
|
|
|
|
+ }
|
|
|
if (this.rowWidth < this.width - 2) {
|
|
if (this.rowWidth < this.width - 2) {
|
|
|
this.rowWidth = this.width - 2;
|
|
this.rowWidth = this.width - 2;
|
|
|
}
|
|
}
|
|
@@ -2125,6 +2256,10 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
this.rowWidth += 180;
|
|
this.rowWidth += 180;
|
|
|
|
|
+ if (this.isHasTraditional) {
|
|
|
|
|
+ // 如果有繁体列并且有内容
|
|
|
|
|
+ this.rowWidth += Number(this.data.col_width[0].value);
|
|
|
|
|
+ }
|
|
|
// 有评分按钮
|
|
// 有评分按钮
|
|
|
this.rowWidth += 50;
|
|
this.rowWidth += 50;
|
|
|
if (this.isHasScore) {
|
|
if (this.isHasScore) {
|
|
@@ -2154,6 +2289,10 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
this.rowWidth += 180;
|
|
this.rowWidth += 180;
|
|
|
|
|
+ if (this.isHasTraditional) {
|
|
|
|
|
+ // 如果有繁体列并且有内容
|
|
|
|
|
+ this.rowWidth += Number(this.data.col_width[0].value);
|
|
|
|
|
+ }
|
|
|
if (this.rowWidth < this.width - 2) {
|
|
if (this.rowWidth < this.width - 2) {
|
|
|
this.rowWidth = this.width - 2;
|
|
this.rowWidth = this.width - 2;
|
|
|
}
|
|
}
|
|
@@ -2184,6 +2323,10 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
this.rowWidth += 180;
|
|
this.rowWidth += 180;
|
|
|
|
|
+ if (this.isHasTraditional) {
|
|
|
|
|
+ // 如果有繁体列并且有内容
|
|
|
|
|
+ this.rowWidth += Number(this.data.col_width[0].value);
|
|
|
|
|
+ }
|
|
|
if (this.rowWidth < this.width - 2) {
|
|
if (this.rowWidth < this.width - 2) {
|
|
|
this.rowWidth = this.width - 2;
|
|
this.rowWidth = this.width - 2;
|
|
|
}
|
|
}
|
|
@@ -2211,6 +2354,22 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
this.rowWidth += 180;
|
|
this.rowWidth += 180;
|
|
|
|
|
+ if (this.isHasTraditional) {
|
|
|
|
|
+ // 如果有繁体列并且有内容
|
|
|
|
|
+ this.rowWidth += Number(this.data.col_width[0].value);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.assessmentMode) {
|
|
|
|
|
+ // 语音评分模式下
|
|
|
|
|
+ if (this.isShowScoreBtn) {
|
|
|
|
|
+ // 有评分按钮
|
|
|
|
|
+ this.rowWidth += 50;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.isHasScore) {
|
|
|
|
|
+ // 有评分
|
|
|
|
|
+ this.rowWidth += 88;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 如果有宽度为0且有内容的列,则行宽最小为撑满
|
|
// 如果有宽度为0且有内容的列,则行宽最小为撑满
|
|
|
if (this.rowWidth < this.width - 2) {
|
|
if (this.rowWidth < this.width - 2) {
|
|
|
this.rowWidth = this.width - 2;
|
|
this.rowWidth = this.width - 2;
|
|
@@ -2283,6 +2442,7 @@ export default {
|
|
|
this.isHasScore = false;
|
|
this.isHasScore = false;
|
|
|
this.isShowScoreBtn = false;
|
|
this.isShowScoreBtn = false;
|
|
|
this.assessmentMode = false;
|
|
this.assessmentMode = false;
|
|
|
|
|
+ this.isHasTraditional = false;
|
|
|
this.showObj = {
|
|
this.showObj = {
|
|
|
pinyin: true,
|
|
pinyin: true,
|
|
|
newWord: true,
|
|
newWord: true,
|
|
@@ -2290,6 +2450,7 @@ export default {
|
|
|
shiyi: true,
|
|
shiyi: true,
|
|
|
collocation: true,
|
|
collocation: true,
|
|
|
liju: true,
|
|
liju: true,
|
|
|
|
|
+ traditional: true,
|
|
|
};
|
|
};
|
|
|
if (this.data.addCol) {
|
|
if (this.data.addCol) {
|
|
|
this.data.addCol.forEach((item) => {
|
|
this.data.addCol.forEach((item) => {
|
|
@@ -2303,6 +2464,10 @@ export default {
|
|
|
let def_str_col = this.data.new_word_list.reduce((acc, itemss) => `${acc + itemss.definition_list}`, '');
|
|
let def_str_col = this.data.new_word_list.reduce((acc, itemss) => `${acc + itemss.definition_list}`, '');
|
|
|
let collocation_col = this.data.new_word_list.reduce((acc, itemss) => `${acc + itemss.collocation}`, '');
|
|
let collocation_col = this.data.new_word_list.reduce((acc, itemss) => `${acc + itemss.collocation}`, '');
|
|
|
let liju_list_col = this.data.new_word_list.reduce((acc, itemss) => `${acc + itemss.liju_list}`, '');
|
|
let liju_list_col = this.data.new_word_list.reduce((acc, itemss) => `${acc + itemss.liju_list}`, '');
|
|
|
|
|
+ let traditional_col = this.data.new_word_list.reduce(
|
|
|
|
|
+ (acc, itemss) => `${acc + (itemss.word_traditional ? itemss.word_traditional : '')}`,
|
|
|
|
|
+ '',
|
|
|
|
|
+ );
|
|
|
this.colHasContent = [
|
|
this.colHasContent = [
|
|
|
Boolean(pinyin_col),
|
|
Boolean(pinyin_col),
|
|
|
Boolean(new_word_col),
|
|
Boolean(new_word_col),
|
|
@@ -2311,6 +2476,7 @@ export default {
|
|
|
Boolean(collocation_col),
|
|
Boolean(collocation_col),
|
|
|
Boolean(liju_list_col),
|
|
Boolean(liju_list_col),
|
|
|
];
|
|
];
|
|
|
|
|
+ this.isHasTraditional = Boolean(traditional_col);
|
|
|
if (this.data.addCol) {
|
|
if (this.data.addCol) {
|
|
|
this.data.addCol.forEach((item) => {
|
|
this.data.addCol.forEach((item) => {
|
|
|
let str_col = this.data.new_word_list.reduce((acc, itemss) => `${acc + itemss[item.key]}`, '');
|
|
let str_col = this.data.new_word_list.reduce((acc, itemss) => `${acc + itemss[item.key]}`, '');
|
|
@@ -2416,7 +2582,7 @@ export default {
|
|
|
this.$set(this.multilingualTextList, item.type, chunkedArr);
|
|
this.$set(this.multilingualTextList, item.type, chunkedArr);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
- // console.log(this.data);
|
|
|
|
|
|
|
+ console.log(this.data);
|
|
|
},
|
|
},
|
|
|
handleChangeTab() {
|
|
handleChangeTab() {
|
|
|
this.wordShow = !this.wordShow;
|
|
this.wordShow = !this.wordShow;
|
|
@@ -3282,8 +3448,8 @@ export default {
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
|
|
|
|
|
:deep .strockplayInner {
|
|
:deep .strockplayInner {
|
|
|
- width: 40px;
|
|
|
|
|
- height: 40px;
|
|
|
|
|
|
|
+ width: 42px;
|
|
|
|
|
+ height: 42px;
|
|
|
|
|
|
|
|
.eep-strock-play-box,
|
|
.eep-strock-play-box,
|
|
|
.playStorkes-btn {
|
|
.playStorkes-btn {
|