This commit is contained in:
joylink_cuiweidong 2020-12-25 18:07:15 +08:00
commit 940f01a89e
13 changed files with 113 additions and 84 deletions

View File

@ -199,7 +199,7 @@ export default {
title: this.$t('menu.menuBar.toCentralControl'), title: this.$t('menu.menuBar.toCentralControl'),
click: this.conterStationControl, click: this.conterStationControl,
operate: OperationEvent.StationControl.requestCentralControl.mbar, operate: OperationEvent.StationControl.requestCentralControl.mbar,
froce: true force: true
} }
] ]
}, },
@ -326,13 +326,13 @@ export default {
title: this.$t('menu.menuBar.toStationControl'), title: this.$t('menu.menuBar.toStationControl'),
click: this.turnToStationControl, click: this.turnToStationControl,
operate: OperationEvent.StationControl.requestStationControl.mbar, operate: OperationEvent.StationControl.requestStationControl.mbar,
froce: true force: true
}, },
{ {
title: this.$t('menu.menuBar.forcedStationControl'), title: this.$t('menu.menuBar.forcedStationControl'),
click: this.mandatoryStationControl, click: this.mandatoryStationControl,
operate: OperationEvent.StationControl.forcedStationControl.password, operate: OperationEvent.StationControl.forcedStationControl.password,
froce: true force: true
}, },
{ {
title: this.$t('menu.menuBar.toCentralControl'), title: this.$t('menu.menuBar.toCentralControl'),

View File

@ -423,28 +423,28 @@ export default {
children: [ children: [
{ {
title: '开放/关闭', title: '开放/关闭',
click: this.standOpenOrClose click: this.standOpenOrClose,
}, },
{ {
title: '设置/取消扣车', title: '设置/取消扣车',
click: this.setStandDetain click: this.setStandDetain,
}, },
{ {
title: '设置站间列车数量', title: '设置站间列车数量',
// click: this.setIntervalStopNumber // click: this.setIntervalStopNumber
click: this.undeveloped click: this.undeveloped,
}, },
{ {
title: '分配停站时间', title: '分配停站时间',
click: this.setAllocateTime click: this.setAllocateTime,
}, },
{ {
title: '授权转移', title: '授权转移',
click: this.authorizeTransfer click: this.authorizeTransfer,
}, },
{ {
title: '显示', title: '显示',
click: this.showStandDetail click: this.showStandDetail,
} }
] ]
}, },
@ -454,23 +454,23 @@ export default {
children: [ children: [
{ {
title: '命令', title: '命令',
click: this.setSwitchCommand click: this.setSwitchCommand,
}, },
{ {
title: '封锁', title: '封锁',
click: this.setBlockSwitch click: this.setBlockSwitch,
}, },
{ {
title: '解除封锁', title: '解除封锁',
click: this.setUnblockSwitch click: this.setUnblockSwitch,
}, },
{ {
title: '请求动岔/请求或授权/取消', title: '请求动岔/请求或授权/取消',
click: this.setSwitchActive click: this.setSwitchActive,
}, },
{ {
title: '显示', title: '显示',
click: this.showSwitchDetail click: this.showSwitchDetail,
} }
] ]
}, },
@ -481,31 +481,31 @@ export default {
{ {
title: '引导', title: '引导',
click: this.setSignalGuide click: this.setSignalGuide,
}, },
{ {
title: '取消允许锁闭', title: '取消允许锁闭',
click: this.setSignalCanBlock click: this.setSignalCanBlock,
}, },
{ {
title: '进路/命令', title: '进路/命令',
click: this.setRouteCommand click: this.setRouteCommand,
}, },
{ {
title: '信号指示模式', title: '信号指示模式',
click: this.setSignalModel click: this.setSignalModel,
}, },
{ {
title: '封锁', title: '封锁',
click: this.setSignalBlock click: this.setSignalBlock,
}, },
{ {
title: '解除封锁', title: '解除封锁',
click: this.setSignalCancelBlock click: this.setSignalCancelBlock,
}, },
{ {
title: '显示', title: '显示',
click: this.showSignalDetail click: this.showSignalDetail,
} }
] ]
}, },
@ -515,19 +515,19 @@ export default {
children: [ children: [
{ {
title: '开放', title: '开放',
click: this.handleOpenSection click: this.handleOpenSection,
}, },
{ {
title: '关闭', title: '关闭',
click: this.handleCloseSection click: this.handleCloseSection,
}, },
{ {
title: '临时限速', title: '临时限速',
click: this.handleLimitSpeed click: this.handleLimitSpeed,
}, },
{ {
title: '显示', title: '显示',
click: this.handleSectionShow click: this.handleSectionShow,
} }
] ]
}, },
@ -538,27 +538,27 @@ export default {
{ {
title: '取消转换锁闭', title: '取消转换锁闭',
// click: this.handleLock // click: this.handleLock
click: this.undeveloped click: this.undeveloped,
}, },
{ {
title: '取消过岔锁闭', title: '取消过岔锁闭',
// click: this.handleUnLock // click: this.handleUnLock
click: this.undeveloped click: this.undeveloped,
}, },
{ {
title: '远程预复位使能', title: '远程预复位使能',
// click: this.handleRestoration // click: this.handleRestoration
click: this.undeveloped click: this.undeveloped,
}, },
{ {
title: '复位', title: '复位',
// click: this.handleSectionRestoration // click: this.handleSectionRestoration
click: this.undeveloped click: this.undeveloped,
}, },
{ {
title: '显示', title: '显示',
// click: this.handleSectionStopShow // click: this.handleSectionStopShow
click: this.undeveloped click: this.undeveloped,
} }
] ]
}, },

