实训平台 综合演练 聊天代码调整
This commit is contained in:
parent
6fe3fe6ecb
commit
6866b58b19
@ -154,7 +154,9 @@ export default {
|
||||
}
|
||||
},
|
||||
handleMember(member) {
|
||||
return member.name ? member.role + '-' + member.name : member.role;
|
||||
const deviceName = member.deviceName ? '-' + member.deviceName : '';
|
||||
const memberName = member.name ? '-' + member.name : '';
|
||||
return member.role + deviceName + memberName;
|
||||
},
|
||||
// 语音录制开始
|
||||
startRecording() {
|
||||
|
@ -1,63 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<chat-box :group="group" />
|
||||
<!-- <div v-show="!minimize" class="reminder-drag">
|
||||
<div v-if="userRole != '05' && userRole != ''">
|
||||
<div class="tabs-roles">
|
||||
<div
|
||||
class="roles roles-first"
|
||||
:class="activeName == 'first' ? 'roles-active':''"
|
||||
@click="clickRoles('first')"
|
||||
>角色
|
||||
</div>
|
||||
<div
|
||||
class="roles"
|
||||
:class="activeName == 'second' ? 'roles-active':''"
|
||||
@click="clickRoles('second')"
|
||||
>所有人
|
||||
</div>
|
||||
<div class="minimality" @click="handleMinimality('min')">
|
||||
<i class="el-icon-remove" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabs-content">
|
||||
<div v-show="activeName == 'first'">
|
||||
<chart-view
|
||||
ref="chatView"
|
||||
:group="group"
|
||||
:station-list="stationLists"
|
||||
@showChatSpeak="showChatSpeak"
|
||||
@showChat="showChat"
|
||||
@showChatNone="showChatNone"
|
||||
/>
|
||||
</div>
|
||||
<div style="flex-grow: 1">
|
||||
<chart-window
|
||||
ref="chat"
|
||||
:group="group"
|
||||
:chat-show="chatShow"
|
||||
:speaking="isSpeaking"
|
||||
:is-show-auto="isShowAuto"
|
||||
@handleChatShow="handleChatShow"
|
||||
@handleChatList="handleChatList"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-tabs v-model="activeName2" type="card">
|
||||
<el-tab-pane label="所有人" name="second">
|
||||
<chart-window :speaking="isSpeaking" :group="group" :is-show-auto="true" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- <div v-show="minimize" class="reminder-drag minimize-box">
|
||||
<div class="chat-title">聊天窗口</div>
|
||||
<div class="minimality" @click="handleMinimality('max')">
|
||||
<i class="el-icon-circle-plus" />
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="display-draft" :class="{'display-type-hb': $route.query.lineCode == '07' && $store.state.training.prdType=='01'}">
|
||||
<el-button-group>
|
||||
<el-button v-if="isProject && !dataError " type="primary" @click="setRelDevice">{{ $t('joinTraining.connectRealDevices') }}</el-button>
|
||||
@ -124,23 +67,11 @@ export default {
|
||||
return {
|
||||
isDisable: false,
|
||||
backLoading:false,
|
||||
timeNow: 0,
|
||||
remainingTime: 0,
|
||||
recordStep: 'BGSetting',
|
||||
training: {
|
||||
id: '',
|
||||
name: '',
|
||||
remarks: ''
|
||||
},
|
||||
chatShow: true,
|
||||
isShowAuto: false,
|
||||
offset: 10,
|
||||
userId: '',
|
||||
activeName: 'first',
|
||||
activeName2: 'second',
|
||||
stationList: [],
|
||||
stationLists: [],
|
||||
minimize: true
|
||||
stationLists: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -171,6 +102,7 @@ export default {
|
||||
}
|
||||
},
|
||||
'$store.state.socket.roleList': function (val) {
|
||||
debugger;
|
||||
if (val && val.length) {
|
||||
this.$nextTick(() => {
|
||||
this.addrolesList(val);
|
||||
@ -208,63 +140,6 @@ export default {
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
// 切换角色tab
|
||||
clickRoles(active) {
|
||||
if (active == 'first') {
|
||||
this.chatShow = true;
|
||||
this.isShowAuto = false;
|
||||
this.$refs.chatView.select(); // 清空选中
|
||||
this.$refs.chat.clearPlay('', ''); // 清空自动播放 会话id
|
||||
|
||||
} else {
|
||||
this.chatShow = false;
|
||||
this.isShowAuto = true;
|
||||
this.$refs.chat.getChathistory('', ''); // 获取所有人列表
|
||||
}
|
||||
this.activeName = active;
|
||||
},
|
||||
|
||||
// handleChatShow(data) {
|
||||
// if (!this.minimize) { // 最大化状态
|
||||
// if (this.activeName == 'first') {
|
||||
// this.$refs.chatView.select(data.id);
|
||||
// this.chatShow = false;
|
||||
// this.isShowAuto = false;
|
||||
// this.$refs.chat.handleTextList(data.conversationId);
|
||||
// } else {
|
||||
// this.activeName = 'first';
|
||||
// this.handleChatShow(data);
|
||||
// }
|
||||
// } else { // 最小化状态
|
||||
// this.minimize = false;
|
||||
// this.handleChatShow(data);
|
||||
// }
|
||||
// },
|
||||
// 切到未读消息并说话
|
||||
// showChatSpeak(data) {
|
||||
// this.chatShow = false;
|
||||
// this.isShowAuto = false;
|
||||
// this.$refs.chat.handleTextList(data.conversationId);
|
||||
// },
|
||||
// 获取历史纪录list
|
||||
showChat(obj) {
|
||||
this.chatShow = false;
|
||||
this.$refs.chat.getChathistory(obj.code, obj.id);
|
||||
},
|
||||
handleChatList(data) {
|
||||
this.$refs.chatView.hintInfo(data);
|
||||
},
|
||||
// 设置不显示
|
||||
showChatNone() {
|
||||
this.chatShow = true;
|
||||
},
|
||||
messageInfo(message, type) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: message,
|
||||
type: type
|
||||
});
|
||||
},
|
||||
setPosition() {
|
||||
this.$nextTick(() => {
|
||||
let offset = 10;
|
||||
@ -336,14 +211,6 @@ export default {
|
||||
this.$refs.chatView.getUserRole();
|
||||
}
|
||||
},
|
||||
handleClick(tab, event) {
|
||||
if (this.activeName == 'second') {
|
||||
this.$refs.chat.getChathistory();
|
||||
}
|
||||
},
|
||||
initPlannedDriving(isDisable) {
|
||||
this.isDisable = isDisable;
|
||||
},
|
||||
selectBeginTime() {
|
||||
this.$refs.setTime.doShow();
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user