调整临时限速配置
This commit is contained in:
parent
003bf13395
commit
0da6a64af7
@ -100,7 +100,6 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { menuBarConvert, SystemType } from './utils/menuItemStatus';
|
||||
import StationControl from './menuDialog/stationControl';
|
||||
import DetainTrainContorl from './menuDialog/detainTrainContorl';
|
||||
import DetainTrainContorlUpDown from './menuDialog/detainTrainContorlUpDown';
|
||||
@ -700,7 +699,6 @@ export default {
|
||||
return list;
|
||||
},
|
||||
initMenu(menu) {
|
||||
this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.training.prdType]], this.$store.state.training.operatemode);
|
||||
if (this.menu[2]) {
|
||||
this.menu[2].children = this.initStationList();
|
||||
}
|
||||
|
@ -9,9 +9,10 @@
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import CancelAllLimit from './dialog/cancelAllLimit';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState } from './utils/menuItemStatus';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'MenuLimit',
|
||||
@ -29,37 +30,26 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [{
|
||||
label: '取消全线临时限速',
|
||||
handler: this.cancelSpeed,
|
||||
disabledCallback: '',
|
||||
auth: { station: true, center: false }
|
||||
}],
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
local: [
|
||||
Local: [
|
||||
{
|
||||
label: '取消全线临时限速',
|
||||
handler: this.cancelSpeed,
|
||||
disabledCallback: MenuDisabledState.Section.cancelSpeed,
|
||||
auth: { station: true, center: false }
|
||||
cmdType: CMD.LimitControl.CMD_CANCEL_ALL_LIMIT_SPEED
|
||||
}
|
||||
],
|
||||
central: [
|
||||
Center: [
|
||||
{
|
||||
label: '取消全线临时限速',
|
||||
handler: this.cancelSpeed,
|
||||
disabledCallback: MenuDisabledState.Section.cancelSpeed,
|
||||
auth: { station: false, center: true }
|
||||
cmdType: CMD.LimitControl.CMD_CANCEL_ALL_LIMIT_SPEED
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
@ -82,9 +72,7 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu];
|
||||
}
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
@ -100,17 +88,8 @@ export default {
|
||||
},
|
||||
// 取消速度
|
||||
cancelSpeed() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.LimitControl.type,
|
||||
label: MapDeviceType.LimitControl.label,
|
||||
operation: OperationEvent.LimitControl.CancelAllLimit.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.LimitControl.cancelSpeed, {}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.cancelAllLimit.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
|
@ -330,6 +330,12 @@ export const menuOperate = {
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_MANUAL
|
||||
}
|
||||
},
|
||||
LimitControl: {
|
||||
cancelSpeed: {
|
||||
operation: OperationEvent.LimitControl.CancelAllLimit.menu.operation,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_ALL_LIMIT_SPEED
|
||||
}
|
||||
},
|
||||
Common: {
|
||||
setFault: {
|
||||
operation: OperationEvent.MixinCommand.stoppage.menu.operation,
|
||||
|
@ -147,7 +147,8 @@ export default {
|
||||
{ label: '站台', value: 'Stand' },
|
||||
{ label: '车站', value: 'Station' },
|
||||
{ label: '控制模式', value: 'ControlConvertMenu' },
|
||||
{ label: '车次窗', value: 'TrainWindow' }
|
||||
{ label: '车次窗', value: 'TrainWindow' },
|
||||
{ label: '全线限速', value: 'LimitControl' }
|
||||
],
|
||||
QuestionTypeList: [
|
||||
{ label: '选择题', value: 'select' },
|
||||
|
@ -255,6 +255,6 @@ export default {
|
||||
CMD_CANCEL_FAULT: {value: 'Cancel_Fault', label: '取消故障'}
|
||||
},
|
||||
LimitControl: {
|
||||
|
||||
CMD_CANCEL_ALL_LIMIT_SPEED: {value: 'Cancel_All_Limit_Speed', label: '取消全线临时限速'}
|
||||
}
|
||||
};
|
||||
|
@ -23,6 +23,8 @@ class MenuContextHandler {
|
||||
control = store.getters['map/getStationCodeByTrain'](selected);
|
||||
} else if (selected._type == 'TrainWindow') {
|
||||
control = store.getters['map/getDeviceTrainWindowCodeByStationCode'](selected.code);
|
||||
} else if (selected._type == 'LimitControl') {
|
||||
return true;
|
||||
} else {
|
||||
control = store.getters['map/getDeviceStationCodeByStationCode'](selected.stationCode);
|
||||
}
|
||||
@ -81,9 +83,13 @@ class MenuContextHandler {
|
||||
return;
|
||||
}
|
||||
const data = CommandHandler.getDefinition(elem.cmdType);
|
||||
|
||||
if (data) {
|
||||
// 判断指令是否显示
|
||||
if (data.simulationRole.toUpperCase() == type.toUpperCase() && data.controlMode.indexOf(status) > -1) {
|
||||
if (data.operateObject == 'LimitControl') {
|
||||
elem.show = true;
|
||||
elem.disabled = false;
|
||||
} else if (data.simulationRole.toUpperCase() == type.toUpperCase() && data.controlMode.indexOf(status) > -1) {
|
||||
elem.show = true;
|
||||
elem.disabled = this.checkDisabled(data, selected);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user