From 4ffda4f614ba64173fda8f5867c494e6e35cdacd Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Tue, 16 Aug 2022 17:17:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AE=9E=E8=AE=AD=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=92=8C=E8=AF=AD=E9=9F=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/chat.js | 16 + src/router/index.js | 6 + src/scripts/cmdPlugin/CommandEnum.js | 4 + src/store/modules/socket.js | 3 + src/views/designPlatform/demonList.vue | 24 + src/views/designPlatform/trainingDesign.vue | 168 +++ src/views/newMap/chatView/chatContent.vue | 25 +- src/views/newMap/chatView/voiceChatBox.vue | 1221 +++++++++++++++++ src/views/newMap/displayNew/demonChat.vue | 9 + .../component/covertOperation.js | 23 + .../scriptPreview/scriptButtonGroup.vue | 2 +- .../scriptPreview/scriptPreviewChat.vue | 9 + .../scriptDisplay/scriptRecord/index.vue | 12 +- .../newMap/jointTrainingNew/menuDemon.vue | 5 +- src/views/scriptManage/getAction.vue | 2 +- 15 files changed, 1517 insertions(+), 12 deletions(-) create mode 100644 src/views/designPlatform/trainingDesign.vue create mode 100644 src/views/newMap/chatView/voiceChatBox.vue diff --git a/src/api/chat.js b/src/api/chat.js index 81cedad06..7eaa66243 100644 --- a/src/api/chat.js +++ b/src/api/chat.js @@ -61,3 +61,19 @@ export function sendConversationText (group, id, data) { data }); } +/** 发送会话语音(新接口) */ +export function sendChatAudioBase64 (group, data) { + return request({ + url: `/simulation/${group}/operate/Conversation_Chat_Audio_Base64`, + method: 'post', + data + }); +} +/** 发送会话文字(新接口) */ +export function sendChatText (group, data) { + return request({ + url: `/simulation/${group}/operate/Conversation_Chat_Text`, + method: 'post', + data + }); +} diff --git a/src/router/index.js b/src/router/index.js index 6762baaca..b5087c19a 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,7 @@ const DesignPlatform = () => import('@/views/designPlatform/index'); const MapPreviewNew = () => import('@/views/designPlatform/mapPreviewNew'); const BigScreen = () => import('@/views/designPlatform/bigScreen'); const BigSplitScreen = () => import('@/views/designPlatform/bigSplitScreen'); +const TrainingDesign = () => import('@/views/designPlatform/trainingDesign'); const TestRunplan = () => import('@/views/designPlatform/testRunplan'); const Package = () => import('@/views/package/index'); @@ -478,6 +479,11 @@ export const publicAsyncRoute = [ component: BigSplitScreen, hidden: true }, + { // 实训设计 + path: '/trainingDesign', + component: TrainingDesign, + hidden: true + }, { path: '/jointTrainingNew', component: JointTrainingNew, diff --git a/src/scripts/cmdPlugin/CommandEnum.js b/src/scripts/cmdPlugin/CommandEnum.js index e30f6b585..9616eaa65 100644 --- a/src/scripts/cmdPlugin/CommandEnum.js +++ b/src/scripts/cmdPlugin/CommandEnum.js @@ -472,5 +472,9 @@ export default { CMD_RAIL_FILL_IN_REGISTER: {value: 'RAIL_FILL_IN_REGISTER', label: '填写行车簿册'}, CMD_RAIL_QUERY_REGISTER: {value: 'RAIL_QUERY_REGISTER', label: '查询行车簿册'}, CMD_RAIL_GIVE_TICKET_TO: {value: 'RAIL_GIVE_TICKET_TO', label: '给出票据'} + }, + Conversation: { + CMD_Conversation_Chat_Text: {value: 'Conversation_Chat_Text', label: '发送文本消息'}, + CMD_Conversation_Chat_Audio_Base64: {value: 'Conversation_Chat_Audio_Base64', label: '发送语音消息'} } }; diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js index 1f73bf0fe..02a83329c 100644 --- a/src/store/modules/socket.js +++ b/src/store/modules/socket.js @@ -96,6 +96,9 @@ function handle(state, data) { case 'Simulation_Conversation': // 仿真-用户交互消息(聊天/命令) handleSimulationInfo(state, msg); break; + case 'Simulation_Conversation_Operation': // 仿真-用户交互消息(聊天/命令)-新 + handleSimulationInfo(state, {id: msg.id, message: msg, messageType: 'MESSAGE'}); + break; case 'Simulation_PlayBack_Conversation': // 回放-用户交互消息 handleSimulationInfo(state, msg); break; diff --git a/src/views/designPlatform/demonList.vue b/src/views/designPlatform/demonList.vue index c63aa55d2..db764c81c 100644 --- a/src/views/designPlatform/demonList.vue +++ b/src/views/designPlatform/demonList.vue @@ -27,6 +27,7 @@ import { getSessionStorage, setSessionStorage, removeSessionStorage } from '@/ut import FilterCity from '@/views/components/filterCity'; import localStore from 'storejs'; import { ProjectCode, GetMapListByProjectList } from '@/scripts/ProjectConfig'; +import { createSimulationNew } from '@/api/simulation'; export default { name: 'PublicMapList', @@ -133,6 +134,19 @@ export default { this.$router.push({ path: `/bigSplitScreen/${obj.mapId}` }); break; } + case 'trainingDesign': { + const data = { mapId: obj.mapId, prdType: '01' }; + createSimulationNew(data).then(resp => { + if (this.loadingProjectList.includes(this.project)) { + this.$store.dispatch('app/transitionAnimations'); + } + const query = { ...data, group: resp.data, scriptId: obj.id, lineCode:obj.lineCode}; + this.$router.push({ path: `/trainingDesign`, query }); + }).catch(error => { + this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`); + }); + break; + } } }, async refresh(filterSelect) { @@ -206,6 +220,16 @@ export default { cityCode: elem.cityCode }); this.isAdministrator() ? elem.children.push({id: '8', name: this.$t('designPlatform.lesson3dDesign'), type: 'lesson3dDesign'}) : ''; + elem.children.push( + { + id: '9', + name: '实训设计', + type: 'trainingDesign', + mapId: elem.id, + lineCode: elem.lineCode, + cityCode: elem.cityCode + } + ); }); diff --git a/src/views/designPlatform/trainingDesign.vue b/src/views/designPlatform/trainingDesign.vue new file mode 100644 index 000000000..4f7904ca8 --- /dev/null +++ b/src/views/designPlatform/trainingDesign.vue @@ -0,0 +1,168 @@ + + + diff --git a/src/views/newMap/chatView/chatContent.vue b/src/views/newMap/chatView/chatContent.vue index 68bf4fc04..2b5d953de 100644 --- a/src/views/newMap/chatView/chatContent.vue +++ b/src/views/newMap/chatView/chatContent.vue @@ -7,7 +7,12 @@
{{ covertName(chatContent.memberId) }}
{{ covertTime(chatContent.time) }}
-
+
+
+ {{ chatContent.content }} +
+
+
@@ -20,9 +25,9 @@
-
+