|
|
@@ -4,7 +4,6 @@
|
|
|
v-dialogDrag
|
|
|
custom-class="record-score-single-dialog"
|
|
|
:visible="visible"
|
|
|
- width="45vw"
|
|
|
:close-on-click-modal="false"
|
|
|
:modal="modal"
|
|
|
:before-close="handleClose"
|
|
|
@@ -76,6 +75,34 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="voice-box">
|
|
|
+ <a
|
|
|
+ class="voice-item"
|
|
|
+ @click="
|
|
|
+ handleChangeTime(
|
|
|
+ recordScoreDetail.audio_url_standard,
|
|
|
+ recordScoreDetail.audio_url_standard_bg,
|
|
|
+ recordScoreDetail.audio_url_standard_ed,
|
|
|
+ 'standard',
|
|
|
+ )
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <SvgIcon
|
|
|
+ size="16"
|
|
|
+ :icon-class="stopAudioS && type === 'standard' ? 'pause-large-fill' : 'play-large-fill'"
|
|
|
+ :style="{ color: attrib?.topic_color }"
|
|
|
+ />
|
|
|
+ 标准音
|
|
|
+ </a>
|
|
|
+ <a class="voice-item" @click="handleChangeTime(recordScoreDetail.audio_url_user, 0, 100000, 'user')">
|
|
|
+ <SvgIcon
|
|
|
+ size="16"
|
|
|
+ :icon-class="stopAudioS && type === 'user' ? 'pause-large-fill' : 'play-large-fill'"
|
|
|
+ :style="{ color: attrib?.topic_color }"
|
|
|
+ />
|
|
|
+ 我的读音
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
<h5>逐字评分</h5>
|
|
|
<div class="word-score-box">
|
|
|
<div
|
|
|
@@ -84,25 +111,46 @@
|
|
|
:key="index"
|
|
|
:style="wordScoreItem(item.score)"
|
|
|
>
|
|
|
- <span class="pinyin">{{ item.pinyin }}·{{ item.tone }}声</span>
|
|
|
<p :style="textColor(item.score)">{{ item.hz }}</p>
|
|
|
- <span :style="textColor(item.score)">{{ item.score }}</span>
|
|
|
+ <div class="char-item">
|
|
|
+ <span>{{ item.pinyin }}</span>
|
|
|
+ <b :style="textColor(item.score)">{{ item.score }}</b>
|
|
|
+ </div>
|
|
|
+ <div class="char-item" v-for="(items, indexs) in item.phoneme_list" :key="indexs">
|
|
|
+ <span>{{ items.char }}</span>
|
|
|
+ <b :style="textColor(items.score)">{{ items.score }}</b>
|
|
|
+ </div>
|
|
|
+ <div class="char-item">
|
|
|
+ <span>{{ item.tone_char }}</span>
|
|
|
+ <b :style="textColor(item.tone_score)">{{ item.tone_score }}</b>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="tips">
|
|
|
- 逐字得分:<span class="color-block" style="background-color: #e7f4e7"></span>≥ 80 标准<span
|
|
|
+ 得分:<span class="color-block" style="background-color: #e7f4e7"></span>≥ 80<span
|
|
|
class="color-block"
|
|
|
style="background-color: #fdf1d6"
|
|
|
></span
|
|
|
- >60–79 偏差 <span class="color-block" style="background-color: #fbe0e0"></span> < 60 需练习
|
|
|
+ >60–79<span class="color-block" style="background-color: #fbe0e0"></span> < 60
|
|
|
</div>
|
|
|
+ <AudioLine
|
|
|
+ ref="audioLine"
|
|
|
+ audio-id="recordScoreSingle"
|
|
|
+ :mp3="mp3Url"
|
|
|
+ :get-cur-time="getCurTime"
|
|
|
+ :ed="ed"
|
|
|
+ type="audioLine"
|
|
|
+ @handleListenRead="handleListenRead"
|
|
|
+ style="height: 0; opacity: 0"
|
|
|
+ />
|
|
|
</el-dialog>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import AudioLine from '../components/voice_matrix/components/AudioLine.vue';
|
|
|
export default {
|
|
|
name: 'RecordScoreSingleDetail',
|
|
|
- components: {},
|
|
|
+ components: { AudioLine },
|
|
|
inject: {
|
|
|
modal: {
|
|
|
default: true,
|
|
|
@@ -118,9 +166,19 @@ export default {
|
|
|
required: true,
|
|
|
default: () => ({}),
|
|
|
},
|
|
|
+ attrib: {
|
|
|
+ type: Object,
|
|
|
+ default: () => ({}),
|
|
|
+ },
|
|
|
},
|
|
|
data() {
|
|
|
- return {};
|
|
|
+ return {
|
|
|
+ stopAudioS: false,
|
|
|
+ mp3Url: '',
|
|
|
+ ed: null,
|
|
|
+ type: '',
|
|
|
+ curTime: 0,
|
|
|
+ };
|
|
|
},
|
|
|
computed: {},
|
|
|
|
|
|
@@ -150,13 +208,32 @@ export default {
|
|
|
};
|
|
|
return style;
|
|
|
},
|
|
|
+ handleListenRead(playFlag) {
|
|
|
+ this.stopAudioS = playFlag;
|
|
|
+ },
|
|
|
+ // 点击播放
|
|
|
+ handleChangeTime(mp3, time, edTime, type) {
|
|
|
+ this.mp3Url = mp3;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.audioLine.onTimeupdateTime(time / 1000, true);
|
|
|
+ this.ed = edTime;
|
|
|
+ this.type = type;
|
|
|
+ this.stopAudioS = true;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ emptyEd() {
|
|
|
+ this.ed = null;
|
|
|
+ },
|
|
|
+ getCurTime(curTime) {
|
|
|
+ this.curTime = curTime * 1000;
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
.record-score-single-dialog {
|
|
|
- width: min(560px, 92vw);
|
|
|
+ width: min(620px, 92vw);
|
|
|
padding: 22px 26px;
|
|
|
background: #fff;
|
|
|
border-radius: 14px;
|
|
|
@@ -250,6 +327,7 @@ export default {
|
|
|
gap: 3px;
|
|
|
|
|
|
.word-score-item {
|
|
|
+ min-width: 40px;
|
|
|
padding: 4px 0 3px;
|
|
|
color: #9aa5b5;
|
|
|
text-align: center;
|
|
|
@@ -272,6 +350,25 @@ export default {
|
|
|
font-size: 13px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .char-item {
|
|
|
+ display: flex;
|
|
|
+ gap: 3px;
|
|
|
+ align-items: center;
|
|
|
+ padding: 0 2px;
|
|
|
+ color: #2b3544;
|
|
|
+
|
|
|
+ span {
|
|
|
+ min-width: 15px;
|
|
|
+ font-family: 'League';
|
|
|
+ text-align: left;
|
|
|
+ }
|
|
|
+
|
|
|
+ b {
|
|
|
+ flex: 1;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.tips {
|
|
|
@@ -289,5 +386,23 @@ export default {
|
|
|
margin: 0 3px 0 10px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .voice-box {
|
|
|
+ display: flex;
|
|
|
+ gap: 6px;
|
|
|
+
|
|
|
+ .voice-item {
|
|
|
+ display: flex;
|
|
|
+ gap: 4px;
|
|
|
+ align-items: center;
|
|
|
+ padding: 3px 12px;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #44515f;
|
|
|
+ cursor: pointer;
|
|
|
+ background: #f8fafc;
|
|
|
+ border: 1px solid #d7dee8;
|
|
|
+ border-radius: 14px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|