合并代码
This commit is contained in:
commit
5bf46c151c
@ -77,73 +77,73 @@ export function bindSimulationTrain(group,groupNumber) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
//EB紧急制动
|
//EB紧急制动
|
||||||
export function trainSimulationEb(group,groupNumber) {
|
export function trainSimulationEb(group,data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/simulation/driving/${group}/train/${groupNumber}/eb`,
|
url: `/simulation/${group}/operate/Driver_EB`,
|
||||||
method: 'put',
|
method: 'post',
|
||||||
params: ''
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//改变列车牵引/制动力
|
//改变列车牵引/制动力
|
||||||
export function trainSimulationForce(group,groupNumber,percent) {
|
export function trainSimulationForce(group,data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/simulation/driving/${group}/train/${groupNumber}/force/${percent}`,
|
url: `/simulation/${group}/operate/Driver_Force_Change`,
|
||||||
method: 'put',
|
method: 'post',
|
||||||
params: ''
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//改变列车档位
|
//改变列车档位
|
||||||
export function trainSimulationGear(group,groupNumber,gear) {
|
export function trainSimulationGear(group,data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/simulation/driving/${group}/train/${groupNumber}/gear/${gear}`,
|
url: `/simulation/${group}/operate/Driver_Gear_Change`,
|
||||||
method: 'put',
|
method: 'post',
|
||||||
params: ''
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//改变列车运行级别
|
//改变列车运行级别
|
||||||
export function trainSimulationDriveMode(group,groupNumber,driveMode) {
|
export function trainSimulationDriveMode(group,data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/simulation/driving/${group}/train/${groupNumber}/driveMode/${driveMode}`,
|
url: `/simulation/${group}/operate/Driver_Drive_Mode_Change`,
|
||||||
method: 'put',
|
method: 'post',
|
||||||
params: ''
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//ATP切除
|
//ATP切除
|
||||||
//ATO
|
//ATO
|
||||||
export function trainSimulationAtp(group,groupNumber) {
|
export function trainSimulationAtp(group,data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/simulation/driving/${group}/train/${groupNumber}/atp`,
|
url: `/simulation/${group}/operate/Driver_ATP_Change`,
|
||||||
method: 'put',
|
method: 'post',
|
||||||
params: ''
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//ATO
|
//ATO
|
||||||
export function trainSimulationAto(group,groupNumber) {
|
export function trainSimulationAto(group,data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/simulation/driving/${group}/train/${groupNumber}/openAto`,
|
url: `/simulation/${group}/operate/Driver_ATO_Open`,
|
||||||
method: 'put',
|
method: 'post',
|
||||||
params: ''
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//换端
|
//换端
|
||||||
export function trainSimulationChangeHead(group,groupNumber) {
|
export function trainSimulationChangeHead(group,data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/simulation/driving/${group}/train/${groupNumber}/changeHead`,
|
url: `/simulation/${group}/operate/Driver_Change_Head`,
|
||||||
method: 'put',
|
method: 'post',
|
||||||
params: ''
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
export function trainSimulationDoorControl(group,groupNumber,direct,open) {
|
export function trainSimulationDoorControl(group,data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/simulation/driving/${group}/train/${groupNumber}/onOrOffDoor?right=${direct}&open=${open}`,
|
url: `/simulation/${group}/operate/Driver_Door_On_Off`,
|
||||||
method: 'put',
|
method: 'post',
|
||||||
params: ''
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { TrainingMode, OperationEvent } from '@/scripts/ConstDic';
|
import { TrainingMode, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { menuBarConvert, SystemType } from './utils/menuItemStatus';
|
|
||||||
import StationControl from './menuDialog/stationControl';
|
import StationControl from './menuDialog/stationControl';
|
||||||
import DetainTrainContorl from './menuDialog/detainTrainContorl';
|
import DetainTrainContorl from './menuDialog/detainTrainContorl';
|
||||||
import DetainTrainContorlUpDown from './menuDialog/detainTrainContorlUpDown';
|
import DetainTrainContorlUpDown from './menuDialog/detainTrainContorlUpDown';
|
||||||
@ -700,7 +699,6 @@ export default {
|
|||||||
return list;
|
return list;
|
||||||
},
|
},
|
||||||
initMenu(menu) {
|
initMenu(menu) {
|
||||||
this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.training.prdType]], this.$store.state.training.operatemode);
|
|
||||||
if (this.menu[2]) {
|
if (this.menu[2]) {
|
||||||
this.menu[2].children = this.initStationList();
|
this.menu[2].children = this.initStationList();
|
||||||
}
|
}
|
||||||
|
@ -9,112 +9,91 @@
|
|||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import CancelAllLimit from './dialog/cancelAllLimit';
|
import CancelAllLimit from './dialog/cancelAllLimit';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import { MenuDisabledState } from './utils/menuItemStatus';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
|
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MenuLimit',
|
name: 'MenuLimit',
|
||||||
components: {
|
components: {
|
||||||
PopMenu,
|
PopMenu,
|
||||||
CancelAllLimit
|
CancelAllLimit
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
menu: [{
|
menu: [],
|
||||||
label: '取消全线临时限速',
|
menuNormal: {
|
||||||
handler: this.cancelSpeed,
|
Local: [
|
||||||
disabledCallback: '',
|
{
|
||||||
auth: { station: true, center: false }
|
label: '取消全线临时限速',
|
||||||
}],
|
handler: this.cancelSpeed,
|
||||||
menuNormal: {
|
cmdType: CMD.LimitControl.CMD_CANCEL_ALL_LIMIT_SPEED
|
||||||
local: [
|
}
|
||||||
{
|
],
|
||||||
label: '取消全线临时限速',
|
Center: [
|
||||||
handler: this.cancelSpeed,
|
{
|
||||||
disabledCallback: MenuDisabledState.Section.cancelSpeed,
|
label: '取消全线临时限速',
|
||||||
auth: { station: true, center: false }
|
handler: this.cancelSpeed,
|
||||||
}
|
cmdType: CMD.LimitControl.CMD_CANCEL_ALL_LIMIT_SPEED
|
||||||
],
|
}
|
||||||
central: [
|
]
|
||||||
{
|
}
|
||||||
label: '取消全线临时限速',
|
};
|
||||||
handler: this.cancelSpeed,
|
},
|
||||||
disabledCallback: MenuDisabledState.Section.cancelSpeed,
|
computed: {
|
||||||
auth: { station: false, center: true }
|
...mapGetters('menuOperation', [
|
||||||
}
|
'buttonOperation'
|
||||||
]
|
])
|
||||||
}
|
},
|
||||||
};
|
watch: {
|
||||||
},
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
computed: {
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.LimitControl) && !this.buttonOperation) {
|
||||||
...mapGetters('training', [
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
'mode',
|
} else {
|
||||||
'operatemode'
|
this.doClose();
|
||||||
]),
|
}
|
||||||
...mapGetters('menuOperation', [
|
}
|
||||||
'buttonOperation'
|
},
|
||||||
])
|
methods: {
|
||||||
},
|
clickEvent() {
|
||||||
watch: {
|
const self = this;
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
window.onclick = function (e) {
|
||||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.LimitControl) && !this.buttonOperation) {
|
self.doClose();
|
||||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
};
|
||||||
} else {
|
},
|
||||||
this.doClose();
|
initMenu() {
|
||||||
}
|
// 编辑模式菜单列表
|
||||||
}
|
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
},
|
},
|
||||||
methods: {
|
doShow(point) {
|
||||||
clickEvent() {
|
this.clickEvent();
|
||||||
const self = this;
|
this.initMenu();
|
||||||
window.onclick = function (e) {
|
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||||
self.doClose();
|
this.$refs.popMenu.resetShowPosition(point);
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
initMenu() {
|
doClose() {
|
||||||
// 编辑模式菜单列表
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
if (this.operatemode === OperateMode.ADMIN) {
|
this.$refs.popMenu.close();
|
||||||
this.menu = [...this.menu];
|
}
|
||||||
}
|
},
|
||||||
},
|
// 取消速度
|
||||||
doShow(point) {
|
cancelSpeed() {
|
||||||
this.clickEvent();
|
commitOperate(menuOperate.LimitControl.cancelSpeed, {}, 0).then(({valid, operate})=>{
|
||||||
this.initMenu();
|
if (valid) {
|
||||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
this.$refs.cancelAllLimit.doShow(operate, this.selected);
|
||||||
this.$refs.popMenu.resetShowPosition(point);
|
}
|
||||||
}
|
});
|
||||||
},
|
}
|
||||||
doClose() {
|
}
|
||||||
if (this.$refs && this.$refs.popMenu) {
|
|
||||||
this.$refs.popMenu.close();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消速度
|
|
||||||
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 }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.cancelAllLimit.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -38,6 +38,26 @@ export const menuOperate = {
|
|||||||
// 区段故障解锁
|
// 区段故障解锁
|
||||||
operation: OperationEvent.Section.fault.menu.operation,
|
operation: OperationEvent.Section.fault.menu.operation,
|
||||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||||
|
},
|
||||||
|
alxeFailure:{
|
||||||
|
// 设置计轴失效
|
||||||
|
operation: OperationEvent.Section.alxeFailure.menu.operation,
|
||||||
|
// cmdType 值有问题
|
||||||
|
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
||||||
|
},
|
||||||
|
unlock:{
|
||||||
|
// 区段解锁
|
||||||
|
operation: OperationEvent.Section.unlock.menu.operation,
|
||||||
|
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||||
|
},
|
||||||
|
setFault: { // 设置故障
|
||||||
|
operation: OperationEvent.Section.stoppage.menu.operation,
|
||||||
|
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
||||||
|
},
|
||||||
|
cancelSpeed: {
|
||||||
|
// 取消限速
|
||||||
|
operation: OperationEvent.Section.cancelSpeed.menu.operation,
|
||||||
|
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Signal:{
|
Signal:{
|
||||||
@ -96,6 +116,22 @@ export const menuOperate = {
|
|||||||
detail:{
|
detail:{
|
||||||
// 查询进路状态
|
// 查询进路状态
|
||||||
operation: OperationEvent.Signal.detail.menu.operation
|
operation: OperationEvent.Signal.detail.menu.operation
|
||||||
|
},
|
||||||
|
guide:{ // 进路引导
|
||||||
|
operation: OperationEvent.Signal.guide.menu.operation,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||||
|
},
|
||||||
|
cancelGuide:{ // 人工解锁进路(信号机取消引导)
|
||||||
|
operation: OperationEvent.Signal.cancelGuide.menu.operation,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
||||||
|
},
|
||||||
|
setAutoTurnBack:{ // 设置自动折返
|
||||||
|
operation: OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
|
||||||
|
},
|
||||||
|
cancelAutoTurnBack:{ // 取消自动折返
|
||||||
|
operation: OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Switch:{
|
Switch:{
|
||||||
@ -162,6 +198,16 @@ export const menuOperate = {
|
|||||||
// 区段故障解锁
|
// 区段故障解锁
|
||||||
operation: OperationEvent.Switch.fault.menu.operation,
|
operation: OperationEvent.Switch.fault.menu.operation,
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
||||||
|
},
|
||||||
|
cancelSpeed: {
|
||||||
|
// 取消临时限速
|
||||||
|
operation: OperationEvent.Switch.cancelSpeed.menu.operation,
|
||||||
|
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
|
||||||
|
},
|
||||||
|
axlePreReset:{
|
||||||
|
// 计轴预复位
|
||||||
|
operation: OperationEvent.Switch.axlePreReset.menu.operation,
|
||||||
|
cmdType: CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
StationStand:{
|
StationStand:{
|
||||||
@ -218,6 +264,26 @@ export const menuOperate = {
|
|||||||
detail:{
|
detail:{
|
||||||
// 查询站台状态
|
// 查询站台状态
|
||||||
operation: OperationEvent.StationStand.detail.menu.operation
|
operation: OperationEvent.StationStand.detail.menu.operation
|
||||||
|
},
|
||||||
|
cancelDetainTrainAll:{
|
||||||
|
// 全线取消扣车
|
||||||
|
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
|
||||||
|
cmdType:CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN
|
||||||
|
},
|
||||||
|
cancelDetainTrainForce: {
|
||||||
|
// 强制取消扣车
|
||||||
|
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation,
|
||||||
|
cmdType: CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
|
||||||
|
},
|
||||||
|
setBulkBuckleTrain:{
|
||||||
|
// 批量扣车
|
||||||
|
operation: OperationEvent.StationStand.setBulkBuckleTrain.menu.operation,
|
||||||
|
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_ALL
|
||||||
|
},
|
||||||
|
cancelBulkBuckleTrain:{
|
||||||
|
// 批量取消扣车
|
||||||
|
operation: OperationEvent.StationStand.cancelBulkBuckleTrain.menu.operation,
|
||||||
|
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_ALL
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
StationControl:{
|
StationControl:{
|
||||||
@ -235,6 +301,39 @@ export const menuOperate = {
|
|||||||
// 紧急站控
|
// 紧急站控
|
||||||
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
|
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
|
||||||
cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
|
cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
|
||||||
|
},
|
||||||
|
setBackStrategy:{
|
||||||
|
// 设置折返策略
|
||||||
|
operation: OperationEvent.Station.setBackStrategy.menu.operation,
|
||||||
|
cmdType: CMD.Station.CMD_STATION_SET_TURN_BACK_STRATEGY
|
||||||
|
}
|
||||||
|
},
|
||||||
|
TrainWindow: {
|
||||||
|
editTrainId: {
|
||||||
|
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||||
|
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
|
||||||
|
},
|
||||||
|
addTrainId: {
|
||||||
|
operation: OperationEvent.Train.addTrainId.menu.operation,
|
||||||
|
cmdType: ''
|
||||||
|
},
|
||||||
|
destinationTrainId: {
|
||||||
|
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||||
|
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_HEAD
|
||||||
|
},
|
||||||
|
setPlanTrainId: {
|
||||||
|
operation: OperationEvent.Train.setPlanTrainId.menu.operation,
|
||||||
|
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_PLAN
|
||||||
|
},
|
||||||
|
artificialTrainId: {
|
||||||
|
operation: OperationEvent.Train.artificialTrainId.menu.operation,
|
||||||
|
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_MANUAL
|
||||||
|
}
|
||||||
|
},
|
||||||
|
LimitControl: {
|
||||||
|
cancelSpeed: {
|
||||||
|
operation: OperationEvent.LimitControl.CancelAllLimit.menu.operation,
|
||||||
|
cmdType: CMD.Fault.CMD_CANCEL_ALL_LIMIT_SPEED
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Common: {
|
Common: {
|
||||||
|
@ -100,7 +100,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { TrainingMode, OperationEvent } from '@/scripts/ConstDic';
|
import { TrainingMode, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { menuBarConvert, SystemType } from './utils/menuItemStatus';
|
|
||||||
import StationControl from './menuDialog/stationControl';
|
import StationControl from './menuDialog/stationControl';
|
||||||
import DetainTrainContorl from './menuDialog/detainTrainContorl';
|
import DetainTrainContorl from './menuDialog/detainTrainContorl';
|
||||||
import DetainTrainContorlUpDown from './menuDialog/detainTrainContorlUpDown';
|
import DetainTrainContorlUpDown from './menuDialog/detainTrainContorlUpDown';
|
||||||
@ -111,6 +110,8 @@ import ManageUser from './menuDialog/manageUser';
|
|||||||
import HelpAbout from './menuDialog/helpAbout';
|
import HelpAbout from './menuDialog/helpAbout';
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
|
import { State2SimulationMap } from '@/scripts/cmdPlugin/Config';
|
||||||
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MenuBar',
|
name: 'MenuBar',
|
||||||
@ -142,7 +143,7 @@ export default {
|
|||||||
valid: true,
|
valid: true,
|
||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
local: [
|
Local: [
|
||||||
{
|
{
|
||||||
title: '系统',
|
title: '系统',
|
||||||
operate: OperationEvent.Command.mBar.system,
|
operate: OperationEvent.Command.mBar.system,
|
||||||
@ -378,6 +379,7 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '帮助',
|
title: '帮助',
|
||||||
|
operate: '',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
title: '关于ITS GPC 工作站',
|
title: '关于ITS GPC 工作站',
|
||||||
@ -387,7 +389,7 @@ export default {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
central: [
|
Center: [
|
||||||
{
|
{
|
||||||
title: '系统',
|
title: '系统',
|
||||||
operate: OperationEvent.Command.mBar.system,
|
operate: OperationEvent.Command.mBar.system,
|
||||||
@ -700,7 +702,8 @@ export default {
|
|||||||
return list;
|
return list;
|
||||||
},
|
},
|
||||||
initMenu(menu) {
|
initMenu(menu) {
|
||||||
this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.training.prdType]], this.$store.state.training.operatemode);
|
const type = State2SimulationMap[this.$store.state.training.prdType];
|
||||||
|
this.menu = MenuContextHandler.menuBarConvert(this.menuNormal[type], this.$store.state.training.operatemode);
|
||||||
if (this.menu[2]) {
|
if (this.menu[2]) {
|
||||||
this.menu[2].children = this.initStationList();
|
this.menu[2].children = this.initStationList();
|
||||||
}
|
}
|
||||||
|
@ -17,8 +17,7 @@ import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
import { OperateMode } from '@/scripts/ConstDic';
|
||||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationMenu',
|
name: 'StationMenu',
|
||||||
components: {
|
components: {
|
||||||
@ -44,25 +43,21 @@ export default {
|
|||||||
{
|
{
|
||||||
label: '全站设置联锁自动触发',
|
label: '全站设置联锁自动触发',
|
||||||
handler: this.setAutoTrigger,
|
handler: this.setAutoTrigger,
|
||||||
disabledCallback: MenuDisabledState.Station.setAutoTrigger,
|
|
||||||
auth: { station: true, center: false }
|
auth: { station: true, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '全站取消联锁自动触发',
|
label: '全站取消联锁自动触发',
|
||||||
handler: this.cancelAutoTrigger,
|
handler: this.cancelAutoTrigger,
|
||||||
disabledCallback: MenuDisabledState.Station.cancelAutoTrigger,
|
|
||||||
auth: { station: true, center: false }
|
auth: { station: true, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '上电解锁',
|
label: '上电解锁',
|
||||||
handler: this.powerUnLock,
|
handler: this.powerUnLock,
|
||||||
disabledCallback: MenuDisabledState.Station.powerUnLock,
|
|
||||||
auth: { station: true, center: false }
|
auth: { station: true, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '执行关键操作测试',
|
label: '执行关键操作测试',
|
||||||
handler: this.execKeyOperationTest,
|
handler: this.execKeyOperationTest,
|
||||||
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
|
|
||||||
auth: { station: true, center: false }
|
auth: { station: true, center: false }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -70,19 +65,16 @@ export default {
|
|||||||
{
|
{
|
||||||
label: '所有进路自排关',
|
label: '所有进路自排关',
|
||||||
handler: this.humanControlALL,
|
handler: this.humanControlALL,
|
||||||
disabledCallback: MenuDisabledState.Station.humanControlALL,
|
|
||||||
auth: { station: false, center: true }
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '所有进路自排开',
|
label: '所有进路自排开',
|
||||||
handler: this.atsAutoControlALL,
|
handler: this.atsAutoControlALL,
|
||||||
disabledCallback: MenuDisabledState.Station.atsAutoControlALL,
|
|
||||||
auth: { station: false, center: true }
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '执行关键操作测试',
|
label: '执行关键操作测试',
|
||||||
handler: this.execKeyOperationTest,
|
handler: this.execKeyOperationTest,
|
||||||
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
|
|
||||||
auth: { station: false, center: true }
|
auth: { station: false, center: true }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -90,13 +82,11 @@ export default {
|
|||||||
menuForce: [
|
menuForce: [
|
||||||
{
|
{
|
||||||
label: '设置ZC故障',
|
label: '设置ZC故障',
|
||||||
handler: this.setStoppage,
|
handler: this.setStoppage
|
||||||
disabledCallback: MenuDisabledState.Station.setStoppage
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消ZC故障',
|
label: '取消ZC故障',
|
||||||
handler: this.cancelStoppage,
|
handler: this.cancelStoppage
|
||||||
disabledCallback: MenuDisabledState.Station.cancelStoppage
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@ -127,23 +117,11 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
initMenu() {
|
initMenu() {
|
||||||
this.menu = [];
|
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
if (this.selected.concentrateStationCode == this.selected.code) {
|
// 故障模式菜单列表
|
||||||
// 编辑模式菜单列表
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
this.menu = menuFiltration(this.menuNormal);
|
this.menu = this.menuForce;
|
||||||
if (this.operatemode === OperateMode.ADMIN) {
|
|
||||||
this.menu = [...this.menu, ...this.menuForce];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.selected.centralized) {
|
|
||||||
// 故障模式菜单列表
|
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
|
||||||
this.menu = [...this.menuForce];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.menu = menuConvert(this.menu);
|
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import { MenuDisabledState } from './utils/menuItemStatus';
|
|
||||||
import TrainDelete from './dialog/trainDelete';
|
import TrainDelete from './dialog/trainDelete';
|
||||||
import TrainDefine from './dialog/trainDefine';
|
import TrainDefine from './dialog/trainDefine';
|
||||||
import TrainMove from './dialog/trainMove';
|
import TrainMove from './dialog/trainMove';
|
||||||
@ -199,20 +198,17 @@ export default {
|
|||||||
menuForce: [
|
menuForce: [
|
||||||
{
|
{
|
||||||
label: '设置通信故障',
|
label: '设置通信故障',
|
||||||
handler: this.setStoppage,
|
handler: this.setStoppage
|
||||||
disabledCallback: MenuDisabledState.Train.setStoppage
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消通信故障',
|
label: '取消通信故障',
|
||||||
handler: this.cancelStoppage,
|
handler: this.cancelStoppage
|
||||||
disabledCallback: MenuDisabledState.Train.cancelStoppage
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
menuSpeed: [
|
menuSpeed: [
|
||||||
{
|
{
|
||||||
label: '确认运行至前方站',
|
label: '确认运行至前方站',
|
||||||
handler: this.limitSpeed,
|
handler: this.limitSpeed
|
||||||
disabledCallback: MenuDisabledState.Train.limitSpeed
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
@ -1,570 +0,0 @@
|
|||||||
import Vue from 'vue';
|
|
||||||
import store from '@/store/index_APP_TARGET';
|
|
||||||
import deviceState from '@/jmap/constant/deviceState';
|
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
|
||||||
|
|
||||||
export function getCurrentStateObject() {
|
|
||||||
return store.getters['menuOperation/selected'];
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 系统类型 */
|
|
||||||
export const SystemType = {
|
|
||||||
'01': 'local', // 现地工作站
|
|
||||||
'02': 'central' // 中心调度工作站
|
|
||||||
};
|
|
||||||
|
|
||||||
export const StationControlType = {
|
|
||||||
'01': 'center', // 中控
|
|
||||||
'02': 'station' // 站控
|
|
||||||
};
|
|
||||||
|
|
||||||
// 控制禁用
|
|
||||||
export const MenuDisabledState = {
|
|
||||||
Section: {
|
|
||||||
// 故障解锁
|
|
||||||
fault() {
|
|
||||||
},
|
|
||||||
// 切除
|
|
||||||
split() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.cutOff != deviceState.Section.cutOff.Default) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 激活
|
|
||||||
active() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.cutOff == deviceState.Section.cutOff.Default) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 区段封锁
|
|
||||||
lock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.Section.status.State06) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 区段解禁
|
|
||||||
unlock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status != deviceState.Section.status.State06) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 区段设置限速
|
|
||||||
setSpeed() {
|
|
||||||
},
|
|
||||||
// 区段取消限速
|
|
||||||
cancelSpeed() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.speedUpperLimit == deviceState.Section.speedUpperLimit.Default) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 新建列车
|
|
||||||
newTrain() {
|
|
||||||
},
|
|
||||||
// 计轴预复位
|
|
||||||
axlePreReset() {
|
|
||||||
},
|
|
||||||
// 设置计轴有效
|
|
||||||
alxeEffective() {
|
|
||||||
},
|
|
||||||
// 设置计轴失效
|
|
||||||
alxeFailure() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.Section.status.State13) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Signal: {
|
|
||||||
// 进路选排
|
|
||||||
arrangementRoute() {
|
|
||||||
|
|
||||||
},
|
|
||||||
// 进路取消
|
|
||||||
cancelTrainRoute() {
|
|
||||||
},
|
|
||||||
// 信号封闭
|
|
||||||
lock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.Signal.status.State05) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 信号解封
|
|
||||||
unlock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status != deviceState.Signal.status.State05) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 信号重开
|
|
||||||
reopenSignal() {
|
|
||||||
},
|
|
||||||
// 进路引导
|
|
||||||
guide() {
|
|
||||||
},
|
|
||||||
// 设置联锁自动进路
|
|
||||||
setAutoInterlock() {
|
|
||||||
},
|
|
||||||
// 取消联锁自动进路
|
|
||||||
cancelAutoInterlock() {
|
|
||||||
},
|
|
||||||
// 设置联锁自动触发
|
|
||||||
setAutoTrigger() {
|
|
||||||
},
|
|
||||||
// 取消联锁自动触发
|
|
||||||
cancelAutoTrigger() {
|
|
||||||
},
|
|
||||||
// 关灯
|
|
||||||
signalClose() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.Signal.status.State01) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 人工控
|
|
||||||
humanControl() {
|
|
||||||
},
|
|
||||||
// ats自动控
|
|
||||||
atsAutoControl() {
|
|
||||||
},
|
|
||||||
// 查询进路状态
|
|
||||||
detail() {
|
|
||||||
},
|
|
||||||
// 设置故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Station: {
|
|
||||||
// 全站设置联锁自动触发
|
|
||||||
setAutoTrigger() {
|
|
||||||
},
|
|
||||||
// 全站取消联锁自动触发
|
|
||||||
cancelAutoTrigger() {
|
|
||||||
},
|
|
||||||
// 上电解锁
|
|
||||||
powerUnLock() {
|
|
||||||
},
|
|
||||||
// 执行关键操作测试
|
|
||||||
execKeyOperationTest() {
|
|
||||||
},
|
|
||||||
// 所有进路自排开
|
|
||||||
atsAutoControlALL() {
|
|
||||||
},
|
|
||||||
// 所有进路自排关
|
|
||||||
humanControlALL() {
|
|
||||||
},
|
|
||||||
// 设置ZC故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消ZC故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
StationControl: {
|
|
||||||
// 紧急站控
|
|
||||||
emergencyStationControl() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.StationControl.status.State03) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 请求站控
|
|
||||||
requestStationControl() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.StationControl.status.State02) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 强行站控
|
|
||||||
forcedStationControl() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.StationControl.status.State02) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 请求中控
|
|
||||||
requestCentralControl() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.StationControl.status.State01) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 设置故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
StationStand: {
|
|
||||||
// 设置扣车
|
|
||||||
setDetainTrain() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.holdStatus != deviceState.StationStand.holdStatus.State01) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消扣车
|
|
||||||
cancelDetainTrain() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State01) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 强制取消扣车
|
|
||||||
cancelDetainTrainForce() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State01) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 设置全站扣车
|
|
||||||
cancelDetainTrainAll() {
|
|
||||||
},
|
|
||||||
// 设置运行等级
|
|
||||||
setRunLevel() {
|
|
||||||
},
|
|
||||||
// 设置停站时间
|
|
||||||
setStopTime() {
|
|
||||||
},
|
|
||||||
// 设置跳停
|
|
||||||
setJumpStop() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.jumpStopStatus != deviceState.StationStand.jumpStopStatus.State01) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消跳停
|
|
||||||
cancelJumpStop() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.jumpStopStatus == deviceState.StationStand.jumpStopStatus.State01) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 提前发车
|
|
||||||
earlyDeparture() {
|
|
||||||
},
|
|
||||||
// 站台详细信息
|
|
||||||
detail() {
|
|
||||||
},
|
|
||||||
// 设置折返策略
|
|
||||||
setBackStrategy() {
|
|
||||||
},
|
|
||||||
// 设置故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Switch: {
|
|
||||||
// 单锁
|
|
||||||
lock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.Switch.status.State10) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 解锁
|
|
||||||
unlock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status != deviceState.Switch.status.State10) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 封锁
|
|
||||||
block() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.Switch.status.State14) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 解封
|
|
||||||
unblock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status != deviceState.Switch.status.State14) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 强扳
|
|
||||||
switchTurnoutForce() {
|
|
||||||
},
|
|
||||||
// 转动
|
|
||||||
switchTurnout() {
|
|
||||||
},
|
|
||||||
// 道岔故障解锁
|
|
||||||
fault() {
|
|
||||||
},
|
|
||||||
// 计轴预复位
|
|
||||||
axlePreReset() {
|
|
||||||
},
|
|
||||||
// 道岔切除
|
|
||||||
split() {
|
|
||||||
},
|
|
||||||
// 道岔激活
|
|
||||||
active() {
|
|
||||||
},
|
|
||||||
// 道岔设置速度
|
|
||||||
setSpeed() {
|
|
||||||
// const device = getCurrentStateObject();
|
|
||||||
},
|
|
||||||
// 设置计轴有效
|
|
||||||
alxeEffective() {
|
|
||||||
},
|
|
||||||
// 道岔取消速度
|
|
||||||
cancelSpeed() {
|
|
||||||
},
|
|
||||||
// 设置故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Train: {
|
|
||||||
// 添加列车识别号
|
|
||||||
addTrainId() {
|
|
||||||
},
|
|
||||||
// 删除列车识别号
|
|
||||||
delTrainId() {
|
|
||||||
},
|
|
||||||
// 修改列车识别号
|
|
||||||
editTrainId() {
|
|
||||||
},
|
|
||||||
// 修改车组号
|
|
||||||
editTrainNo() {
|
|
||||||
},
|
|
||||||
// 移动列车识别号
|
|
||||||
moveTrainId() {
|
|
||||||
},
|
|
||||||
// 交换列车识别号
|
|
||||||
switchTrainId() {
|
|
||||||
},
|
|
||||||
// 设置限速
|
|
||||||
limitSpeed() {
|
|
||||||
},
|
|
||||||
// 设置通信故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消通信故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 添加计划车
|
|
||||||
addPlanTrain() {
|
|
||||||
},
|
|
||||||
// 设置计划车
|
|
||||||
setPlanTrain() {
|
|
||||||
},
|
|
||||||
// 设置头码车
|
|
||||||
setHeadTrain() {
|
|
||||||
},
|
|
||||||
// 设置人工车
|
|
||||||
setWorkTrain() {
|
|
||||||
},
|
|
||||||
// 标记重点车
|
|
||||||
trainToFlag() {
|
|
||||||
},
|
|
||||||
// 取消标记重点车
|
|
||||||
trainUnFlag() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 将menu的disabled属性使用disabledCallback计算并返回
|
|
||||||
* @param {Array} menu
|
|
||||||
*/
|
|
||||||
export function menuConvert(menu) {
|
|
||||||
if (menu.constructor === Array) {
|
|
||||||
menu.forEach(elem => {
|
|
||||||
if (elem.type === 'separator') {
|
|
||||||
elem.show = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (elem.disabledCallback.constructor === Function) {
|
|
||||||
if (!elem.defaultDisabled) {
|
|
||||||
elem.disabled = elem.disabledCallback();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return menu;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据产品类型,返回对应的menuBar
|
|
||||||
* @param {*} menuObj
|
|
||||||
*/
|
|
||||||
export function menuBarConvert(menu, mode) {
|
|
||||||
if (menu) {
|
|
||||||
if (mode === OperateMode.NORMAL) {
|
|
||||||
menu.forEach(item => {
|
|
||||||
if (item.type === 'separator') {
|
|
||||||
item.show = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
item.show = false;
|
|
||||||
if (!item.click) {
|
|
||||||
item.click = () => { };
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!item.froce) {
|
|
||||||
item.show = true;
|
|
||||||
if (item.children && item.children.length > 0) {
|
|
||||||
menuBarConvert(item.children, mode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else if (mode === OperateMode.ADMIN) {
|
|
||||||
menu.forEach(item => {
|
|
||||||
item.show = true;
|
|
||||||
if (!item.click) {
|
|
||||||
item.click = () => { };
|
|
||||||
}
|
|
||||||
if (item.children && item.children.length > 0) {
|
|
||||||
menuBarConvert(item.children, mode);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return menu || [];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 将menu的show属性过滤返回
|
|
||||||
* @param {Array} menu
|
|
||||||
*/
|
|
||||||
export function menuFiltration(menuObj) {
|
|
||||||
var selected = getCurrentStateObject();
|
|
||||||
var control;
|
|
||||||
var menu = [];
|
|
||||||
|
|
||||||
if (selected._type == 'StationStand') {
|
|
||||||
control = store.getters['map/getStationControlByStationCode'](selected.deviceStationCode);
|
|
||||||
} else if (selected._type == 'Station') {
|
|
||||||
control = store.getters['map/getStationControlByStationCode'](selected.code);
|
|
||||||
} else {
|
|
||||||
control = store.getters['map/getStationControlByStationCode'](selected.stationCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (control) {
|
|
||||||
if (store.state.training.prdType != '') {
|
|
||||||
const type = SystemType[store.state.training.prdType];
|
|
||||||
const status = StationControlType[control.status];
|
|
||||||
menu = [...menuObj[type]];
|
|
||||||
if (menu.constructor === Array) {
|
|
||||||
menu.forEach(elem => {
|
|
||||||
if (elem.type === 'separator') {
|
|
||||||
elem.show = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (elem.auth.constructor === Object) {
|
|
||||||
elem.show = true;
|
|
||||||
if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
|
|
||||||
elem.show = false;
|
|
||||||
}
|
|
||||||
elem.defaultDisabled = !elem.auth[status];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return menu;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 将train menu的show属性过滤返回
|
|
||||||
*/
|
|
||||||
export function trainMenuFiltration(menuObj) {
|
|
||||||
var menu = [];
|
|
||||||
if (store.state.training.prdType != '') {
|
|
||||||
const type = SystemType[store.state.training.prdType];
|
|
||||||
menu = [...menuObj[type]];
|
|
||||||
if (menu.constructor === Array) {
|
|
||||||
menu.forEach(elem => {
|
|
||||||
if (elem.type === 'separator') {
|
|
||||||
elem.show = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (elem.auth.constructor === Object) {
|
|
||||||
elem.show = true;
|
|
||||||
if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
|
|
||||||
elem.show = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return menu;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 离开菜单以及执行完菜单取消选中状态
|
|
||||||
*/
|
|
||||||
export function mouseCancelState(selected) {
|
|
||||||
const device = Vue.prototype.$jlmap.getDeviceByCode(selected.code);
|
|
||||||
const instance = (device || {}).instance;
|
|
||||||
if (instance && instance.mouseEvent && instance.mouseEvent.mouseout) {
|
|
||||||
device['down'] = false;
|
|
||||||
instance.mouseEvent.mouseout(Vue.prototype.$jlmap.$zr.curEvent);
|
|
||||||
}
|
|
||||||
}
|
|
@ -79,7 +79,7 @@ import { mapGetters } from 'vuex';
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
import OperationHandler 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 '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteHandControl',
|
name: 'RouteHandControl',
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
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 '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteLock',
|
name: 'RouteLock',
|
||||||
|
@ -50,7 +50,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|||||||
import ConfirmControl from './childDialog/confirmControl';
|
import ConfirmControl from './childDialog/confirmControl';
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import { deepAssign } from '@/utils/index';
|
import { deepAssign } from '@/utils/index';
|
||||||
import { menuOperate, commitOperate } from '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
import OperationHandler 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 '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config';
|
import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
import OperationHandler 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 '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandDetainTrain',
|
name: 'StandDetainTrain',
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -86,7 +86,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|||||||
import ConfirmTrain from './childDialog/confirmTrain';
|
import ConfirmTrain from './childDialog/confirmTrain';
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import Handler from '@/scripts/cmdPlugin/Handler';
|
import Handler from '@/scripts/cmdPlugin/Handler';
|
||||||
import { menuOperate, commitOperate } from '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import {getTrainDetailBytripNumber} from '@/api/simulation';
|
import {getTrainDetailBytripNumber} from '@/api/simulation';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -39,7 +39,7 @@ import { mapGetters } from 'vuex';
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import Handler from '@/scripts/cmdPlugin/Handler';
|
import Handler from '@/scripts/cmdPlugin/Handler';
|
||||||
import { menuOperate, commitOperate } from '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import {TrainType} from '@/scripts/ConstDic';
|
import {TrainType} from '@/scripts/ConstDic';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -18,7 +18,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import { menuOperate, commitOperate } from './utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -24,7 +24,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import { menuOperate, commitOperate } from './utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SignalMenu',
|
name: 'SignalMenu',
|
||||||
|
@ -25,7 +25,7 @@ import { mapGetters } from 'vuex';
|
|||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import { menuOperate, commitOperate } from './utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationStandMenu',
|
name: 'StationStandMenu',
|
||||||
|
@ -13,7 +13,7 @@ import { mapGetters } from 'vuex';
|
|||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import { menuOperate, commitOperate } from './utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MenuStationTurnBack',
|
name: 'MenuStationTurnBack',
|
||||||
|
@ -18,7 +18,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import { menuOperate, commitOperate } from './utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SwitchMenu',
|
name: 'SwitchMenu',
|
||||||
|
@ -1,570 +0,0 @@
|
|||||||
import store from '@/store/index_APP_TARGET';
|
|
||||||
import deviceState from '@/jmap/constant/deviceState';
|
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
|
||||||
|
|
||||||
export function getCurrentStateObject() {
|
|
||||||
return store.getters['menuOperation/selected'];
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 系统类型 */
|
|
||||||
export const State2SimulationMap = {
|
|
||||||
'01': 'local', // 现地工作站
|
|
||||||
'02': 'central' // 中心调度工作站
|
|
||||||
};
|
|
||||||
|
|
||||||
export const State2ControlMap = {
|
|
||||||
'01': 'center', // 中控
|
|
||||||
'02': 'station', // 站控
|
|
||||||
'03': 'station'
|
|
||||||
};
|
|
||||||
|
|
||||||
// 控制禁用
|
|
||||||
export const MenuDisabledState = {
|
|
||||||
Section: {
|
|
||||||
// 故障解锁
|
|
||||||
fault() {
|
|
||||||
},
|
|
||||||
// 切除
|
|
||||||
split() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.cutOff != deviceState.Section.cutOff.Default) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 激活
|
|
||||||
active() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.cutOff == deviceState.Section.cutOff.Default) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 区段封锁
|
|
||||||
lock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.Section.status.State06) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 区段解禁
|
|
||||||
unlock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status != deviceState.Section.status.State06) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 区段设置限速
|
|
||||||
setSpeed() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.speedUpperLimit != deviceState.Section.speedUpperLimit.Default) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 区段取消限速
|
|
||||||
cancelSpeed() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.speedUpperLimit == deviceState.Section.speedUpperLimit.Default) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 新建列车
|
|
||||||
newTrain() {
|
|
||||||
},
|
|
||||||
// 计轴预复位
|
|
||||||
axlePreReset() {
|
|
||||||
},
|
|
||||||
// 设置故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Signal: {
|
|
||||||
// 进路选排
|
|
||||||
arrangementRoute() {
|
|
||||||
|
|
||||||
},
|
|
||||||
// 进路取消
|
|
||||||
cancelTrainRoute() {
|
|
||||||
},
|
|
||||||
// 信号封闭
|
|
||||||
lock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.Signal.status.State05) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 信号解封
|
|
||||||
unlock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status != deviceState.Signal.status.State05) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 信号重开
|
|
||||||
reopenSignal() {
|
|
||||||
},
|
|
||||||
// 进路引导
|
|
||||||
guide() {
|
|
||||||
},
|
|
||||||
// 设置联锁自动进路
|
|
||||||
setAutoInterlock() {
|
|
||||||
},
|
|
||||||
// 取消联锁自动进路
|
|
||||||
cancelAutoInterlock() {
|
|
||||||
},
|
|
||||||
// 设置联锁自动触发
|
|
||||||
setAutoTrigger() {
|
|
||||||
},
|
|
||||||
// 取消联锁自动触发
|
|
||||||
cancelAutoTrigger() {
|
|
||||||
},
|
|
||||||
// 关灯
|
|
||||||
signalClose() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.Signal.status.State01) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 人工控
|
|
||||||
humanControl() {
|
|
||||||
},
|
|
||||||
// ats自动控
|
|
||||||
atsAutoControl() {
|
|
||||||
},
|
|
||||||
// 查询进路状态
|
|
||||||
detail() {
|
|
||||||
},
|
|
||||||
// 设置故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Station: {
|
|
||||||
// 全站设置联锁自动触发
|
|
||||||
setAutoTrigger() {
|
|
||||||
},
|
|
||||||
// 全站取消联锁自动触发
|
|
||||||
cancelAutoTrigger() {
|
|
||||||
},
|
|
||||||
// 上电解锁
|
|
||||||
powerUnLock() {
|
|
||||||
},
|
|
||||||
// 执行关键操作测试
|
|
||||||
execKeyOperationTest() {
|
|
||||||
},
|
|
||||||
// 所有进路自排开
|
|
||||||
atsAutoControlALL() {
|
|
||||||
},
|
|
||||||
// 所有进路自排关
|
|
||||||
humanControlALL() {
|
|
||||||
},
|
|
||||||
// 设置ZC故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消ZC故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
StationControl: {
|
|
||||||
// 紧急站控
|
|
||||||
emergencyStationControl() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.StationControl.status.State03) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 请求站控
|
|
||||||
requestStationControl() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.StationControl.status.State02) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 强行站控
|
|
||||||
forcedStationControl() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.StationControl.status.State02) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 请求中控
|
|
||||||
requestCentralControl() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.StationControl.status.State01) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 设置故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
StationStand: {
|
|
||||||
// 设置扣车
|
|
||||||
setDetainTrain() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (store.state.training.prdType == '02') { // 中心行调模式
|
|
||||||
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State04) {
|
|
||||||
return true;
|
|
||||||
} else if (device && device.holdStatus == deviceState.StationStand.holdStatus.State03) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
} else { // 现地模式
|
|
||||||
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State04) {
|
|
||||||
return true;
|
|
||||||
} else if (device && device.holdStatus == deviceState.StationStand.holdStatus.State02) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消扣车
|
|
||||||
cancelDetainTrain() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (store.state.training.prdType == '02') {
|
|
||||||
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State04) {
|
|
||||||
return false;
|
|
||||||
} else if (device && device.holdStatus != deviceState.StationStand.holdStatus.State03) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State04) {
|
|
||||||
return false;
|
|
||||||
} else if (device && device.holdStatus != deviceState.StationStand.holdStatus.State02) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 强制取消扣车
|
|
||||||
cancelDetainTrainForce() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State01) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 设置全站扣车
|
|
||||||
cancelDetainTrainAll() {
|
|
||||||
},
|
|
||||||
// 设置运行等级
|
|
||||||
setRunLevel() {
|
|
||||||
},
|
|
||||||
// 设置停站时间
|
|
||||||
setStopTime() {
|
|
||||||
},
|
|
||||||
// 设置跳停
|
|
||||||
setJumpStop() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.jumpStopStatus != deviceState.StationStand.jumpStopStatus.State01) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消跳停
|
|
||||||
cancelJumpStop() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.jumpStopStatus == deviceState.StationStand.jumpStopStatus.State01) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 提前发车
|
|
||||||
earlyDeparture() {
|
|
||||||
},
|
|
||||||
// 站台详细信息
|
|
||||||
detail() {
|
|
||||||
},
|
|
||||||
// 设置折返策略
|
|
||||||
setBackStrategy() {
|
|
||||||
},
|
|
||||||
// 设置故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Switch: {
|
|
||||||
// 单锁
|
|
||||||
lock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.Switch.status.State10) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 解锁
|
|
||||||
unlock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status != deviceState.Switch.status.State10) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 封锁
|
|
||||||
block() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.Switch.status.State14) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 解封
|
|
||||||
unblock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status != deviceState.Switch.status.State14) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 强扳
|
|
||||||
switchTurnoutForce() {
|
|
||||||
},
|
|
||||||
// 转动
|
|
||||||
switchTurnout() {
|
|
||||||
},
|
|
||||||
// 道岔故障解锁
|
|
||||||
fault() {
|
|
||||||
},
|
|
||||||
// 计轴预复位
|
|
||||||
axlePreReset() {
|
|
||||||
},
|
|
||||||
// 道岔切除
|
|
||||||
split() {
|
|
||||||
},
|
|
||||||
// 道岔激活
|
|
||||||
active() {
|
|
||||||
},
|
|
||||||
// 道岔设置速度
|
|
||||||
setSpeed() {
|
|
||||||
// const device = getCurrentStateObject();
|
|
||||||
},
|
|
||||||
// 道岔取消速度
|
|
||||||
cancelSpeed() {
|
|
||||||
},
|
|
||||||
// 设置故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Train: {
|
|
||||||
// 添加列车识别号
|
|
||||||
addTrainId() {
|
|
||||||
},
|
|
||||||
// 删除列车识别号
|
|
||||||
delTrainId() {
|
|
||||||
},
|
|
||||||
// 修改列车识别号
|
|
||||||
editTrainId() {
|
|
||||||
},
|
|
||||||
// 修改车组号
|
|
||||||
editTrainNo() {
|
|
||||||
},
|
|
||||||
// 移动列车识别号
|
|
||||||
moveTrainId() {
|
|
||||||
},
|
|
||||||
// 交换列车识别号
|
|
||||||
switchTrainId() {
|
|
||||||
},
|
|
||||||
// 设置限速
|
|
||||||
limitSpeed() {
|
|
||||||
},
|
|
||||||
// 设置通信故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消通信故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export function checkOperationValidity() {
|
|
||||||
if (store.state.training.prdType == '02') {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 将menu的disabled属性使用disabledCallback计算并返回
|
|
||||||
* @param {Array} menu
|
|
||||||
*/
|
|
||||||
export function menuConvert(menu) {
|
|
||||||
if (menu.constructor === Array) {
|
|
||||||
menu.forEach(elem => {
|
|
||||||
if (elem.type === 'separator') {
|
|
||||||
elem.show = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (elem.disabledCallback.constructor === Function) {
|
|
||||||
elem.disabled = elem.defaultDisabled;
|
|
||||||
if (!elem.defaultDisabled) {
|
|
||||||
elem.disabled = elem.disabledCallback();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return menu;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据产品类型,返回对应的menuBar
|
|
||||||
* @param {*} menuObj
|
|
||||||
*/
|
|
||||||
export function menuBarConvert(menu, mode) {
|
|
||||||
if (menu) {
|
|
||||||
if (mode === OperateMode.NORMAL) {
|
|
||||||
menu.forEach(item => {
|
|
||||||
if (item.type === 'separator') {
|
|
||||||
item.show = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
item.show = false;
|
|
||||||
if (!item.click) {
|
|
||||||
item.click = () => { };
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!item.froce) {
|
|
||||||
item.show = true;
|
|
||||||
if (item.children && item.children.length > 0) {
|
|
||||||
menuBarConvert(item.children, mode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else if (mode === OperateMode.ADMIN) {
|
|
||||||
menu.forEach(item => {
|
|
||||||
item.show = true;
|
|
||||||
if (!item.click) {
|
|
||||||
item.click = () => { };
|
|
||||||
}
|
|
||||||
if (item.children && item.children.length > 0) {
|
|
||||||
menuBarConvert(item.children, mode);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return menu || [];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 将menu的show属性过滤返回
|
|
||||||
* @param {Array} menu
|
|
||||||
*/
|
|
||||||
export function menuFiltration(menuObj) {
|
|
||||||
var selected = getCurrentStateObject();
|
|
||||||
var control;
|
|
||||||
var menu = [];
|
|
||||||
|
|
||||||
if (selected._type == 'StationStand') {
|
|
||||||
control = store.getters['map/getStationControlByStationCode'](selected.deviceStationCode);
|
|
||||||
} else if (selected._type == 'Station') {
|
|
||||||
control = store.getters['map/getStationControlByStationCode'](selected.code);
|
|
||||||
} else {
|
|
||||||
control = store.getters['map/getStationControlByStationCode'](selected.stationCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (control) {
|
|
||||||
if (store.state.training.prdType != '') {
|
|
||||||
const type = State2SimulationMap[store.state.training.prdType];
|
|
||||||
const status = State2ControlMap[control.status];
|
|
||||||
menu = [...menuObj[type]];
|
|
||||||
if (menu.constructor === Array) {
|
|
||||||
menu.forEach(elem => {
|
|
||||||
if (elem.type === 'separator') {
|
|
||||||
elem.show = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (elem.auth.constructor === Object) {
|
|
||||||
elem.show = true;
|
|
||||||
if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
|
|
||||||
elem.show = false;
|
|
||||||
}
|
|
||||||
elem.defaultDisabled = !elem.auth[status];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return menu;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 将train menu的show属性过滤返回
|
|
||||||
*/
|
|
||||||
export function trainMenuFiltration(menuObj) {
|
|
||||||
var menu = [];
|
|
||||||
if (store.state.training.prdType != '') {
|
|
||||||
const type = State2SimulationMap[store.state.training.prdType];
|
|
||||||
menu = [...menuObj[type]];
|
|
||||||
if (menu.constructor === Array) {
|
|
||||||
menu.forEach(elem => {
|
|
||||||
if (elem.auth.constructor === Object) {
|
|
||||||
elem.show = true;
|
|
||||||
if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
|
|
||||||
elem.show = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return menu;
|
|
||||||
}
|
|
||||||
|
|
@ -1,337 +0,0 @@
|
|||||||
import store from '@/store/index_APP_TARGET';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
|
|
||||||
// 操作
|
|
||||||
export const menuOperate = {
|
|
||||||
Section:{
|
|
||||||
split:{
|
|
||||||
// 区段切除
|
|
||||||
operation: OperationEvent.Section.split.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
|
||||||
},
|
|
||||||
active:{
|
|
||||||
// 区段激活
|
|
||||||
operation: OperationEvent.Section.active.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
|
||||||
},
|
|
||||||
lock: {
|
|
||||||
// 区段封锁
|
|
||||||
operation: OperationEvent.Section.lock.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
|
||||||
},
|
|
||||||
unlock: {
|
|
||||||
// 区段解封
|
|
||||||
operation: OperationEvent.Section.unlock.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
|
||||||
},
|
|
||||||
alxeEffective:{
|
|
||||||
// 确认计轴有效
|
|
||||||
operation: OperationEvent.Section.alxeEffective.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
|
|
||||||
},
|
|
||||||
setSpeed:{
|
|
||||||
// 设置速度
|
|
||||||
operation: OperationEvent.Section.setSpeed.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
|
||||||
},
|
|
||||||
cancelSpeed: {
|
|
||||||
// 取消限速
|
|
||||||
operation: OperationEvent.Section.cancelSpeed.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
|
|
||||||
},
|
|
||||||
axlePreReset:{
|
|
||||||
// 区段计轴预复位
|
|
||||||
operation: OperationEvent.Section.axlePreReset.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
|
|
||||||
},
|
|
||||||
fault:{
|
|
||||||
// 区段故障解锁
|
|
||||||
operation: OperationEvent.Section.fault.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Signal:{
|
|
||||||
arrangementRoute:{
|
|
||||||
// 排列进路
|
|
||||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
|
||||||
},
|
|
||||||
cancelTrainRoute:{
|
|
||||||
// 取消进路
|
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
|
||||||
},
|
|
||||||
lock:{
|
|
||||||
// 信号封锁
|
|
||||||
operation:OperationEvent.Signal.lock.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
|
||||||
},
|
|
||||||
unlock:{
|
|
||||||
// 信号解封
|
|
||||||
operation: OperationEvent.Signal.unlock.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
|
||||||
},
|
|
||||||
guide:{
|
|
||||||
// 进路引导
|
|
||||||
operation: OperationEvent.Signal.guide.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
|
||||||
},
|
|
||||||
reopenSignal:{
|
|
||||||
// 信号重开
|
|
||||||
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
|
||||||
},
|
|
||||||
signalClose:{
|
|
||||||
// 信号关灯
|
|
||||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
|
||||||
},
|
|
||||||
humanControl:{
|
|
||||||
// 进路交人工控
|
|
||||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
|
||||||
},
|
|
||||||
atsAutoControl:{
|
|
||||||
// 进路交自动控
|
|
||||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
|
||||||
},
|
|
||||||
setAutoInterlock:{
|
|
||||||
// 设置通过模式 设置联锁自动进路
|
|
||||||
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
|
||||||
},
|
|
||||||
cancelAutoInterlock:{
|
|
||||||
// 取消通过模式 取消联锁自动进路
|
|
||||||
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
|
||||||
},
|
|
||||||
detail:{
|
|
||||||
// 查询进路状态
|
|
||||||
operation: OperationEvent.Signal.detail.menu.operation
|
|
||||||
},
|
|
||||||
cancelGuide:{
|
|
||||||
// 人工解锁进路(信号机取消引导)
|
|
||||||
operation: OperationEvent.Signal.cancelGuide.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
|
||||||
},
|
|
||||||
setAutoTurnBack:{
|
|
||||||
// 设置自动折返
|
|
||||||
operation: OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
|
|
||||||
},
|
|
||||||
cancelAutoTurnBack:{
|
|
||||||
// 取消自动折返
|
|
||||||
operation: OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
|
|
||||||
},
|
|
||||||
setAutoTrigger: {
|
|
||||||
// 设置联锁自动触发
|
|
||||||
operation: OperationEvent.Signal.setAutoTrigger.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
|
|
||||||
},
|
|
||||||
cancelAutoTrigger: {
|
|
||||||
// 取消联锁自动触发
|
|
||||||
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Switch:{
|
|
||||||
lock:{
|
|
||||||
// 道岔单锁
|
|
||||||
operation: OperationEvent.Switch.lock.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
|
||||||
},
|
|
||||||
unlock:{
|
|
||||||
// 道岔解锁
|
|
||||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
|
||||||
},
|
|
||||||
block: {
|
|
||||||
// 道岔封锁
|
|
||||||
operation: OperationEvent.Switch.block.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
|
||||||
},
|
|
||||||
unblock: {
|
|
||||||
// 道岔解封
|
|
||||||
operation: OperationEvent.Switch.unblock.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
|
||||||
},
|
|
||||||
turnout: {
|
|
||||||
// 道岔转动
|
|
||||||
operation: OperationEvent.Switch.turnout.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_TURN
|
|
||||||
},
|
|
||||||
fault: {
|
|
||||||
// 故障解锁
|
|
||||||
operation: OperationEvent.Switch.fault.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
|
||||||
},
|
|
||||||
split:{
|
|
||||||
// 区段切除
|
|
||||||
operation: OperationEvent.Switch.split.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
|
|
||||||
},
|
|
||||||
active:{
|
|
||||||
// 区段激活
|
|
||||||
operation: OperationEvent.Switch.active.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
|
||||||
},
|
|
||||||
setSpeed:{
|
|
||||||
// 设置临时限速
|
|
||||||
operation: OperationEvent.Switch.setSpeed.menu.operation,
|
|
||||||
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
|
||||||
},
|
|
||||||
cancelSpeed: {
|
|
||||||
// 取消临时限速
|
|
||||||
operation: OperationEvent.Switch.cancelSpeed.menu.operation,
|
|
||||||
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
|
|
||||||
},
|
|
||||||
alxeEffective:{
|
|
||||||
// 确认计轴有效
|
|
||||||
operation: OperationEvent.Switch.alxeEffective.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
|
|
||||||
},
|
|
||||||
axlePreReset:{
|
|
||||||
// 计轴预复位
|
|
||||||
operation: OperationEvent.Switch.axlePreReset.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
StationStand:{
|
|
||||||
setDetainTrain:{
|
|
||||||
// 设置扣车
|
|
||||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
|
||||||
},
|
|
||||||
cancelDetainTrain:{
|
|
||||||
// 取消扣车
|
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
|
||||||
},
|
|
||||||
cancelDetainTrainForce: {
|
|
||||||
// 强制取消扣车
|
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
|
|
||||||
},
|
|
||||||
cancelDetainTrainAll: {
|
|
||||||
// 全线取消扣车
|
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN
|
|
||||||
},
|
|
||||||
setJumpStop:{
|
|
||||||
// 设置跳停
|
|
||||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
|
||||||
},
|
|
||||||
cancelJumpStop:{
|
|
||||||
// 取消跳停
|
|
||||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
|
||||||
},
|
|
||||||
setStopTime:{
|
|
||||||
// 停站时间控制
|
|
||||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
|
|
||||||
},
|
|
||||||
setRunLevel:{
|
|
||||||
// 运行时间控制
|
|
||||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME
|
|
||||||
},
|
|
||||||
earlyDeparture:{
|
|
||||||
// 设置提前发车
|
|
||||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
|
|
||||||
},
|
|
||||||
setBackStrategy:{
|
|
||||||
// 设置折返策略
|
|
||||||
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
|
|
||||||
},
|
|
||||||
detail:{
|
|
||||||
// 查询站台状态
|
|
||||||
operation: OperationEvent.StationStand.detail.menu.operation
|
|
||||||
// cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS
|
|
||||||
}
|
|
||||||
//
|
|
||||||
},
|
|
||||||
StationControl:{
|
|
||||||
requestCentralControl:{
|
|
||||||
// 请求中控(遥控)
|
|
||||||
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
|
|
||||||
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
|
|
||||||
},
|
|
||||||
requestStationControl:{
|
|
||||||
// 请求站控
|
|
||||||
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
|
|
||||||
cmdType:CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
|
|
||||||
},
|
|
||||||
emergencyStationControl:{
|
|
||||||
// 紧急站控
|
|
||||||
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
|
|
||||||
cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
|
|
||||||
},
|
|
||||||
setBackStrategy:{
|
|
||||||
// 设置折返策略
|
|
||||||
operation: OperationEvent.Station.setBackStrategy.menu.operation,
|
|
||||||
cmdType: CMD.Station.CMD_STATION_SET_TURN_BACK_STRATEGY
|
|
||||||
}
|
|
||||||
},
|
|
||||||
TrainWindow: {
|
|
||||||
editTrainId: {
|
|
||||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
|
||||||
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
|
|
||||||
},
|
|
||||||
addTrainId: {
|
|
||||||
operation: OperationEvent.Train.addTrainId.menu.operation,
|
|
||||||
cmdType: ''
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Common: {
|
|
||||||
setFault: {
|
|
||||||
operation: OperationEvent.MixinCommand.stoppage.menu.operation,
|
|
||||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
|
||||||
},
|
|
||||||
cancelFault: {
|
|
||||||
operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation,
|
|
||||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export function commitOperate(operate, paramList, over, val) {
|
|
||||||
const step = {
|
|
||||||
start: true,
|
|
||||||
operation: operate.operation,
|
|
||||||
param:{}
|
|
||||||
};
|
|
||||||
step.param = paramList;
|
|
||||||
if (val) {
|
|
||||||
step['val'] = val;
|
|
||||||
}
|
|
||||||
// over 0为首次操作,1为中间操作,2为最后操作,3为直接一次性操作
|
|
||||||
if (over == 0 || over == 3) {
|
|
||||||
const codeList = Object.values(paramList);
|
|
||||||
step.code = codeList[0];
|
|
||||||
}
|
|
||||||
if (over != 0 && over != 3) {
|
|
||||||
delete step.start;
|
|
||||||
}
|
|
||||||
if (over == 2 || over == 3) {
|
|
||||||
step.over = true;
|
|
||||||
step.cmdType = operate.cmdType;
|
|
||||||
}
|
|
||||||
return new Promise(function(resolve, reject) {
|
|
||||||
store.dispatch('training/nextNew', step).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
resolve({ valid: valid, operate: step });
|
|
||||||
}).catch(error=>{
|
|
||||||
reject(error);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
@ -31,7 +31,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/ConstDic';
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import {menuOperate, commitOperate} from '../../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ConfirmControl',
|
name: 'ConfirmControl',
|
||||||
|
@ -81,7 +81,7 @@ import ConfirmControl from './childDialog/confirmControl';
|
|||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteHandControl',
|
name: 'RouteHandControl',
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
<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 '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import { deepAssign } from '@/utils/index';
|
import { deepAssign } from '@/utils/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteLock',
|
name: 'RouteLock',
|
||||||
|
@ -129,7 +129,7 @@
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
import OperationHandler 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 '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandDetainTrain',
|
name: 'StandDetainTrain',
|
||||||
|
@ -93,7 +93,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
import ConfirmControl from './childDialog/confirmControl';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandRunLevel',
|
name: 'StandRunLevel',
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
import ConfirmControl from './childDialog/confirmControl';
|
import ConfirmControl from './childDialog/confirmControl';
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandStopTime',
|
name: 'StandStopTime',
|
||||||
|
@ -48,7 +48,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|||||||
// import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
// import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
import ConfirmControl from './childDialog/confirmControl';
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteControl',
|
name: 'RouteControl',
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="xian-02__menus" :style="{width: width + 'px'}">
|
<div class="xian-02__menus" :style="{width: width + 'px'}">
|
||||||
<menu-cancel ref="menuCancel" />
|
<menu-cancel ref="menuCancel" />
|
||||||
<!-- <menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" /> -->
|
|
||||||
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
||||||
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
|
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
|
||||||
<menu-station-control ref="menuStationControl" :selected="selected" />
|
<menu-station-control ref="menuStationControl" :selected="selected" />
|
||||||
@ -29,7 +28,6 @@ import MenuSwitch from './menuSwitch';
|
|||||||
import MenuSection from './menuSection';
|
import MenuSection from './menuSection';
|
||||||
import MenuTrain from './menuTrain';
|
import MenuTrain from './menuTrain';
|
||||||
import MenuStation from './menuStation';
|
import MenuStation from './menuStation';
|
||||||
// import MenuBar from './menuBar';
|
|
||||||
import MenuLimit from './menuLimit';
|
import MenuLimit from './menuLimit';
|
||||||
// import PassiveAlarm from './passiveDialog/alarm';
|
// import PassiveAlarm from './passiveDialog/alarm';
|
||||||
import PassiveContorl from './passiveDialog/control';
|
import PassiveContorl from './passiveDialog/control';
|
||||||
@ -41,7 +39,6 @@ import MenuRequest from './menuRequest';
|
|||||||
export default {
|
export default {
|
||||||
name: 'Menus',
|
name: 'Menus',
|
||||||
components: {
|
components: {
|
||||||
// MenuBar,
|
|
||||||
MenuAxleReset,
|
MenuAxleReset,
|
||||||
MenuAutoTrunRoute,
|
MenuAutoTrunRoute,
|
||||||
MenuCancel,
|
MenuCancel,
|
||||||
@ -70,15 +67,7 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
...mapGetters('config', [
|
...mapGetters('config', [
|
||||||
'width'
|
'width'
|
||||||
]),
|
])
|
||||||
isShowBar() {
|
|
||||||
return this.$store.state.training.prdType && this.$store.state.training.prdType !== '07';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
isShowBar(val) {
|
|
||||||
val && this.$store.dispatch('config/updateMenuBar');
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import TurnBackControl from './dialog/turnBackControl';
|
import TurnBackControl from './dialog/turnBackControl';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -47,7 +47,7 @@
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import TwoConfirmation from './childDialog/twoConfirmation';
|
import TwoConfirmation from './childDialog/twoConfirmation';
|
||||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationControl',
|
name: 'StationControl',
|
||||||
|
@ -20,7 +20,7 @@ import { mapGetters } from 'vuex';
|
|||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -20,7 +20,7 @@ import RouteHandControl from './dialog/routeHandControl';
|
|||||||
import RouterCommand from './dialog/routerCommand';
|
import RouterCommand from './dialog/routerCommand';
|
||||||
import RouteDetail from './dialog/routeDetail';
|
import RouteDetail from './dialog/routeDetail';
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import StationControl from './dialog/stationControl';
|
import StationControl from './dialog/stationControl';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
|
@ -21,7 +21,7 @@ import { mapGetters } from 'vuex';
|
|||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SwitchMenu',
|
name: 'SwitchMenu',
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu/index';
|
import PopMenu from '@/components/PopMenu/index';
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import { MenuDisabledState } from './utils/menuItemStatus';
|
|
||||||
import TrainDelete from './dialog/trainDelete';
|
import TrainDelete from './dialog/trainDelete';
|
||||||
import TrainDefine from './dialog/trainDefine';
|
import TrainDefine from './dialog/trainDefine';
|
||||||
import TrainMove from './dialog/trainMove';
|
import TrainMove from './dialog/trainMove';
|
||||||
@ -214,20 +213,17 @@ export default {
|
|||||||
menuForce: [
|
menuForce: [
|
||||||
{
|
{
|
||||||
label: '设置通信故障',
|
label: '设置通信故障',
|
||||||
handler: this.setStoppage,
|
handler: this.setStoppage
|
||||||
disabledCallback: MenuDisabledState.Train.setStoppage
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消通信故障',
|
label: '取消通信故障',
|
||||||
handler: this.cancelStoppage,
|
handler: this.cancelStoppage
|
||||||
disabledCallback: MenuDisabledState.Train.cancelStoppage
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
menuSpeed: [
|
menuSpeed: [
|
||||||
{
|
{
|
||||||
label: '确认运行至前方站',
|
label: '确认运行至前方站',
|
||||||
handler: this.limitSpeed,
|
handler: this.limitSpeed
|
||||||
disabledCallback: MenuDisabledState.Train.limitSpeed
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
@ -18,7 +18,7 @@ import { mapGetters } from 'vuex';
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationStandMenu',
|
name: 'StationStandMenu',
|
||||||
|
@ -1,570 +0,0 @@
|
|||||||
import Vue from 'vue';
|
|
||||||
import store from '@/store/index_APP_TARGET';
|
|
||||||
import deviceState from '@/jmap/constant/deviceState';
|
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
|
||||||
|
|
||||||
export function getCurrentStateObject() {
|
|
||||||
return store.getters['menuOperation/selected'];
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 系统类型 */
|
|
||||||
export const SystemType = {
|
|
||||||
'01': 'local', // 现地工作站
|
|
||||||
'02': 'central' // 中心调度工作站
|
|
||||||
};
|
|
||||||
|
|
||||||
export const StationControlType = {
|
|
||||||
'01': 'center', // 中控
|
|
||||||
'02': 'station' // 站控
|
|
||||||
};
|
|
||||||
|
|
||||||
// 控制禁用
|
|
||||||
export const MenuDisabledState = {
|
|
||||||
Section: {
|
|
||||||
// 故障解锁
|
|
||||||
fault() {
|
|
||||||
},
|
|
||||||
// 切除
|
|
||||||
split() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.cutOff != deviceState.Section.cutOff.Default) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 激活
|
|
||||||
active() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.cutOff == deviceState.Section.cutOff.Default) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 区段封锁
|
|
||||||
lock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.Section.status.State06) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 区段解禁
|
|
||||||
unlock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status != deviceState.Section.status.State06) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 区段设置限速
|
|
||||||
setSpeed() {
|
|
||||||
},
|
|
||||||
// 区段取消限速
|
|
||||||
cancelSpeed() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.speedUpperLimit == deviceState.Section.speedUpperLimit.Default) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 新建列车
|
|
||||||
newTrain() {
|
|
||||||
},
|
|
||||||
// 计轴预复位
|
|
||||||
axlePreReset() {
|
|
||||||
},
|
|
||||||
// 设置计轴有效
|
|
||||||
alxeEffective() {
|
|
||||||
},
|
|
||||||
// 设置计轴失效
|
|
||||||
alxeFailure() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.Section.status.State13) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Signal: {
|
|
||||||
// 进路选排
|
|
||||||
arrangementRoute() {
|
|
||||||
|
|
||||||
},
|
|
||||||
// 进路取消
|
|
||||||
cancelTrainRoute() {
|
|
||||||
},
|
|
||||||
// 信号封闭
|
|
||||||
lock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.Signal.status.State05) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 信号解封
|
|
||||||
unlock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status != deviceState.Signal.status.State05) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 信号重开
|
|
||||||
reopenSignal() {
|
|
||||||
},
|
|
||||||
// 进路引导
|
|
||||||
guide() {
|
|
||||||
},
|
|
||||||
// 设置联锁自动进路
|
|
||||||
setAutoInterlock() {
|
|
||||||
},
|
|
||||||
// 取消联锁自动进路
|
|
||||||
cancelAutoInterlock() {
|
|
||||||
},
|
|
||||||
// 设置联锁自动触发
|
|
||||||
setAutoTrigger() {
|
|
||||||
},
|
|
||||||
// 取消联锁自动触发
|
|
||||||
cancelAutoTrigger() {
|
|
||||||
},
|
|
||||||
// 关灯
|
|
||||||
signalClose() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.Signal.status.State01) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 人工控
|
|
||||||
humanControl() {
|
|
||||||
},
|
|
||||||
// ats自动控
|
|
||||||
atsAutoControl() {
|
|
||||||
},
|
|
||||||
// 查询进路状态
|
|
||||||
detail() {
|
|
||||||
},
|
|
||||||
// 设置故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Station: {
|
|
||||||
// 全站设置联锁自动触发
|
|
||||||
setAutoTrigger() {
|
|
||||||
},
|
|
||||||
// 全站取消联锁自动触发
|
|
||||||
cancelAutoTrigger() {
|
|
||||||
},
|
|
||||||
// 上电解锁
|
|
||||||
powerUnLock() {
|
|
||||||
},
|
|
||||||
// 执行关键操作测试
|
|
||||||
execKeyOperationTest() {
|
|
||||||
},
|
|
||||||
// 所有进路自排开
|
|
||||||
atsAutoControlALL() {
|
|
||||||
},
|
|
||||||
// 所有进路自排关
|
|
||||||
humanControlALL() {
|
|
||||||
},
|
|
||||||
// 设置ZC故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消ZC故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
StationControl: {
|
|
||||||
// 紧急站控
|
|
||||||
emergencyStationControl() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.StationControl.status.State03) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 请求站控
|
|
||||||
requestStationControl() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.StationControl.status.State02) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 强行站控
|
|
||||||
forcedStationControl() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.StationControl.status.State02) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 请求中控
|
|
||||||
requestCentralControl() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.StationControl.status.State01) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 设置故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
StationStand: {
|
|
||||||
// 设置扣车
|
|
||||||
setDetainTrain() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.holdStatus != deviceState.StationStand.holdStatus.State01) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消扣车
|
|
||||||
cancelDetainTrain() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State01) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 强制取消扣车
|
|
||||||
cancelDetainTrainForce() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State01) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 设置全站扣车
|
|
||||||
cancelDetainTrainAll() {
|
|
||||||
},
|
|
||||||
// 设置运行等级
|
|
||||||
setRunLevel() {
|
|
||||||
},
|
|
||||||
// 设置停站时间
|
|
||||||
setStopTime() {
|
|
||||||
},
|
|
||||||
// 设置跳停
|
|
||||||
setJumpStop() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.jumpStopStatus != deviceState.StationStand.jumpStopStatus.State01) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消跳停
|
|
||||||
cancelJumpStop() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.jumpStopStatus == deviceState.StationStand.jumpStopStatus.State01) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 提前发车
|
|
||||||
earlyDeparture() {
|
|
||||||
},
|
|
||||||
// 站台详细信息
|
|
||||||
detail() {
|
|
||||||
},
|
|
||||||
// 设置折返策略
|
|
||||||
setBackStrategy() {
|
|
||||||
},
|
|
||||||
// 设置故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Switch: {
|
|
||||||
// 单锁
|
|
||||||
lock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.Switch.status.State10) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 解锁
|
|
||||||
unlock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status != deviceState.Switch.status.State10) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 封锁
|
|
||||||
block() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.Switch.status.State14) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 解封
|
|
||||||
unblock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status != deviceState.Switch.status.State14) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 强扳
|
|
||||||
switchTurnoutForce() {
|
|
||||||
},
|
|
||||||
// 转动
|
|
||||||
switchTurnout() {
|
|
||||||
},
|
|
||||||
// 道岔故障解锁
|
|
||||||
fault() {
|
|
||||||
},
|
|
||||||
// 计轴预复位
|
|
||||||
axlePreReset() {
|
|
||||||
},
|
|
||||||
// 道岔切除
|
|
||||||
split() {
|
|
||||||
},
|
|
||||||
// 道岔激活
|
|
||||||
active() {
|
|
||||||
},
|
|
||||||
// 道岔设置速度
|
|
||||||
setSpeed() {
|
|
||||||
// const device = getCurrentStateObject();
|
|
||||||
},
|
|
||||||
// 设置计轴有效
|
|
||||||
alxeEffective() {
|
|
||||||
},
|
|
||||||
// 道岔取消速度
|
|
||||||
cancelSpeed() {
|
|
||||||
},
|
|
||||||
// 设置故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Train: {
|
|
||||||
// 添加列车识别号
|
|
||||||
addTrainId() {
|
|
||||||
},
|
|
||||||
// 删除列车识别号
|
|
||||||
delTrainId() {
|
|
||||||
},
|
|
||||||
// 修改列车识别号
|
|
||||||
editTrainId() {
|
|
||||||
},
|
|
||||||
// 修改车组号
|
|
||||||
editTrainNo() {
|
|
||||||
},
|
|
||||||
// 移动列车识别号
|
|
||||||
moveTrainId() {
|
|
||||||
},
|
|
||||||
// 交换列车识别号
|
|
||||||
switchTrainId() {
|
|
||||||
},
|
|
||||||
// 设置限速
|
|
||||||
limitSpeed() {
|
|
||||||
},
|
|
||||||
// 设置通信故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消通信故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 添加计划车
|
|
||||||
addPlanTrain() {
|
|
||||||
},
|
|
||||||
// 设置计划车
|
|
||||||
setPlanTrain() {
|
|
||||||
},
|
|
||||||
// 设置头码车
|
|
||||||
setHeadTrain() {
|
|
||||||
},
|
|
||||||
// 设置人工车
|
|
||||||
setWorkTrain() {
|
|
||||||
},
|
|
||||||
// 标记重点车
|
|
||||||
trainToFlag() {
|
|
||||||
},
|
|
||||||
// 取消标记重点车
|
|
||||||
trainUnFlag() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 将menu的disabled属性使用disabledCallback计算并返回
|
|
||||||
* @param {Array} menu
|
|
||||||
*/
|
|
||||||
export function menuConvert(menu) {
|
|
||||||
if (menu.constructor === Array) {
|
|
||||||
menu.forEach(elem => {
|
|
||||||
if (elem.type === 'separator') {
|
|
||||||
elem.show = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// if (elem.disabledCallback.constructor === Function) {
|
|
||||||
// if (!elem.defaultDisabled) {
|
|
||||||
// elem.disabled = elem.disabledCallback();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return menu;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据产品类型,返回对应的menuBar
|
|
||||||
* @param {*} menuObj
|
|
||||||
*/
|
|
||||||
export function menuBarConvert(menu, mode) {
|
|
||||||
if (menu) {
|
|
||||||
if (mode === OperateMode.NORMAL) {
|
|
||||||
menu.forEach(item => {
|
|
||||||
if (item.type === 'separator') {
|
|
||||||
item.show = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
item.show = false;
|
|
||||||
if (!item.click) {
|
|
||||||
item.click = () => { };
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!item.froce) {
|
|
||||||
item.show = true;
|
|
||||||
if (item.children && item.children.length > 0) {
|
|
||||||
menuBarConvert(item.children, mode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else if (mode === OperateMode.ADMIN) {
|
|
||||||
menu.forEach(item => {
|
|
||||||
item.show = true;
|
|
||||||
if (!item.click) {
|
|
||||||
item.click = () => { };
|
|
||||||
}
|
|
||||||
if (item.children && item.children.length > 0) {
|
|
||||||
menuBarConvert(item.children, mode);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return menu || [];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 将menu的show属性过滤返回
|
|
||||||
* @param {Array} menu
|
|
||||||
*/
|
|
||||||
export function menuFiltration(menuObj) {
|
|
||||||
var selected = getCurrentStateObject();
|
|
||||||
var control;
|
|
||||||
var menu = [];
|
|
||||||
|
|
||||||
if (selected._type == 'StationStand') {
|
|
||||||
control = store.getters['map/getStationControlByStationCode'](selected.deviceStationCode);
|
|
||||||
} else if (selected._type == 'Station') {
|
|
||||||
control = store.getters['map/getStationControlByStationCode'](selected.code);
|
|
||||||
} else {
|
|
||||||
control = store.getters['map/getStationControlByStationCode'](selected.stationCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (control) {
|
|
||||||
if (store.state.training.prdType != '') {
|
|
||||||
const type = SystemType[store.state.training.prdType];
|
|
||||||
const status = StationControlType[control.status];
|
|
||||||
menu = [...menuObj[type]];
|
|
||||||
if (menu.constructor === Array) {
|
|
||||||
menu.forEach(elem => {
|
|
||||||
if (elem.type === 'separator') {
|
|
||||||
elem.show = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (elem.auth.constructor === Object) {
|
|
||||||
elem.show = true;
|
|
||||||
if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
|
|
||||||
elem.show = false;
|
|
||||||
}
|
|
||||||
elem.defaultDisabled = !elem.auth[status];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return menu;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 将train menu的show属性过滤返回
|
|
||||||
*/
|
|
||||||
export function trainMenuFiltration(menuObj) {
|
|
||||||
var menu = [];
|
|
||||||
if (store.state.training.prdType != '') {
|
|
||||||
const type = SystemType[store.state.training.prdType];
|
|
||||||
menu = [...menuObj[type]];
|
|
||||||
if (menu.constructor === Array) {
|
|
||||||
menu.forEach(elem => {
|
|
||||||
if (elem.type === 'separator') {
|
|
||||||
elem.show = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (elem.auth.constructor === Object) {
|
|
||||||
elem.show = true;
|
|
||||||
if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
|
|
||||||
elem.show = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return menu;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 离开菜单以及执行完菜单取消选中状态
|
|
||||||
*/
|
|
||||||
export function mouseCancelState(selected) {
|
|
||||||
const device = Vue.prototype.$jlmap.getDeviceByCode(selected.code);
|
|
||||||
const instance = (device || {}).instance;
|
|
||||||
if (instance && instance.mouseEvent && instance.mouseEvent.mouseout) {
|
|
||||||
device['down'] = false;
|
|
||||||
instance.mouseEvent.mouseout(Vue.prototype.$jlmap.$zr.curEvent);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,302 +0,0 @@
|
|||||||
import store from '@/store/index_APP_TARGET';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
|
|
||||||
// 操作
|
|
||||||
export const menuOperate = {
|
|
||||||
Section:{
|
|
||||||
alxeFailure:{
|
|
||||||
// 设置计轴失效
|
|
||||||
operation: OperationEvent.Section.alxeFailure.menu.operation,
|
|
||||||
// cmdType 值有问题
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
|
||||||
},
|
|
||||||
active:{
|
|
||||||
// 区段激活
|
|
||||||
operation: OperationEvent.Section.active.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
|
||||||
},
|
|
||||||
alxeEffective:{
|
|
||||||
// 确认计轴有效
|
|
||||||
operation: OperationEvent.Section.alxeEffective.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
|
|
||||||
},
|
|
||||||
split:{
|
|
||||||
// 区段切除
|
|
||||||
operation: OperationEvent.Section.split.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
|
||||||
},
|
|
||||||
lock:{
|
|
||||||
// 区段封锁
|
|
||||||
operation: OperationEvent.Section.lock.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
|
||||||
},
|
|
||||||
unlock:{
|
|
||||||
// 区段解锁
|
|
||||||
operation: OperationEvent.Section.unlock.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
|
||||||
},
|
|
||||||
setSpeed:{
|
|
||||||
// 设置速度
|
|
||||||
operation: OperationEvent.Section.setSpeed.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
|
||||||
},
|
|
||||||
fault:{
|
|
||||||
// 区段故障解锁
|
|
||||||
operation: OperationEvent.Section.fault.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Signal:{
|
|
||||||
arrangementRoute:{
|
|
||||||
// 排列进路
|
|
||||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
|
||||||
},
|
|
||||||
cancelTrainRoute:{
|
|
||||||
// 取消进路
|
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
|
||||||
},
|
|
||||||
lock:{
|
|
||||||
// 信号封锁
|
|
||||||
operation:OperationEvent.Signal.lock.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
|
||||||
},
|
|
||||||
unlock:{
|
|
||||||
// 信号解封
|
|
||||||
operation: OperationEvent.Signal.unlock.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
|
||||||
},
|
|
||||||
guide:{
|
|
||||||
// 进路引导
|
|
||||||
operation: OperationEvent.Signal.guide.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
|
||||||
},
|
|
||||||
reopenSignal:{
|
|
||||||
// 信号重开
|
|
||||||
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
|
||||||
},
|
|
||||||
signalClose:{
|
|
||||||
// 信号关灯
|
|
||||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
|
||||||
},
|
|
||||||
humanControl:{
|
|
||||||
// 进路交人工控
|
|
||||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
|
||||||
},
|
|
||||||
atsAutoControl:{
|
|
||||||
// 进路交自动控
|
|
||||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
|
||||||
},
|
|
||||||
setAutoInterlock:{
|
|
||||||
// 设置通过模式
|
|
||||||
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
|
||||||
},
|
|
||||||
cancelAutoInterlock:{
|
|
||||||
// 取消通过模式
|
|
||||||
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
|
||||||
},
|
|
||||||
detail:{
|
|
||||||
// 查询进路状态
|
|
||||||
operation: OperationEvent.Signal.detail.menu.operation
|
|
||||||
},
|
|
||||||
cancelGuide:{
|
|
||||||
// 人工解锁进路(信号机取消引导)
|
|
||||||
operation: OperationEvent.Signal.cancelGuide.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
|
||||||
},
|
|
||||||
setAutoTurnBack:{
|
|
||||||
// 设置自动折返
|
|
||||||
operation: OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
|
|
||||||
},
|
|
||||||
cancelAutoTurnBack:{
|
|
||||||
// 取消自动折返
|
|
||||||
operation: OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Switch:{
|
|
||||||
lock:{
|
|
||||||
// 道岔单锁
|
|
||||||
operation: OperationEvent.Switch.lock.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
|
||||||
},
|
|
||||||
unlock:{
|
|
||||||
// 道岔解锁
|
|
||||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
|
||||||
},
|
|
||||||
block:{
|
|
||||||
// 道岔封锁
|
|
||||||
operation: OperationEvent.Switch.block.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
|
||||||
},
|
|
||||||
unblock:{
|
|
||||||
// 道岔解封
|
|
||||||
operation: OperationEvent.Switch.unblock.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
|
||||||
},
|
|
||||||
locate:{
|
|
||||||
// 道岔定操
|
|
||||||
operation: OperationEvent.Switch.locate.menu.operation,
|
|
||||||
cmdType:CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
|
||||||
},
|
|
||||||
reverse:{
|
|
||||||
// 道岔反操
|
|
||||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
|
||||||
cmdType:CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
|
||||||
},
|
|
||||||
split:{
|
|
||||||
// 区段切除
|
|
||||||
operation: OperationEvent.Switch.split.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
|
|
||||||
},
|
|
||||||
active:{
|
|
||||||
// 区段激活
|
|
||||||
operation: OperationEvent.Switch.active.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
|
||||||
},
|
|
||||||
setSpeed:{
|
|
||||||
// 设置临时限速
|
|
||||||
operation: OperationEvent.Switch.setSpeed.menu.operation,
|
|
||||||
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
|
||||||
},
|
|
||||||
alxeEffective:{
|
|
||||||
// 确认计轴有效
|
|
||||||
operation: OperationEvent.Switch.alxeEffective.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
|
|
||||||
}
|
|
||||||
},
|
|
||||||
StationStand:{
|
|
||||||
setDetainTrain:{
|
|
||||||
// 设置扣车
|
|
||||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
|
||||||
},
|
|
||||||
cancelDetainTrain:{
|
|
||||||
// 取消扣车
|
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
|
||||||
},
|
|
||||||
setDetainTrainAuto:{
|
|
||||||
// 区间列车数量限制
|
|
||||||
operation: OperationEvent.StationStand.setDetainTrainAuto.menu.operation,
|
|
||||||
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_AUTO
|
|
||||||
},
|
|
||||||
cancelDetainTrainAuto:{
|
|
||||||
// 取消区间列车数量限制
|
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrainAuto.menu.operation,
|
|
||||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_AUTO
|
|
||||||
},
|
|
||||||
setBulkBuckleTrain:{
|
|
||||||
// 批量扣车
|
|
||||||
operation: OperationEvent.StationStand.setBulkBuckleTrain.menu.operation,
|
|
||||||
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_ALL
|
|
||||||
},
|
|
||||||
cancelBulkBuckleTrain:{
|
|
||||||
// 批量取消扣车
|
|
||||||
operation: OperationEvent.StationStand.cancelBulkBuckleTrain.menu.operation,
|
|
||||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_ALL
|
|
||||||
},
|
|
||||||
setJumpStop:{
|
|
||||||
// 设置跳停
|
|
||||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
|
||||||
},
|
|
||||||
cancelJumpStop:{
|
|
||||||
// 取消跳停
|
|
||||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
|
||||||
},
|
|
||||||
setStopTime:{
|
|
||||||
// 停站时间控制
|
|
||||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
|
|
||||||
},
|
|
||||||
setRunLevel:{
|
|
||||||
// 运行时间控制
|
|
||||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME
|
|
||||||
},
|
|
||||||
earlyDeparture:{
|
|
||||||
// 设置提前发车
|
|
||||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
|
|
||||||
},
|
|
||||||
setBackStrategy:{
|
|
||||||
// 设置折返策略
|
|
||||||
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
|
|
||||||
},
|
|
||||||
detail:{
|
|
||||||
// 查询站台状态
|
|
||||||
operation: OperationEvent.StationStand.detail.menu.operation
|
|
||||||
}
|
|
||||||
},
|
|
||||||
StationControl:{
|
|
||||||
requestCentralControl:{
|
|
||||||
// 请求中控(遥控)
|
|
||||||
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
|
|
||||||
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
|
|
||||||
},
|
|
||||||
requestStationControl:{
|
|
||||||
// 请求站控
|
|
||||||
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
|
|
||||||
cmdType:CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
|
|
||||||
},
|
|
||||||
emergencyStationControl:{
|
|
||||||
// 紧急站控
|
|
||||||
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
|
|
||||||
cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Common: {
|
|
||||||
setFault: {
|
|
||||||
operation: OperationEvent.MixinCommand.stoppage.menu.operation,
|
|
||||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
|
||||||
},
|
|
||||||
cancelFault: {
|
|
||||||
operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation,
|
|
||||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export function commitOperate(operate, paramList, over) {
|
|
||||||
const step = {
|
|
||||||
start: true,
|
|
||||||
operation: operate.operation,
|
|
||||||
param:{}
|
|
||||||
};
|
|
||||||
step.param = paramList;
|
|
||||||
// over 0为首次操作,1为中间操作,2为最后操作,3为直接一次性操作
|
|
||||||
if (over == 0 || over == 3) {
|
|
||||||
const codeList = Object.values(paramList);
|
|
||||||
step.code = codeList[0];
|
|
||||||
}
|
|
||||||
if (over != 0 && over != 3) {
|
|
||||||
delete step.start;
|
|
||||||
}
|
|
||||||
if (over == 2 || over == 3) {
|
|
||||||
step.over = true;
|
|
||||||
step.cmdType = operate.cmdType;
|
|
||||||
}
|
|
||||||
return new Promise(function(resolve, reject) {
|
|
||||||
store.dispatch('training/nextNew', step).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
resolve({ valid: valid, operate: step });
|
|
||||||
}).catch(error=>{
|
|
||||||
reject(error);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
@ -147,7 +147,8 @@ export default {
|
|||||||
{ label: '站台', value: 'Stand' },
|
{ label: '站台', value: 'Stand' },
|
||||||
{ label: '车站', value: 'Station' },
|
{ label: '车站', value: 'Station' },
|
||||||
{ label: '控制模式', value: 'ControlConvertMenu' },
|
{ label: '控制模式', value: 'ControlConvertMenu' },
|
||||||
{ label: '车次窗', value: 'TrainWindow' }
|
{ label: '车次窗', value: 'TrainWindow' },
|
||||||
|
{ label: '全线限速', value: 'LimitControl' }
|
||||||
],
|
],
|
||||||
QuestionTypeList: [
|
QuestionTypeList: [
|
||||||
{ label: '选择题', value: 'select' },
|
{ label: '选择题', value: 'select' },
|
||||||
|
@ -64,6 +64,18 @@ export default {
|
|||||||
CMD_CM_REPLY_CENTER_CONTROL: {value:'CM_Reply_Center_Control', label: '回复中控请求'}
|
CMD_CM_REPLY_CENTER_CONTROL: {value:'CM_Reply_Center_Control', label: '回复中控请求'}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 司机操作
|
||||||
|
Driver:{
|
||||||
|
CMD_DRIVER_FORCE_CHANGE:{value:'Driver_Force_Change', label:'改变列车的牵引/制动力'},
|
||||||
|
CMD_DRIVER_EB:{value:'Driver_EB', label:'按EB按钮'},
|
||||||
|
CMD_DRIVER_GEAR_CHANGE:{value:'Driver_Gear_Change', label:'改变列车档位'},
|
||||||
|
CMD_DRIVER_ATO_OPEN:{value:'Driver_ATO_Open', label:'开启ATO'},
|
||||||
|
CMD_DRIVER_ATP_CHANGE:{value:'Driver_ATP_Change', label:'改变ATP状态'},
|
||||||
|
CMD_DRIVER_Drive_MODE_CHANGE:{value:'Driver_Drive_Mode_Change', label:'改变列车运行模式'},
|
||||||
|
CMD_DRIVER_CHANGE_HEAD:{value:'Driver_Change_Head', label:'换端'},
|
||||||
|
CMD_DRIVER_DOOR_ON_OFF:{value:'Driver_Door_On_Off', label:'列车车门开关'}
|
||||||
|
},
|
||||||
|
|
||||||
// 信号机操作
|
// 信号机操作
|
||||||
Signal: {
|
Signal: {
|
||||||
/** 设置故障 */
|
/** 设置故障 */
|
||||||
@ -255,6 +267,6 @@ export default {
|
|||||||
CMD_CANCEL_FAULT: {value: 'Cancel_Fault', label: '取消故障'}
|
CMD_CANCEL_FAULT: {value: 'Cancel_Fault', label: '取消故障'}
|
||||||
},
|
},
|
||||||
LimitControl: {
|
LimitControl: {
|
||||||
|
CMD_CANCEL_ALL_LIMIT_SPEED: {value: 'Cancel_All_Limit_Speed', label: '取消全线临时限速'}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -23,6 +23,8 @@ class MenuContextHandler {
|
|||||||
control = store.getters['map/getStationCodeByTrain'](selected);
|
control = store.getters['map/getStationCodeByTrain'](selected);
|
||||||
} else if (selected._type == 'TrainWindow') {
|
} else if (selected._type == 'TrainWindow') {
|
||||||
control = store.getters['map/getDeviceTrainWindowCodeByStationCode'](selected.code);
|
control = store.getters['map/getDeviceTrainWindowCodeByStationCode'](selected.code);
|
||||||
|
} else if (selected._type == 'LimitControl') {
|
||||||
|
return true;
|
||||||
} else {
|
} else {
|
||||||
control = store.getters['map/getDeviceStationCodeByStationCode'](selected.stationCode);
|
control = store.getters['map/getDeviceStationCodeByStationCode'](selected.stationCode);
|
||||||
}
|
}
|
||||||
@ -81,9 +83,13 @@ class MenuContextHandler {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const data = CommandHandler.getDefinition(elem.cmdType);
|
const data = CommandHandler.getDefinition(elem.cmdType);
|
||||||
|
|
||||||
if (data) {
|
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.show = true;
|
||||||
elem.disabled = this.checkDisabled(data, selected);
|
elem.disabled = this.checkDisabled(data, selected);
|
||||||
} else {
|
} else {
|
||||||
|
@ -5,8 +5,8 @@ export function getBaseUrl() {
|
|||||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||||
BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||||
|
@ -234,8 +234,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
let param = {
|
||||||
throttle(trainSimulationForce(this.group,this.groupNum, this.move),200,true);
|
groupNumber:this.groupNum,
|
||||||
|
percent:this.move
|
||||||
|
};
|
||||||
|
throttle(
|
||||||
|
trainSimulationForce(this.group,param).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
}).catch((error) => {
|
||||||
|
console.log(error);
|
||||||
|
})
|
||||||
|
,200,true);
|
||||||
updatemmic1(this.move);
|
updatemmic1(this.move);
|
||||||
},
|
},
|
||||||
speedend: function(event){
|
speedend: function(event){
|
||||||
@ -316,7 +325,12 @@
|
|||||||
if(this.userRole == "DRIVER"){
|
if(this.userRole == "DRIVER"){
|
||||||
if(angle<63 && angle>46){
|
if(angle<63 && angle>46){
|
||||||
if(this.touchstate != "Drive"){
|
if(this.touchstate != "Drive"){
|
||||||
trainSimulationGear(this.group,this.groupNum,"Drive").then(netdata => {
|
let data = {
|
||||||
|
groupNumber:this.groupNum,
|
||||||
|
gear:"Drive"
|
||||||
|
};
|
||||||
|
trainSimulationGear(this.group,data).then(netdata => {
|
||||||
|
console.log(netdata);
|
||||||
if(netdata.code == "200"){
|
if(netdata.code == "200"){
|
||||||
this.toutransform = "rotate(140deg)";
|
this.toutransform = "rotate(140deg)";
|
||||||
this.touchstate = "Drive";
|
this.touchstate = "Drive";
|
||||||
@ -328,7 +342,11 @@
|
|||||||
|
|
||||||
}else if(angle<93 && angle>68){
|
}else if(angle<93 && angle>68){
|
||||||
if(this.touchstate != "Neutral"){
|
if(this.touchstate != "Neutral"){
|
||||||
trainSimulationGear(this.group,this.groupNum,"Neutral").then(netdata => {
|
let data = {
|
||||||
|
groupNumber:this.groupNum,
|
||||||
|
gear:"Neutral"
|
||||||
|
};
|
||||||
|
trainSimulationGear(this.group,data).then(netdata => {
|
||||||
if(netdata.code == "200"){
|
if(netdata.code == "200"){
|
||||||
this.toutransform = "rotate(175deg)";
|
this.toutransform = "rotate(175deg)";
|
||||||
this.touchstate = "Neutral";
|
this.touchstate = "Neutral";
|
||||||
@ -340,7 +358,11 @@
|
|||||||
|
|
||||||
}else if(angle<127 && angle>101){
|
}else if(angle<127 && angle>101){
|
||||||
if(this.touchstate != "Reverse"){
|
if(this.touchstate != "Reverse"){
|
||||||
trainSimulationGear(this.group,this.groupNum,"Reverse").then(netdata => {
|
let data = {
|
||||||
|
groupNumber:this.groupNum,
|
||||||
|
gear:"Reverse"
|
||||||
|
};
|
||||||
|
trainSimulationGear(this.group,data).then(netdata => {
|
||||||
if(netdata.code == "200"){
|
if(netdata.code == "200"){
|
||||||
this.toutransform = "rotate(205deg)";
|
this.toutransform = "rotate(205deg)";
|
||||||
this.touchstate = "Reverse";
|
this.touchstate = "Reverse";
|
||||||
|
@ -352,7 +352,11 @@
|
|||||||
},
|
},
|
||||||
atpclick: function (e){
|
atpclick: function (e){
|
||||||
//console.log("atp");
|
//console.log("atp");
|
||||||
trainSimulationAtp(this.group,this.groupNum).then(netdata => {
|
let data = {
|
||||||
|
groupNumber:this.groupNum,
|
||||||
|
cutOff:true,
|
||||||
|
};
|
||||||
|
trainSimulationAtp(this.group,data).then(netdata => {
|
||||||
// console.log(netdata);
|
// console.log(netdata);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -361,17 +365,28 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
changehead: function(e){
|
changehead: function(e){
|
||||||
trainSimulationChangeHead(this.group,this.groupNum).then(netdata => {
|
let data = {
|
||||||
|
groupNumber:this.groupNum,
|
||||||
|
};
|
||||||
|
trainSimulationChangeHead(this.group,data).then(netdata => {
|
||||||
// console.log(netdata);
|
// console.log(netdata);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
bmcbtcclick: function (e){
|
bmcbtcclick: function (e){
|
||||||
trainSimulationDriveMode(this.group,this.groupNum,"CM").then(netdata => {
|
let data = {
|
||||||
|
groupNumber:this.groupNum,
|
||||||
|
driveMode:"CM"
|
||||||
|
};
|
||||||
|
trainSimulationDriveMode(this.group,data).then(netdata => {
|
||||||
// console.log(netdata);
|
// console.log(netdata);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
rmclick: function (e){
|
rmclick: function (e){
|
||||||
trainSimulationDriveMode(this.group,this.groupNum,"RM").then(netdata => {
|
let data = {
|
||||||
|
groupNumber:this.groupNum,
|
||||||
|
driveMode:"RM"
|
||||||
|
};
|
||||||
|
trainSimulationDriveMode(this.group,data).then(netdata => {
|
||||||
// console.log(netdata);
|
// console.log(netdata);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -395,31 +410,53 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
dloclick: function (e){
|
dloclick: function (e){
|
||||||
trainSimulationDoorControl(this.group,this.groupNum,false,true).then(netdata => {
|
let data = {
|
||||||
|
groupNumber:this.groupNum,
|
||||||
|
right:false,
|
||||||
|
open:true,
|
||||||
|
};
|
||||||
|
trainSimulationDoorControl(this.group,data).then(netdata => {
|
||||||
// console.log(netdata);
|
// console.log(netdata);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
dlcclick: function (e){
|
dlcclick: function (e){
|
||||||
|
let data = {
|
||||||
trainSimulationDoorControl(this.group,this.groupNum,false,false).then(netdata => {
|
groupNumber:this.groupNum,
|
||||||
|
right:false,
|
||||||
|
open:false,
|
||||||
|
};
|
||||||
|
trainSimulationDoorControl(this.group,data).then(netdata => {
|
||||||
// console.log(netdata);
|
// console.log(netdata);
|
||||||
this.doorleftimg = this.greenimg;
|
this.doorleftimg = this.greenimg;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
droclick: function (e){
|
droclick: function (e){
|
||||||
trainSimulationDoorControl(this.group,this.groupNum,true,true).then(netdata => {
|
let data = {
|
||||||
|
groupNumber:this.groupNum,
|
||||||
|
right:true,
|
||||||
|
open:true,
|
||||||
|
};
|
||||||
|
trainSimulationDoorControl(this.group,data).then(netdata => {
|
||||||
// console.log(netdata);
|
// console.log(netdata);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
drcclick: function (e){
|
drcclick: function (e){
|
||||||
trainSimulationDoorControl(this.group,this.groupNum,true,false).then(netdata => {
|
let data = {
|
||||||
|
groupNumber:this.groupNum,
|
||||||
|
right:true,
|
||||||
|
open:false,
|
||||||
|
};
|
||||||
|
trainSimulationDoorControl(this.group,data).then(netdata => {
|
||||||
// console.log(netdata);
|
// console.log(netdata);
|
||||||
this.doorrightimg = this.greenimg;
|
this.doorrightimg = this.greenimg;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
atoaclick: function (e){
|
atoaclick: function (e){
|
||||||
trainSimulationAto(this.group,this.groupNum).then(netdata => {
|
let data = {
|
||||||
|
groupNumber:this.groupNum,
|
||||||
|
};
|
||||||
|
trainSimulationAto(this.group,data).then(netdata => {
|
||||||
// console.log(netdata);
|
// console.log(netdata);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -427,7 +464,10 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
ebstop: function (e){
|
ebstop: function (e){
|
||||||
trainSimulationEb(this.group,this.groupNum).then(netdata => {
|
let data = {
|
||||||
|
groupNumber:this.groupNum,
|
||||||
|
};
|
||||||
|
trainSimulationEb(this.group,data).then(netdata => {
|
||||||
// console.log(netdata);
|
// console.log(netdata);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -211,7 +211,6 @@ export default {
|
|||||||
},
|
},
|
||||||
updatetrainstatus(newdata){
|
updatetrainstatus(newdata){
|
||||||
//更新车组号
|
//更新车组号
|
||||||
console.log(newdata);
|
|
||||||
this.updatemmispeedview(newdata.v,newdata.pv,newdata.tv);
|
this.updatemmispeedview(newdata.v,newdata.pv,newdata.tv);
|
||||||
|
|
||||||
this.updatemmilen(newdata.maLen);
|
this.updatemmilen(newdata.maLen);
|
||||||
@ -243,7 +242,6 @@ export default {
|
|||||||
if(this.mmimodel.updateato){
|
if(this.mmimodel.updateato){
|
||||||
this.mmimodel.updateato(atospeed);
|
this.mmimodel.updateato(atospeed);
|
||||||
}
|
}
|
||||||
console.log(this.m9state1);
|
|
||||||
|
|
||||||
if(this.m9state1 == false){
|
if(this.m9state1 == false){
|
||||||
if(speed>atospeed){
|
if(speed>atospeed){
|
||||||
@ -261,8 +259,6 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
updatedrivedata(drivedata){
|
updatedrivedata(drivedata){
|
||||||
// console.log(drivedata);
|
|
||||||
// // console.log(drivedata);
|
|
||||||
// if(drivedata == "breaker"){
|
// if(drivedata == "breaker"){
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
|
@ -134,7 +134,7 @@ export default {
|
|||||||
operateType = 'ControlConvertMenu';
|
operateType = 'ControlConvertMenu';
|
||||||
}
|
}
|
||||||
const operateName = CMD[operateType]['CMD_' + data];
|
const operateName = CMD[operateType]['CMD_' + data];
|
||||||
const deviceTypeList = {Section:'区段', Switch:'道岔', Signal:'信号机', Stand:'站台', Station:'车站', TrainWindow:'车次窗', ControlConvertMenu:'控制模式'};
|
const deviceTypeList = {Section:'区段', Switch:'道岔', Signal:'信号机', Stand:'站台', Station:'车站', TrainWindow:'车次窗', ControlConvertMenu:'控制模式', Driver:'司机'};
|
||||||
const operateTypeName = deviceTypeList[operateType];
|
const operateTypeName = deviceTypeList[operateType];
|
||||||
this.actionInfoList.push({id: element.id, isCoversition: false, memberName: memberName, command: operateTypeName + '(' + operateName.label + ')', row: element, visible: false});
|
this.actionInfoList.push({id: element.id, isCoversition: false, memberName: memberName, command: operateTypeName + '(' + operateName.label + ')', row: element, visible: false});
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user