rt-sim-training-client/src/views/newMap/displayNew/demonChat.vue

64 lines
1.5 KiB
Vue
Raw Normal View History

2020-07-23 17:51:37 +08:00
<template>
2020-08-20 20:27:19 +08:00
<div>
<chat-box
ref="chatbox"
:group="group"
2020-09-11 09:26:51 +08:00
:user-role="userRole"
2020-08-20 20:27:19 +08:00
/>
2020-09-11 09:26:51 +08:00
<script-tip ref="scriptTip" :offset="offset" @allowCreatCoversition="allowCreatCoversition" />
2020-08-20 20:27:19 +08:00
</div>
2020-07-23 17:51:37 +08:00
</template>
<script>
2020-09-11 17:10:11 +08:00
import ChatBox from '../chatView/chatBox.vue';
2020-08-20 20:27:19 +08:00
import ScriptTip from '@/views/newMap/displayNew/scriptDisplay/component/scriptTip';
2020-09-11 09:26:51 +08:00
// import {getAllConversition} from '@/api/chat';
2020-07-23 17:51:37 +08:00
export default {
name:'DemonChat',
components:{
2020-08-20 20:27:19 +08:00
ChatBox,
ScriptTip
2020-07-23 17:51:37 +08:00
},
props: {
group: {
type: String,
required: true
},
userRole: {
type: String,
required: true
2020-08-20 20:27:19 +08:00
},
offset: {
type: Number,
required: true
2020-07-23 17:51:37 +08:00
}
},
watch:{
// 剧本执行完成消息
'$store.state.socket.scriptFinish':function(val, old) {
2020-08-26 15:28:32 +08:00
this.$message('剧本演出完毕');
2020-08-20 20:27:19 +08:00
this.$refs.scriptTip.resetScriptTip();
2020-07-23 17:51:37 +08:00
}
},
mounted() {
},
methods:{
clearAllData() {
2020-09-21 14:20:33 +08:00
// this.resetCoversition();
2020-09-18 16:02:22 +08:00
this.$refs.chatbox.resetCoversition();
2020-08-20 20:27:19 +08:00
this.$refs.scriptTip.resetScriptTip();
},
2020-07-23 17:51:37 +08:00
resetCoversition() {
2020-09-21 14:20:33 +08:00
this.$refs.chatbox.resetCoversition();
2020-08-20 20:27:19 +08:00
},
allowCreatCoversition() {
},
resetScriptTip() {
this.$refs.scriptTip.resetScriptTip();
2020-09-18 16:02:22 +08:00
},
cancelCommonConversation() {
this.$refs.chatbox.cancelCommonConversation();
2020-07-23 17:51:37 +08:00
}
}
};
</script>