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 @@
+
+