This commit is contained in:
zyy 2020-06-05 18:04:42 +08:00
commit c86bb0bff3
3 changed files with 44 additions and 30 deletions

View File

@ -71,10 +71,10 @@ export default {
} }
}, },
beforeDestroy() { beforeDestroy() {
if (this.isPlaying) { // if (this.isPlaying) {
endPlaying({}).then(res=>{ endPlaying({}).then(res=>{
}); });
} // }
}, },
methods:{ methods:{
back() { back() {
@ -86,35 +86,35 @@ export default {
addSpeed() { addSpeed() {
if (this.playSpeedIndex < this.playSpeedList.length - 1) { if (this.playSpeedIndex < this.playSpeedList.length - 1) {
this.playSpeedIndex++; this.playSpeedIndex++;
if (this.isPlaying) { // if (this.isPlaying) {
// // //
playingPause({}).then(res=>{ // playingPause({}).then(res=>{
this.isPlaying = false; // this.isPlaying = false;
setPlaySpeed({level:this.playSpeedList[this.playSpeedIndex].level}).then(res=>{ // setPlaySpeed({level:this.playSpeedList[this.playSpeedIndex].level}).then(res=>{
}); // });
}); // });
} else { // } else {
setPlaySpeed({level:this.playSpeedList[this.playSpeedIndex].level}).then(res=>{ setPlaySpeed({level:this.playSpeedList[this.playSpeedIndex].level}).then(res=>{
}); });
} // }
} }
}, },
minusSpeed() { minusSpeed() {
if (this.playSpeedIndex > 0) { if (this.playSpeedIndex > 0) {
this.playSpeedIndex--; this.playSpeedIndex--;
if (this.isPlaying) { // if (this.isPlaying) {
// // //
playingPause({}).then(res=>{ // playingPause({}).then(res=>{
this.isPlaying = false; // this.isPlaying = false;
// setPlaySpeed({level:this.playSpeedList[this.playSpeedIndex].level}).then(res=>{
// });
// });
// } else {
setPlaySpeed({level:this.playSpeedList[this.playSpeedIndex].level}).then(res=>{ setPlaySpeed({level:this.playSpeedList[this.playSpeedIndex].level}).then(res=>{
}); });
}); // }
} else {
setPlaySpeed({level:this.playSpeedList[this.playSpeedIndex].level}).then(res=>{
});
}
} }
}, },

View File

@ -2,7 +2,7 @@
<!-- v-quickMenuDrag --> <!-- v-quickMenuDrag -->
<div class="chatBox" :style="{'bottom':bottom+'px'}"> <div class="chatBox" :style="{'bottom':bottom+'px'}">
<div v-show="!minimize" class="chat-box"> <div v-show="!minimize" class="chat-box">
<chat-member-list ref="chatMemberList" :group="group" :current-coversition="currentCoversition" /> <chat-member-list v-if="project!='refereeJsxt'" ref="chatMemberList" :group="group" :current-coversition="currentCoversition" />
<div class="chat-box-main"> <div class="chat-box-main">
<chat-coversition-list ref="chatCoversitionList" :user-role="userRole" @hideAddCoversition="hideAddCoversition" @setCurrentCoversition="setCurrentCoversition" @setHeadTitle="setHeadTitle" /> <chat-coversition-list ref="chatCoversitionList" :user-role="userRole" @hideAddCoversition="hideAddCoversition" @setCurrentCoversition="setCurrentCoversition" @setHeadTitle="setHeadTitle" />
<div class="chat-window"> <div class="chat-window">
@ -19,7 +19,7 @@
</div> </div>
</div> </div>
<div class="chat-box-content"> <div class="chat-box-content">
<chat-content ref="chatContent" :current-coversition="currentCoversition" @changeCoversition="changeCoversition" /> <chat-content ref="chatContent" :project="project" :current-coversition="currentCoversition" @changeCoversition="changeCoversition" />
<div v-if="recordSending" class="chat_record_tip"> <div v-if="recordSending" class="chat_record_tip">
<div id="record_progress_bar" :style="'width:'+100/60*seconds+'%'" /> <div id="record_progress_bar" :style="'width:'+100/60*seconds+'%'" />
<div class="record_icon" /> <div class="record_icon" />
@ -56,6 +56,7 @@ import ChatCreateGroup from './chatCreateGroup';
import ChatTooltip from './chatTooltip'; import ChatTooltip from './chatTooltip';
import RecordRTC from 'recordrtc'; import RecordRTC from 'recordrtc';
import {uploadAudioFileNew, quitCoversition} from '@/api/chat'; import {uploadAudioFileNew, quitCoversition} from '@/api/chat';
import { getSessionStorage } from '@/utils/auth';
export default { export default {
name: 'ChatBox', name: 'ChatBox',
components:{ components:{
@ -101,6 +102,9 @@ export default {
}, },
isButtonShow() { isButtonShow() {
return this.userRole != 'ADMIN' && this.userRole != 'AUDIENCE' && this.isHasCoversition; return this.userRole != 'ADMIN' && this.userRole != 'AUDIENCE' && this.isHasCoversition;
},
project() {
return getSessionStorage('project');
} }
}, },
watch:{ watch:{

View File

@ -26,11 +26,16 @@
import {getSimulationContextListNew} from '@/api/chat'; import {getSimulationContextListNew} from '@/api/chat';
import ConstConfig from '@/scripts/ConstConfig'; import ConstConfig from '@/scripts/ConstConfig';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
export default { export default {
props:{ props:{
currentCoversition:{ currentCoversition:{
type:Object, type:Object,
required:true required:true
},
project:{
type:String,
required:true
} }
}, },
data() { data() {
@ -73,7 +78,12 @@ export default {
this.playAllAudio(); this.playAllAudio();
} }
} }
} else {
if (this.project == 'refereeJsxt') {
this.chatContentList.push(simulationText);
simulationText.name = '所有人';
this.$emit('changeCoversition', simulationText);
}
} }
} }
}, },
@ -81,7 +91,7 @@ export default {
this.inintData(); this.inintData();
}, },
currentCoversition:function (val, old) { currentCoversition:function (val, old) {
if (val) { if (val && this.project != 'refereeJsxt') {
this.chatContentList = []; this.chatContentList = [];
this.coversition = this.currentCoversition; this.coversition = this.currentCoversition;
this.inintData(); this.inintData();