diff --git a/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js b/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js index 354eb8bbe..9ae34a205 100644 --- a/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js +++ b/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js @@ -230,6 +230,8 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) { for(let i=0,leni=stationlist.length;i { + location.reload(); + }); + } + }, async subscribe() { this.clearSubscribe(); const header = { group: this.$route.query.group || '', 'X-Token': getToken() }; diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 612275fba..706e6ab66 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -432,7 +432,12 @@ export default { }; setSessionStorage('projectDevice', JSON.stringify(res.data.deviceVO)); if (this.$route.query.type == 'LSW') { - this.$router.push({ path: `/bigSplitScreen/${resp.data.map.id}`, query: query }); + const config = JSON.parse(res.data.deviceVO.config); + if (config.quadrant == '99') { + this.$router.push({ path: `/displayBigScreen/${resp.data.map.id}`, query: query }); + } else { + this.$router.push({ path: `/bigSplitScreen/${resp.data.map.id}`, query: query }); + } } else if (this.$route.query.type === 'ISCS_LW' || this.$route.query.type === 'ISCS_CW') { this.$router.push({ path: `/displayIscs/system`, query: { group: res.data.group, diff --git a/src/views/newMap/chatView/chatBox.vue b/src/views/newMap/chatView/chatBox.vue index fab875557..3996e62b9 100644 --- a/src/views/newMap/chatView/chatBox.vue +++ b/src/views/newMap/chatView/chatBox.vue @@ -1,5 +1,5 @@ diff --git a/src/views/newMap/displayNew/chatView/chatBox.vue b/src/views/newMap/displayNew/chatView/chatBox.vue index 57c865cfa..df04e6fcf 100644 --- a/src/views/newMap/displayNew/chatView/chatBox.vue +++ b/src/views/newMap/displayNew/chatView/chatBox.vue @@ -170,10 +170,10 @@ export default { const object = document.querySelector('.menuButton'); if (object) { const objectBottom = object.offsetHeight || 0; - this.bottom = objectBottom + 15; + this.bottom = objectBottom + 15; } else { - this.bottom = 15; - } + this.bottom = 15; + } }, queryMember(val) { if (this.$refs.tree) { diff --git a/src/views/newMap/displayNew/designIndex.vue b/src/views/newMap/displayNew/designIndex.vue index d5718e215..b4c036b1a 100644 --- a/src/views/newMap/displayNew/designIndex.vue +++ b/src/views/newMap/displayNew/designIndex.vue @@ -5,12 +5,11 @@ - +
{{ $t('display.demon.exitScript') }} {{ $t('display.demon.back') }}
- - - + @@ -68,14 +66,6 @@ export default { MenuSystemTime, Jl3dDrive }, - props: { - size: { - type: Object, - default() { - return null; - } - } - }, data() { return { mode: '', @@ -165,6 +155,9 @@ export default { this.showStation = code; } }, + '$store.state.training.prdType':function(val) { + this.setPosition(); + }, // '$store.state.training.prdType': function(val) { // debugger; // // this.prdType=val; @@ -184,14 +177,12 @@ export default { }); } }, - async created() { + created() { this.mode = this.$route.params.mode; this.group = this.$route.query.group || ''; }, async mounted() { - await this.setWindowSize(); await this.initLoadData(); - this.switchMode('01'); }, async beforeDestroy() { await this.clearAllTimer(); @@ -200,32 +191,98 @@ export default { await this.$store.dispatch('map/mapClear'); }, methods: { - // 清除检查在线定时器 - clearAllTimer() { - if (this.ierval) { - clearTimeout(this.ierval); - this.ierval = null; - } - - if (this.checkLine) { - clearTimeout(this.checkLine); - this.checkLine = null; + // 加载地图数据 + async initLoadData() { + this.setWindowSize(); + this.$store.dispatch('training/reset'); + try { + await this.loadSimulationInfo(); + if (this.isDemon) { + await this.initLoadDemonData(); + } + this.checkLoginLineTimer(); + this.checkMouseStatusTimer(); + } catch (error) { + this.$messageBox(`初始化失败: ${error.message}`); + this.endViewLoading(); } }, + setWindowSize() { + this.$nextTick(() => { + const width = this.width; + const height = this.height; + this.$store.dispatch('config/resize', { width, height }); + this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode }); + }); + }, + // 加载仿真信息 + async loadSimulationInfo() { + const resp = await getSimulationInfoNew(this.group); + if (resp && resp.code == 200 && resp.data && !resp.data.dataError) { + this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause); + this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`)); + } else if (resp && resp.code == 200 && resp.data && resp.data.dataError) { + this.dataError = true; + this.$messageBox('此地图数据正在维护中,无法运行!'); + } + }, + + // 仿真系统 + async initLoadDemonData() { + this.$store.dispatch('training/end', TrainingMode.NORMAL); + this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式 + if (this.group) { + await this.loadNewMapDataByGroup(this.group); + this.switchMode('01'); + } else { + this.endViewLoading(); + } + }, + + // 通过id加载地图数据 + async loadNewMapDataByGroup(group) { + try { + await loadNewMapDataByGroup(group); + await this.$store.dispatch('training/setMapDefaultState'); + } catch (error) { + this.$messageBox(`获取地图数据失败: ${error.message}`); + this.endViewLoading(); + } + }, + + // 结束加载状态 + endViewLoading() { + this.$store.dispatch('map/mapClear'); + this.$nextTick(() => { + EventBus.$emit('viewLoading', false); + }); + }, + // 设置检查在线定时器 checkLoginLineTimer() { if (this.checkLine) { - clearTimeout(this.checkLine); + clearInterval(this.checkLine); } - this.checkLine = setInterval(() => { checkLoginLine(); }, 5000 * 60); }, + + // 清除检查在线定时器 + clearAllTimer() { + if (this.ierval) { + clearInterval(this.ierval); + this.ierval = null; + } + if (this.checkLine) { + clearInterval(this.checkLine); + this.checkLine = null; + } + }, // 设置手标显示状态 checkMouseStatusTimer() { if (this.ierval) { - clearTimeout(this.ierval); + clearInterval(this.ierval); } this.ierval = setInterval(() => { if (this.mouseNum) { @@ -249,77 +306,15 @@ export default { }, setPosition() { this.$nextTick(() => { - let offset = 15; - let offsetBottom = 15; + this.offset = 15; + this.offsetBottom = 15; const menuBar = document.getElementById('menuBar'); const menuTool = document.getElementById('menuTool'); const menuBottom = document.getElementById('menuButton'); - if (menuBar) { - offset += (menuBar.offsetHeight || 0); - } - if (menuTool) { - offset += (menuTool.offsetHeight || 0); - } - if (menuBottom) { - offsetBottom += (menuBottom.offsetHeight || 0); - } - - if (this.offset != offset) { - this.offset = offset; - } - if (this.offsetBottom != offsetBottom) { - this.offsetBottom = offsetBottom; - } + this.offset = this.offset + (menuBar ? menuBar.offsetHeight || 0 : 0) + (menuTool ? menuTool.offsetHeight || 0 : 0); + this.offsetBottom = this.offsetBottom + (menuBottom ? menuBottom.offsetHeight || 0 : 0); }); }, - // 结束加载状态 - endViewLoading(isSuccess) { - if (!isSuccess) { - this.$store.dispatch('map/mapClear'); - } - - this.$nextTick(() => { - EventBus.$emit('viewLoading', false); - }); - }, - // 加载仿真信息 - async loadSimulationInfo() { - const resp = await getSimulationInfoNew(this.group); - if (resp && resp.code == 200 && resp.data && !resp.data.dataError) { - this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause); - this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`)); - } else if (resp && resp.code == 200 && resp.data && resp.data.dataError) { - this.dataError = true; - this.$messageBox('此地图数据正在维护中,无法运行!'); - } - }, - // 加载地图数据 - async initLoadData() { - this.$store.dispatch('training/reset'); - try { - await this.loadSimulationInfo(); - if (this.isDemon) { - await this.initLoadDemonData(); - } - this.checkLoginLineTimer(); - this.checkMouseStatusTimer(); - } catch (error) { - this.$messageBox(`初始化失败: ${error.message}`); - this.endViewLoading(); - } - }, - // 仿真系统 - async initLoadDemonData() { - this.$store.dispatch('training/end', TrainingMode.NORMAL); - this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式 - // this.$store.dispatch('training/setPrdType', this.prdTypeMap[this.prdType]); - - if (this.group) { - await this.loadNewMapDataByGroup(this.group); - } else { - this.endViewLoading(); - } - }, async back() { await clearSimulation(this.group); this.$store.dispatch('training/over').then(() => { @@ -340,6 +335,8 @@ export default { } else { this.userRole = 'AUDIENCE'; } + + // 以下待优化 const memberList = this.$store.state.training.memberData; if (data.id) { memberList[data.id].userId = this.$store.state.user.id; @@ -422,7 +419,7 @@ export default { children: maintainerList }]; this.memberData = lastMemberList; - + // 以上待优化 }, // 退出剧本 handleQuitQuest() { @@ -432,7 +429,7 @@ export default { this.isscriptRun = false; this.$store.dispatch('scriptRecord/updateSimulationPause', false); this.userRole = ''; - // this.$refs.chatbox.clearAllData(); + this.$refs.chatbox.clearAllData(); }).catch(()=>{ this.$messageBox(this.$t('display.demon.exitTaskFail')); }); @@ -443,18 +440,6 @@ export default { this.$messageBox(this.$t('display.demon.exitTaskFail')); }); }, - - // 通过id加载地图数据 - async loadNewMapDataByGroup(group) { - try { - await loadNewMapDataByGroup(group); - await this.$store.dispatch('training/setMapDefaultState'); - } catch (error) { - this.$messageBox(`获取地图数据失败: ${error.message}`); - this.endViewLoading(); - } - }, - // 销毁仿真 async quit() { await clearSimulation(this.group); @@ -463,39 +448,31 @@ export default { switchMode(prdType) { this.$store.dispatch('training/setPrdType', prdType); }, - hidepanel() { - if (this.isDrive) { - this.panelShow = false; - this.drivingShow = true; - this.$refs.Jl3dDrive.show(this.mapId, this.group); - } else { - this.panelShow = false; - this.simulationShow = true; - this.$refs.Jl3dSimulation.show(this.mapId, this.group); - } - }, - showpanel() { - this.panelShow = true; - this.simulationShow = false; - }, - showdriving() { - this.panelShow = true; - this.drivingShow = false; - }, + // hidepanel() { + // if (this.isDrive) { + // this.panelShow = false; + // this.drivingShow = true; + // this.$refs.Jl3dDrive.show(this.mapId, this.group); + // } else { + // this.panelShow = false; + // this.simulationShow = true; + // this.$refs.Jl3dSimulation.show(this.mapId, this.group); + // } + // }, + // showpanel() { + // this.panelShow = true; + // this.simulationShow = false; + // }, + // showdriving() { + // this.panelShow = true; + // this.drivingShow = false; + // }, runPlanViewShow() { this.$refs.runPlanView.doShow(); }, runPlanLoadShow() { this.$refs.runPlanLoad.doShow(); }, - setWindowSize() { - 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 }); - }); - }, switchStationMode(val) { if (val == null && this.stationList.length > 0) { this.showStation = this.stationList[0].value; diff --git a/src/views/newMap/displayNew/scriptPreviewChat.vue b/src/views/newMap/displayNew/scriptPreviewChat.vue index c151e2027..8429b1014 100644 --- a/src/views/newMap/displayNew/scriptPreviewChat.vue +++ b/src/views/newMap/displayNew/scriptPreviewChat.vue @@ -4,12 +4,16 @@ :group="group" :is-show="isShow" :tree-data="treeData" + :offset-bottom="offsetBottom" :conversition-id="conversitionId" :current-member-list="currentMemberList" :chat-content-list="chatContentList" :script-tip="scriptTip" :is-start-record="isStartRecord" + :invite-user-name="inviteUserName" + :is-quit-show="isQuitShow" @setScriptTip="setScriptTip" + @resetCoversition="resetCoversition" />