|
@@ -290,11 +290,23 @@
|
|
|
@click="matrixCellClick(i, j)"
|
|
|
>
|
|
|
<span>
|
|
|
- <span :class="[getBracketsOuterTypeClass(column.text_brackets.brackets_outer_type)]">
|
|
|
+ <span
|
|
|
+ :class="[
|
|
|
+ getBracketsOuterTypeClass(
|
|
|
+ column.text_brackets.brackets_outer_type
|
|
|
+ ),
|
|
|
+ ]"
|
|
|
+ >
|
|
|
{{ column.text_brackets.brackets_outer }}
|
|
|
</span>
|
|
|
<span class="brackets"> [ </span>
|
|
|
- <span :class="[column.text_brackets.brackets_inner_type === 'pinyin' ? 'pinyin' : 'english']">
|
|
|
+ <span
|
|
|
+ :class="[
|
|
|
+ column.text_brackets.brackets_inner_type === 'pinyin'
|
|
|
+ ? 'pinyin'
|
|
|
+ : 'english',
|
|
|
+ ]"
|
|
|
+ >
|
|
|
{{ column.text_brackets.brackets_inner }}
|
|
|
</span>
|
|
|
<span class="brackets"> ]</span>
|
|
@@ -336,7 +348,7 @@
|
|
|
</div>
|
|
|
<!-- 录音 -->
|
|
|
<div class="voice-luyin">
|
|
|
- <soundrecord
|
|
|
+ <Soundrecord
|
|
|
v-if="refresh"
|
|
|
ref="luyin"
|
|
|
type="promax"
|
|
@@ -351,7 +363,7 @@
|
|
|
@sentPause="sentPause"
|
|
|
@handleWav="handleWav"
|
|
|
/>
|
|
|
- <audio-compare
|
|
|
+ <AudioCompare
|
|
|
:style="{ flex: 1 }"
|
|
|
:theme-color="themeColor"
|
|
|
:wavblob="wavblob"
|
|
@@ -370,7 +382,7 @@
|
|
|
</span>
|
|
|
</div>
|
|
|
<div :id="`screen-${cid}`" class="voice-full-screen">
|
|
|
- <voice-fullscreen
|
|
|
+ <VoiceFullscreen
|
|
|
v-if="isFull"
|
|
|
:theme-color="themeColor"
|
|
|
:cur-que="curQue"
|
|
@@ -494,13 +506,12 @@ export default {
|
|
|
this.handleParentPlay();
|
|
|
},
|
|
|
isFull: {
|
|
|
- handler (newVal, oldVal) {
|
|
|
- let _this = this;
|
|
|
- _this.refresh = false;
|
|
|
+ handler(newVal, oldVal) {
|
|
|
+ this.refresh = false;
|
|
|
if (!newVal) {
|
|
|
- _this.$nextTick(() => {
|
|
|
+ this.$nextTick(() => {
|
|
|
// 重新渲染组件
|
|
|
- _this.refresh = true;
|
|
|
+ this.refresh = true;
|
|
|
});
|
|
|
}
|
|
|
},
|
|
@@ -508,13 +519,11 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
created() {
|
|
|
- let _this = this;
|
|
|
Bus.$on("audioPause", id => {
|
|
|
- if (_this.cid === id) return;
|
|
|
- _this.$nextTick(() => {
|
|
|
- console.log(_this.$refs.luyin);
|
|
|
- if (_this.$refs.luyin.microphoneStatus) _this.$refs.luyin.microphone();
|
|
|
- _this.handleParentPlay();
|
|
|
+ if (this.cid === id) return;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ if (this.$refs.luyin.microphoneStatus) this.$refs.luyin.microphone();
|
|
|
+ this.handleParentPlay();
|
|
|
});
|
|
|
});
|
|
|
if (!this.curQue.Bookanswer) {
|
|
@@ -526,9 +535,6 @@ export default {
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
- document
|
|
|
- .querySelector("body")
|
|
|
- .addEventListener("click", this.restoreAudioStatus);
|
|
|
// 如果一行内有两个语音矩阵,隐藏 全屏模式 文字
|
|
|
if (
|
|
|
Number(
|
|
@@ -538,11 +544,7 @@ export default {
|
|
|
this.$refs.fullscreen.children[0].hidden = true;
|
|
|
}
|
|
|
},
|
|
|
- beforeDestroy() {
|
|
|
- document
|
|
|
- .querySelector("body")
|
|
|
- .removeEventListener("click", this.restoreAudioStatus);
|
|
|
- },
|
|
|
+ beforeDestroy() {},
|
|
|
methods: {
|
|
|
// 鼠标移入移出
|
|
|
matrixCellMouseenter(i, j, type) {
|
|
@@ -589,32 +591,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- // 判断 click 点击是否语音矩阵可操作区域
|
|
|
- restoreAudioStatus(event) {
|
|
|
- const whitePath = [
|
|
|
- "column-green",
|
|
|
- "column-red",
|
|
|
- "column-brown",
|
|
|
- "matrix-checkbox-column-",
|
|
|
- "matrix-checkbox-row-",
|
|
|
- "audio-simple-image",
|
|
|
- "audio-simple-repeat",
|
|
|
- "luyin-box",
|
|
|
- ];
|
|
|
-
|
|
|
- let operable = event.path.some(item => {
|
|
|
- let className = item.className;
|
|
|
- if (!className) return false;
|
|
|
- return whitePath.some(path => className.includes(path));
|
|
|
- });
|
|
|
- if (!operable) {
|
|
|
- this.selectedLine = { type: "", index: -1 };
|
|
|
- this.selectCell = { row: -1, column: -1 };
|
|
|
- if (this.playing) this.handleParentPlay();
|
|
|
- if (this.unWatch) this.unWatch();
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
checkboxMouseenter(isSelected, type) {
|
|
|
if (!isSelected) return this.clearSelectCell();
|
|
|
if (type === "row") this.selectColumn = -1;
|
|
@@ -646,10 +622,10 @@ export default {
|
|
|
},
|
|
|
|
|
|
getBracketsOuterTypeClass(type) {
|
|
|
- if (type === 'pinyin') return 'pinyin';
|
|
|
- if (type === 'chs') return 'chs';
|
|
|
- if (type === 'english') return 'english';
|
|
|
- return 'chs';
|
|
|
+ if (type === "pinyin") return "pinyin";
|
|
|
+ if (type === "chs") return "chs";
|
|
|
+ if (type === "english") return "english";
|
|
|
+ return "chs";
|
|
|
},
|
|
|
|
|
|
playAudio() {
|
|
@@ -1296,7 +1272,7 @@ $select-color-brown-active: #a37557;
|
|
|
}
|
|
|
|
|
|
.english {
|
|
|
- font-family: 'robot';
|
|
|
+ font-family: "robot";
|
|
|
}
|
|
|
|
|
|
.brackets {
|