Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
# Conflicts: # src/views/jsxt/competition/examDetail.vue # src/views/jsxt/refereeList/index.vue
This commit is contained in:
commit
04f41456d9
@ -125,7 +125,7 @@ export default {
|
||||
// this.getData();
|
||||
},
|
||||
covertStatus(status) {
|
||||
const statusDict = {'01':'未考试', '02':'准备中', '03':'考试中', '04':'考试结束'};
|
||||
const statusDict = {'0':'尚未参赛', '1':'进入赛场', '2':'理论赛场', '3':'实操赛场', '4':'完成比赛'};
|
||||
return statusDict[status];
|
||||
},
|
||||
// getData() {
|
||||
@ -156,6 +156,7 @@ export default {
|
||||
this.$router.push({ path: `/displayNew/demon`, query: query});
|
||||
});
|
||||
});
|
||||
// });
|
||||
},
|
||||
playBack() {
|
||||
|
||||
|
@ -35,6 +35,9 @@ export default {
|
||||
return {
|
||||
chatContentList:[],
|
||||
coversition:{},
|
||||
currentAudioList:[],
|
||||
isPlay:false,
|
||||
currentAudioIndex:0,
|
||||
baseUrl:process.env.VUE_APP_VOICE_API
|
||||
};
|
||||
},
|
||||
@ -47,12 +50,27 @@ export default {
|
||||
const simulationText = this.$store.state.socket.simulationText;
|
||||
if (this.currentCoversition.id == val.id) {
|
||||
this.chatContentList.push(simulationText);
|
||||
if (simulationText.member.userId != this.$store.state.user.id) {
|
||||
this.currentAudioList.push(this.chatContentList.length - 1);
|
||||
if (!this.isPlay) {
|
||||
this.isPlay = true;
|
||||
this.playAllAudio();
|
||||
}
|
||||
}
|
||||
this.scrollTop();
|
||||
} else {
|
||||
if (!simulationText.group) {
|
||||
this.$emit('changeCoversition', simulationText);
|
||||
// this.$emit('addCoversition', {data:simulationText, headerTitle:''});
|
||||
this.chatContentList.push(simulationText);
|
||||
if (simulationText.member.userId != this.$store.state.user.id) {
|
||||
this.currentAudioList.push(this.chatContentList.length - 1);
|
||||
if (!this.isPlay) {
|
||||
this.isPlay = true;
|
||||
this.playAllAudio();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -101,6 +119,23 @@ export default {
|
||||
formatTime(time) {
|
||||
return /\d{2}:\d{2}:\d{2}/.exec(time)[0] || time;
|
||||
},
|
||||
playAllAudio() {
|
||||
this.playEachAudio(this.currentAudioList[this.currentAudioIndex]);
|
||||
},
|
||||
playEachAudio(index) {
|
||||
this.$nextTick(function() {
|
||||
document.querySelector('#audio' + index).play();
|
||||
document.querySelector('#audio' + index).onended = function() {
|
||||
this.currentAudioList.shift();
|
||||
if (this.currentAudioList.length > 0) {
|
||||
this.currentAudioIndex++;
|
||||
this.playEachAudio(this.currentAudioList[this.currentAudioIndex]);
|
||||
} else {
|
||||
this.isPlay = false;
|
||||
}
|
||||
};
|
||||
});
|
||||
},
|
||||
covertName(data) {
|
||||
if (data != 'All') {
|
||||
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
|
||||
|
Loading…
Reference in New Issue
Block a user