|
@@ -17,7 +17,7 @@
|
|
class="audio-simple-image"
|
|
class="audio-simple-image"
|
|
:src="playing ? voicePlaySrc : voicePauseSrc"
|
|
:src="playing ? voicePlaySrc : voicePauseSrc"
|
|
@click="playAudio"
|
|
@click="playAudio"
|
|
- >
|
|
|
|
|
|
+ />
|
|
<span
|
|
<span
|
|
:class="[
|
|
:class="[
|
|
'Repeat-16',
|
|
'Repeat-16',
|
|
@@ -57,8 +57,8 @@
|
|
:class="[
|
|
:class="[
|
|
'matrix-top',
|
|
'matrix-top',
|
|
curQue.voiceMatrix.columnSelection &&
|
|
curQue.voiceMatrix.columnSelection &&
|
|
- (selectColumn === i ||
|
|
|
|
- (selectedLine.type === 'column' && selectedLine.index === i))
|
|
|
|
|
|
+ (selectColumn === i ||
|
|
|
|
+ (selectedLine.type === 'column' && selectedLine.index === i))
|
|
? 'read'
|
|
? 'read'
|
|
: '',
|
|
: '',
|
|
]"
|
|
]"
|
|
@@ -70,7 +70,7 @@
|
|
"
|
|
"
|
|
v-show="
|
|
v-show="
|
|
selectColumn === i ||
|
|
selectColumn === i ||
|
|
- (selectedLine.type === 'column' && selectedLine.index === i)
|
|
|
|
|
|
+ (selectedLine.type === 'column' && selectedLine.index === i)
|
|
"
|
|
"
|
|
:class="[
|
|
:class="[
|
|
`matrix-checkbox-row-${themeColor}`,
|
|
`matrix-checkbox-row-${themeColor}`,
|
|
@@ -90,8 +90,8 @@
|
|
:class="[
|
|
:class="[
|
|
'column-wrapper',
|
|
'column-wrapper',
|
|
curQue.voiceMatrix.rowSelection &&
|
|
curQue.voiceMatrix.rowSelection &&
|
|
- (selectRow === i ||
|
|
|
|
- (selectedLine.type === 'row' && selectedLine.index === i))
|
|
|
|
|
|
+ (selectRow === i ||
|
|
|
|
+ (selectedLine.type === 'row' && selectedLine.index === i))
|
|
? 'read'
|
|
? 'read'
|
|
: '',
|
|
: '',
|
|
]"
|
|
]"
|
|
@@ -101,7 +101,7 @@
|
|
v-if="curQue.voiceMatrix.rowSelection"
|
|
v-if="curQue.voiceMatrix.rowSelection"
|
|
v-show="
|
|
v-show="
|
|
selectRow === i ||
|
|
selectRow === i ||
|
|
- (selectedLine.type === 'row' && selectedLine.index === i)
|
|
|
|
|
|
+ (selectedLine.type === 'row' && selectedLine.index === i)
|
|
"
|
|
"
|
|
:class="[
|
|
:class="[
|
|
`matrix-checkbox-column-${themeColor}`,
|
|
`matrix-checkbox-column-${themeColor}`,
|
|
@@ -119,17 +119,17 @@
|
|
:class="[
|
|
:class="[
|
|
'column-wrapper',
|
|
'column-wrapper',
|
|
(curQue.voiceMatrix.rowSelection && selectRow === i) ||
|
|
(curQue.voiceMatrix.rowSelection && selectRow === i) ||
|
|
- (curQue.voiceMatrix.columnSelection && selectColumn === j) ||
|
|
|
|
- (curQue.voiceMatrix.columnSelection &&
|
|
|
|
- selectedLine.type === 'column' &&
|
|
|
|
- selectedLine.index === j) ||
|
|
|
|
- (curQue.voiceMatrix.rowSelection &&
|
|
|
|
- selectedLine.type === 'row' &&
|
|
|
|
- selectedLine.index === i)
|
|
|
|
|
|
+ (curQue.voiceMatrix.columnSelection && selectColumn === j) ||
|
|
|
|
+ (curQue.voiceMatrix.columnSelection &&
|
|
|
|
+ selectedLine.type === 'column' &&
|
|
|
|
+ selectedLine.index === j) ||
|
|
|
|
+ (curQue.voiceMatrix.rowSelection &&
|
|
|
|
+ selectedLine.type === 'row' &&
|
|
|
|
+ selectedLine.index === i)
|
|
? 'read'
|
|
? 'read'
|
|
: '',
|
|
: '',
|
|
(i === 0 && curQue.voiceMatrix.firstLineHighlight) ||
|
|
(i === 0 && curQue.voiceMatrix.firstLineHighlight) ||
|
|
- (j === row.length - 1 && curQue.voiceMatrix.lastColumnHighlight)
|
|
|
|
|
|
+ (j === row.length - 1 && curQue.voiceMatrix.lastColumnHighlight)
|
|
? `highlight-${themeColor}`
|
|
? `highlight-${themeColor}`
|
|
: '',
|
|
: '',
|
|
]"
|
|
]"
|
|
@@ -142,15 +142,15 @@
|
|
:class="[
|
|
:class="[
|
|
column.text.length === 0 ? 'space' : `column-${themeColor}`,
|
|
column.text.length === 0 ? 'space' : `column-${themeColor}`,
|
|
(selectCell.row === i && selectCell.column === j) ||
|
|
(selectCell.row === i && selectCell.column === j) ||
|
|
- (selectedLine.type === 'column' &&
|
|
|
|
- selectedLine.index === j) ||
|
|
|
|
- (selectedLine.type === 'row' && selectedLine.index === i)
|
|
|
|
|
|
+ (selectedLine.type === 'column' &&
|
|
|
|
+ selectedLine.index === j) ||
|
|
|
|
+ (selectedLine.type === 'row' && selectedLine.index === i)
|
|
? 'selected'
|
|
? 'selected'
|
|
: '',
|
|
: '',
|
|
playing &&
|
|
playing &&
|
|
- column.lrc_data.begin_time / 1000 <= curTime &&
|
|
|
|
- (curTime < column.lrc_data.end_time / 1000 ||
|
|
|
|
- column.lrc_data.end_time === -1)
|
|
|
|
|
|
+ column.lrc_data.begin_time / 1000 <= curTime &&
|
|
|
|
+ (curTime < column.lrc_data.end_time / 1000 ||
|
|
|
|
+ column.lrc_data.end_time === -1)
|
|
? 'playing'
|
|
? 'playing'
|
|
: '',
|
|
: '',
|
|
column.isTitle ? 'title' : '',
|
|
column.isTitle ? 'title' : '',
|
|
@@ -177,15 +177,15 @@
|
|
:class="[
|
|
:class="[
|
|
`sentence-${themeColor}`,
|
|
`sentence-${themeColor}`,
|
|
(selectCell.row === i && selectCell.column === j) ||
|
|
(selectCell.row === i && selectCell.column === j) ||
|
|
- (selectedLine.type === 'column' &&
|
|
|
|
- selectedLine.index === j) ||
|
|
|
|
- (selectedLine.type === 'row' && selectedLine.index === i)
|
|
|
|
|
|
+ (selectedLine.type === 'column' &&
|
|
|
|
+ selectedLine.index === j) ||
|
|
|
|
+ (selectedLine.type === 'row' && selectedLine.index === i)
|
|
? 'selected'
|
|
? 'selected'
|
|
: '',
|
|
: '',
|
|
playing &&
|
|
playing &&
|
|
- column.lrc_data.begin_time / 1000 <= curTime &&
|
|
|
|
- (curTime < column.lrc_data.end_time / 1000 ||
|
|
|
|
- column.lrc_data.end_time === -1)
|
|
|
|
|
|
+ column.lrc_data.begin_time / 1000 <= curTime &&
|
|
|
|
+ (curTime < column.lrc_data.end_time / 1000 ||
|
|
|
|
+ column.lrc_data.end_time === -1)
|
|
? 'playing'
|
|
? 'playing'
|
|
: '',
|
|
: '',
|
|
column.isTitle ? 'title' : '',
|
|
column.isTitle ? 'title' : '',
|
|
@@ -243,15 +243,15 @@
|
|
:class="[
|
|
:class="[
|
|
`pinyinEnglish-${themeColor}`,
|
|
`pinyinEnglish-${themeColor}`,
|
|
(selectCell.row === i && selectCell.column === j) ||
|
|
(selectCell.row === i && selectCell.column === j) ||
|
|
- (selectedLine.type === 'column' &&
|
|
|
|
- selectedLine.index === j) ||
|
|
|
|
- (selectedLine.type === 'row' && selectedLine.index === i)
|
|
|
|
|
|
+ (selectedLine.type === 'column' &&
|
|
|
|
+ selectedLine.index === j) ||
|
|
|
|
+ (selectedLine.type === 'row' && selectedLine.index === i)
|
|
? 'selected'
|
|
? 'selected'
|
|
: '',
|
|
: '',
|
|
playing &&
|
|
playing &&
|
|
- column.lrc_data.begin_time / 1000 <= curTime &&
|
|
|
|
- (curTime < column.lrc_data.end_time / 1000 ||
|
|
|
|
- column.lrc_data.end_time === -1)
|
|
|
|
|
|
+ column.lrc_data.begin_time / 1000 <= curTime &&
|
|
|
|
+ (curTime < column.lrc_data.end_time / 1000 ||
|
|
|
|
+ column.lrc_data.end_time === -1)
|
|
? 'playing'
|
|
? 'playing'
|
|
: '',
|
|
: '',
|
|
column.isTitle ? 'title' : '',
|
|
column.isTitle ? 'title' : '',
|
|
@@ -274,15 +274,15 @@
|
|
:class="[
|
|
:class="[
|
|
`textBrackets-${themeColor}`,
|
|
`textBrackets-${themeColor}`,
|
|
(selectCell.row === i && selectCell.column === j) ||
|
|
(selectCell.row === i && selectCell.column === j) ||
|
|
- (selectedLine.type === 'column' &&
|
|
|
|
- selectedLine.index === j) ||
|
|
|
|
- (selectedLine.type === 'row' && selectedLine.index === i)
|
|
|
|
|
|
+ (selectedLine.type === 'column' &&
|
|
|
|
+ selectedLine.index === j) ||
|
|
|
|
+ (selectedLine.type === 'row' && selectedLine.index === i)
|
|
? 'selected'
|
|
? 'selected'
|
|
: '',
|
|
: '',
|
|
playing &&
|
|
playing &&
|
|
- column.lrc_data.begin_time / 1000 <= curTime &&
|
|
|
|
- (curTime < column.lrc_data.end_time / 1000 ||
|
|
|
|
- column.lrc_data.end_time === -1)
|
|
|
|
|
|
+ column.lrc_data.begin_time / 1000 <= curTime &&
|
|
|
|
+ (curTime < column.lrc_data.end_time / 1000 ||
|
|
|
|
+ column.lrc_data.end_time === -1)
|
|
? 'playing'
|
|
? 'playing'
|
|
: '',
|
|
: '',
|
|
column.isTitle ? 'title' : '',
|
|
column.isTitle ? 'title' : '',
|
|
@@ -319,8 +319,8 @@
|
|
:key="`end-${i}`"
|
|
:key="`end-${i}`"
|
|
:class="[
|
|
:class="[
|
|
curQue.voiceMatrix.rowSelection &&
|
|
curQue.voiceMatrix.rowSelection &&
|
|
- (selectRow === i ||
|
|
|
|
- (selectedLine.type === 'row' && selectedLine.index === i))
|
|
|
|
|
|
+ (selectRow === i ||
|
|
|
|
+ (selectedLine.type === 'row' && selectedLine.index === i))
|
|
? 'read'
|
|
? 'read'
|
|
: '',
|
|
: '',
|
|
]"
|
|
]"
|
|
@@ -335,8 +335,8 @@
|
|
:class="[
|
|
:class="[
|
|
'matrix-bottom',
|
|
'matrix-bottom',
|
|
curQue.voiceMatrix.columnSelection &&
|
|
curQue.voiceMatrix.columnSelection &&
|
|
- (selectColumn === i ||
|
|
|
|
- (selectedLine.type === 'column' && selectedLine.index === i))
|
|
|
|
|
|
+ (selectColumn === i ||
|
|
|
|
+ (selectedLine.type === 'column' && selectedLine.index === i))
|
|
? 'read'
|
|
? 'read'
|
|
: '',
|
|
: '',
|
|
]"
|
|
]"
|
|
@@ -519,7 +519,7 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- Bus.$on("audioPause", id => {
|
|
|
|
|
|
+ Bus.$on("audioPause", (id) => {
|
|
if (this.cid === id) return;
|
|
if (this.cid === id) return;
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
if (this.$refs.luyin.microphoneStatus) this.$refs.luyin.microphone();
|
|
if (this.$refs.luyin.microphoneStatus) this.$refs.luyin.microphone();
|
|
@@ -637,7 +637,7 @@ export default {
|
|
this.lrcArray = [];
|
|
this.lrcArray = [];
|
|
let { type, index } = this.selectedLine;
|
|
let { type, index } = this.selectedLine;
|
|
if (type.length > 0 && index >= 0 && type === "row") {
|
|
if (type.length > 0 && index >= 0 && type === "row") {
|
|
- this.curQue.voiceMatrix.matrix[index].forEach(item => {
|
|
|
|
|
|
+ this.curQue.voiceMatrix.matrix[index].forEach((item) => {
|
|
let data = this.getLrcData(item);
|
|
let data = this.getLrcData(item);
|
|
if (data) this.lrcArray.push(data);
|
|
if (data) this.lrcArray.push(data);
|
|
});
|
|
});
|
|
@@ -646,7 +646,7 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
if (type.length > 0 && index >= 0 && type === "column") {
|
|
if (type.length > 0 && index >= 0 && type === "column") {
|
|
- this.curQue.voiceMatrix.matrix.forEach(item => {
|
|
|
|
|
|
+ this.curQue.voiceMatrix.matrix.forEach((item) => {
|
|
let data = this.getLrcData(item[index]);
|
|
let data = this.getLrcData(item[index]);
|
|
if (data) this.lrcArray.push(data);
|
|
if (data) this.lrcArray.push(data);
|
|
});
|
|
});
|
|
@@ -669,7 +669,7 @@ export default {
|
|
this.$refs.audioLine.PlayAudio();
|
|
this.$refs.audioLine.PlayAudio();
|
|
if (end_time === -1) return;
|
|
if (end_time === -1) return;
|
|
let end = end_time / 1000 - 0.01;
|
|
let end = end_time / 1000 - 0.01;
|
|
- this.unWatch = this.$watch("curTime", val => {
|
|
|
|
|
|
+ this.unWatch = this.$watch("curTime", (val) => {
|
|
if (val >= end) {
|
|
if (val >= end) {
|
|
if (!this.hasSelectedCell) return this.unWatch();
|
|
if (!this.hasSelectedCell) return this.unWatch();
|
|
this.handleParentPlay();
|
|
this.handleParentPlay();
|
|
@@ -724,7 +724,7 @@ export default {
|
|
}
|
|
}
|
|
let arr = [];
|
|
let arr = [];
|
|
if (type.length > 0 && index >= 0 && type === "row") {
|
|
if (type.length > 0 && index >= 0 && type === "row") {
|
|
- this.curQue.voiceMatrix.matrix[index].forEach(item => {
|
|
|
|
|
|
+ this.curQue.voiceMatrix.matrix[index].forEach((item) => {
|
|
let data = this.getLrcData(item);
|
|
let data = this.getLrcData(item);
|
|
if (data) arr.push(data);
|
|
if (data) arr.push(data);
|
|
});
|
|
});
|
|
@@ -733,7 +733,7 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
if (type.length > 0 && index >= 0 && type === "column") {
|
|
if (type.length > 0 && index >= 0 && type === "column") {
|
|
- this.curQue.voiceMatrix.matrix.forEach(item => {
|
|
|
|
|
|
+ this.curQue.voiceMatrix.matrix.forEach((item) => {
|
|
let data = this.getLrcData(item[index]);
|
|
let data = this.getLrcData(item[index]);
|
|
if (data) arr.push(data);
|
|
if (data) arr.push(data);
|
|
});
|
|
});
|
|
@@ -773,9 +773,13 @@ export default {
|
|
|
|
|
|
pauseAudio() {
|
|
pauseAudio() {
|
|
let audio = document.getElementsByTagName("audio");
|
|
let audio = document.getElementsByTagName("audio");
|
|
- if(audio&&audio.length>0&&window.location.href.indexOf('GCLS-Learn')==-1){
|
|
|
|
- audio.forEach(item => {
|
|
|
|
- item.pause();
|
|
|
|
|
|
+ if (
|
|
|
|
+ audio &&
|
|
|
|
+ audio.length > 0 &&
|
|
|
|
+ window.location.href.indexOf("GCLS-Learn") == -1
|
|
|
|
+ ) {
|
|
|
|
+ audio.forEach((item) => {
|
|
|
|
+ item.pause();
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -824,7 +828,7 @@ export default {
|
|
// 监听是否已到结束时间,为了选中效果 - 0.01
|
|
// 监听是否已到结束时间,为了选中效果 - 0.01
|
|
if (end_time === -1) return;
|
|
if (end_time === -1) return;
|
|
let end = end_time / 1000 - 0.01;
|
|
let end = end_time / 1000 - 0.01;
|
|
- this.unWatch = this.$watch("curTime", val => {
|
|
|
|
|
|
+ this.unWatch = this.$watch("curTime", (val) => {
|
|
if (val >= end) {
|
|
if (val >= end) {
|
|
this.handleParentPlay();
|
|
this.handleParentPlay();
|
|
this.$refs.audioLine.onTimeupdateTime(end);
|
|
this.$refs.audioLine.onTimeupdateTime(end);
|
|
@@ -927,6 +931,7 @@ $select-color-brown-active: #a37557;
|
|
// 语音矩阵
|
|
// 语音矩阵
|
|
&-container {
|
|
&-container {
|
|
overflow: auto;
|
|
overflow: auto;
|
|
|
|
+ font-size: 16px;
|
|
height: calc(100% - 80px);
|
|
height: calc(100% - 80px);
|
|
background-color: #f5f5f5;
|
|
background-color: #f5f5f5;
|
|
border-left: 1px solid $border-color;
|
|
border-left: 1px solid $border-color;
|