@@ -74,6 +75,7 @@ export default {
inter:null,
recorders: null,
microphone:null,
+ scriptTip:'',
form:{
language:'zh',
sex:'1'
@@ -89,6 +91,17 @@ export default {
this.$refs.chatCoversitionList.setCoversitionStatus(val);
});
}
+ },
+ '$store.state.socket.simulationScriptTip':function(val, old) {
+ if (val) {
+ if (val.type == 'Conversation') {
+ const target = this.$refs.chatMemberList.getMember(val.targetId);
+ if (target && target.length > 0) {
+ this.scriptTip = '请对' + target[0].memberName + '说:' + val.reply;
+ }
+ }
+
+ }
}
},
mounted() {
@@ -110,19 +123,24 @@ export default {
},
setCurrentCoversition(coversition) {
this.currentCoversition = coversition;
+ if (this.recordSending) {
+ this.cancleRecording();
+ }
},
setHeadTitle(headerTitle) {
this.headerTitle = headerTitle;
},
addCoversition({data, headerTitle}) {
this.$refs.chatCoversitionList.addCoversition(data, headerTitle);
- if (headerTitle) {
- this.currentCoversition = {id:data.id, group:data.group};
- this.headerTitle = headerTitle;
- }
+ this.currentCoversition = {id:data.id, group:data.group};
+ this.headerTitle = headerTitle;
+ },
+ changeCoversition(data) {
+ this.$refs.chatCoversitionList.changeCoversitionOther(data);
},
// 语音录制开始
startRecording() {
+ this.scriptTip = '';
const that = this;
if (!this.recordSending && !this.recorders && !this.microphone) {
this.$refs.chatSetting.doClose();
@@ -267,6 +285,7 @@ export default {
.chat-box-footer{
display: inline-block;
width: 100%;
+ position: relative;
}
.chat-window{
display: inline-block;
@@ -322,6 +341,27 @@ export default {
.coversition-list{
}
+.scriptTip{
+ position: absolute;
+ width: 260px;
+ padding: 10px;
+ background: #ccc;
+ right: 7px;
+ bottom:45px;
+ border-radius: 5px;
+ font-size: 14px;
+}
+.scriptTip::after{
+ content: '';
+ position: absolute;
+ width: 0;
+ height: 0;
+ border-left: 10px solid transparent;
+ border-right: 10px solid transparent;
+ border-top: 8px solid #cccccc;
+ right: 16px;
+ bottom: -7px;
+}
.showMembers{
float: right;
diff --git a/src/views/newMap/displayNew/chatView/chatContent.vue b/src/views/newMap/displayNew/chatView/chatContent.vue
index b8b9c920b..3b46dbce2 100644
--- a/src/views/newMap/displayNew/chatView/chatContent.vue
+++ b/src/views/newMap/displayNew/chatView/chatContent.vue
@@ -8,7 +8,8 @@
-
@{{ covertName(chatContent.targetName) }}
+
+
@{{ covertName(chatContent.targetName) }}
{{ chatContent.message }}
@@ -42,7 +43,8 @@ export default {
if (this.currentCoversition.id == val.id) {
this.chatContentList.push(simulationText);
} else {
- this.$emit('addCoversition', {data:simulationText, headerTitle:''});
+ this.$emit('changeCoversition', simulationText);
+ // this.$emit('addCoversition', {data:simulationText, headerTitle:''});
this.chatContentList.push(simulationText);
}
},
diff --git a/src/views/newMap/displayNew/chatView/chatCoversitionList.vue b/src/views/newMap/displayNew/chatView/chatCoversitionList.vue
index b3a3131c6..b57071f02 100644
--- a/src/views/newMap/displayNew/chatView/chatCoversitionList.vue
+++ b/src/views/newMap/displayNew/chatView/chatCoversitionList.vue
@@ -48,7 +48,6 @@ export default {
addCoversition(data, headerTitle) {
const index = this.coversitionList.findIndex(item=>{ return item.id == data.id; });
if (index < 0) {
- debugger;
const objectCover = this.handleMemberName(data);
data.coverName = objectCover.coversitionName;
data.isOnline = objectCover.isOnline;
@@ -64,6 +63,13 @@ export default {
this.$emit('setCurrentCoversition', coversition);
// this.$refs.chatContent.reloadData(this.currentCoversition);
},
+ changeCoversitionOther(coversition) {
+ const objectCover = this.handleMemberName(coversition);
+ coversition.coverName = objectCover.coversitionName;
+ coversition.isOnline = objectCover.isOnline;
+ this.coversitionList.push(coversition);
+ this.changeCoversition(coversition);
+ },
handleMemberName(conversition) {
if (conversition.group) {
return {coversitionName:conversition.name, isOnline:true};
diff --git a/src/views/newMap/displayNew/chatView/chatMemberList.vue b/src/views/newMap/displayNew/chatView/chatMemberList.vue
index f78781ab3..ddb243928 100644
--- a/src/views/newMap/displayNew/chatView/chatMemberList.vue
+++ b/src/views/newMap/displayNew/chatView/chatMemberList.vue
@@ -78,6 +78,11 @@ export default {
this.memberList = lastData;
});
},
+ getMember(memberId) {
+ return this.memberList.filter(member=>{
+ return member.id == memberId;
+ });
+ },
doShow() {
if (this.showMembers) {
this.showMembers = false;
diff --git a/src/views/newMap/displayNew/demon/addQuest.vue b/src/views/newMap/displayNew/demon/addQuest.vue
index 05d0ffdb2..e84b2b6f4 100644
--- a/src/views/newMap/displayNew/demon/addQuest.vue
+++ b/src/views/newMap/displayNew/demon/addQuest.vue
@@ -51,6 +51,8 @@
-
diff --git a/src/views/newMap/newMapdraft/index.vue b/src/views/newMap/newMapdraft/index.vue
index 4f0dce456..34bc835b9 100644
--- a/src/views/newMap/newMapdraft/index.vue
+++ b/src/views/newMap/newMapdraft/index.vue
@@ -47,18 +47,20 @@
/>
+