南京二 故障名称调整

This commit is contained in:
fan 2021-08-10 15:47:00 +08:00
parent b64065fb5b
commit 8fb2e6eb66
2 changed files with 32 additions and 17 deletions

View File

@ -194,6 +194,21 @@ export default {
// return fault.value != 'NORMAL_SPLIT' && fault.value != 'REVERSE_SPLIT';
// });
// }
if (selected._type === 'Section' && this.popClass === 'haerbin-01__systerm') {
this.faultList = [
{label: '计轴故障', value: 'FAULT'},
{label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'}
];
} else if (selected._type === 'Switch' && this.popClass === 'haerbin-01__systerm') {
this.faultList = [
{label: '失表', value: 'SPLIT'},
{label: '定位失表', value: 'NORMAL_SPLIT'},
{label: '反位失表', value: 'REVERSE_SPLIT'},
{label: '挤岔', value: 'SQUEEZE'},
{label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'},
{label: '计轴故障', value: 'AXLE_FAULT'}
];
}
if (this.faultList && this.faultList.length) {
this.form.faultType = this.faultList[0].value;
}

View File

@ -35,9 +35,9 @@ class MenuContextHandler {
return store.state.training.prdType;
}
getDeviceByCode(code) {
return store.state.map.mapDevice[code];
}
getDeviceByCode(code) {
return store.state.map.mapDevice[code];
}
// 判断指令是否隐藏
checkDisabled(data, selected) {
@ -78,7 +78,7 @@ class MenuContextHandler {
// 特殊处理站台的右键操作( 因为小站台不允许有操作 )
if (selected._type == 'StationStand' && selected.small) {
menu = [];
menu = [];
}
if (menu.constructor === Array) {
@ -110,7 +110,7 @@ class MenuContextHandler {
}
// 特殊处理站台的右键操作( 因为小站台不允许有操作 )
if (selected._type == 'StationStand' && selected.small) {
menu = [];
menu = [];
}
if (menu.constructor === Array) {
menu.forEach(elem => {
@ -128,19 +128,19 @@ class MenuContextHandler {
return menu;
}
covertList(list) {
const menu = [...list];
const selected = this.getCurrentStateObject();
covertList(list) {
const menu = [...list];
const selected = this.getCurrentStateObject();
const control = this.getStationControl(selected);
if (control && !store.state.scriptRecord.audioPlay) {
if (this.getPrdType() != '' && this.getPrdType() != null) {
const type = State2SimulationMap[this.getPrdType()];
const status = State2ControlMap[control.controlMode]; // 判断当前模式
// 特殊处理站台的右键操作( 因为小站台不允许有操作 )
if (selected._type == 'StationStand' && selected.small) {
menu = [];
}
// 特殊处理站台的右键操作( 因为小站台不允许有操作 )
if (selected._type == 'StationStand' && selected.small) {
menu = [];
}
if (menu.constructor === Array) {
menu.forEach(elem => {
@ -156,7 +156,7 @@ class MenuContextHandler {
}
}
return menu;
}
}
covertEachCommand(elem, type, selected, status, isSettingCommand = true) {
if (elem.type === 'separator') {
@ -165,17 +165,17 @@ class MenuContextHandler {
}
const data = CommandHandler.getDefinition(elem.cmdType);
const model = this.getDeviceByCode(selected.code);
const model = this.getDeviceByCode(selected.code);
if (data) {
// 判断指令是否显示
if (data.simulationRole.toUpperCase() == type.toUpperCase() && data.controlMode.indexOf(status) > -1) {
elem.show = true;
elem.disabled = this.checkDisabled(data, model);
if (!elem.disabled &&
if (!elem.disabled &&
elem.checkDisabled) {
elem.disabled = !!elem.checkDisabled(model);
}
elem.disabled = !!elem.checkDisabled(model);
}
} else {
elem.show = true;
elem.disabled = true;