View File

@ -1,4 +1,5 @@
<template> <template>
<div>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false"> <el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row> <el-row>
<el-table <el-table
@ -28,10 +29,10 @@
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="4" :offset="1"> <el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !!initEle" @click="commit">确定(O)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !!initEle" @click="commit(true)">确定(O)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">应用(A)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !!initEle" @click="commit(false)">应用(A)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button> <el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
@ -41,8 +42,9 @@
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<switch-block ref="switchBlock" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</el-dialog> </el-dialog>
<switch-block ref="switchBlock" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</div>
</template> </template>
<script> <script>
@ -127,7 +129,7 @@ export default {
this.$refs.singleTable.setCurrentRow(); this.$refs.singleTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
commit() { commit(isClose=false) {
const step = { const step = {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: this.isBlock ? OperationEvent.Switch.block.confirm.operation : OperationEvent.Switch.unblock.confirm.operation, operation: this.isBlock ? OperationEvent.Switch.block.confirm.operation : OperationEvent.Switch.unblock.confirm.operation,
@ -137,9 +139,11 @@ export default {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchBlock.doShow(step, this.selected); this.$refs.switchBlock.doShow(step, this.selected);
this.initEle = this.selected; this.initEle = this.selected;
isClose && this.doClose();
} }
}).catch(() => { }).catch(() => {
isClose && this.doClose();
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
}, },

View File

@ -29,13 +29,13 @@
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="4" :offset="1"> <el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button> <el-button :id="domIdConfirm" type="primary" :disabled="!selected" :loading="loading" @click="commit(true)">确定(O)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button>应用(A)</el-button> <el-button :id="domIdApply" :disabled="!selected" :loading="loading" @click="commit(false)">应用(A)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button> <el-button :id="domIdCancel" :disabled="!selected" :loading="loading" @click="cancel">关闭(C)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button>帮助(H)</el-button> <el-button>帮助(H)</el-button>
@ -81,7 +81,10 @@ export default {
}, },
domIdConfirm() { domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : ''; return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
}, },
domIdApply() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menuButton.domId : '';
},
title() { title() {
return '站台开放/关闭'; return '站台开放/关闭';
} }
@ -113,19 +116,21 @@ export default {
this.$refs.singleTable.setCurrentRow(); this.$refs.singleTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
commit() { commit(isClose=false) {
const step = { const step = {
over: true, over: true,
cmdType:this.status ? CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP : CMD.Stand.CMD_STAND_SET_JUMP_STOP, cmdType:this.status ? CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP : CMD.Stand.CMD_STAND_SET_JUMP_STOP,
operation:this.status ? OperationEvent.StationStand.cancelJumpStop.confirm.operation : OperationEvent.StationStand.setJumpStop.confirm.operation, operation:this.status ? OperationEvent.StationStand.cancelJumpStop.confirm.operation : OperationEvent.StationStand.setJumpStop.confirm.operation,
param: {standCode: this.selected.code} param: {standCode: this.selected.code}
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose(); isClose && this.doClose();
} }
}).catch(() => { }).catch((error) => {
isClose && this.doClose();
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
}, },

View File

@ -25,7 +25,7 @@
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="6" :offset="2"> <el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">打印(P)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" disabled>打印(P)</el-button>
</el-col> </el-col>
<el-col :span="6" :offset="2"> <el-col :span="6" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button> <el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>

View File

@ -41,10 +41,10 @@
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="4" :offset="1"> <el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit">确定(O)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit(true)">确定(O)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button>应用(A)</el-button> <el-button :id="domIdApply" :loading="loading" :disabled="!selected" @click="commit(false)">应用(A)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button> <el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
@ -93,7 +93,10 @@ export default {
}, },
domIdConfirm() { domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : ''; return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
}, },
domIdApply() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menuButton.domId : '';
},
title() { title() {
return '扣车'; return '扣车';
} }
@ -140,17 +143,18 @@ export default {
this.$refs.singleTable.setCurrentRow(); this.$refs.singleTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
commit() { commit(isClose=false) {
let cmdCommand = menuOperate.StationStand.setDetainTrain; let cmdCommand = menuOperate.StationStand.setDetainTrain;
if (this.standStatus) { if (this.standStatus) {
cmdCommand = menuOperate.StationStand.cancelDetainTrain; cmdCommand = menuOperate.StationStand.cancelDetainTrain;
} }
commitOperate(cmdCommand, {standCode: this.selected.code}, 3).then((valid)=>{ commitOperate(cmdCommand, {standCode: this.selected.code}, 3).then((valid)=>{
if (valid) { if (valid) {
this.doClose(); isClose && this.doClose();
} }
}).catch(() => { }).catch(() => {
this.doClose(); isClose && this.doClose();
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
}, },

View File

@ -29,10 +29,10 @@
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="6" :offset="2"> <el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit">确定(O)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit(true)">确定(O)</el-button>
</el-col> </el-col>
<el-col :span="6" :offset="2"> <el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">应用(A)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit(false)">应用(A)</el-button>
</el-col> </el-col>
<el-col :span="6" :offset="2"> <el-col :span="6" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button> <el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
@ -45,7 +45,6 @@
<script> <script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
@ -112,19 +111,20 @@ export default {
this.$refs.singleTable.setCurrentRow(); this.$refs.singleTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
commit() { commit(isClose=false) {
const step = { const step = {
over: true, over: true,
cmdType: this.active ? CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK : CMD.Switch.CMD_SWITCH_SINGLE_LOCK, cmdType: this.active ? CMD.Switch.CMD_SWITCH_ACTIVE : CMD.Switch.CMD_SWITCH_CUT_OFF,
operation: this.active ? OperationEvent.Switch.unlock.confirm.operation : OperationEvent.Switch.lock.confirm.operation, operation: this.active ? OperationEvent.Switch.unlock.confirm.operation : OperationEvent.Switch.lock.confirm.operation,
param: { switchCode: this.selected.code} param: { switchCode: this.selected.code}
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose(); isClose && this.doClose();
} }
}).catch(() => { }).catch(() => {
isClose && this.doClose();
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
}, },

View File

@ -37,10 +37,10 @@
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="4" :offset="1"> <el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit(true)">确定(O)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">应用(A)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit(false)">应用(A)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button> <el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
@ -56,7 +56,6 @@
<script> <script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
@ -133,7 +132,7 @@ export default {
return '未锁闭的'; return '未锁闭的';
} }
}, },
commit() { commit(isClose=false) {
if (this.command) { if (this.command) {
const operate = { const operate = {
cmdType: this.isBlock ? CMD.Switch.CMD_SWITCH_BLOCK : CMD.Switch.CMD_SWITCH_UNBLOCK, cmdType: this.isBlock ? CMD.Switch.CMD_SWITCH_BLOCK : CMD.Switch.CMD_SWITCH_UNBLOCK,
@ -147,6 +146,7 @@ export default {
this.$emit('commandSuccess', this.selected.code); this.$emit('commandSuccess', this.selected.code);
} }
}).catch(() => { }).catch(() => {
this.doClose();
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
} else { } else {

View File

@ -46,10 +46,10 @@
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="4" :offset="1"> <el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :disabled="!selected" :loading="loading" :selected="true" @click="commit">确定(O)</el-button> <el-button :id="domIdConfirm" type="primary" :disabled="!selected" :loading="loading" :selected="true" @click="commit(true)">确定(O)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">应用(A)</el-button> <el-button :id="domIdConfirm" type="primary" :disabled="!selected" :loading="loading" :selected="true" @click="commit(false)">应用(A)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button> <el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
@ -134,15 +134,27 @@ export default {
this.$refs.singleTable.setCurrentRow(); this.$refs.singleTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
commit() { commit(isClose=false) {
commitOperate(menuOperate.Switch.turnout, {switchCode: this.selected.code}, 3).then(({valid})=>{ const cmd = {
if (valid) { normal: menuOperate.Switch.locate,
this.doClose(); reverse: menuOperate.Switch.reverse
} }[this.position];
});
if (cmd) {
commitOperate(cmd, {switchCode: this.selected.code}, 3).then(({valid})=>{
if (valid) {
isClose && this.doClose();
}
}).catch(error => {
isClose && this.doClose();
this.$refs.noticeInfo.doShow();
})
} else {
this.$message.info('未知指令');
}
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
if (!val) { return; } if (!val) { return; }
commitOperate(menuOperate.Switch.turnout, {code:val.code}).then(({valid, operate})=>{ commitOperate(menuOperate.Switch.turnout, {code:val.code}).then(({valid, operate})=>{
if (valid) { if (valid) {
const switchEle = this.$store.getters['map/getDeviceByCode'](val.code); const switchEle = this.$store.getters['map/getDeviceByCode'](val.code);

View File

@ -21,7 +21,7 @@
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="6" :offset="2"> <el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">打印(P)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" disabled>打印(P)</el-button>
</el-col> </el-col>
<el-col :span="6" :offset="2"> <el-col :span="6" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button> <el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
@ -105,11 +105,6 @@ export default {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
},
commit() {
},
handleClick() {
}, },
getSwitchPosition(code) { getSwitchPosition(code) {
const switchEle = this.$store.getters['map/getDeviceByCode'](code); const switchEle = this.$store.getters['map/getDeviceByCode'](code);

View File

@ -203,7 +203,7 @@ export default {
title: this.$t('menu.menuBar.toCentralControl'), title: this.$t('menu.menuBar.toCentralControl'),
click: this.conterStationControl, click: this.conterStationControl,
operate: OperationEvent.StationControl.requestCentralControl.mbar, operate: OperationEvent.StationControl.requestCentralControl.mbar,
froce: true force: true
} }
] ]
}, },
@ -330,13 +330,13 @@ export default {
title: this.$t('menu.menuBar.toStationControl'), title: this.$t('menu.menuBar.toStationControl'),
click: this.turnToStationControl, click: this.turnToStationControl,
operate: OperationEvent.StationControl.requestStationControl.mbar, operate: OperationEvent.StationControl.requestStationControl.mbar,
froce: true force: true
}, },
{ {
title: this.$t('menu.menuBar.forcedStationControl'), title: this.$t('menu.menuBar.forcedStationControl'),
click: this.mandatoryStationControl, click: this.mandatoryStationControl,
operate: OperationEvent.StationControl.forcedStationControl.password, operate: OperationEvent.StationControl.forcedStationControl.password,
froce: true force: true
}, },
{ {
title: this.$t('menu.menuBar.toCentralControl'), title: this.$t('menu.menuBar.toCentralControl'),

View File

@ -117,9 +117,9 @@ class MenuContextHandler {
item.show = false; item.show = false;
if (!item.click) { if (!item.click) {
item.click = () => { }; item.click = () => { };
} }
if (!item.froce) { if (!item.force) {
item.show = true; item.show = true;
if (item.children && item.children.length > 0) { if (item.children && item.children.length > 0) {
this.menuBarConvert(item.children, mode); this.menuBarConvert(item.children, mode);
@ -131,7 +131,8 @@ class MenuContextHandler {
item.show = true; item.show = true;
if (!item.click) { if (!item.click) {
item.click = () => { }; item.click = () => { };
} }
if (item.children && item.children.length > 0) { if (item.children && item.children.length > 0) {
this.menuBarConvert(item.children, mode); this.menuBarConvert(item.children, mode);
} }

View File

@ -38,6 +38,13 @@ export default {
label: this.$t('system.lineCode'), label: this.$t('system.lineCode'),
config: { config: {
data: [] data: []
}
},
simulationRole: {
type: 'select',
label: this.$t('system.simulationRole'),
config: {
data: []
} }
}, },
operateObject: { operateObject: {
@ -145,7 +152,8 @@ export default {
this.$ConstSelect.deviceTypeList.forEach(elem => { this.$ConstSelect.deviceTypeList.forEach(elem => {
this.deviceTypeList.push(elem); this.deviceTypeList.push(elem);
}); });
this.queryForm.queryObject.operateObject.config.data = this.deviceTypeList; this.queryForm.queryObject.operateObject.config.data = this.deviceTypeList;
this.queryForm.queryObject.simulationRole.config.data = this.$ConstSelect.simulationRole;
} catch (error) { } catch (error) {
console.log(error); console.log(error);
} }
@ -199,8 +207,8 @@ export default {
cancelButtonText: this.$t('global.cancel'), cancelButtonText: this.$t('global.cancel'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
// const param = row;
createCommand(row).then(response => { createCommand(row).then(response => {
this.reloadTable();
this.$message.success('复制指令成功!'); this.$message.success('复制指令成功!');
}).catch(error => { }).catch(error => {
console.log(error); console.log(error);