|
@@ -6,7 +6,7 @@
|
|
:class="[
|
|
:class="[
|
|
themeColor.length === 0 || themeColor === 'red'
|
|
themeColor.length === 0 || themeColor === 'red'
|
|
? 'serial-number'
|
|
? 'serial-number'
|
|
- : `serial-number-${themeColor}`
|
|
|
|
|
|
+ : `serial-number-${themeColor}`,
|
|
]"
|
|
]"
|
|
>
|
|
>
|
|
{{ curQue.voiceMatrix.audioSerialNumber }}
|
|
{{ curQue.voiceMatrix.audioSerialNumber }}
|
|
@@ -22,7 +22,7 @@
|
|
:class="[
|
|
:class="[
|
|
'Repeat-16',
|
|
'Repeat-16',
|
|
'audio-simple-repeat',
|
|
'audio-simple-repeat',
|
|
- isRepeat ? '' : 'disabled'
|
|
|
|
|
|
+ isRepeat ? '' : 'disabled',
|
|
]"
|
|
]"
|
|
@click="isRepeat = !isRepeat"
|
|
@click="isRepeat = !isRepeat"
|
|
/>
|
|
/>
|
|
@@ -45,7 +45,7 @@
|
|
v-if="curQue.voiceMatrix.matrix.length > 0"
|
|
v-if="curQue.voiceMatrix.matrix.length > 0"
|
|
class="matrix"
|
|
class="matrix"
|
|
:style="{
|
|
:style="{
|
|
- 'grid-template': `36px repeat(${curQue.voiceMatrix.matrix.length}, auto) minmax(36px, 1fr) / 36px repeat(${curQue.voiceMatrix.matrix[0].length}, auto) minmax(36px, 1fr)`
|
|
|
|
|
|
+ 'grid-template': `36px repeat(${curQue.voiceMatrix.matrix.length}, auto) minmax(36px, 1fr) / 36px repeat(${curQue.voiceMatrix.matrix[0].length}, auto) minmax(36px, 1fr)`,
|
|
}"
|
|
}"
|
|
@mouseleave="clearSelectCell"
|
|
@mouseleave="clearSelectCell"
|
|
>
|
|
>
|
|
@@ -60,7 +60,7 @@
|
|
(selectColumn === i ||
|
|
(selectColumn === i ||
|
|
(selectedLine.type === 'column' && selectedLine.index === i))
|
|
(selectedLine.type === 'column' && selectedLine.index === i))
|
|
? 'read'
|
|
? 'read'
|
|
- : ''
|
|
|
|
|
|
+ : '',
|
|
]"
|
|
]"
|
|
@mouseenter="checkboxMouseenter(selectColumn === i, 'column')"
|
|
@mouseenter="checkboxMouseenter(selectColumn === i, 'column')"
|
|
>
|
|
>
|
|
@@ -76,7 +76,7 @@
|
|
`matrix-checkbox-row-${themeColor}`,
|
|
`matrix-checkbox-row-${themeColor}`,
|
|
selectedLine.type === 'column' && selectedLine.index === i
|
|
selectedLine.type === 'column' && selectedLine.index === i
|
|
? 'active'
|
|
? 'active'
|
|
- : ''
|
|
|
|
|
|
+ : '',
|
|
]"
|
|
]"
|
|
@click="selectRowOrColumn(i, 'column')"
|
|
@click="selectRowOrColumn(i, 'column')"
|
|
/>
|
|
/>
|
|
@@ -93,7 +93,7 @@
|
|
(selectRow === i ||
|
|
(selectRow === i ||
|
|
(selectedLine.type === 'row' && selectedLine.index === i))
|
|
(selectedLine.type === 'row' && selectedLine.index === i))
|
|
? 'read'
|
|
? 'read'
|
|
- : ''
|
|
|
|
|
|
+ : '',
|
|
]"
|
|
]"
|
|
@mouseenter="checkboxMouseenter(selectRow === i, 'row')"
|
|
@mouseenter="checkboxMouseenter(selectRow === i, 'row')"
|
|
>
|
|
>
|
|
@@ -107,7 +107,7 @@
|
|
`matrix-checkbox-column-${themeColor}`,
|
|
`matrix-checkbox-column-${themeColor}`,
|
|
selectedLine.type === 'row' && selectedLine.index === i
|
|
selectedLine.type === 'row' && selectedLine.index === i
|
|
? 'active'
|
|
? 'active'
|
|
- : ''
|
|
|
|
|
|
+ : '',
|
|
]"
|
|
]"
|
|
@click="selectRowOrColumn(i, 'row')"
|
|
@click="selectRowOrColumn(i, 'row')"
|
|
/>
|
|
/>
|
|
@@ -131,7 +131,7 @@
|
|
(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}`
|
|
- : ''
|
|
|
|
|
|
+ : '',
|
|
]"
|
|
]"
|
|
@mouseenter="matrixCellMouseenter(i, j, column.type)"
|
|
@mouseenter="matrixCellMouseenter(i, j, column.type)"
|
|
>
|
|
>
|
|
@@ -153,7 +153,7 @@
|
|
column.lrc_data.end_time === -1)
|
|
column.lrc_data.end_time === -1)
|
|
? 'playing'
|
|
? 'playing'
|
|
: '',
|
|
: '',
|
|
- column.isTitle ? 'title' : ''
|
|
|
|
|
|
+ column.isTitle ? 'title' : '',
|
|
]"
|
|
]"
|
|
@click="matrixCellClick(i, j)"
|
|
@click="matrixCellClick(i, j)"
|
|
>
|
|
>
|
|
@@ -167,7 +167,7 @@
|
|
'connection',
|
|
'connection',
|
|
i === 0 && curQue.voiceMatrix.firstLineHighlight
|
|
i === 0 && curQue.voiceMatrix.firstLineHighlight
|
|
? `highlight-bc-${themeColor}`
|
|
? `highlight-bc-${themeColor}`
|
|
- : ''
|
|
|
|
|
|
+ : '',
|
|
]"
|
|
]"
|
|
/>
|
|
/>
|
|
<!-- 分词 -->
|
|
<!-- 分词 -->
|
|
@@ -188,10 +188,10 @@
|
|
column.lrc_data.end_time === -1)
|
|
column.lrc_data.end_time === -1)
|
|
? 'playing'
|
|
? 'playing'
|
|
: '',
|
|
: '',
|
|
- column.isTitle ? 'title' : ''
|
|
|
|
|
|
+ column.isTitle ? 'title' : '',
|
|
]"
|
|
]"
|
|
:style="{
|
|
:style="{
|
|
- 'grid-template-columns': `repeat(${column.sentence_data.wordsList.length}, auto)`
|
|
|
|
|
|
+ 'grid-template-columns': `repeat(${column.sentence_data.wordsList.length}, auto)`,
|
|
}"
|
|
}"
|
|
@click="matrixCellClick(i, j)"
|
|
@click="matrixCellClick(i, j)"
|
|
>
|
|
>
|
|
@@ -238,7 +238,7 @@
|
|
column.lrc_data.end_time === -1)
|
|
column.lrc_data.end_time === -1)
|
|
? 'playing'
|
|
? 'playing'
|
|
: '',
|
|
: '',
|
|
- column.isTitle ? 'title' : ''
|
|
|
|
|
|
+ column.isTitle ? 'title' : '',
|
|
]"
|
|
]"
|
|
@click="matrixCellClick(i, j)"
|
|
@click="matrixCellClick(i, j)"
|
|
>
|
|
>
|
|
@@ -269,7 +269,7 @@
|
|
column.lrc_data.end_time === -1)
|
|
column.lrc_data.end_time === -1)
|
|
? 'playing'
|
|
? 'playing'
|
|
: '',
|
|
: '',
|
|
- column.isTitle ? 'title' : ''
|
|
|
|
|
|
+ column.isTitle ? 'title' : '',
|
|
]"
|
|
]"
|
|
@click="matrixCellClick(i, j)"
|
|
@click="matrixCellClick(i, j)"
|
|
>
|
|
>
|
|
@@ -294,7 +294,7 @@
|
|
(selectRow === i ||
|
|
(selectRow === i ||
|
|
(selectedLine.type === 'row' && selectedLine.index === i))
|
|
(selectedLine.type === 'row' && selectedLine.index === i))
|
|
? 'read'
|
|
? 'read'
|
|
- : ''
|
|
|
|
|
|
+ : '',
|
|
]"
|
|
]"
|
|
@mouseenter="clearSelectCell"
|
|
@mouseenter="clearSelectCell"
|
|
/>
|
|
/>
|
|
@@ -310,7 +310,7 @@
|
|
(selectColumn === i ||
|
|
(selectColumn === i ||
|
|
(selectedLine.type === 'column' && selectedLine.index === i))
|
|
(selectedLine.type === 'column' && selectedLine.index === i))
|
|
? 'read'
|
|
? 'read'
|
|
- : ''
|
|
|
|
|
|
+ : '',
|
|
]"
|
|
]"
|
|
@mouseenter="clearSelectCell"
|
|
@mouseenter="clearSelectCell"
|
|
/>
|
|
/>
|
|
@@ -344,7 +344,7 @@
|
|
:handle-change-stop-audio="handleChangeStopAudio"
|
|
:handle-change-stop-audio="handleChangeStopAudio"
|
|
@playing="playChange"
|
|
@playing="playChange"
|
|
/>
|
|
/>
|
|
- <span class="fullscreen" @click="fullScreen">
|
|
|
|
|
|
+ <span ref="fullscreen" class="fullscreen" @click="fullScreen">
|
|
<span>全屏模式</span>
|
|
<span>全屏模式</span>
|
|
<el-image :src="fullscreenSrc" />
|
|
<el-image :src="fullscreenSrc" />
|
|
</span>
|
|
</span>
|
|
@@ -374,22 +374,19 @@ export default {
|
|
AudioLine,
|
|
AudioLine,
|
|
Soundrecord,
|
|
Soundrecord,
|
|
AudioCompare,
|
|
AudioCompare,
|
|
- VoiceFullscreen
|
|
|
|
|
|
+ VoiceFullscreen,
|
|
},
|
|
},
|
|
props: ["curQue", "themeColor"],
|
|
props: ["curQue", "themeColor"],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
// 组件id
|
|
// 组件id
|
|
- cid: Math.random()
|
|
|
|
- .toString(36)
|
|
|
|
- .substr(2, 10),
|
|
|
|
|
|
+ cid: Math.random().toString(36).substr(2, 10),
|
|
isFull: false,
|
|
isFull: false,
|
|
curTime: 0,
|
|
curTime: 0,
|
|
playing: false,
|
|
playing: false,
|
|
stopAudio: true,
|
|
stopAudio: true,
|
|
unWatch: null,
|
|
unWatch: null,
|
|
lrcArray: [],
|
|
lrcArray: [],
|
|
- cellTimer: null,
|
|
|
|
fileName: "",
|
|
fileName: "",
|
|
// 底色行、列
|
|
// 底色行、列
|
|
selectRow: -1,
|
|
selectRow: -1,
|
|
@@ -397,18 +394,18 @@ export default {
|
|
// 行、列选中
|
|
// 行、列选中
|
|
selectedLine: {
|
|
selectedLine: {
|
|
type: "",
|
|
type: "",
|
|
- index: 0
|
|
|
|
|
|
+ index: 0,
|
|
},
|
|
},
|
|
// 点击选中
|
|
// 点击选中
|
|
selectCell: {
|
|
selectCell: {
|
|
row: -1,
|
|
row: -1,
|
|
- column: -1
|
|
|
|
|
|
+ column: -1,
|
|
},
|
|
},
|
|
isRepeat: false,
|
|
isRepeat: false,
|
|
// 跟读所需属性
|
|
// 跟读所需属性
|
|
wavblob: null,
|
|
wavblob: null,
|
|
isRecord: false,
|
|
isRecord: false,
|
|
- matrixSelectLrc: null
|
|
|
|
|
|
+ matrixSelectLrc: null,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -442,7 +439,7 @@ export default {
|
|
type: type.length > 0 && index >= 0 ? type : "cell",
|
|
type: type.length > 0 && index >= 0 ? type : "cell",
|
|
index,
|
|
index,
|
|
row,
|
|
row,
|
|
- column
|
|
|
|
|
|
+ column,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
|
|
@@ -466,12 +463,12 @@ export default {
|
|
return require("@/assets/NPC/full-screen-red.png");
|
|
return require("@/assets/NPC/full-screen-red.png");
|
|
}
|
|
}
|
|
return require(`@/assets/NPC/full-screen-${themeColor}.png`);
|
|
return require(`@/assets/NPC/full-screen-${themeColor}.png`);
|
|
- }
|
|
|
|
|
|
+ },
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
hasSelectedCell() {
|
|
hasSelectedCell() {
|
|
this.handleParentPlay();
|
|
this.handleParentPlay();
|
|
- }
|
|
|
|
|
|
+ },
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
Bus.$on("audioPause", id => {
|
|
Bus.$on("audioPause", id => {
|
|
@@ -485,6 +482,10 @@ export default {
|
|
document
|
|
document
|
|
.querySelector("body")
|
|
.querySelector("body")
|
|
.addEventListener("click", this.restoreAudioStatus);
|
|
.addEventListener("click", this.restoreAudioStatus);
|
|
|
|
+ // 如果一行内有两个语音矩阵,隐藏 全屏模式 文字
|
|
|
|
+ if (Number(window.getComputedStyle(this.$refs.fullscreen).width.replace('px', '')) < 80) {
|
|
|
|
+ this.$refs.fullscreen.children[0].hidden = true;
|
|
|
|
+ }
|
|
},
|
|
},
|
|
beforeDestroy() {
|
|
beforeDestroy() {
|
|
document
|
|
document
|
|
@@ -527,13 +528,8 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
setRecordingFileName(row, column) {
|
|
setRecordingFileName(row, column) {
|
|
- let {
|
|
|
|
- type,
|
|
|
|
- text,
|
|
|
|
- sentence_data,
|
|
|
|
- pinyin_english_data,
|
|
|
|
- text_brackets
|
|
|
|
- } = this.curQue.voiceMatrix.matrix[row][column];
|
|
|
|
|
|
+ let { type, text, sentence_data, pinyin_english_data, text_brackets } =
|
|
|
|
+ this.curQue.voiceMatrix.matrix[row][column];
|
|
if (type === "text") this.fileName = text;
|
|
if (type === "text") this.fileName = text;
|
|
if (type === "SentenceSegwordChs") this.fileName = sentence_data.sentence;
|
|
if (type === "SentenceSegwordChs") this.fileName = sentence_data.sentence;
|
|
if (type === "PinyinEnglish") this.fileName = pinyin_english_data.pinyin;
|
|
if (type === "PinyinEnglish") this.fileName = pinyin_english_data.pinyin;
|
|
@@ -552,7 +548,7 @@ export default {
|
|
"matrix-checkbox-row-",
|
|
"matrix-checkbox-row-",
|
|
"audio-simple-image",
|
|
"audio-simple-image",
|
|
"audio-simple-repeat",
|
|
"audio-simple-repeat",
|
|
- "luyin-box"
|
|
|
|
|
|
+ "luyin-box",
|
|
];
|
|
];
|
|
|
|
|
|
let operable = event.path.some(item => {
|
|
let operable = event.path.some(item => {
|
|
@@ -725,7 +721,7 @@ export default {
|
|
return {
|
|
return {
|
|
begin_time: lrc_data.begin_time,
|
|
begin_time: lrc_data.begin_time,
|
|
end_time: this.mp3Duration,
|
|
end_time: this.mp3Duration,
|
|
- text: lrc_data.text
|
|
|
|
|
|
+ text: lrc_data.text,
|
|
};
|
|
};
|
|
}
|
|
}
|
|
return lrc_data;
|
|
return lrc_data;
|
|
@@ -794,8 +790,8 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
});
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ },
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
@@ -1278,6 +1274,7 @@ $select-color-brown-active: #a37557;
|
|
.el-image {
|
|
.el-image {
|
|
width: 16px;
|
|
width: 16px;
|
|
height: 16px;
|
|
height: 16px;
|
|
|
|
+ margin-left: 8px;
|
|
vertical-align: text-bottom;
|
|
vertical-align: text-bottom;
|
|
}
|
|
}
|
|
}
|
|
}
|