diff --git a/src/api/chat.js b/src/api/chat.js index 1b9c88513..7b493411a 100644 --- a/src/api/chat.js +++ b/src/api/chat.js @@ -49,7 +49,7 @@ export function chatWithText(data, group) { }); } -// 文字聊天 发送文字 +// 文字聊天 发送语音 export function chatWithAudio(file, group) { return request({ url: `/api/jointTraining/chatWithAudio?group=${group}`, @@ -58,6 +58,15 @@ export function chatWithAudio(file, group) { }); } +// 文字聊天 发送语音(新版) +export function chatWithAudioNew(file, group) { + return request({ + url: `/api/v1/jointTraining/chatWithAudio?group=${group}`, + method: 'post', + data: file + }); +} + // 生成分发二维码 export function getJoinTrainCode(data, group) { return request({ diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js index 1a56e4335..fbc3fc740 100644 --- a/src/store/modules/socket.js +++ b/src/store/modules/socket.js @@ -118,7 +118,7 @@ function handleRecordList(state, data) { value: data.message, self: isSelf, voice: data.isAudio, - src: data.isAudio ? `${process.env.process.env.VUE_VOICE_API}/jlcloud/audio/${data.audioPath}` : '', + src: data.isAudio ? `/jlcloud/audio/${data.audioPath}` : '', other: !isSelf, userName: data.member.nickName, chatTime: data.chatTime, diff --git a/src/views/newMap/displayNew/chatView/chatBox.vue b/src/views/newMap/displayNew/chatView/chatBox.vue new file mode 100644 index 000000000..59715e23b --- /dev/null +++ b/src/views/newMap/displayNew/chatView/chatBox.vue @@ -0,0 +1,422 @@ + + + + + + + + + + {{ headerTitle }} + + + + + + + + + + + + + + + + 正在录音... + 确定 + 取消 + + + + + + + + 聊天窗口 + + + + + + + + + diff --git a/src/views/newMap/displayNew/chatView/chatContent.vue b/src/views/newMap/displayNew/chatView/chatContent.vue new file mode 100644 index 000000000..e09b49033 --- /dev/null +++ b/src/views/newMap/displayNew/chatView/chatContent.vue @@ -0,0 +1,199 @@ + + + + + + {{ covertName(chatContent.member) }} + {{ formatTime(chatContent.chatTime) }} + + + + @{{ covertName(chatContent.targetName) }} + + {{ chatContent.message }} + + + + + + + + + diff --git a/src/views/newMap/displayNew/chatView/chatCoversitionList.vue b/src/views/newMap/displayNew/chatView/chatCoversitionList.vue new file mode 100644 index 000000000..30f92ebb8 --- /dev/null +++ b/src/views/newMap/displayNew/chatView/chatCoversitionList.vue @@ -0,0 +1,168 @@ + + + + + {{ coversition.coverName }} + + + + + diff --git a/src/views/newMap/displayNew/chatView/chatMemberList.vue b/src/views/newMap/displayNew/chatView/chatMemberList.vue new file mode 100644 index 000000000..01a0d0b06 --- /dev/null +++ b/src/views/newMap/displayNew/chatView/chatMemberList.vue @@ -0,0 +1,154 @@ + + + 成员列表 + + {{ member.memberName }} + + + + + diff --git a/src/views/newMap/displayNew/chatView/chatSetting.vue b/src/views/newMap/displayNew/chatView/chatSetting.vue new file mode 100644 index 000000000..26e59ac5b --- /dev/null +++ b/src/views/newMap/displayNew/chatView/chatSetting.vue @@ -0,0 +1,126 @@ + + + + 设置 + + + + + + + 语言: + + + + 性别: + + + + + + + + diff --git a/src/views/newMap/displayNew/designIndex.vue b/src/views/newMap/displayNew/designIndex.vue index 5ccf32337..7fb6a0f28 100644 --- a/src/views/newMap/displayNew/designIndex.vue +++ b/src/views/newMap/displayNew/designIndex.vue @@ -5,8 +5,6 @@ - - - - - @@ -54,9 +49,7 @@ import MapSystemDraft from '@/views/newMap/mapsystemNew/index'; import MenuDemon from '@/views/newMap/displayNew/menuDemon'; import MenuSchema from '@/views/newMap/displayNew/menuSchema'; import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime'; -import MenuScript from '@/views/newMap/displayNew/menuScript'; import AddQuest from './demon/addQuest'; -import Scheduling from './demon/scheduling'; import { mapGetters } from 'vuex'; import { setGoodsTryUse } from '@/api/management/goods'; import { clearSimulation, getSimulationInfoNew } from '@/api/simulation'; @@ -80,12 +73,10 @@ export default { AddQuest, MapSystemDraft, MenuDemon, - MenuScript, MenuSchema, MenuSystemTime, - // Jl3dSimulation, - Jl3dDrive, - Scheduling + Jl3dDrive + // Scheduling }, props: { size: { @@ -119,8 +110,7 @@ export default { '04': '02', // 司机 => 行调 '05': '' // 派班 => null }, - isDrive: this.prdType == '04', - isShowScheduling: this.prdType == '05' + isDrive: this.prdType == '04' }; }, computed: { @@ -146,9 +136,6 @@ export default { right() { return this.$store.state.config.width / 2 - 55; }, - trainingId() { - return this.$route.query.trainingId; - }, mapId() { return this.$route.query.mapId; }, @@ -156,24 +143,12 @@ export default { // return this.$route.query.prdType; return this.$store.state.training.prdType; }, - skinCode() { - return this.$route.query.skinCode; - }, - isLesson() { - return this.mode === 'teach' || this.mode === 'manage'; - }, isDemon() { return this.mode === 'demon'; - }, - isScript() { - return this.mode === 'script'; } // isDrive() { // return this.prdType == '04'; // }, - // isShowScheduling() { - // return this.prdType == '05'; - // } }, watch: { '$store.state.config.menuBarLoadedCount': function (val) { @@ -183,19 +158,12 @@ export default { this.mapBoxP = document.getElementById(this.canvasId).children[0]; this.mapBoxP.style.cursor = ''; }, - '$store.state.training.prdType': function(val) { - // this.prdType=val; - this.isDrive = (val == '04'); - this.isShowScheduling = (val == '05'); - }, - '$store.state.socket.permissionOver': function () { - this.$alert('用户权限已被收回', '提示', { - confirmButtonText: '确定', - callback: action => { - this.back(); - } - }); - }, + // '$store.state.training.prdType': function(val) { + // debugger; + // // this.prdType=val; + // this.isDrive = (val == '04'); + // this.isShowScheduling = (val == '05'); + // }, '$store.state.app.windowSizeCount': function() { this.setWindowSize(); }, @@ -322,8 +290,6 @@ export default { await this.loadSimulationInfo(); if (this.isDemon) { await this.initLoadDemonData(); - } else if (this.isScript) { - await this.initLoadTaskData(); } this.checkLoginLineTimer(); this.checkMouseStatusTimer(); @@ -344,18 +310,6 @@ export default { this.endViewLoading(); } }, - // 任务录制系统 - async initLoadTaskData() { - this.$store.dispatch('training/end', TrainingMode.NORMAL); - this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式 - this.switchMode('01'); - - if (this.group) { - await this.loadNewMapDataByGroup(this.group); - } else { - this.endViewLoading(); - } - }, // 加载剧本 async runQuestLoadShow() { this.$refs.addQuest.doShow(); @@ -435,12 +389,8 @@ export default { }, // 仿真错误时,被动退出时调用 async back() { - if (this.isLesson) { - await this.$refs.lessonMenu.back(); - } else if (this.isDemon) { + if (this.isDemon) { await this.$refs.menuDemon.back(); - } else if (this.isScript) { - await this.$refs.menuScript.back(); } }, // 设置使用时间 @@ -491,9 +441,7 @@ export default { this.$nextTick(() => { const width = this.size ? this.size.width : this.width; const height = this.size ? this.size.height : this.height; - this.$store.dispatch('config/resize', { width, height }); - this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode }); }); } diff --git a/src/views/newMap/displayNew/menuDemon.vue b/src/views/newMap/displayNew/menuDemon.vue index 2220e3349..bac94f7e6 100644 --- a/src/views/newMap/displayNew/menuDemon.vue +++ b/src/views/newMap/displayNew/menuDemon.vue @@ -1,5 +1,6 @@ + {{ $t('display.demon.trialTime') }} {{ countTime }} @@ -32,6 +33,7 @@