调整地图绘制流程
This commit is contained in:
parent
ea333e6c6d
commit
d15328de57
@ -16,7 +16,7 @@ import { checkLoginLine } from '@/api/login';
|
|||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
import MenuReplay from './menuReplay';
|
import MenuReplay from './menuReplay';
|
||||||
import { getToken } from '@/utils/auth';
|
import { getToken } from '@/utils/auth';
|
||||||
import { DeviceMenu, getDeviceMenuByDeviceType } from '@/scripts/ConstDic';
|
import { getDeviceMenuByDeviceType } from '@/scripts/ConstDic';
|
||||||
import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp';
|
import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp';
|
||||||
export default {
|
export default {
|
||||||
name:'RefereeDisplay',
|
name:'RefereeDisplay',
|
||||||
@ -151,7 +151,6 @@ export default {
|
|||||||
async initLoadData() {
|
async initLoadData() {
|
||||||
this.$store.dispatch('training/reset');
|
this.$store.dispatch('training/reset');
|
||||||
try {
|
try {
|
||||||
// await this.loadSimulationInfo();
|
|
||||||
await this.initLoadRecordData();
|
await this.initLoadRecordData();
|
||||||
this.checkLoginLineTimer();
|
this.checkLoginLineTimer();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -219,29 +218,6 @@ export default {
|
|||||||
this.endViewLoading();
|
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() {
|
setWindowSize() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
const width = this.width;
|
const width = this.width;
|
||||||
|
@ -141,10 +141,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
// $store.state.config.menuBarLoadedCount
|
|
||||||
// 'offset': function (val) {
|
|
||||||
// this.dialogShow && this.dragEvent();
|
|
||||||
// },
|
|
||||||
'$store.state.socket.autoFaultTrigger':function(val) {
|
'$store.state.socket.autoFaultTrigger':function(val) {
|
||||||
this.dialogShow && this.getSimulationFaultRules();
|
this.dialogShow && this.getSimulationFaultRules();
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ import Cookies from 'js-cookie';
|
|||||||
|
|
||||||
// 三维
|
// 三维
|
||||||
// import Jl3dSimulation from '@/views/jlmap3d/simulation/jl3dsimulation';
|
// 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';
|
import { timeFormat } from '@/utils/date';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -63,8 +63,8 @@ export default {
|
|||||||
ScriptPreviewChat,
|
ScriptPreviewChat,
|
||||||
MapSystemDraft,
|
MapSystemDraft,
|
||||||
MenuSchema,
|
MenuSchema,
|
||||||
MenuSystemTime,
|
MenuSystemTime
|
||||||
Jl3dDrive
|
// Jl3dDrive
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -295,8 +295,8 @@ export default {
|
|||||||
lastData = Object.values(lastData);
|
lastData = Object.values(lastData);
|
||||||
const lastMemberList = [];
|
const lastMemberList = [];
|
||||||
const dispatcherList = [];
|
const dispatcherList = [];
|
||||||
const electricDispatcherList = [];
|
// const electricDispatcherList = [];
|
||||||
const depotDispatcherList = [];
|
// const depotDispatcherList = [];
|
||||||
const stationSupervisorList = [];
|
const stationSupervisorList = [];
|
||||||
const driverList = [];
|
const driverList = [];
|
||||||
const maintainerList = [];
|
const maintainerList = [];
|
||||||
|
@ -12,12 +12,14 @@
|
|||||||
:offset-bottom="offsetBottom"
|
:offset-bottom="offsetBottom"
|
||||||
:data-error="dataError"
|
:data-error="dataError"
|
||||||
:script-id="scriptId"
|
:script-id="scriptId"
|
||||||
|
:show-station="showStation"
|
||||||
@hidepanel="hidepanel"
|
@hidepanel="hidepanel"
|
||||||
@passflow="passflow"
|
@passflow="passflow"
|
||||||
@quitQuest="quitQuest"
|
@quitQuest="quitQuest"
|
||||||
@jl3dstation="jl3dstation"
|
@jl3dstation="jl3dstation"
|
||||||
@devicemodel="devicemodel"
|
@devicemodel="devicemodel"
|
||||||
@showScheduling="showScheduling"
|
@showScheduling="showScheduling"
|
||||||
|
@switchStationMode="switchStationMode"
|
||||||
/>
|
/>
|
||||||
<menu-lesson
|
<menu-lesson
|
||||||
v-if="isLesson"
|
v-if="isLesson"
|
||||||
@ -212,7 +214,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.config.menuBarLoadedCount': function (val) {
|
'$store.state.config.menuBarLoadedCount': function (val) { // menuBar加载完成
|
||||||
this.setPosition();
|
this.setPosition();
|
||||||
},
|
},
|
||||||
'$store.state.training.prdType': function (val) { // 根据权限类型计算高度
|
'$store.state.training.prdType': function (val) { // 根据权限类型计算高度
|
||||||
@ -356,10 +358,9 @@ export default {
|
|||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 加载仿真信息
|
// 新版地图根据仿真group获取仿真基础信息
|
||||||
async loadSimulationInfo() {
|
async loadSimulationInfo() {
|
||||||
// 单人仿真获取人员列表
|
getSimulationMemberList(this.$route.query.group).then(resp => { // 单人仿真获取人员列表
|
||||||
getSimulationMemberList(this.$route.query.group).then(resp => {
|
|
||||||
this.$store.dispatch('training/setMemberList', {memberList:resp.data, userId: this.$store.state.user.id});
|
this.$store.dispatch('training/setMemberList', {memberList:resp.data, userId: this.$store.state.user.id});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox('获取仿真成员列表失败!');
|
this.$messageBox('获取仿真成员列表失败!');
|
||||||
@ -372,11 +373,11 @@ export default {
|
|||||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
|
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
|
||||||
this.planRunning = resp.data.planRunning;
|
this.planRunning = resp.data.planRunning;
|
||||||
this.$store.dispatch('map/setRunPlanStatus', this.planRunning);
|
this.$store.dispatch('map/setRunPlanStatus', this.planRunning);
|
||||||
if (!resp.data.planRunning) {
|
if (!this.planRunning) {
|
||||||
this.$store.dispatch('training/over');
|
this.$store.dispatch('training/over');
|
||||||
}
|
}
|
||||||
if (this.isDemon) {
|
if (this.isDemon) {
|
||||||
this.$refs.menuDemon.initPlannedDriving(resp.data.planRunning);
|
this.$refs.menuDemon.initPlannedDriving(this.planRunning); // 是否正在按计划行车
|
||||||
} else if (this.isScript) {
|
} else if (this.isScript) {
|
||||||
// this.$refs.menuScript.initPlannedDriving(resp.data.planRunning);
|
// this.$refs.menuScript.initPlannedDriving(resp.data.planRunning);
|
||||||
}
|
}
|
||||||
|
@ -11,12 +11,11 @@
|
|||||||
<el-button type="primary" size="small" @click="back">{{ projectDevice?'退出':$t('display.demon.back') }}</el-button>
|
<el-button type="primary" size="small" @click="back">{{ projectDevice?'退出':$t('display.demon.back') }}</el-button>
|
||||||
<template v-if="!dataError">
|
<template v-if="!dataError">
|
||||||
<template v-if="isShowQuest">
|
<template v-if="isShowQuest">
|
||||||
<!-- && !isDesignPlatform -->
|
<el-button v-if="!isDesignPlatform" type="danger" size="small" @click="handleQuitQuest">退出剧本</el-button>
|
||||||
<el-button v-if="!isDesignPlatform" type="danger" size="small" @click="handleQuitQuest">{{ $t('display.demon.exitScript') }}</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="!projectDevice">
|
<template v-else-if="!projectDevice">
|
||||||
<el-button type="danger" size="small" @click="end">{{ $t('display.demon.initialize') }}</el-button>
|
<el-button type="danger" size="small" @click="end">{{ $t('display.demon.initialize') }}</el-button>
|
||||||
<el-button type="success" :disabled="isDisable || dataError" size="small" @click="selectBeginTime">{{ $t('display.demon.drivingByPlan') }}</el-button>
|
<el-button type="success" :disabled="isDisable" size="small" @click="selectBeginTime">{{ $t('display.demon.drivingByPlan') }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
<!-- 设备视图 -->
|
<!-- 设备视图 -->
|
||||||
<el-button v-if="isShow3dmodel && !isShowScheduling" size="small" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button>
|
<el-button v-if="isShow3dmodel && !isShowScheduling" size="small" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button>
|
||||||
@ -67,6 +66,12 @@ export default {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
showStation: {
|
||||||
|
type: String,
|
||||||
|
default() {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
},
|
||||||
dataError: {
|
dataError: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default() {
|
default() {
|
||||||
@ -129,13 +134,6 @@ export default {
|
|||||||
'$store.state.training.subscribeCount': function () {
|
'$store.state.training.subscribeCount': function () {
|
||||||
this.group && this.initLoadPage();
|
this.group && this.initLoadPage();
|
||||||
},
|
},
|
||||||
'$store.state.socket.tipOperateCount': function (val) {
|
|
||||||
this.$alert(this.$t('display.demon.taskOperateSuccess'), this.$t('global.tips'), {
|
|
||||||
confirmButtonText: this.$t('global.confirm'),
|
|
||||||
callback: action => {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
'$store.state.socket.simulationRoleList':function(val) {
|
'$store.state.socket.simulationRoleList':function(val) {
|
||||||
(val || []).forEach(item => {
|
(val || []).forEach(item => {
|
||||||
if (item.messageType === 'KICK_OUT' && item.userId == this.$store.state.user.id) {
|
if (item.messageType === 'KICK_OUT' && item.userId == this.$store.state.user.id) {
|
||||||
@ -192,7 +190,7 @@ export default {
|
|||||||
selectBeginTime() {
|
selectBeginTime() {
|
||||||
this.$refs.setTime.doShow();
|
this.$refs.setTime.doShow();
|
||||||
},
|
},
|
||||||
start(model) {
|
start(model) { // 开始仿真
|
||||||
this.isDisable = true;
|
this.isDisable = true;
|
||||||
const data = {
|
const data = {
|
||||||
time: model.initTime
|
time: model.initTime
|
||||||
@ -205,6 +203,9 @@ export default {
|
|||||||
this.$store.dispatch('map/setRunPlanStatus', true);
|
this.$store.dispatch('map/setRunPlanStatus', true);
|
||||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
|
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
|
||||||
this.$store.dispatch('map/setShowCentralizedStationNum');
|
this.$store.dispatch('map/setShowCentralizedStationNum');
|
||||||
|
if (this.$route.query.lineCode == '06') {
|
||||||
|
this.$emit('switchStationMode', this.showStation); // 宁波线 过滤列车显示
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.isDisable = false;
|
this.isDisable = false;
|
||||||
@ -249,7 +250,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleQuitQuest() {
|
handleQuitQuest() {
|
||||||
quitScriptNew(this.group).then(resp => {
|
quitScriptNew(this.group).then(resp => {
|
||||||
getSimulationInfoNew(this.group).then(()=>{
|
getSimulationInfoNew(this.group).then((res)=>{
|
||||||
this.quitQuest();
|
this.quitQuest();
|
||||||
this.initLoadPage();
|
this.initLoadPage();
|
||||||
this.clearAllData();
|
this.clearAllData();
|
||||||
|
@ -10,8 +10,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="practice-bottom" :style="{bottom: offsetBottom + 'px'}">
|
<div class="practice-bottom" :style="{bottom: offsetBottom + 'px'}">
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<!-- v-if="!isScriptCommand" -->
|
|
||||||
<!-- v-if="!isScriptCommand" -->
|
|
||||||
<el-button type="success" :disabled="isDisable || dataError" @click="selectBeginTime">按计划行车</el-button>
|
<el-button type="success" :disabled="isDisable || dataError" @click="selectBeginTime">按计划行车</el-button>
|
||||||
<el-button type="danger" :disabled="dataError" @click="end">初始化</el-button>
|
<el-button type="danger" :disabled="dataError" @click="end">初始化</el-button>
|
||||||
<el-button type="primary" @click="back">返回</el-button>
|
<el-button type="primary" @click="back">返回</el-button>
|
||||||
@ -98,14 +96,7 @@ export default {
|
|||||||
this.isDisable = true;
|
this.isDisable = true;
|
||||||
const data = {
|
const data = {
|
||||||
time: model.initTime
|
time: model.initTime
|
||||||
// loadNumber:this.trainList.length
|
|
||||||
};
|
};
|
||||||
// const data = {
|
|
||||||
// time: model.initTime
|
|
||||||
// };
|
|
||||||
// if (this.$route.query.prdType === '04') {
|
|
||||||
// data.loadNumber = model.loadNum;
|
|
||||||
// }
|
|
||||||
ranAsPlan(data, this.group).then(res => {
|
ranAsPlan(data, this.group).then(res => {
|
||||||
this.$store.dispatch('training/simulationStart').then(() => {
|
this.$store.dispatch('training/simulationStart').then(() => {
|
||||||
this.$store.dispatch('map/setRunPlanStatus', true);
|
this.$store.dispatch('map/setRunPlanStatus', true);
|
||||||
|
@ -1,28 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="schema" :style="{top: offset+'px'}">
|
<div class="schema" :style="{top: offset+'px'}">
|
||||||
<!-- (isScript&&!isScriptCommand) || -->
|
|
||||||
<el-select v-if="isDesignPlatform" v-model="swch" size="small" :placeholder="$t('display.schema.selectProduct')" @change="switchMode">
|
<el-select v-if="isDesignPlatform" v-model="swch" size="small" :placeholder="$t('display.schema.selectProduct')" @change="switchMode">
|
||||||
<el-option v-for="item in swchList" :key="item.value" :label="item.name" :value="item.value" />
|
<el-option v-for="item in swchList" :key="item.value" :label="item.name" :value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<!-- showSelectStation&&((!isScriptCommand&&swch=='01')||(isScriptCommand && isLocalStation)) -->
|
|
||||||
<el-select v-if="showSelectStation && isLocalStation && !isScript" v-model="showStationContent" style="width: 100px;" size="small" @change="switchStationModeInfo">
|
<el-select v-if="showSelectStation && isLocalStation && !isScript" v-model="showStationContent" style="width: 100px;" size="small" @change="switchStationModeInfo">
|
||||||
<el-option v-for="item in stationList" :key="item.value" :label="item.name" :value="item.value" />
|
<el-option v-for="item in stationList" :key="item.value" :label="item.name" :value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
|
<template v-if="!dataError">
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button v-if="isDemon && isDesignPlatform && !dataError" size="small" :disabled="viewDisabled" type="success" @click="viewScriptRoles">{{ $t('display.schema.selectRoles') }}</el-button>
|
<el-button v-if="isDemon && isDesignPlatform" size="small" :disabled="viewDisabled" type="success" @click="viewScriptRoles">{{ $t('display.schema.selectRoles') }}</el-button>
|
||||||
<!-- 加载剧本 -->
|
<!-- 加载剧本 -->
|
||||||
<el-button v-if="isDemon && !isDesignPlatform && !isScheduling && !dataError" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">{{ $t('display.schema.loadScript') }}</el-button>
|
<el-button v-if="isDemon && !isDesignPlatform && !isScheduling" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">{{ $t('display.schema.loadScript') }}</el-button>
|
||||||
<!-- 运行图加载 -->
|
<!-- 运行图加载 -->
|
||||||
<el-button v-if="notScript && runing && !dataError" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
|
<el-button v-if="notScript && runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
|
||||||
<el-button v-if="!runing && notScript && !dataError" size="small" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
|
<el-button v-if="notScript && !runing" size="small" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
|
||||||
<el-button v-if="mode==OperateMode.FAULT && !dataError" size="small" type="danger" @click="setFault">自动故障设置</el-button>
|
<el-button v-if="mode==OperateMode.FAULT" size="small" type="danger" @click="setFault">自动故障设置</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
<el-radio-group v-if="!isScheduling" v-model="mode" size="small" @change="changeOperateMode(mode)">
|
||||||
<el-radio-group v-if="!isScheduling && !dataError" v-model="mode" size="small" @change="changeOperateMode(mode)">
|
|
||||||
<el-radio-button class="mode" :label="OperateMode.NORMAL">{{ $t('display.schema.normalOperation') }}</el-radio-button>
|
<el-radio-button class="mode" :label="OperateMode.NORMAL">{{ $t('display.schema.normalOperation') }}</el-radio-button>
|
||||||
<el-radio-button class="mode" :label="OperateMode.FAULT">故障模式</el-radio-button>
|
<el-radio-button class="mode" :label="OperateMode.FAULT">故障模式</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<fault-choose v-if="isDemon || isScript" ref="faultChoose" :group="group" :offset="offset" />
|
<fault-choose v-if="isDemon || isScript" ref="faultChoose" :group="group" :offset="offset" />
|
||||||
<run-plan-Load ref="runPlanLoad" :group="group" />
|
<run-plan-Load ref="runPlanLoad" :group="group" />
|
||||||
@ -36,9 +35,7 @@ import RunPlanLoad from './demon/runPlanLoad';
|
|||||||
import RunPlanView from './demon/runPlanView';
|
import RunPlanView from './demon/runPlanView';
|
||||||
import FaultChoose from './demon/faultChoose';
|
import FaultChoose from './demon/faultChoose';
|
||||||
import AddQuest from './demon/addQuest';
|
import AddQuest from './demon/addQuest';
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
import { OperateMode } from '@/scripts/ConstDic';
|
||||||
// import { getStationList } from '@/api/runplan';
|
|
||||||
import { getByGroupStationList } from '@/api/jmap/map';
|
import { getByGroupStationList } from '@/api/jmap/map';
|
||||||
import {loadDraftScript, loadDraftScriptNew} from '@/api/designPlatform';
|
import {loadDraftScript, loadDraftScriptNew} from '@/api/designPlatform';
|
||||||
import { getEveryDayRunPlanNew, loadScriptNew } from '@/api/simulation';
|
import { getEveryDayRunPlanNew, loadScriptNew } from '@/api/simulation';
|
||||||
@ -99,9 +96,6 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('runPlan', [
|
|
||||||
'stations'
|
|
||||||
]),
|
|
||||||
group() {
|
group() {
|
||||||
return this.$route.query.group;
|
return this.$route.query.group;
|
||||||
},
|
},
|
||||||
@ -134,9 +128,8 @@ export default {
|
|||||||
},
|
},
|
||||||
'$store.state.training.switchcount': async function () {
|
'$store.state.training.switchcount': async function () {
|
||||||
if (this.group) {
|
if (this.group) {
|
||||||
const started = this.$store.state.training.started;
|
if (this.$store.state.training.started) {
|
||||||
if (started) {
|
await this.loadRunData();
|
||||||
await this.loadRunData(this.$route.query);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -154,17 +147,17 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
await this.loadRunData(this.$route.query);
|
await this.loadRunData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadRunData(opt) {
|
loadRunData() {
|
||||||
this.$store.dispatch('runPlan/clear').then(() => {
|
this.$store.dispatch('runPlan/clear').then(() => {
|
||||||
if (opt && opt.mapId) {
|
if (this.group) {
|
||||||
this.viewDisabled = true;
|
this.viewDisabled = true;
|
||||||
getByGroupStationList(this.$route.query.group).then(response => {
|
// 获取排序的车站列表
|
||||||
// getStationList(opt.mapId).then(response => {
|
getByGroupStationList(this.group).then(response => {
|
||||||
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
|
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
|
||||||
getEveryDayRunPlanNew(this.group).then(resp => {
|
getEveryDayRunPlanNew(this.group).then(resp => { // 获取仿真运行图
|
||||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||||
this.$store.dispatch('runPlan/setInitialPlanData', resp.data);
|
this.$store.dispatch('runPlan/setInitialPlanData', resp.data);
|
||||||
this.viewDisabled = false;
|
this.viewDisabled = false;
|
||||||
|
@ -46,7 +46,6 @@ export default {
|
|||||||
return {
|
return {
|
||||||
isDisable: false,
|
isDisable: false,
|
||||||
isScriptCommand:false
|
isScriptCommand:false
|
||||||
// isSaveStage: true,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -91,14 +90,7 @@ export default {
|
|||||||
this.isDisable = true;
|
this.isDisable = true;
|
||||||
const data = {
|
const data = {
|
||||||
time: model.initTime
|
time: model.initTime
|
||||||
// loadNumber:this.trainList.length
|
|
||||||
};
|
};
|
||||||
// const data = {
|
|
||||||
// time: model.initTime
|
|
||||||
// };
|
|
||||||
// if (this.$route.query.prdType === '04') {
|
|
||||||
// data.loadNumber = model.loadNum;
|
|
||||||
// }
|
|
||||||
ranAsPlan(data, this.group).then(res => {
|
ranAsPlan(data, this.group).then(res => {
|
||||||
this.$store.dispatch('training/simulationStart').then(() => {
|
this.$store.dispatch('training/simulationStart').then(() => {
|
||||||
this.$store.dispatch('map/setRunPlanStatus', true);
|
this.$store.dispatch('map/setRunPlanStatus', true);
|
||||||
|
@ -270,7 +270,6 @@ export default {
|
|||||||
resetSize() {
|
resetSize() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$jlmap && this.$jlmap.resize({ width: this.width, height: this.height });
|
this.$jlmap && this.$jlmap.resize({ width: this.width, height: this.height });
|
||||||
// this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode });
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$store.dispatch('config/resetCanvasOffset');
|
this.$store.dispatch('config/resetCanvasOffset');
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
@ -30,9 +30,7 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.config.menuBarLoadedCount': function (val) {
|
'$store.state.config.menuBarLoadedCount': function (val) {
|
||||||
this.$nextTick(() => {
|
|
||||||
this.setPosition();
|
this.setPosition();
|
||||||
});
|
|
||||||
},
|
},
|
||||||
'$route' () {
|
'$route' () {
|
||||||
this.setOffsetX();
|
this.setOffsetX();
|
||||||
|
@ -28,9 +28,7 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.config.menuBarLoadedCount': function (val) {
|
'$store.state.config.menuBarLoadedCount': function (val) {
|
||||||
this.$nextTick(() => {
|
|
||||||
this.setPosition();
|
this.setPosition();
|
||||||
});
|
|
||||||
},
|
},
|
||||||
'$route' () {
|
'$route' () {
|
||||||
this.setOffsetX();
|
this.setOffsetX();
|
||||||
|
@ -38,26 +38,22 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
setPosition() {
|
setPosition() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
let offset = (this.$route.path.includes('displayNew') || this.$route.path.includes('scriptDisplayNew')) && (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) ? 73 : 15;
|
const offset = (this.$route.path.includes('displayNew') || this.$route.path.includes('scriptDisplayNew')) && (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) ? 73 : 15;
|
||||||
const menuBar = document.getElementById('menuBar');
|
const menuBar = document.getElementById('menuBar');
|
||||||
const menuTool = document.getElementById('menuTool');
|
const menuTool = document.getElementById('menuTool');
|
||||||
if (menuBar) {
|
if (menuBar) {
|
||||||
offset += (menuBar.offsetHeight || 0);
|
this.offset = (menuBar.offsetHeight || 0) + offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (menuTool) {
|
if (menuTool) {
|
||||||
offset += (menuTool.offsetHeight || 0);
|
this.offset = (menuTool.offsetHeight || 0) + offset;
|
||||||
}
|
|
||||||
|
|
||||||
if (this.offset != offset) {
|
|
||||||
this.offset = offset;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
setShrinkCanvas() {
|
setShrinkCanvas() { // 放大
|
||||||
this.$emit('setShrink');
|
this.$emit('setShrink');
|
||||||
},
|
},
|
||||||
setMagnifyCanvas() {
|
setMagnifyCanvas() { // 缩小
|
||||||
this.$emit('setMagnify');
|
this.$emit('setMagnify');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.config.menuBarLoadedCount': function (val) {
|
'$store.state.config.menuBarLoadedCount': function (val) { // menuBar加载完成
|
||||||
this.setPosition();
|
this.setPosition();
|
||||||
},
|
},
|
||||||
'$store.state.training.prdType': function (prdType) {
|
'$store.state.training.prdType': function (prdType) {
|
||||||
|
@ -47,7 +47,6 @@ import { getSimulationQrcode } from '@/api/jointSimulation';
|
|||||||
import { getSessionStorage } from '@/utils/auth';
|
import { getSessionStorage } from '@/utils/auth';
|
||||||
import { refereeExitSimulation, quitCurrentRace, startPracticalCompetition, submitPracticalCompetition } from '@/api/competition';
|
import { refereeExitSimulation, quitCurrentRace, startPracticalCompetition, submitPracticalCompetition } from '@/api/competition';
|
||||||
import { NoQrcodeList } from '@/scripts/ProjectConfig';
|
import { NoQrcodeList } from '@/scripts/ProjectConfig';
|
||||||
// import { prefixIntrger } from '@/utils/date';
|
|
||||||
import localStore from 'storejs';
|
import localStore from 'storejs';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -140,10 +139,16 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'$store.state.socket.simulationStart': async function (val) {
|
// '$store.state.socket.simulationStart': async function (val) {
|
||||||
|
// if (val) {
|
||||||
|
// // this.$store.dispatch('training/setInitTime', +new Date(val));
|
||||||
|
// // this.$store.dispatch('training/simulationStart');
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
'$store.state.training.started': function (val) {
|
||||||
|
this.isDisable = false;
|
||||||
if (val) {
|
if (val) {
|
||||||
this.$store.dispatch('training/setInitTime', +new Date(val));
|
this.isDisable = true;
|
||||||
this.$store.dispatch('training/simulationStart');
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'$store.state.socket.simulationOver':function(val) {
|
'$store.state.socket.simulationOver':function(val) {
|
||||||
@ -227,7 +232,6 @@ export default {
|
|||||||
},
|
},
|
||||||
// 开始仿真
|
// 开始仿真
|
||||||
start(model) {
|
start(model) {
|
||||||
this.isDisable = true;
|
|
||||||
const data = {
|
const data = {
|
||||||
time: model.initTime
|
time: model.initTime
|
||||||
};
|
};
|
||||||
|
@ -56,14 +56,8 @@ export default {
|
|||||||
getScriptMemberDataNew(group).then(response=>{
|
getScriptMemberDataNew(group).then(response=>{
|
||||||
const lastData = JSON.stringify(response.data);
|
const lastData = JSON.stringify(response.data);
|
||||||
this.allRoleData = this.coverData(lastData, ConstConfig.ConstSelect.roleTypeNew);
|
this.allRoleData = this.coverData(lastData, ConstConfig.ConstSelect.roleTypeNew);
|
||||||
// lastData = lastData.replace(new RegExp('id', 'g'), 'key');
|
|
||||||
// lastData = JSON.parse(lastData);
|
|
||||||
// this.allRoleData = lastData;
|
|
||||||
getScriptPlayMemberNew(group).then(response=>{
|
getScriptPlayMemberNew(group).then(response=>{
|
||||||
const last = response.data;
|
const last = response.data;
|
||||||
// let userdata=JSON.stringify(response.data)
|
|
||||||
// let reg=new RegExp('\"id\":\"(.*?)\\\"','g');
|
|
||||||
// let datalist=userdata.match(reg);
|
|
||||||
const data = [];
|
const data = [];
|
||||||
last.forEach(function(element) { data.push(element.id); });
|
last.forEach(function(element) { data.push(element.id); });
|
||||||
this.selectRoleData = data;
|
this.selectRoleData = data;
|
||||||
@ -76,9 +70,6 @@ export default {
|
|||||||
this.allRoleData = this.coverData(lastData, ConstConfig.ConstSelect.roleType);
|
this.allRoleData = this.coverData(lastData, ConstConfig.ConstSelect.roleType);
|
||||||
getScriptPlayMember(group).then(response=>{
|
getScriptPlayMember(group).then(response=>{
|
||||||
const last = response.data;
|
const last = response.data;
|
||||||
// let userdata=JSON.stringify(response.data)
|
|
||||||
// let reg=new RegExp('\"id\":\"(.*?)\\\"','g');
|
|
||||||
// let datalist=userdata.match(reg);
|
|
||||||
const data = [];
|
const data = [];
|
||||||
last.forEach(function(element) { data.push(element.id); });
|
last.forEach(function(element) { data.push(element.id); });
|
||||||
this.selectRoleData = data;
|
this.selectRoleData = data;
|
||||||
|
Loading…
Reference in New Issue
Block a user