From 901ab1a8bda8e51b6c4a6820ef12d469d2870ae7 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 15 May 2020 16:54:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=A7=E6=9C=AC=E6=B7=BB=E5=8A=A0=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/script.js | 4 +- .../theme/beijing_01/menus/menuSignal.vue | 1 - src/store/modules/socket.js | 63 +++---------------- .../newMap/displayNew/chatView/chatBox.vue | 50 +++++++++++++-- .../displayNew/chatView/chatContent.vue | 6 +- .../chatView/chatCoversitionList.vue | 8 ++- .../displayNew/chatView/chatMemberList.vue | 5 ++ .../newMap/displayNew/demon/addQuest.vue | 24 ++++++- 8 files changed, 94 insertions(+), 67 deletions(-) diff --git a/src/api/script.js b/src/api/script.js index 19264af82..0d66e269c 100644 --- a/src/api/script.js +++ b/src/api/script.js @@ -13,7 +13,7 @@ export function getScriptPageListOnline(params) { /** 分页查找上线的剧本(新版)*/ export function getScriptPageListOnlineNew(params) { return request({ - url: `/api/scirpt/v1/paging/online`, + url: `/api/script/v1/paging/online`, method: 'get', params: params }); @@ -30,7 +30,7 @@ export function getScriptById(id) { /** 通过ID查询发布的剧本的详细信息(新版) */ export function getScriptByIdNew(id) { return request({ - url: `/api/scirpt/v1/${id}/detail`, + url: `/api/script/v1/${id}/detail`, method: 'get' }); } diff --git a/src/jmapNew/theme/beijing_01/menus/menuSignal.vue b/src/jmapNew/theme/beijing_01/menus/menuSignal.vue index 779ec9e13..d61298593 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSignal.vue @@ -371,7 +371,6 @@ export default { }, // 现地信号重开操作 reopenSignalByRoute(selectType) { - debugger; commitOperate(menuOperate.Signal.reopenSignal, {signalCode:selectType.code}, 3).then(({valid, operate})=>{ }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js index 061fd17fd..8c21a5287 100644 --- a/src/store/modules/socket.js +++ b/src/store/modules/socket.js @@ -26,6 +26,9 @@ function handle(state, data) { case 'Simulation_User': // 仿真-聊天界面用户进出仿真消息 handleSimulationUserinfo(state, msg); // 用户进出仿真消息 break; + case 'Simulation_Script_Tip': // 仿真-聊天界面用户进出仿真消息 + handleSimulationScriptTipInfo(state, msg); // 用户进出仿真消息 + break; case 'Simulation_RunFact': // 仿真-列车实际到发车站消息 // let runFactMsg = msg; // if (runFactMsg.constructor !== Array ) { @@ -136,7 +139,6 @@ function handleSimulationInfo(state, data) { if (data.member.userId == userId) { isSelf = true; } - const myDate = new Date(); const myDate1 = myDate.toLocaleDateString().replace(/\//g, '-'); const chatTime = /\d{2}:\d{2}:\d{2}/.exec(data.chatTime)[0] || data.chatTime; @@ -156,61 +158,11 @@ function handleSimulationInfo(state, data) { date: +new Date(`${myDate1} ${chatTime}`) }; state.simulationText = params; - // if (state.coversitionList[data.conversationId]) { - // state.coversitionList[data.conversationId].push(params); - // } else { - // state.coversitionList[data.conversationId] = []; - // state.coversitionList[data.conversationId].push(params); - // } +} - // switch (data.member.role) { - // case '01': - // role = '管理员'; - // break; - // case '02': - // role = '教员'; - // break; - // case '03': - // role = `调度员`; - // break; - // case '04': - // store.state.map.map.stationList.forEach(nor => { - // if (nor.code == data.member.deviceCode) { - // role = `${nor.name}`; - // } - // }); - // break; - // } - // if (!data.member.userId && data.member.deviceName) { - // data.member.nickName = data.member.deviceName; - // } - // if (!data.targetMember.userId && data.targetMember.deviceName) { - // data.targetMember.nickName = data.targetMember.deviceName; - // } - - // const param = { - // join: false, - // value: data.message, - // self: isSelf, - // voice: data.isAudio, - // src: data.isAudio ? `${process.env.process.env.VUE_VOICE_API}/jlcloud/audio/${data.audioPath}` : '', - // other: !isSelf, - // userName: '', - // id: data.member.id, - // chatTime: data.chatTime, - // date: +new Date(`${myDate1} ${chatTime}`), - // conversationId: data.conversationId, - // changeVO: data.changeVO || {}, - // targetMember: data.targetMember, - // member: data.member, - // group: data.group - // }; - // if (data.member.role) { - // param.userName = `${role}【${data.member.nickName}】`; - // } else { - // param.userName = `${data.member.nickName}`; - // } - // state.simulationText = param; +// 剧本提示 +function handleSimulationScriptTipInfo(state, data) { + state.simulationScriptTip = data; } function handleUserinfo(state, data) { @@ -242,6 +194,7 @@ const socket = { chatContent: {}, // 聊天室聊天内容 roleList: [], // 设置角色信息 simulationRoleList:[], // 设置仿真的聊天角色信息 + simulationScriptTip:{}, // 剧本推送提示信息 jointRoomPrepare: false, // 演练房间准备状态 equipmentStatus: [], // 仿真-设备状态消息 trainStationList: [], // 仿真-列车实际到发车站消息 diff --git a/src/views/newMap/displayNew/chatView/chatBox.vue b/src/views/newMap/displayNew/chatView/chatBox.vue index b1aa4d0c6..649939ca4 100644 --- a/src/views/newMap/displayNew/chatView/chatBox.vue +++ b/src/views/newMap/displayNew/chatView/chatBox.vue @@ -19,7 +19,7 @@