From d15328de57d0bd3f94fa17ca6d73e773151a6fd1 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Fri, 31 Jul 2020 15:24:44 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E7=BB=98=E5=88=B6=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/jsxt/refereeList/display.vue | 26 +-------- .../newMap/displayNew/demon/faultChoose.vue | 4 -- src/views/newMap/displayNew/designIndex.vue | 38 ++++++------- src/views/newMap/displayNew/index.vue | 15 +++--- src/views/newMap/displayNew/menuDemon.vue | 25 ++++----- src/views/newMap/displayNew/menuPractice.vue | 9 ---- src/views/newMap/displayNew/menuSchema.vue | 53 ++++++++----------- src/views/newMap/displayNew/menuScript.vue | 8 --- src/views/newMap/jlmapNew/index.vue | 1 - .../newMap/jlmapNew/pendant/showMode.vue | 4 +- .../newMap/jlmapNew/pendant/switchStation.vue | 4 +- src/views/newMap/jlmapNew/pendant/zoom.vue | 14 ++--- src/views/newMap/jointTrainingNew/index.vue | 2 +- .../newMap/jointTrainingNew/menuDemon.vue | 14 +++-- src/views/scriptManage/home.vue | 4 +- .../scriptManage/scriptRecord/addRole.vue | 9 ---- 16 files changed, 83 insertions(+), 147 deletions(-) diff --git a/src/views/jsxt/refereeList/display.vue b/src/views/jsxt/refereeList/display.vue index 6d21f9c05..0b10d41a1 100644 --- a/src/views/jsxt/refereeList/display.vue +++ b/src/views/jsxt/refereeList/display.vue @@ -16,7 +16,7 @@ import { checkLoginLine } from '@/api/login'; import { EventBus } from '@/scripts/event-bus'; import MenuReplay from './menuReplay'; import { getToken } from '@/utils/auth'; -import { DeviceMenu, getDeviceMenuByDeviceType } from '@/scripts/ConstDic'; +import { getDeviceMenuByDeviceType } from '@/scripts/ConstDic'; import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp'; export default { name:'RefereeDisplay', @@ -151,7 +151,6 @@ export default { async initLoadData() { this.$store.dispatch('training/reset'); try { - // await this.loadSimulationInfo(); await this.initLoadRecordData(); this.checkLoginLineTimer(); } catch (error) { @@ -219,29 +218,6 @@ export default { this.endViewLoading(); } }, - // 加载仿真信息 - // async loadSimulationInfo() { - // this.dataError = false; - // 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.questId = Number(resp.data.questId) || 0; - // this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`)); - // if (resp.data.planRunning) { - // this.planRunning = resp.data.planRunning; - // } else { - // this.$store.dispatch('training/over'); - // } - // if (this.isDemon) { - // this.$refs.menuDemon.initPlannedDriving(resp.data.planRunning); - // } else if (this.isScript) { - // this.$refs.menuScript.initPlannedDriving(resp.data.planRunning); - // } - // } else if (resp && resp.code == 200 && resp.data && resp.data.dataError) { - // this.dataError = true; - // this.$messageBox('此地图数据正在维护中,无法运行!'); - // } - // }, setWindowSize() { this.$nextTick(() => { const width = this.width; diff --git a/src/views/newMap/displayNew/demon/faultChoose.vue b/src/views/newMap/displayNew/demon/faultChoose.vue index 09d9297e9..55b62d0da 100644 --- a/src/views/newMap/displayNew/demon/faultChoose.vue +++ b/src/views/newMap/displayNew/demon/faultChoose.vue @@ -141,10 +141,6 @@ export default { } }, watch:{ - // $store.state.config.menuBarLoadedCount - // 'offset': function (val) { - // this.dialogShow && this.dragEvent(); - // }, '$store.state.socket.autoFaultTrigger':function(val) { this.dialogShow && this.getSimulationFaultRules(); } diff --git a/src/views/newMap/displayNew/designIndex.vue b/src/views/newMap/displayNew/designIndex.vue index e748d649c..10f4438d3 100644 --- a/src/views/newMap/displayNew/designIndex.vue +++ b/src/views/newMap/displayNew/designIndex.vue @@ -52,7 +52,7 @@ import Cookies from 'js-cookie'; // 三维 // import Jl3dSimulation from '@/views/jlmap3d/simulation/jl3dsimulation'; -import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive'; +// import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive'; import { timeFormat } from '@/utils/date'; export default { @@ -63,8 +63,8 @@ export default { ScriptPreviewChat, MapSystemDraft, MenuSchema, - MenuSystemTime, - Jl3dDrive + MenuSystemTime + // Jl3dDrive }, data() { return { @@ -100,8 +100,8 @@ export default { 'canvasHeight' ]), ...mapGetters('map', [ - 'map', - 'stationList' + 'map', + 'stationList' ]), // ...mapGetters('training', [ // 'offsetStationCode' @@ -146,8 +146,8 @@ export default { } }, '$store.state.training.prdType':function(val) { - this.setPosition(); - this.setMode(); + this.setPosition(); + this.setMode(); }, // '$store.state.training.prdType': function(val) { // debugger; @@ -160,7 +160,7 @@ export default { }, 'stationList': function () { this.setStationList(); - }, + }, $route() { // this.$nextTick(() => { this.initLoadData(); @@ -246,11 +246,11 @@ export default { }, setPosition() { this.$nextTick(() => { - const menuBar = document.getElementById('menuBar'); - const menuTool = document.getElementById('menuTool'); - const menuBottom = document.getElementById('menuButton'); - this.offset = 15 + (menuBar ? menuBar.offsetHeight || 0 : 0) + (menuTool ? menuTool.offsetHeight || 0 : 0); - this.offsetBottom = 15 + (menuBottom ? menuBottom.offsetHeight || 0 : 0); + const menuBar = document.getElementById('menuBar'); + const menuTool = document.getElementById('menuTool'); + const menuBottom = document.getElementById('menuButton'); + this.offset = 15 + (menuBar ? menuBar.offsetHeight || 0 : 0) + (menuTool ? menuTool.offsetHeight || 0 : 0); + this.offsetBottom = 15 + (menuBottom ? menuBottom.offsetHeight || 0 : 0); }); }, async back() { @@ -295,8 +295,8 @@ export default { lastData = Object.values(lastData); const lastMemberList = []; const dispatcherList = []; - const electricDispatcherList = []; - const depotDispatcherList = []; + // const electricDispatcherList = []; + // const depotDispatcherList = []; const stationSupervisorList = []; const driverList = []; const maintainerList = []; @@ -386,10 +386,10 @@ export default { }, switchMode(prdType) { this.$store.dispatch('training/setPrdType', prdType); - }, - setMode() { - this.showSelectStation = this.$store.state.map.map.skinVO.code === '06' && this.$store.state.training.prdType === '01'; - }, + }, + setMode() { + this.showSelectStation = this.$store.state.map.map.skinVO.code === '06' && this.$store.state.training.prdType === '01'; + }, // hidepanel() { // if (this.isDrive) { // this.panelShow = false; diff --git a/src/views/newMap/displayNew/index.vue b/src/views/newMap/displayNew/index.vue index a739dfc37..e71f59ed3 100644 --- a/src/views/newMap/displayNew/index.vue +++ b/src/views/newMap/displayNew/index.vue @@ -12,12 +12,14 @@ :offset-bottom="offsetBottom" :data-error="dataError" :script-id="scriptId" + :show-station="showStation" @hidepanel="hidepanel" @passflow="passflow" @quitQuest="quitQuest" @jl3dstation="jl3dstation" @devicemodel="devicemodel" @showScheduling="showScheduling" + @switchStationMode="switchStationMode" /> { + getSimulationMemberList(this.$route.query.group).then(resp => { // 单人仿真获取人员列表 this.$store.dispatch('training/setMemberList', {memberList:resp.data, userId: this.$store.state.user.id}); }).catch(() => { this.$messageBox('获取仿真成员列表失败!'); @@ -372,11 +373,11 @@ export default { this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`)); this.planRunning = resp.data.planRunning; this.$store.dispatch('map/setRunPlanStatus', this.planRunning); - if (!resp.data.planRunning) { + if (!this.planRunning) { this.$store.dispatch('training/over'); } if (this.isDemon) { - this.$refs.menuDemon.initPlannedDriving(resp.data.planRunning); + this.$refs.menuDemon.initPlannedDriving(this.planRunning); // 是否正在按计划行车 } else if (this.isScript) { // this.$refs.menuScript.initPlannedDriving(resp.data.planRunning); } diff --git a/src/views/newMap/displayNew/menuDemon.vue b/src/views/newMap/displayNew/menuDemon.vue index 1475ca793..de7334ec7 100644 --- a/src/views/newMap/displayNew/menuDemon.vue +++ b/src/views/newMap/displayNew/menuDemon.vue @@ -11,12 +11,11 @@ {{ projectDevice?'退出':$t('display.demon.back') }}