|
@@ -1,148 +1,46 @@
|
|
|
<template>
|
|
|
<div :class="['voicefull', bgIndex === 0 ? 'bg1' : 'bg2']">
|
|
|
<div
|
|
|
- class="voicefull-top"
|
|
|
- @mouseover="setTopShow(true)"
|
|
|
- @mouseleave="setTopShow(false)"
|
|
|
+ class="voicefull-bottom"
|
|
|
+ @mouseover="setBottomShow(true)"
|
|
|
+ @mouseleave="setBottomShow(false)"
|
|
|
>
|
|
|
- <div :class="[isTopShow ? 'voicefull-top-show' : 'voicefull-top-hidden']">
|
|
|
- <div class="top-left">
|
|
|
- <div :class="['select-bg', bgIndex === 1 ? 'select-bg-blue' : '']">
|
|
|
- <div :class="['bg-green-box', bgIndex === 1 ? 'active' : '']">
|
|
|
- <span
|
|
|
- :class="['bg-green', bgIndex === 1 ? 'active' : '']"
|
|
|
- @click="changeBg(1)"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div :class="['bg-white-box', bgIndex === 0 ? 'active' : '']">
|
|
|
- <span
|
|
|
- :class="['bg-white', bgIndex === 0 ? 'active' : '']"
|
|
|
- @click="changeBg(0)"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div
|
|
|
- :class="['set-fontSize', bgIndex === 1 ? 'set-fontSize-green' : '']"
|
|
|
- >
|
|
|
- <template v-if="hzSize >= 34">
|
|
|
- <span
|
|
|
- :class="[
|
|
|
- 'font-jian-black',
|
|
|
- bgIndex === 1 ? 'font-jian-yellow' : ''
|
|
|
- ]"
|
|
|
- @click="setFontSize('-')"
|
|
|
- />
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <span
|
|
|
- :class="[
|
|
|
- 'font-jian-black',
|
|
|
- bgIndex === 1
|
|
|
- ? 'font-jian-yellow-disabled'
|
|
|
- : 'font-jian-white-disabled'
|
|
|
- ]"
|
|
|
- />
|
|
|
- </template>
|
|
|
- <span
|
|
|
- :class="[
|
|
|
- 'font-img-black',
|
|
|
- bgIndex === 1 ? 'font-img-yellow' : ''
|
|
|
- ]"
|
|
|
- />
|
|
|
- <template v-if="hzSize <= 76">
|
|
|
- <span
|
|
|
- :class="[
|
|
|
- 'font-jia-black',
|
|
|
- bgIndex === 1 ? 'font-jia-yellow' : ''
|
|
|
- ]"
|
|
|
- @click="setFontSize('+')"
|
|
|
- />
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <span
|
|
|
- :class="[
|
|
|
- 'font-jia-black',
|
|
|
- bgIndex === 1
|
|
|
- ? 'font-jia-yellow-disabled'
|
|
|
- : 'font-jia-white-disabled'
|
|
|
- ]"
|
|
|
- />
|
|
|
- </template>
|
|
|
- </div>
|
|
|
+ <div :class="['voicefull-bottom-show', isBottomShow ? '' : 'hidden']">
|
|
|
+ <div class="bottom-left">
|
|
|
+ <soundrecorddiff
|
|
|
+ ref="Soundrecorddiff"
|
|
|
+ :bg-index="bgIndex"
|
|
|
+ :file-name="fileName"
|
|
|
+ :select-data="selectData"
|
|
|
+ :answer-record-list="recordList"
|
|
|
+ @getSelectData="getSelectData"
|
|
|
+ @getWavblob="getWavblob"
|
|
|
+ @handleParentPlay="handleParentPlay"
|
|
|
+ @sentPause="sentPause"
|
|
|
+ @getRerordStatus="getRerordStatus"
|
|
|
+ @getMicrophoneStatus="getMicrophoneStatus"
|
|
|
+ @getPlayStatus="getPlayStatus"
|
|
|
+ @handleWav="handleWav"
|
|
|
+ />
|
|
|
<div
|
|
|
- :class="['op-btn', bgIndex === 1 ? 'op-btn-green' : '']"
|
|
|
- @click="changeStatus('isKeyboard')"
|
|
|
+ v-if="isShowCompare"
|
|
|
+ :class="['compare-box', bgIndex === 1 ? 'compare-box-white' : '']"
|
|
|
>
|
|
|
- <span
|
|
|
- :class="[
|
|
|
- 'keyboard-icon',
|
|
|
- !isKeyboard ? 'disabled' : '',
|
|
|
- isKeyboard && bgIndex === 1 ? 'keyboard-icon-yellow' : ''
|
|
|
- ]"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="top-middle">
|
|
|
- <template v-if="mp3">
|
|
|
- <voice-matrix-fullscreen-audio
|
|
|
- ref="audioLine"
|
|
|
- audio-id="voiceMatrixFullscreenAudio"
|
|
|
- :is-repeat="isRepeat"
|
|
|
- :bg-index="bgIndex"
|
|
|
- :mp3="mp3"
|
|
|
+ <audio-compare
|
|
|
+ type="full"
|
|
|
+ :theme-color="themeColor"
|
|
|
+ :url="mp3"
|
|
|
+ :wavblob="wavblob"
|
|
|
+ :sent-pause="sentPause"
|
|
|
+ :is-record="isRecord"
|
|
|
+ :handle-change-stop-audio="handleChangeStopAudio"
|
|
|
+ :get-play-status="getPlayStatus"
|
|
|
+ :matrix-select-lrc="matrixSelectLrc"
|
|
|
:get-cur-time="getCurTime"
|
|
|
- :stop-audio="stopAudio"
|
|
|
- :has-selected-cell="hasSelectedCell"
|
|
|
- @playChange="playChange"
|
|
|
- @parentPlayAudio="playAudio"
|
|
|
- @handleChangeStopAudio="handleChangeStopAudio"
|
|
|
- />
|
|
|
- </template>
|
|
|
- <div
|
|
|
- :class="['op-btn', bgIndex === 1 ? 'op-btn-green' : '']"
|
|
|
- @click="changeLoopState"
|
|
|
- >
|
|
|
- <span
|
|
|
- :class="[
|
|
|
- 'repeat-icon',
|
|
|
- !isRepeat ? 'disabled' : 'auto-icon',
|
|
|
- isRepeat && bgIndex === 1 ? 'auto-icon-yellow' : ''
|
|
|
- ]"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div
|
|
|
- :class="['op-btn', bgIndex === 1 ? 'op-btn-green' : '']"
|
|
|
- @click="changePinyin"
|
|
|
- >
|
|
|
- <span
|
|
|
- :class="[
|
|
|
- 'pinyin-icon',
|
|
|
- !isShowPY || !isHasPY ? 'disabled' : '',
|
|
|
- isShowPY && isHasPY && bgIndex === 1 ? 'pinyin-icon-yellow' : ''
|
|
|
- ]"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div
|
|
|
- :class="['op-btn', bgIndex === 1 ? 'op-btn-green' : '']"
|
|
|
- @click="changeEN"
|
|
|
- >
|
|
|
- <span
|
|
|
- :class="[
|
|
|
- 'en-icon',
|
|
|
- !isShowEN || !isHasEN ? 'disabled' : '',
|
|
|
- isShowEN && bgIndex === 1 && isHasEN ? 'en-icon-yellow' : ''
|
|
|
- ]"
|
|
|
+ :cur-time="curTime"
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div
|
|
|
- :class="['op-btn', bgIndex === 1 ? 'op-btn-green' : '']"
|
|
|
- @click="exitFullScreen"
|
|
|
- >
|
|
|
- <span
|
|
|
- :class="['close-icon', bgIndex === 1 ? 'close-icon-white' : '']"
|
|
|
- />
|
|
|
- </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -152,7 +50,7 @@
|
|
|
class="matrix"
|
|
|
:style="{
|
|
|
'grid-template': `96px repeat(${curQue.voiceMatrix.matrix.length}, auto) minmax(1.5em, 1fr) / 112px repeat(${curQue.voiceMatrix.matrix[0].length}, auto) minmax(124px, 1fr)`,
|
|
|
- 'font-size': `${hzSize}px`
|
|
|
+ 'font-size': `${hzSize}px`,
|
|
|
}"
|
|
|
@mouseleave="clearSelectCell"
|
|
|
>
|
|
@@ -169,14 +67,15 @@
|
|
|
row.type !== 'connection' && curQue.voiceMatrix.columnSelection
|
|
|
"
|
|
|
v-show="
|
|
|
+ isMobile ||
|
|
|
selectColumn === i ||
|
|
|
- (selectedLine.type === 'column' && selectedLine.index === i)
|
|
|
+ (selectedLine.type === 'column' && selectedLine.index === i)
|
|
|
"
|
|
|
:class="[
|
|
|
`matrix-checkbox-row-${themeColor}`,
|
|
|
selectedLine.type === 'column' && selectedLine.index === i
|
|
|
? 'active'
|
|
|
- : ''
|
|
|
+ : '',
|
|
|
]"
|
|
|
@click="selectRowOrColumn(i, 'column')"
|
|
|
/>
|
|
@@ -193,14 +92,15 @@
|
|
|
<span
|
|
|
v-if="curQue.voiceMatrix.rowSelection"
|
|
|
v-show="
|
|
|
+ isMobile ||
|
|
|
selectRow === i ||
|
|
|
- (selectedLine.type === 'row' && selectedLine.index === i)
|
|
|
+ (selectedLine.type === 'row' && selectedLine.index === i)
|
|
|
"
|
|
|
:class="[
|
|
|
`matrix-checkbox-column-${themeColor}`,
|
|
|
selectedLine.type === 'row' && selectedLine.index === i
|
|
|
? 'active'
|
|
|
- : ''
|
|
|
+ : '',
|
|
|
]"
|
|
|
@click="selectRowOrColumn(i, 'row')"
|
|
|
/>
|
|
@@ -212,9 +112,9 @@
|
|
|
:class="[
|
|
|
'column-wrapper',
|
|
|
(i === 0 && curQue.voiceMatrix.firstLineHighlight) ||
|
|
|
- (j === row.length - 1 && curQue.voiceMatrix.lastColumnHighlight)
|
|
|
+ (j === row.length - 1 && curQue.voiceMatrix.lastColumnHighlight)
|
|
|
? `highlight-${themeColor}`
|
|
|
- : ''
|
|
|
+ : '',
|
|
|
]"
|
|
|
@mouseenter="matrixCellMouseenter(i, j, column.type)"
|
|
|
>
|
|
@@ -225,18 +125,18 @@
|
|
|
:class="[
|
|
|
column.text.length === 0 ? 'space' : `column-${themeColor}`,
|
|
|
(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'
|
|
|
: '',
|
|
|
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'
|
|
|
: '',
|
|
|
- column.isTitle ? 'title' : ''
|
|
|
+ column.isTitle ? 'title' : '',
|
|
|
]"
|
|
|
@click="matrixCellClick(i, j)"
|
|
|
>
|
|
@@ -250,7 +150,7 @@
|
|
|
'connection',
|
|
|
i === 0 && curQue.voiceMatrix.firstLineHighlight
|
|
|
? `highlight-bc-${themeColor}`
|
|
|
- : ''
|
|
|
+ : '',
|
|
|
]"
|
|
|
/>
|
|
|
<!-- 分词 -->
|
|
@@ -260,21 +160,21 @@
|
|
|
:class="[
|
|
|
`sentence-${themeColor}`,
|
|
|
(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'
|
|
|
: '',
|
|
|
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'
|
|
|
: '',
|
|
|
- column.isTitle ? 'title' : ''
|
|
|
+ column.isTitle ? 'title' : '',
|
|
|
]"
|
|
|
: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)"
|
|
|
>
|
|
@@ -282,18 +182,16 @@
|
|
|
v-for="({ chs, pinyin }, w) in column.sentence_data.wordsList"
|
|
|
>
|
|
|
<span
|
|
|
- :key="
|
|
|
- `${
|
|
|
- column.sentence_data.pyPosition === 'top'
|
|
|
- ? 'pinyin'
|
|
|
- : 'chs'
|
|
|
- }-${w}`
|
|
|
- "
|
|
|
+ :key="`${
|
|
|
+ column.sentence_data.pyPosition === 'top'
|
|
|
+ ? 'pinyin'
|
|
|
+ : 'chs'
|
|
|
+ }-${w}`"
|
|
|
:style="{
|
|
|
visibility:
|
|
|
column.sentence_data.pyPosition === 'top' && isShowPY
|
|
|
? 'visible'
|
|
|
- : 'hidden'
|
|
|
+ : 'hidden',
|
|
|
}"
|
|
|
:class="
|
|
|
column.sentence_data.pyPosition === 'top'
|
|
@@ -310,18 +208,16 @@
|
|
|
v-for="({ chs, pinyin }, w) in column.sentence_data.wordsList"
|
|
|
>
|
|
|
<span
|
|
|
- :key="
|
|
|
- `${
|
|
|
- column.sentence_data.pyPosition === 'top'
|
|
|
- ? 'chs'
|
|
|
- : 'pinyin'
|
|
|
- }-${w}`
|
|
|
- "
|
|
|
+ :key="`${
|
|
|
+ column.sentence_data.pyPosition === 'top'
|
|
|
+ ? 'chs'
|
|
|
+ : 'pinyin'
|
|
|
+ }-${w}`"
|
|
|
:style="{
|
|
|
visibility:
|
|
|
column.sentence_data.pyPosition !== 'top' && isShowPY
|
|
|
? 'hidden'
|
|
|
- : 'visible'
|
|
|
+ : 'visible',
|
|
|
}"
|
|
|
:class="
|
|
|
column.sentence_data.pyPosition === 'top'
|
|
@@ -342,18 +238,18 @@
|
|
|
:class="[
|
|
|
`pinyinEnglish-${themeColor}`,
|
|
|
(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'
|
|
|
: '',
|
|
|
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'
|
|
|
: '',
|
|
|
- column.isTitle ? 'title' : ''
|
|
|
+ column.isTitle ? 'title' : '',
|
|
|
]"
|
|
|
@click="matrixCellClick(i, j)"
|
|
|
>
|
|
@@ -376,18 +272,18 @@
|
|
|
:class="[
|
|
|
`textBrackets-${themeColor}`,
|
|
|
(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'
|
|
|
: '',
|
|
|
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'
|
|
|
: '',
|
|
|
- column.isTitle ? 'title' : ''
|
|
|
+ column.isTitle ? 'title' : '',
|
|
|
]"
|
|
|
@click="matrixCellClick(i, j)"
|
|
|
>
|
|
@@ -417,46 +313,150 @@
|
|
|
</div>
|
|
|
|
|
|
<div
|
|
|
- class="voicefull-bottom"
|
|
|
- @mouseover="setBottomShow(true)"
|
|
|
- @mouseleave="setBottomShow(false)"
|
|
|
+ class="voicefull-top"
|
|
|
+ @mouseover="setTopShow(true)"
|
|
|
+ @mouseleave="setTopShow(false)"
|
|
|
>
|
|
|
- <div :class="['voicefull-bottom-show', isBottomShow ? '' : 'hidden']">
|
|
|
- <div class="bottom-left">
|
|
|
- <soundrecorddiff
|
|
|
- ref="Soundrecorddiff"
|
|
|
- :bg-index="bgIndex"
|
|
|
- :file-name="fileName"
|
|
|
- :select-data="selectData"
|
|
|
- :answer-record-list="recordList"
|
|
|
- @getSelectData="getSelectData"
|
|
|
- @getWavblob="getWavblob"
|
|
|
- @handleParentPlay="handleParentPlay"
|
|
|
- @sentPause="sentPause"
|
|
|
- @getRerordStatus="getRerordStatus"
|
|
|
- @getMicrophoneStatus="getMicrophoneStatus"
|
|
|
- @getPlayStatus="getPlayStatus"
|
|
|
- @handleWav="handleWav"
|
|
|
- />
|
|
|
+ <div :class="[isTopShow ? 'voicefull-top-show' : 'voicefull-top-hidden']">
|
|
|
+ <div class="top-left">
|
|
|
+ <div :class="['select-bg', bgIndex === 1 ? 'select-bg-blue' : '']">
|
|
|
+ <div :class="['bg-green-box', bgIndex === 1 ? 'active' : '']">
|
|
|
+ <span
|
|
|
+ :class="['bg-green', bgIndex === 1 ? 'active' : '']"
|
|
|
+ @click="changeBg(1)"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div :class="['bg-white-box', bgIndex === 0 ? 'active' : '']">
|
|
|
+ <span
|
|
|
+ :class="['bg-white', bgIndex === 0 ? 'active' : '']"
|
|
|
+ @click="changeBg(0)"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div
|
|
|
- v-if="isShowCompare"
|
|
|
- :class="['compare-box', bgIndex === 1 ? 'compare-box-white' : '']"
|
|
|
+ :class="['set-fontSize', bgIndex === 1 ? 'set-fontSize-green' : '']"
|
|
|
>
|
|
|
- <audio-compare
|
|
|
- type="full"
|
|
|
- :theme-color="themeColor"
|
|
|
- :url="mp3"
|
|
|
- :wavblob="wavblob"
|
|
|
- :sent-pause="sentPause"
|
|
|
- :is-record="isRecord"
|
|
|
- :handle-change-stop-audio="handleChangeStopAudio"
|
|
|
- :get-play-status="getPlayStatus"
|
|
|
- :matrix-select-lrc="matrixSelectLrc"
|
|
|
+ <template v-if="hzSize >= 34">
|
|
|
+ <span
|
|
|
+ :class="[
|
|
|
+ 'font-jian-black',
|
|
|
+ bgIndex === 1 ? 'font-jian-yellow' : '',
|
|
|
+ ]"
|
|
|
+ @click="setFontSize('-')"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <span
|
|
|
+ :class="[
|
|
|
+ 'font-jian-black',
|
|
|
+ bgIndex === 1
|
|
|
+ ? 'font-jian-yellow-disabled'
|
|
|
+ : 'font-jian-white-disabled',
|
|
|
+ ]"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <span
|
|
|
+ :class="[
|
|
|
+ 'font-img-black',
|
|
|
+ bgIndex === 1 ? 'font-img-yellow' : '',
|
|
|
+ ]"
|
|
|
+ />
|
|
|
+ <template v-if="hzSize <= 76">
|
|
|
+ <span
|
|
|
+ :class="[
|
|
|
+ 'font-jia-black',
|
|
|
+ bgIndex === 1 ? 'font-jia-yellow' : '',
|
|
|
+ ]"
|
|
|
+ @click="setFontSize('+')"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <span
|
|
|
+ :class="[
|
|
|
+ 'font-jia-black',
|
|
|
+ bgIndex === 1
|
|
|
+ ? 'font-jia-yellow-disabled'
|
|
|
+ : 'font-jia-white-disabled',
|
|
|
+ ]"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ :class="['op-btn', bgIndex === 1 ? 'op-btn-green' : '']"
|
|
|
+ @click="changeStatus('isKeyboard')"
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ :class="[
|
|
|
+ 'keyboard-icon',
|
|
|
+ !isKeyboard ? 'disabled' : '',
|
|
|
+ isKeyboard && bgIndex === 1 ? 'keyboard-icon-yellow' : '',
|
|
|
+ ]"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="top-middle">
|
|
|
+ <template v-if="mp3">
|
|
|
+ <voice-matrix-fullscreen-audio
|
|
|
+ ref="audioLine"
|
|
|
+ audio-id="voiceMatrixFullscreenAudio"
|
|
|
+ :is-repeat="isRepeat"
|
|
|
+ :bg-index="bgIndex"
|
|
|
+ :mp3="mp3"
|
|
|
:get-cur-time="getCurTime"
|
|
|
- :cur-time="curTime"
|
|
|
+ :stop-audio="stopAudio"
|
|
|
+ :has-selected-cell="hasSelectedCell"
|
|
|
+ @playChange="playChange"
|
|
|
+ @parentPlayAudio="playAudio"
|
|
|
+ @handleChangeStopAudio="handleChangeStopAudio"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <div
|
|
|
+ :class="['op-btn', bgIndex === 1 ? 'op-btn-green' : '']"
|
|
|
+ @click="changeLoopState"
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ :class="[
|
|
|
+ 'repeat-icon',
|
|
|
+ !isRepeat ? 'disabled' : 'auto-icon',
|
|
|
+ isRepeat && bgIndex === 1 ? 'auto-icon-yellow' : '',
|
|
|
+ ]"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ :class="['op-btn', bgIndex === 1 ? 'op-btn-green' : '']"
|
|
|
+ @click="changePinyin"
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ :class="[
|
|
|
+ 'pinyin-icon',
|
|
|
+ !isShowPY || !isHasPY ? 'disabled' : '',
|
|
|
+ isShowPY && isHasPY && bgIndex === 1
|
|
|
+ ? 'pinyin-icon-yellow'
|
|
|
+ : '',
|
|
|
+ ]"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ :class="['op-btn', bgIndex === 1 ? 'op-btn-green' : '']"
|
|
|
+ @click="changeEN"
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ :class="[
|
|
|
+ 'en-icon',
|
|
|
+ !isShowEN || !isHasEN ? 'disabled' : '',
|
|
|
+ isShowEN && bgIndex === 1 && isHasEN ? 'en-icon-yellow' : '',
|
|
|
+ ]"
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div
|
|
|
+ :class="['op-btn', bgIndex === 1 ? 'op-btn-green' : '']"
|
|
|
+ @click="exitFullScreen"
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ :class="['close-icon', bgIndex === 1 ? 'close-icon-white' : '']"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -473,11 +473,19 @@ export default {
|
|
|
VoiceMatrixFullscreenAudio,
|
|
|
Soundrecorddiff,
|
|
|
AudioCompare,
|
|
|
- Wordcard
|
|
|
+ Wordcard,
|
|
|
},
|
|
|
props: ["mp3", "curQue", "themeColor", "recordList"],
|
|
|
data() {
|
|
|
+ const userAgent = navigator.userAgent || window.opera;
|
|
|
+ // 检查是否包含移动设备的标识
|
|
|
+ let isMobile =
|
|
|
+ /android|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(
|
|
|
+ userAgent
|
|
|
+ );
|
|
|
+
|
|
|
return {
|
|
|
+ isMobile,
|
|
|
hzSize: 48,
|
|
|
bgIndex: 1,
|
|
|
item: null,
|
|
@@ -503,12 +511,12 @@ export default {
|
|
|
// 行、列选中
|
|
|
selectedLine: {
|
|
|
type: "",
|
|
|
- index: 0
|
|
|
+ index: 0,
|
|
|
},
|
|
|
// 点击选中
|
|
|
selectCell: {
|
|
|
row: -1,
|
|
|
- column: -1
|
|
|
+ column: -1,
|
|
|
},
|
|
|
isRepeat: false,
|
|
|
// 跟读所需属性
|
|
@@ -520,7 +528,7 @@ export default {
|
|
|
cellTimer: null,
|
|
|
// 拼音、英文显隐判断
|
|
|
isShowPY: true,
|
|
|
- isShowEN: true
|
|
|
+ isShowEN: true,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -552,7 +560,7 @@ export default {
|
|
|
type: type.length > 0 && index >= 0 ? type : "cell",
|
|
|
index,
|
|
|
row,
|
|
|
- column
|
|
|
+ column,
|
|
|
};
|
|
|
},
|
|
|
// 矩阵的行、列数从 0 开始
|
|
@@ -560,9 +568,9 @@ export default {
|
|
|
const matrixArr = this.curQue.voiceMatrix.matrix;
|
|
|
return {
|
|
|
rows: matrixArr.length - 1,
|
|
|
- columns: matrixArr.length > 0 ? matrixArr[0].length - 1 : -1
|
|
|
+ columns: matrixArr.length > 0 ? matrixArr[0].length - 1 : -1,
|
|
|
};
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
isRecording(newVal) {
|
|
@@ -586,7 +594,7 @@ export default {
|
|
|
}
|
|
|
}, 50);
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
created() {
|
|
|
document.addEventListener("keyup", this.handleKeyup);
|
|
@@ -595,8 +603,8 @@ export default {
|
|
|
"fullscreenchange",
|
|
|
"mozfullscreenchange",
|
|
|
"webkitfullscreenchange",
|
|
|
- "msfullscreenchange"
|
|
|
- ].forEach(event => {
|
|
|
+ "msfullscreenchange",
|
|
|
+ ].forEach((event) => {
|
|
|
document.addEventListener(event, this.handleFullscreen);
|
|
|
});
|
|
|
},
|
|
@@ -606,8 +614,8 @@ export default {
|
|
|
"fullscreenchange",
|
|
|
"mozfullscreenchange",
|
|
|
"webkitfullscreenchange",
|
|
|
- "msfullscreenchange"
|
|
|
- ].forEach(event => {
|
|
|
+ "msfullscreenchange",
|
|
|
+ ].forEach((event) => {
|
|
|
document.removeEventListener(event, this.handleFullscreen);
|
|
|
});
|
|
|
},
|
|
@@ -650,13 +658,8 @@ export default {
|
|
|
},
|
|
|
|
|
|
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 === "SentenceSegwordChs") this.fileName = sentence_data.sentence;
|
|
|
if (type === "PinyinEnglish") this.fileName = pinyin_english_data.pinyin;
|
|
@@ -705,7 +708,7 @@ export default {
|
|
|
this.lrcArray = [];
|
|
|
let { type, index } = this.selectedLine;
|
|
|
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);
|
|
|
if (data) this.lrcArray.push(data);
|
|
|
});
|
|
@@ -714,7 +717,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
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]);
|
|
|
if (data) this.lrcArray.push(data);
|
|
|
});
|
|
@@ -737,7 +740,7 @@ export default {
|
|
|
this.$refs.audioLine.PlayAudio();
|
|
|
if (end_time === -1) return;
|
|
|
let end = end_time / 1000 - 0.01;
|
|
|
- this.unWatch = this.$watch("curTime", val => {
|
|
|
+ this.unWatch = this.$watch("curTime", (val) => {
|
|
|
if (val >= end) {
|
|
|
if (!this.hasSelectedCell) return this.unWatch();
|
|
|
this.handleParentPlay();
|
|
@@ -787,7 +790,7 @@ export default {
|
|
|
}
|
|
|
let arr = [];
|
|
|
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);
|
|
|
if (data) arr.push(data);
|
|
|
});
|
|
@@ -796,7 +799,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
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]);
|
|
|
if (data) arr.push(data);
|
|
|
});
|
|
@@ -822,7 +825,7 @@ export default {
|
|
|
return {
|
|
|
begin_time: lrc_data.begin_time,
|
|
|
end_time: this.mp3Duration,
|
|
|
- text: lrc_data.text
|
|
|
+ text: lrc_data.text,
|
|
|
};
|
|
|
}
|
|
|
return lrc_data;
|
|
@@ -843,7 +846,7 @@ export default {
|
|
|
// 监听是否已到结束时间,为了选中效果 - 0.01
|
|
|
if (end_time === -1) return;
|
|
|
let end = end_time / 1000 - 0.01;
|
|
|
- this.unWatch = this.$watch("curTime", val => {
|
|
|
+ this.unWatch = this.$watch("curTime", (val) => {
|
|
|
if (val >= end) {
|
|
|
this.handleParentPlay();
|
|
|
this.$refs.audioLine.onTimeupdateTime(end);
|
|
@@ -972,9 +975,13 @@ export default {
|
|
|
|
|
|
pauseAudio() {
|
|
|
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();
|
|
|
});
|
|
|
}
|
|
|
},
|
|
@@ -985,8 +992,8 @@ export default {
|
|
|
changeFullScreen() {
|
|
|
this.pauseAudio();
|
|
|
this.$emit("changeIsFull");
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|
|
@@ -1539,6 +1546,7 @@ $dark-color-play: #fff2c6;
|
|
|
> span {
|
|
|
display: inline-block;
|
|
|
padding: 4px 12px;
|
|
|
+ white-space: nowrap;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1585,6 +1593,7 @@ $dark-color-play: #fff2c6;
|
|
|
column-gap: 8px;
|
|
|
justify-items: center;
|
|
|
justify-content: start;
|
|
|
+ white-space: nowrap;
|
|
|
|
|
|
> span {
|
|
|
padding: 0;
|