调整综合演练顶部菜单判断,增加哈尔滨项目 行调设备登陆显示指令模式

This commit is contained in:
zyy 2020-08-03 14:12:56 +08:00
parent 5b92e9125d
commit 31be09323b
12 changed files with 229 additions and 151 deletions

View File

@ -220,7 +220,9 @@ export default {
{
label: '取消故障',
handler: this.cancelStoppage
},
}
],
menuDirective: [
{
label: '确认运行至前方站',
handler: this.nextStation
@ -282,8 +284,11 @@ export default {
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce];
// ...this.menuSpeed
this.menu = [...this.menuForce, ...this.menuDirective];
}
//
if (this.operatemode === OperateMode.DIRECTIVE) {
this.menu = [...this.menuDirective];
}
// this.menu = menuConvert(this.menu);

View File

@ -133,7 +133,9 @@ export default {
{
label: '取消故障',
handler: this.cancelStoppage
},
}
],
menuDirective: [
{
label: '确认运行至前方站',
handler: this.nextStation
@ -191,7 +193,11 @@ export default {
this.menu = MenuContextHandler.covert(this.menuNormal);
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce, ...this.menuSpeed];
this.menu = [...this.menuForce, ...this.menuDirective, ...this.menuSpeed];
}
//
if (this.operatemode === OperateMode.DIRECTIVE) {
this.menu = [...this.menuDirective];
}
// this.menu = menuConvert(this.menu);

View File

@ -116,7 +116,9 @@ export default {
{
label: '取消故障',
handler: this.cancelStoppage
},
}
],
menuDirective: [
{
label: '确认运行至前方站',
handler: this.nextStation
@ -173,7 +175,11 @@ export default {
this.menu = MenuContextHandler.covert(this.menuNormal);
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
this.menu = [...this.menuForce, ...this.menuDirective];
}
//
if (this.operatemode === OperateMode.DIRECTIVE) {
this.menu = [...this.menuDirective];
}
},
doShow(point) {

View File

@ -125,7 +125,9 @@ export default {
{
label: '取消故障',
handler: this.cancelStoppage
},
}
],
menuDirective: [
{
label: '确认运行至前方站',
handler: this.nextStation
@ -182,7 +184,11 @@ export default {
this.menu = MenuContextHandler.covert(this.menuNormal);
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
this.menu = [...this.menuForce, ...this.menuDirective];
}
//
if (this.operatemode === OperateMode.DIRECTIVE) {
this.menu = [...this.menuDirective];
}
},
doShow(point) {

View File

@ -93,7 +93,9 @@ export default {
{
label: '取消故障',
handler: this.cancelStoppage
},
}
],
menuDirective: [
{
label: '确认运行至前方站',
handler: this.nextStation
@ -164,8 +166,11 @@ export default {
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce];
// ...this.menuSpeed
this.menu = [...this.menuForce, ...this.menuDirective];
}
//
if (this.operatemode === OperateMode.DIRECTIVE) {
this.menu = [...this.menuDirective];
}
},
doShow(point) {

View File

@ -64,7 +64,9 @@ export default {
{
label: '取消故障',
handler: this.cancelStoppage
},
}
],
menuDirective: [
{
label: '确认运行至前方站',
handler: this.nextStation
@ -123,10 +125,13 @@ export default {
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce, ...this.menuSpeed];
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce];
this.menu = [...this.menuForce, ...this.menuDirective];
}
//
if (this.operatemode === OperateMode.DIRECTIVE) {
this.menu = [...this.menuDirective];
}
},
doShow(point) {

View File

@ -211,7 +211,9 @@ export default {
{
label: '取消故障',
handler: this.cancelStoppage
},
}
],
menuDirective: [
{
label: '确认运行至前方站',
handler: this.nextStation
@ -280,7 +282,11 @@ export default {
this.menu = MenuContextHandler.covert(this.menuNormal);
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
this.menu = [...this.menuForce, ...this.menuDirective];
}
//
if (this.operatemode === OperateMode.DIRECTIVE) {
this.menu = [...this.menuDirective];
}
},
doShow(point) {

View File

@ -114,7 +114,9 @@ export default {
{
label: '取消故障',
handler: this.cancelStoppage
},
}
],
menuDirective: [
{
label: '确认运行至前方站',
handler: this.nextStation
@ -176,11 +178,13 @@ export default {
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce];
// ...this.menuSpeed
this.menu = [...this.menuForce, ...this.menuDirective];
}
//
if (this.operatemode === OperateMode.DIRECTIVE) {
this.menu = [...this.menuDirective];
}
},
doShow(point) {

View File

@ -222,7 +222,9 @@ export default {
{
label: '取消故障',
handler: this.cancelStoppage
},
}
],
menuDirective: [
{
label: '确认运行至前方站',
handler: this.nextStation
@ -281,7 +283,11 @@ export default {
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
this.menu = [...this.menuForce, ...this.menuDirective];
}
//
if (this.operatemode === OperateMode.DIRECTIVE) {
this.menu = [...this.menuDirective];
}
},
doShow(point) {

View File

@ -47,7 +47,8 @@ export const TrainingMode = {
export const OperateMode = {
ADMIN: '00',
NORMAL: '01',
FAULT: '02'
FAULT: '02',
DIRECTIVE: '03'
};
/**

View File

@ -15,12 +15,10 @@
<!-- 运行图加载 -->
<el-button v-if="notScript && runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</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" size="small" type="danger" @click="setFault">自动故障设置</el-button>
<el-button v-if="faultMode" size="small" type="danger" @click="setFault">自动故障设置</el-button>
</el-button-group>
<el-radio-group v-if="!isScheduling" 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.FAULT">故障模式</el-radio-button>
</el-radio-group>
<el-button v-if="!isScheduling" size="small" :type="faultMode ? 'danger' : ''" @click="changeOperateMode()">故障模式</el-button>
<!-- <el-button v-if="!isLocalStation" size="small" :type="faultMode ? 'danger' : ''" @click="changeDirectiveMode()">指令模式</el-button> -->
</template>
</div>
<fault-choose v-if="isDemon || isScript" ref="faultChoose" :group="group" :offset="offset" />
@ -89,6 +87,7 @@ export default {
swch: '02',
showStationContent:'',
isScriptCommand:false,
faultMode: false,
swchList: [
{ value: '01', name: '现地' },
{ value: '02', name: '行调' }
@ -176,9 +175,22 @@ export default {
}
});
},
changeOperateMode(handle) {
this.$store.dispatch('training/changeOperateMode', { mode: handle });
changeOperateMode() {
this.faultMode = !this.faultMode;
let mode = OperateMode.NORMAL;
if (this.faultMode) {
mode = OperateMode.FAULT;
}
this.$store.dispatch('training/changeOperateMode', { mode: mode });
},
// changeDirectiveMode() { // (使 使)
// this.directiveMode = !this.directiveMode;
// let mode = OperateMode.NORMAL;
// if (this.directiveMode) {
// mode = OperateMode.DIRECTIVE;
// }
// this.$store.dispatch('training/changeOperateMode', { mode: mode });
// },
setRuning(run) {
this.runing = run;
},

View File

@ -12,18 +12,12 @@
{{ $t('joinTraining.runGraphLoading') }}</el-button><!-- -->
</template>
<template v-if="isAdmin">
<el-button v-if="mode==OperateMode.FAULT && !dataError" size="small" type="danger" @click="setFault">{{ $t('joinTraining.faultSetting') }}</el-button>
<el-button v-if="faultMode && !dataError" size="small" type="danger" @click="setFault">{{ $t('joinTraining.faultSetting') }}</el-button>
</template>
</el-button-group>
<el-radio-group
v-if="isAdmin && !dataError && !isScreen"
v-model="mode"
size="small"
@change="changeOperateMode(mode)"
>
<el-radio-button class="mode" :label="OperateMode.NORMAL">{{ $t('joinTraining.normalOperation') }}</el-radio-button>
<el-radio-button class="mode" :label="OperateMode.FAULT">{{ $t('joinTraining.faultOperation') }}</el-radio-button>
</el-radio-group>
<el-button v-if="isAdmin && !dataError && !isScreen" size="small" :type="faultMode ? 'danger' : ''" @click="changeOperateMode()">故障模式</el-button>
<!-- isCenter && !dataError && !isAdmin 此判断用于以后(目前 暂时不用) -->
<el-button v-if="isShowDirective" size="small" :type="directiveMode ? 'primary' : ''" @click="changeDirectiveMode()">指令模式</el-button>
</div>
<join-run-plan-view v-if="runing && !dataError" ref="runPlanView" :group="group" />
</div>
@ -34,6 +28,7 @@ import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { getByGroupStationList } from '@/api/jmap/map';
import { getEveryDayRunPlanNew } from '@/api/simulation';
import { getSessionStorage } from '@/utils/auth';
import JoinRunPlanView from '@/views/newMap/displayNew/demon/runPlanView';
export default {
name: 'MenuDemonSchema',
@ -89,7 +84,9 @@ export default {
kmRangeCoordMap: {},
runPlanData: {},
runing: false,
userId: ''
userId: '',
faultMode: false,
directiveMode: false
};
},
computed: {
@ -98,6 +95,12 @@ export default {
]),
isScreen() {
return this.$store.state.training.prdType === '07';
},
isCenter() {
return this.$store.state.training.prdType === '02';
},
isShowDirective() { //
return this.$route.query.type == 'CW' && getSessionStorage('project') == 'heb';
}
},
watch: {
@ -147,8 +150,21 @@ export default {
// initPlannedDriving(isDisable) {
// this.isDisable = isDisable;
// },
changeOperateMode(handle) {
this.$store.dispatch('training/changeOperateMode', { mode: handle });
changeOperateMode() {
this.faultMode = !this.faultMode;
let mode = OperateMode.NORMAL;
if (this.faultMode) {
mode = OperateMode.FAULT;
}
this.$store.dispatch('training/changeOperateMode', { mode: mode });
},
changeDirectiveMode() { //
this.directiveMode = !this.directiveMode;
let mode = OperateMode.NORMAL;
if (this.directiveMode) {
mode = OperateMode.DIRECTIVE;
}
this.$store.dispatch('training/changeOperateMode', { mode: mode });
},
setFault() {
this.$emit('faultChooseShow');