diff --git a/src/views/newMap/display/simulationMenu/simulationMenu.vue b/src/views/newMap/display/simulationMenu/simulationMenu.vue
index c1cd00241..5264c08d0 100644
--- a/src/views/newMap/display/simulationMenu/simulationMenu.vue
+++ b/src/views/newMap/display/simulationMenu/simulationMenu.vue
@@ -67,8 +67,16 @@ export default {
{ label: '切换客流数据', name: 'changeFlowData', click: this.changeFlowData, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasLpf && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
{ label: '成员管理', name: 'memberManage', click: this.memberManage, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasMemberManage && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
{ label: '考试', name: 'exam', click: this.goExam, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasExam && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
- { label: '按计划行车', name: 'drivingPlan', click: this.drivingPlan, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; }, isShow: () => { return this.$store.state.training.simulationUserType === SimulationUserType.TEACHER && this.$route.query.client !== 'diagramEdit'; } },
- { label: '初始化', name: 'initialize', click: this.initializeSim, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; }, isShow: () => { return this.$store.state.training.simulationUserType === SimulationUserType.TEACHER && this.$route.query.client !== 'diagramEdit'; } },
+ { label: '按计划行车', name: 'drivingPlan', click: this.drivingPlan, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; },
+ isShow: () => {
+ return this.$store.state.training.simulationUserType === SimulationUserType.TEACHER &&
+ (this.$route.query.client !== 'diagramEdit' || (this.$route.query.client == 'diagramEdit' && this.$store.state.map.picture == 'testRunplan'));
+ } },
+ { label: '初始化', name: 'initialize', click: this.initializeSim, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; },
+ isShow: () => {
+ return this.$store.state.training.simulationUserType === SimulationUserType.TEACHER &&
+ (this.$route.query.client !== 'diagramEdit' || (this.$route.query.client == 'diagramEdit' && this.$store.state.map.picture == 'testRunplan'));
+ } },
{ label: '退出', name: 'quit', click: this.exitSim, isDisabled: () => { return false; }, isShow: () => { return true; } }
]
};
@@ -94,6 +102,11 @@ export default {
'$store.state.training.simulationUserType': function (val) {
this.handleMenuShow();
},
+ '$store.state.map.picture': function (val) {
+ if (val == 'testRunplan') {
+ this.handleMenuShow();
+ }
+ },
'$store.state.socket.simulationOver':function(val) {
this.back();
},
diff --git a/src/views/newMap/display/terminals/diagramEdit/components/routingoperate/routeMap.vue b/src/views/newMap/display/terminals/diagramEdit/components/routingoperate/routeMap.vue
index f250fd50b..e98f2c255 100644
--- a/src/views/newMap/display/terminals/diagramEdit/components/routingoperate/routeMap.vue
+++ b/src/views/newMap/display/terminals/diagramEdit/components/routingoperate/routeMap.vue
@@ -4,7 +4,7 @@
-
+
@@ -113,7 +113,6 @@ export default {
width = this.$store.state.app.width - 500;
} else {
width = this.$store.state.app.width * 0.7;
-
}
const height = this.$store.state.app.height - 49;
this.$store.dispatch('config/resize', { width, height });
diff --git a/src/views/newMap/display/terminals/diagramEdit/index.vue b/src/views/newMap/display/terminals/diagramEdit/index.vue
index bbf374dc7..2a9716508 100644
--- a/src/views/newMap/display/terminals/diagramEdit/index.vue
+++ b/src/views/newMap/display/terminals/diagramEdit/index.vue
@@ -10,6 +10,7 @@
@loadingRunPlan="loadingRunPlan"
@modifyRunPlanName="modifyRunPlanName"
@refresh="refreshRunPlanList"
+ @pictureChange="pictureChange"
@refreshData="refresh"
/>
@@ -117,6 +118,9 @@ export default {
this.refreshRunPlanList(true);
generateRunPlanInfoSync(this.$route.query.mapId);
}
+ debugger;
+ const runPlanInfo = this.$store.state.rpTools.runPlanInfo;
+ debugger;
},
beforeDestroy() {
},
@@ -204,6 +208,9 @@ export default {
this.$refs.schedule.refreshRunPlanName(name);
this.refreshRunPlanList(this.loadRunPlanId);
this.$router.replace({ path: this.$route.path, query: { ...this.$route.query, planName: name }});
+ },
+ pictureChange(data) {
+ this.$emit('pictureChange', data.name);
}
}
};
diff --git a/src/views/newMap/display/terminals/diagramEdit/menuBar.vue b/src/views/newMap/display/terminals/diagramEdit/menuBar.vue
index dcec12677..67c5db673 100644
--- a/src/views/newMap/display/terminals/diagramEdit/menuBar.vue
+++ b/src/views/newMap/display/terminals/diagramEdit/menuBar.vue
@@ -138,6 +138,7 @@ import { planEffectiveCheck, clearPlaningData } from '@/api/runplan';
import { EventBus } from '@/scripts/event-bus';
import { publishRunPlanAllUser } from '@/api/designPlatform';
import { deleteRunPlan } from '@/api/runplan';
+import { simulationLoadRunPlan } from '@/api/simulation';
export default {
name: 'PlanMenuBar',
@@ -285,11 +286,11 @@ export default {
{
title: this.$t('planMonitor.validityCheck'),
click: this.handlePlanEffectiveCheck
+ },
+ {
+ title: this.$t('planMonitor.testRunningDiagram'),
+ click: this.handleTestRunPlan
}
- // {
- // title: this.$t('planMonitor.testRunningDiagram'),
- // click: this.handleTestRunPlan
- // }
]
}
// {
@@ -719,6 +720,16 @@ export default {
this.$messageBox(this.$t('tip.publishRunPlanFail'));
this.publishVisible = false;
});
+ },
+ // 测试运行图
+ handleTestRunPlan() {
+ if (this.loadRunPlanId) {
+ // simulationLoadRunPlan(this.$route.query.group, this.loadRunPlanId).then(resp => {
+ this.$emit('pictureChange', {name:'testRunplan'});
+ // });
+ } else {
+ this.$messageBox(this.$t('tip.selectARunGraphFirst'));
+ }
}
}
};
diff --git a/src/views/newMap/display/terminals/diagramEdit/statusBar.vue b/src/views/newMap/display/terminals/diagramEdit/statusBar.vue
index dbd6ddfe0..508b7df05 100644
--- a/src/views/newMap/display/terminals/diagramEdit/statusBar.vue
+++ b/src/views/newMap/display/terminals/diagramEdit/statusBar.vue
@@ -160,22 +160,17 @@ export default {
handlePlanEffectiveCheck() {
const planId = this.loadRunPlanId;
if (planId) {
- if (/^\/plan\/usertool/.test(this.$route.fullPath)) {
- this.$messageBox(' 功能待完善');
- } else {
- planEffectiveCheck(planId).then(resp => {
- this.$emit('dispatchDialog', {
- name: 'systermOut',
- params: {
- width: 600,
- contextList: resp.data.length > 0 ? resp.data : ['检查成功']
- }
- });
- }).catch(error => {
- this.$messageBox(error.message + ' ' + this.$t('tip.runGraphVerificationFailed'));
+ planEffectiveCheck(planId).then(resp => {
+ this.$emit('dispatchDialog', {
+ name: 'systermOut',
+ params: {
+ width: 600,
+ contextList: resp.data.length > 0 ? resp.data : ['检查成功']
+ }
});
- }
-
+ }).catch(error => {
+ this.$messageBox(error.message + ' ' + this.$t('tip.runGraphVerificationFailed'));
+ });
} else {
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
}
diff --git a/src/views/newMap/display/terminals/index.vue b/src/views/newMap/display/terminals/index.vue
index a1bef3254..d5a2e1668 100644
--- a/src/views/newMap/display/terminals/index.vue
+++ b/src/views/newMap/display/terminals/index.vue
@@ -25,7 +25,7 @@
-
+
@@ -33,6 +33,8 @@
+
+