调整福州使用新版指令方式发送
This commit is contained in:
parent
7dde1958f5
commit
3044da2ea4
@ -25,7 +25,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NoticeInfo',
|
name: 'NoticeInfo',
|
||||||
|
@ -1,16 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog v-dialogDrag class="fuzhou-01__systerm confirm-control" :title="title" :visible.sync="show" width="360px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false" append-to-body>
|
||||||
v-dialogDrag
|
|
||||||
class="fuzhou-01__systerm confirm-control"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="360px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
append-to-body
|
|
||||||
>
|
|
||||||
<div class="context">
|
<div class="context">
|
||||||
<template v-for="(message,index) in messages">
|
<template v-for="(message,index) in messages">
|
||||||
<span :key="index">{{ message }}</span>
|
<span :key="index">{{ message }}</span>
|
||||||
@ -29,7 +18,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import NoticeInfo from './childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -166,9 +156,9 @@ export default {
|
|||||||
// 进路设置
|
// 进路设置
|
||||||
routeSetting() {
|
routeSetting() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: this.operate.type,
|
operation: OperationEvent.Signal.arrangementRoute.confirm.operation,
|
||||||
operation: OperationEvent.Signal.arrangementRoute.confirm.operation
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -186,9 +176,9 @@ export default {
|
|||||||
// 信号关灯
|
// 信号关灯
|
||||||
signalClose() {
|
signalClose() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: this.operate.type,
|
operation: OperationEvent.Signal.signalClose.confirm.operation,
|
||||||
operation: OperationEvent.Signal.signalClose.confirm.operation
|
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -206,9 +196,9 @@ export default {
|
|||||||
// 信号重开
|
// 信号重开
|
||||||
reopenSignal() {
|
reopenSignal() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: this.operate.type,
|
operation: OperationEvent.Signal.reopenSignal.confirm.operation,
|
||||||
operation: OperationEvent.Signal.reopenSignal.confirm.operation
|
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -226,9 +216,9 @@ export default {
|
|||||||
// 取消进路
|
// 取消进路
|
||||||
cancelTrainRoute() {
|
cancelTrainRoute() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: this.operate.type,
|
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation,
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -246,9 +236,9 @@ export default {
|
|||||||
// 进路交人工控
|
// 进路交人工控
|
||||||
humanControl() {
|
humanControl() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||||
operation: OperationEvent.Signal.humanControl.menu.operation
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -266,9 +256,9 @@ export default {
|
|||||||
// 进路交ATS自动控
|
// 进路交ATS自动控
|
||||||
atsAutoControl() {
|
atsAutoControl() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -286,9 +276,9 @@ export default {
|
|||||||
// 设置运行等级
|
// 设置运行等级
|
||||||
setRunLevel() {
|
setRunLevel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.StationStand.setRunLevel.confirm.operation,
|
operation: OperationEvent.StationStand.setRunLevel.confirm.operation,
|
||||||
|
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME,
|
||||||
val: this.operate.val
|
val: this.operate.val
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -307,9 +297,9 @@ export default {
|
|||||||
// 停站时间
|
// 停站时间
|
||||||
setStopTime() {
|
setStopTime() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.StationStand.setStopTime.confirm.operation,
|
operation: OperationEvent.StationStand.setStopTime.confirm.operation,
|
||||||
|
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME,
|
||||||
val: this.operate.val
|
val: this.operate.val
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -328,9 +318,9 @@ export default {
|
|||||||
// 设置折返策略
|
// 设置折返策略
|
||||||
setBackStrategy() {
|
setBackStrategy() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.StationStand.setBackStrategy.confirm.operation,
|
operation: OperationEvent.StationStand.setBackStrategy.confirm.operation,
|
||||||
|
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY,
|
||||||
val: this.operate.val
|
val: this.operate.val
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -348,7 +338,6 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,16 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog v-dialogDrag class="fuzhou-01__systerm confirm-control-speed" :title="title" :visible.sync="show" width="540px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false" append-to-body>
|
||||||
v-dialogDrag
|
|
||||||
class="fuzhou-01__systerm confirm-control-speed"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="540px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
append-to-body
|
|
||||||
>
|
|
||||||
<div style="height: 60px; padding-left: 20px">
|
<div style="height: 60px; padding-left: 20px">
|
||||||
<span style="font-size: 18px">{{ message }}</span>
|
<span style="font-size: 18px">{{ message }}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -26,7 +15,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ConfirmControlSpeed',
|
name: 'ConfirmControlSpeed',
|
||||||
@ -34,7 +23,6 @@ export default {
|
|||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
type: '',
|
|
||||||
operation: '',
|
operation: '',
|
||||||
message: ''
|
message: ''
|
||||||
};
|
};
|
||||||
@ -63,17 +51,13 @@ export default {
|
|||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||||
/** 区段设置限速*/
|
return OperationEvent.Section.setSpeed.confirm.domId; // 区段设置限速
|
||||||
return OperationEvent.Section.setSpeed.confirm.domId;
|
|
||||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||||
/** 区段取消限速*/
|
return OperationEvent.Section.cancelSpeed.confirm.domId; // 区段取消限速
|
||||||
return OperationEvent.Section.cancelSpeed.confirm.domId;
|
|
||||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||||
/** 道岔设置限速*/
|
return OperationEvent.Switch.setSpeed.confirm.domId; // 道岔设置限速
|
||||||
return OperationEvent.Switch.setSpeed.confirm.domId;
|
|
||||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||||
/** 道岔取消限速*/
|
return OperationEvent.Switch.cancelSpeed.confirm.domId; // 道岔取消限速
|
||||||
return OperationEvent.Switch.cancelSpeed.confirm.domId;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
@ -87,7 +71,6 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.type = operate.type;
|
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
this.message = operate.message;
|
this.message = operate.message;
|
||||||
}
|
}
|
||||||
@ -104,9 +87,7 @@ export default {
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
const operate = {
|
const operate = {};
|
||||||
type: this.type
|
|
||||||
};
|
|
||||||
|
|
||||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||||
/** 区段设置限速*/
|
/** 区段设置限速*/
|
||||||
@ -131,14 +112,12 @@ export default {
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
|
||||||
this.$emit('setOperate', { step: 0, success: false });
|
this.$emit('setOperate', { step: 0, success: false });
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: this.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteUnlockConfirm',
|
name: 'RouteUnlockConfirm',
|
||||||
@ -82,7 +82,6 @@ export default {
|
|||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Signal.unlock.confirm.operation
|
operation: OperationEvent.Signal.unlock.confirm.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -102,7 +101,6 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -29,8 +29,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from './childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ConfirmTrain',
|
name: 'ConfirmTrain',
|
||||||
@ -137,9 +138,9 @@ export default {
|
|||||||
// 进路设置
|
// 进路设置
|
||||||
routeSetting() {
|
routeSetting() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: this.operate.type,
|
operation: OperationEvent.Train.addTrainId.confirm.operation,
|
||||||
operation: OperationEvent.Train.addTrainId.confirm.operation
|
cmdType: CMD.Train.CMD_ADD_TRAIN_ID
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -156,7 +157,6 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -83,9 +83,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { now } from '@/utils/date';
|
import { now } from '@/utils/date';
|
||||||
import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock';
|
import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteCmdControl',
|
name: 'RouteCmdControl',
|
||||||
@ -269,7 +270,6 @@ export default {
|
|||||||
},
|
},
|
||||||
commandHasPopUp() {
|
commandHasPopUp() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
@ -290,7 +290,6 @@ export default {
|
|||||||
},
|
},
|
||||||
commandNoPopUp() {
|
commandNoPopUp() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||||
@ -314,7 +313,6 @@ export default {
|
|||||||
},
|
},
|
||||||
confirm1() {
|
confirm1() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
@ -343,16 +341,17 @@ export default {
|
|||||||
},
|
},
|
||||||
confirm2() {
|
confirm2() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true
|
||||||
type: MapDeviceType.Signal.type
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
/** 信号解封*/
|
/** 信号解封*/
|
||||||
operate.operation = OperationEvent.Signal.unlock.confirm2.operation;
|
operate.operation = OperationEvent.Signal.unlock.confirm2.operation;
|
||||||
|
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
|
||||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||||
/** 办理引导进路*/
|
/** 办理引导进路*/
|
||||||
operate.operation = OperationEvent.Signal.guide.confirm2.operation;
|
operate.operation = OperationEvent.Signal.guide.confirm2.operation;
|
||||||
|
operate.cmdType = CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE;
|
||||||
}
|
}
|
||||||
this.setMessage('');
|
this.setMessage('');
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
|
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
|
||||||
@ -375,7 +374,6 @@ export default {
|
|||||||
},
|
},
|
||||||
stop() {
|
stop() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
@ -401,7 +399,6 @@ export default {
|
|||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Command.close.menu.operation
|
operation: OperationEvent.Command.close.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -36,9 +36,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
import ConfirmControl from './childDialog/confirmControl';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteControl',
|
name: 'RouteControl',
|
||||||
@ -65,7 +67,7 @@ export default {
|
|||||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||||
@ -153,9 +155,9 @@ export default {
|
|||||||
// 现地工作站取消进路
|
// 现地工作站取消进路
|
||||||
cancelTrainRouteByLocal() {
|
cancelTrainRouteByLocal() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -173,8 +175,9 @@ export default {
|
|||||||
// 行调工作站取消进路
|
// 行调工作站取消进路
|
||||||
cancelTrainRouteByCentral() {
|
cancelTrainRouteByCentral() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
over: true,
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE,
|
||||||
messages: [this.$t('tip.signalModeToManualModeTipPrefix') + this.signalName + this.$t('tip.signalModeToManualModeTipSuffix')]
|
messages: [this.$t('tip.signalModeToManualModeTipPrefix') + this.signalName + this.$t('tip.signalModeToManualModeTipSuffix')]
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -193,7 +196,6 @@ export default {
|
|||||||
// 信号关灯
|
// 信号关灯
|
||||||
signalClose() {
|
signalClose() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
operation: OperationEvent.Signal.signalClose.menu.operation,
|
||||||
messages: [this.$t('menu.menuSignal.signalOff') + this.$t('global.colon') + this.signalName]
|
messages: [this.$t('menu.menuSignal.signalOff') + this.$t('global.colon') + this.signalName]
|
||||||
};
|
};
|
||||||
@ -213,7 +215,6 @@ export default {
|
|||||||
// 信号重开
|
// 信号重开
|
||||||
reopenSignal() {
|
reopenSignal() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
||||||
messages: [this.$t('menu.menuSignal.signalReopen') + this.$t('global.colon') + this.signalName]
|
messages: [this.$t('menu.menuSignal.signalReopen') + this.$t('global.colon') + this.signalName]
|
||||||
};
|
};
|
||||||
@ -233,8 +234,8 @@ export default {
|
|||||||
// 设置联锁自动进路
|
// 设置联锁自动进路
|
||||||
setAutoInterlock() {
|
setAutoInterlock() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Signal.type,
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO,
|
||||||
operation: OperationEvent.Signal.setAutoInterlock.menu.operation
|
operation: OperationEvent.Signal.setAutoInterlock.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -253,9 +254,9 @@ export default {
|
|||||||
// 取消联锁自动进路
|
// 取消联锁自动进路
|
||||||
cancelAutoInterlock() {
|
cancelAutoInterlock() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
|
||||||
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -273,9 +274,9 @@ export default {
|
|||||||
// 设置联锁自动触发
|
// 设置联锁自动触发
|
||||||
setAutoTrigger() {
|
setAutoTrigger() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.setAutoTrigger.menu.operation,
|
||||||
operation: OperationEvent.Signal.setAutoTrigger.menu.operation
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -293,9 +294,9 @@ export default {
|
|||||||
// 取消联锁自动触发
|
// 取消联锁自动触发
|
||||||
cancelAutoTrigger() {
|
cancelAutoTrigger() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation,
|
||||||
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
|
||||||
};
|
};
|
||||||
|
|
||||||
this.doClose();
|
this.doClose();
|
||||||
@ -314,7 +315,6 @@ export default {
|
|||||||
// 取消
|
// 取消
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Command.close.menu.operation
|
operation: OperationEvent.Command.close.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -62,8 +62,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteDetail',
|
name: 'RouteDetail',
|
||||||
@ -129,9 +130,9 @@ export default {
|
|||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.detail.menu.operation,
|
||||||
operation: OperationEvent.Signal.detail.menu.operation
|
cmdType: CMD.Signal.CMD_STAND_VIEW_STATUS
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -148,7 +149,7 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -79,9 +79,11 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
import ConfirmControl from './childDialog/confirmControl';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteHandControl',
|
name: 'RouteHandControl',
|
||||||
@ -121,7 +123,7 @@ export default {
|
|||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||||
@ -212,24 +214,14 @@ export default {
|
|||||||
this.selection = selection;
|
this.selection = selection;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
serializeCodeListWithSeparator(sep) {
|
|
||||||
const codeList = [];
|
|
||||||
if (this.selection && this.selection.length) {
|
|
||||||
this.selection.forEach(elem => {
|
|
||||||
codeList.push(elem.code);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return codeList.join(sep);
|
|
||||||
},
|
|
||||||
handleChooseChange(selection) {
|
handleChooseChange(selection) {
|
||||||
this.selection = selection;
|
this.selection = selection;
|
||||||
if (selection && selection.length) {
|
const codeList = selection.map(elem => { return elem.code; });
|
||||||
|
if (codeList && codeList.length) {
|
||||||
const operate = {
|
const operate = {
|
||||||
repeat: true,
|
repeat: true,
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: '',
|
operation: '',
|
||||||
val: this.serializeCodeListWithSeparator('::'),
|
val: codeList.join('::')
|
||||||
selection: selection
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||||
@ -260,10 +252,14 @@ export default {
|
|||||||
},
|
},
|
||||||
// 自排关
|
// 自排关
|
||||||
humanControl() {
|
humanControl() {
|
||||||
|
const codeList = this.selection.map(elem => { return elem.code; });
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||||
operation: OperationEvent.Signal.humanControl.menu.operation
|
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING,
|
||||||
|
param: {
|
||||||
|
Route_Code_List: codeList
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -280,10 +276,14 @@ export default {
|
|||||||
},
|
},
|
||||||
// 自排开
|
// 自排开
|
||||||
atsAutoControl() {
|
atsAutoControl() {
|
||||||
|
const codeList = this.selection.map(elem => { return elem.code; });
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation
|
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING,
|
||||||
|
param: {
|
||||||
|
Route_Code_List: codeList
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -300,7 +300,6 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -53,8 +53,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteLock',
|
name: 'RouteLock',
|
||||||
@ -131,9 +132,9 @@ export default {
|
|||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.lock.menu.operation,
|
||||||
operation: OperationEvent.Signal.lock.menu.operation
|
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -150,7 +151,6 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,15 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog v-dialogDrag class="fuzhou-01__systerm route-setting" :title="title" :visible.sync="show" width="500px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||||
v-dialogDrag
|
|
||||||
class="fuzhou-01__systerm route-setting"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="500px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<el-row class="header">
|
<el-row class="header">
|
||||||
<el-col :span="8"><span>{{ $t('menu.stationName') }}</span></el-col>
|
<el-col :span="8"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||||
<el-col :span="8" :offset="2"><span>{{ $t('menu.startSignal') }}</span></el-col>
|
<el-col :span="8" :offset="2"><span>{{ $t('menu.startSignal') }}</span></el-col>
|
||||||
@ -22,16 +12,7 @@
|
|||||||
<el-input v-model="signalName" size="small" disabled />
|
<el-input v-model="signalName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table
|
<el-table ref="table" :data="tempData" border style="width: 100%; margin-top:10px" size="mini" height="120" highlight-current-row @row-click="clickEvent">
|
||||||
ref="table"
|
|
||||||
:data="tempData"
|
|
||||||
border
|
|
||||||
style="width: 100%; margin-top:10px"
|
|
||||||
size="mini"
|
|
||||||
height="120"
|
|
||||||
highlight-current-row
|
|
||||||
@row-click="clickEvent"
|
|
||||||
>
|
|
||||||
<el-table-column :id="domIdChoose" prop="name" :label="this.$t('menu.route')" style="margin-left:30px" />
|
<el-table-column :id="domIdChoose" prop="name" :label="this.$t('menu.route')" style="margin-left:30px" />
|
||||||
<el-table-column prop="protectedSection" :label="this.$t('menu.protectionSection')" :width="180">
|
<el-table-column prop="protectedSection" :label="this.$t('menu.protectionSection')" :width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -45,11 +26,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-row
|
<el-row justify="center" class="button-group">
|
||||||
justify="
|
|
||||||
center"
|
|
||||||
class="button-group"
|
|
||||||
>
|
|
||||||
<el-col :span="8" :offset="4">
|
<el-col :span="8" :offset="4">
|
||||||
<el-button
|
<el-button
|
||||||
:id="domIdConfirm"
|
:id="domIdConfirm"
|
||||||
@ -69,7 +46,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
import ConfirmControl from './childDialog/confirmControl';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
@ -200,9 +177,11 @@ export default {
|
|||||||
|
|
||||||
// 设置选中指令
|
// 设置选中指令
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
|
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
|
||||||
val: row.code
|
val: row.code,
|
||||||
|
param: {
|
||||||
|
Route_Code: row.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -223,7 +202,6 @@ export default {
|
|||||||
names = names + this.row.overlapSwitchList.map(elem => { return elem.name; }).join('');
|
names = names + this.row.overlapSwitchList.map(elem => { return elem.name; }).join('');
|
||||||
}
|
}
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||||
messages: [this.$t('menu.accessSetting') + this.$t('global.colon') + `${this.row.name}${names}(${this.row.stationName})`]
|
messages: [this.$t('menu.accessSetting') + this.$t('global.colon') + `${this.row.name}${names}(${this.row.stationName})`]
|
||||||
};
|
};
|
||||||
@ -245,7 +223,6 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,16 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-dialog
|
<el-dialog v-dialogDrag class="fuzhou-01__systerm section-cmd-control" :title="title" :visible.sync="show" width="840px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||||
v-dialogDrag
|
|
||||||
class="fuzhou-01__systerm section-cmd-control"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="840px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||||
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
|
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
|
||||||
<el-form label-position="center" size="mini">
|
<el-form label-position="center" size="mini">
|
||||||
@ -18,12 +8,7 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item :label="this.$t('global.status')" label-width="40px">
|
<el-form-item :label="this.$t('global.status')" label-width="40px">
|
||||||
<el-select v-model="operation" size="small" disabled>
|
<el-select v-model="operation" size="small" disabled>
|
||||||
<el-option
|
<el-option v-for="option in typeList" :key="option.code" :label="option.name" :value="option.code" />
|
||||||
v-for="option in typeList"
|
|
||||||
:key="option.code"
|
|
||||||
:label="option.name"
|
|
||||||
:value="option.code"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -40,16 +25,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table :data="tempData" border style="width: 100%" size="mini" highlight-current-row height="200">
|
||||||
ref="tempData"
|
|
||||||
class="table"
|
|
||||||
:data="tempData"
|
|
||||||
border
|
|
||||||
style="width: 100%"
|
|
||||||
size="mini"
|
|
||||||
highlight-current-row
|
|
||||||
height="200"
|
|
||||||
>
|
|
||||||
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
|
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
|
||||||
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
|
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
|
||||||
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
|
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
|
||||||
@ -58,18 +34,17 @@
|
|||||||
<span class="notice">{{ message }}</span>
|
<span class="notice">{{ message }}</span>
|
||||||
<el-row class="button-group">
|
<el-row class="button-group">
|
||||||
<el-col :span="2" :offset="3">
|
<el-col :span="2" :offset="3">
|
||||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
|
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">
|
||||||
v-show="timeCountCommand>0"
|
{{ $t('menu.release') }}
|
||||||
>({{ timeCountCommand }})</span></el-button>
|
<span v-show="timeCountCommand>0">({{ timeCountCommand }})</span></el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" :offset="1">
|
<el-col :span="2" :offset="1">
|
||||||
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
|
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}</el-button>
|
||||||
</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" :offset="2">
|
<el-col :span="2" :offset="2">
|
||||||
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">{{ $t('menu.secondConfirm') }}<span
|
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">
|
||||||
v-show="timeCountConfirm>0"
|
{{ $t('menu.secondConfirm') }}
|
||||||
>({{ timeCountConfirm }})</span></el-button>
|
<span v-show="timeCountConfirm>0">({{ timeCountConfirm }})</span></el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" :offset="2">
|
<el-col :span="2" :offset="2">
|
||||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
|
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
|
||||||
@ -82,8 +57,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { now } from '@/utils/date';
|
import { now } from '@/utils/date';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SectionCmdControl',
|
name: 'SectionCmdControl',
|
||||||
@ -120,14 +96,11 @@ export default {
|
|||||||
domIdCommand() {
|
domIdCommand() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||||
/** 区段解封*/
|
return OperationEvent.Section.unlock.order.domId; // 区段解封
|
||||||
return OperationEvent.Section.unlock.order.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||||
/** 区段故障解锁*/
|
return OperationEvent.Section.fault.order.domId; // 区段故障解锁
|
||||||
return OperationEvent.Section.fault.order.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||||
/** 区段计轴预复位*/
|
return OperationEvent.Section.axlePreReset.order.domId; // 区段计轴预复位
|
||||||
return OperationEvent.Section.axlePreReset.order.domId;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
@ -135,14 +108,11 @@ export default {
|
|||||||
domIdConfirm1() {
|
domIdConfirm1() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||||
/** 区段解封*/
|
return OperationEvent.Section.unlock.confirm1.domId; // 区段解封
|
||||||
return OperationEvent.Section.unlock.confirm1.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||||
/** 区段故障解锁*/
|
return OperationEvent.Section.fault.confirm1.domId; // 区段故障解锁
|
||||||
return OperationEvent.Section.fault.confirm1.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||||
/** 区段计轴预复位*/
|
return OperationEvent.Section.axlePreReset.confirm1.domId; // 区段计轴预复位
|
||||||
return OperationEvent.Section.axlePreReset.confirm1.domId;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
@ -289,9 +259,7 @@ export default {
|
|||||||
commandHasPopUp() {
|
commandHasPopUp() {
|
||||||
},
|
},
|
||||||
commandNoPopUp() {
|
commandNoPopUp() {
|
||||||
const operate = {
|
const operate = {};
|
||||||
type: MapDeviceType.Section.type
|
|
||||||
};
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||||
/** 区段解封*/
|
/** 区段解封*/
|
||||||
@ -320,7 +288,6 @@ export default {
|
|||||||
},
|
},
|
||||||
confirm1() {
|
confirm1() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Section.type
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||||
@ -351,21 +318,22 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
confirm2() {
|
confirm2() {
|
||||||
const operate = {
|
const operate = {};
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.Section.type
|
|
||||||
};
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||||
/** 区段解封*/
|
/** 区段解封*/
|
||||||
operate.operation = OperationEvent.Section.unlock.confirm2.operation;
|
operate.operation = OperationEvent.Section.unlock.confirm2.operation;
|
||||||
|
operate.cmdType = CMD.Section.CMD_SECTION_UNBLOCK;
|
||||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||||
/** 区段故障解锁*/
|
/** 区段故障解锁*/
|
||||||
operate.operation = OperationEvent.Section.fault.confirm2.operation;
|
operate.operation = OperationEvent.Section.fault.confirm2.operation;
|
||||||
|
operate.cmdType = CMD.Section.CMD_SECTION_FAULT_UNLOCK;
|
||||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||||
/** 区段计轴预复位*/
|
/** 区段计轴预复位*/
|
||||||
operate.operation = OperationEvent.Section.axlePreReset.confirm2.operation;
|
operate.operation = OperationEvent.Section.axlePreReset.confirm2.operation;
|
||||||
|
operate.cmdType = CMD.Section.CMD_SECTION_AXIS_PRE_RESET;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setMessage('');
|
this.setMessage('');
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
|
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -386,9 +354,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
stop() {
|
stop() {
|
||||||
const operate = {
|
const operate = {};
|
||||||
type: MapDeviceType.Section.type
|
|
||||||
};
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||||
/** 区段解封*/
|
/** 区段解封*/
|
||||||
@ -416,7 +382,6 @@ export default {
|
|||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Section.type,
|
|
||||||
operation: OperationEvent.Command.close.menu.operation
|
operation: OperationEvent.Command.close.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -428,9 +393,6 @@ export default {
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getOperate(operate) {
|
|
||||||
/** 弹框返回值处理*/
|
|
||||||
},
|
|
||||||
setButtonEnable(param) {
|
setButtonEnable(param) {
|
||||||
this.cmdDisabled = [true, true, true];
|
this.cmdDisabled = [true, true, true];
|
||||||
if (param && param.step >= 0) {
|
if (param && param.step >= 0) {
|
||||||
|
@ -1,15 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog v-dialogDrag class="fuzhou-01__systerm section-control" :title="title" :visible.sync="show" width="300px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||||
v-dialogDrag
|
|
||||||
class="fuzhou-01__systerm section-control"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="300px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<el-row class="header">
|
<el-row class="header">
|
||||||
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
|
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||||
<el-col :span="11" :offset="2"><span>{{ $t('menu.section') }}</span></el-col>
|
<el-col :span="11" :offset="2"><span>{{ $t('menu.section') }}</span></el-col>
|
||||||
@ -35,8 +25,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SectionControl',
|
name: 'SectionControl',
|
||||||
@ -60,7 +52,7 @@ export default {
|
|||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.operation == OperationEvent.Section.lock.menu.operation) {
|
if (this.operation == OperationEvent.Section.lock.menu.operation) {
|
||||||
@ -111,64 +103,41 @@ export default {
|
|||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
if (this.operation == OperationEvent.Section.lock.menu.operation) {
|
if (this.operation == OperationEvent.Section.lock.menu.operation) {
|
||||||
/** 区段封锁*/
|
this.lock(); // 区段封锁
|
||||||
this.lock();
|
|
||||||
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
|
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
|
||||||
/** 轨道区段切除*/
|
this.split(); // 轨道区段切除
|
||||||
this.split();
|
|
||||||
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
||||||
/** 轨道区段激活*/
|
this.active(); // 轨道区段激活
|
||||||
this.active();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 道岔单锁
|
// 区段单锁
|
||||||
lock() {
|
lock() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Section.type,
|
operation: OperationEvent.Section.lock.menu.operation,
|
||||||
operation: OperationEvent.Section.lock.menu.operation
|
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||||
};
|
};
|
||||||
|
this.sendCommand(operate);
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// 轨道区段切除
|
// 轨道区段切除
|
||||||
split() {
|
split() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Section.type,
|
operation: OperationEvent.Section.split.menu.operation,
|
||||||
operation: OperationEvent.Section.split.menu.operation
|
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||||
};
|
};
|
||||||
|
this.sendCommand(operate);
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// 轨道区段激活
|
// 轨道区段激活
|
||||||
active() {
|
active() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Section.type,
|
operation: OperationEvent.Section.active.menu.operation,
|
||||||
operation: OperationEvent.Section.active.menu.operation
|
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||||
};
|
};
|
||||||
|
this.sendCommand(operate);
|
||||||
|
},
|
||||||
|
sendCommand(operate) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -176,14 +145,12 @@ export default {
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Section.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,16 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-dialog
|
<el-dialog v-dialogDrag class="fuzhou-01__systerm section-cmd-speed" :title="title" :visible.sync="show" width="840px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||||
v-dialogDrag
|
|
||||||
class="fuzhou-01__systerm section-cmd-speed"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="840px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||||
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
|
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
|
||||||
<el-form label-position="center" size="mini">
|
<el-form label-position="center" size="mini">
|
||||||
@ -18,12 +8,7 @@
|
|||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item :label="this.$t('menu.type')" label-width="40px">
|
<el-form-item :label="this.$t('menu.type')" label-width="40px">
|
||||||
<el-select v-model="operation" size="small" disabled>
|
<el-select v-model="operation" size="small" disabled>
|
||||||
<el-option
|
<el-option v-for="option in typeList" :key="option.code" :label="option.name" :value="option.code" />
|
||||||
v-for="option in typeList"
|
|
||||||
:key="option.code"
|
|
||||||
:label="option.name"
|
|
||||||
:value="option.code"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -39,13 +24,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item :label="this.$t('menu.speedLimitValue')" label-width="80px">
|
<el-form-item :label="this.$t('menu.speedLimitValue')" label-width="80px">
|
||||||
<el-select
|
<el-select :id="domIdChoose" v-model="formData.SpeedLimit_Value" size="small" :disabled="spdDisabled" @change="speedSelectChange">
|
||||||
:id="domIdChoose"
|
|
||||||
v-model="speed"
|
|
||||||
size="small"
|
|
||||||
:disabled="spdDisabled"
|
|
||||||
@change="speedSelectChange"
|
|
||||||
>
|
|
||||||
<el-option v-for="item in speedList" :key="item" :label="item" :value="item" />
|
<el-option v-for="item in speedList" :key="item" :label="item" :value="item" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -53,16 +32,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table :data="tableData" border style="width: 100%" size="mini" highlight-current-row height="200">
|
||||||
ref="table"
|
|
||||||
class="table"
|
|
||||||
:data="tableData"
|
|
||||||
border
|
|
||||||
style="width: 100%"
|
|
||||||
size="mini"
|
|
||||||
highlight-current-row
|
|
||||||
height="200"
|
|
||||||
>
|
|
||||||
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
|
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
|
||||||
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
|
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
|
||||||
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
|
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
|
||||||
@ -71,18 +41,17 @@
|
|||||||
<span class="notice">{{ message }}</span>
|
<span class="notice">{{ message }}</span>
|
||||||
<el-row class="button-group">
|
<el-row class="button-group">
|
||||||
<el-col :span="2" :offset="3">
|
<el-col :span="2" :offset="3">
|
||||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
|
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">
|
||||||
v-show="timeCountCommand>0"
|
{{ $t('menu.release') }}
|
||||||
>({{ timeCountCommand }})</span></el-button>
|
<span v-show="timeCountCommand>0">({{ timeCountCommand }})</span></el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" :offset="1">
|
<el-col :span="2" :offset="1">
|
||||||
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
|
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}</el-button>
|
||||||
</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" :offset="2">
|
<el-col :span="2" :offset="2">
|
||||||
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">{{ $t('menu.secondConfirm') }}<span
|
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">
|
||||||
v-show="timeCountConfirm>0"
|
{{ $t('menu.secondConfirm') }}
|
||||||
>({{ timeCountConfirm }})</span></el-button>
|
<span v-show="timeCountConfirm>0">({{ timeCountConfirm }})</span></el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" :offset="2">
|
<el-col :span="2" :offset="2">
|
||||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
|
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
|
||||||
@ -96,9 +65,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import ConfirmControlSpeed from './childDialog/confirmControlSpeed';
|
import ConfirmControlSpeed from './childDialog/confirmControlSpeed';
|
||||||
import { now } from '@/utils/date';
|
import { now } from '@/utils/date';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SectionCmdSpeed',
|
name: 'SectionCmdSpeed',
|
||||||
@ -113,7 +83,6 @@ export default {
|
|||||||
order: 0,
|
order: 0,
|
||||||
row: null,
|
row: null,
|
||||||
timer: null,
|
timer: null,
|
||||||
type: '',
|
|
||||||
operation: '',
|
operation: '',
|
||||||
cmdDisabled: [true, true, true],
|
cmdDisabled: [true, true, true],
|
||||||
spdDisabled: false,
|
spdDisabled: false,
|
||||||
@ -126,7 +95,9 @@ export default {
|
|||||||
speedSpace: 5,
|
speedSpace: 5,
|
||||||
stationName: '',
|
stationName: '',
|
||||||
name: '',
|
name: '',
|
||||||
speed: ''
|
formData: {
|
||||||
|
SpeedLimit_Value: ''
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -143,7 +114,7 @@ export default {
|
|||||||
speedList() {
|
speedList() {
|
||||||
const list = [];
|
const list = [];
|
||||||
for (var i = 0; i * this.speedSpace <= this.maxSpeed; i++) {
|
for (var i = 0; i * this.speedSpace <= this.maxSpeed; i++) {
|
||||||
list.push(String(i * this.speedSpace));
|
list.push(i * this.speedSpace);
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
},
|
},
|
||||||
@ -270,7 +241,6 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
cmdDisabled: {
|
cmdDisabled: {
|
||||||
handler(val, oldVal) {
|
handler(val, oldVal) {
|
||||||
this.stpDisabled = true;
|
|
||||||
this.spdDisabled = false;
|
this.spdDisabled = false;
|
||||||
val.forEach((elem, index) => {
|
val.forEach((elem, index) => {
|
||||||
// 取消操作禁止选择限速,并跳过该步骤
|
// 取消操作禁止选择限速,并跳过该步骤
|
||||||
@ -286,7 +256,7 @@ export default {
|
|||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
},
|
},
|
||||||
'speed': function (val) {
|
'formData.SpeedLimit_Value': function (val) {
|
||||||
if (val) this.cmdDisabled[0] = false;
|
if (val) this.cmdDisabled[0] = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -344,7 +314,7 @@ export default {
|
|||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.speed = '';
|
this.formData.SpeedLimit_Value = '';
|
||||||
this.tableData = [];
|
this.tableData = [];
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
this.timeCountCommand = -1;
|
this.timeCountCommand = -1;
|
||||||
@ -352,11 +322,10 @@ export default {
|
|||||||
this.cmdDisabled = [true, true, true];
|
this.cmdDisabled = [true, true, true];
|
||||||
this.stpDisabled = true;
|
this.stpDisabled = true;
|
||||||
this.order = 0;
|
this.order = 0;
|
||||||
this.type = operate.type;
|
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
this.setMessage(this.$t('tip.selectSpeedLimitValueTip'));
|
this.setMessage(this.$t('tip.selectSpeedLimitValueTip'));
|
||||||
if (this.isCancelSpeed) {
|
if (this.isCancelSpeed) {
|
||||||
this.speed = `${tempData}`;
|
this.formData.SpeedLimit_Value = `${tempData}`;
|
||||||
this.spdDisabled = true;
|
this.spdDisabled = true;
|
||||||
this.cmdDisabled = [false, true, true];
|
this.cmdDisabled = [false, true, true];
|
||||||
}
|
}
|
||||||
@ -374,7 +343,6 @@ export default {
|
|||||||
},
|
},
|
||||||
speedSelectChange(val) {
|
speedSelectChange(val) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: this.type,
|
|
||||||
val: val
|
val: val
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -395,26 +363,24 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
command() {
|
command() {
|
||||||
const operate = {
|
const operate = {};
|
||||||
type: this.type
|
|
||||||
};
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||||
/** 区段设置限速*/
|
/** 区段设置限速*/
|
||||||
operate.operation = OperationEvent.Section.setSpeed.order.operation;
|
operate.operation = OperationEvent.Section.setSpeed.order.operation;
|
||||||
operate.message = this.$t('menu.in') + `【${this.name}】` + this.$t('menu.sectionSetLimitPrefix') + `${this.speed}` + this.$t('menu.sectionLimitSuffix');
|
operate.message = this.$t('menu.in') + `【${this.name}】` + this.$t('menu.sectionSetLimitPrefix') + `${this.formData.SpeedLimit_Value}` + this.$t('menu.sectionLimitSuffix');
|
||||||
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
||||||
/** 区段取消限速*/
|
/** 区段取消限速*/
|
||||||
operate.operation = OperationEvent.Section.cancelSpeed.order.operation;
|
operate.operation = OperationEvent.Section.cancelSpeed.order.operation;
|
||||||
operate.message = this.$t('menu.in') + `【${this.name}】` + this.$t('menu.sectionCancelLimitPrefix') + `${this.speed}` + this.$t('menu.sectionLimitSuffix');
|
operate.message = this.$t('menu.in') + `【${this.name}】` + this.$t('menu.sectionCancelLimitPrefix') + `${this.formData.SpeedLimit_Value}` + this.$t('menu.sectionLimitSuffix');
|
||||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||||
/** 道岔设置限速*/
|
/** 道岔设置限速*/
|
||||||
operate.operation = OperationEvent.Switch.setSpeed.order.operation;
|
operate.operation = OperationEvent.Switch.setSpeed.order.operation;
|
||||||
operate.message = this.$t('menu.in') + `【${this.name}】` + this.$t('menu.switchSetLimitPrefix') + `${this.speed}` + this.$t('menu.sectionLimitSuffix');
|
operate.message = this.$t('menu.in') + `【${this.name}】` + this.$t('menu.switchSetLimitPrefix') + `${this.formData.SpeedLimit_Value}` + this.$t('menu.sectionLimitSuffix');
|
||||||
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||||
/** 道岔取消限速*/
|
/** 道岔取消限速*/
|
||||||
operate.operation = OperationEvent.Switch.cancelSpeed.order.operation;
|
operate.operation = OperationEvent.Switch.cancelSpeed.order.operation;
|
||||||
operate.message = this.$t('menu.in') + `【${this.name}】` + this.$t('menu.switchCancelLimitPrefix') + `${this.speed}` + this.$t('menu.sectionLimitSuffix');
|
operate.message = this.$t('menu.in') + `【${this.name}】` + this.$t('menu.switchCancelLimitPrefix') + `${this.formData.SpeedLimit_Value}` + this.$t('menu.sectionLimitSuffix');
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setMessage(this.$t('tip.firstConfirmTip'));
|
this.setMessage(this.$t('tip.firstConfirmTip'));
|
||||||
@ -432,9 +398,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
confirm1() {
|
confirm1() {
|
||||||
const operate = {
|
const operate = {};
|
||||||
type: this.type
|
|
||||||
};
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||||
/** 区段设置限速*/
|
/** 区段设置限速*/
|
||||||
@ -468,23 +432,26 @@ export default {
|
|||||||
},
|
},
|
||||||
confirm2() {
|
confirm2() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
val: this.formData.SpeedLimit_Value,
|
||||||
type: this.type,
|
param: this.formData
|
||||||
val: this.speed
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||||
/** 区段设置限速*/
|
/** 区段设置限速*/
|
||||||
operate.operation = OperationEvent.Section.setSpeed.confirm2.operation;
|
operate.operation = OperationEvent.Section.setSpeed.confirm2.operation;
|
||||||
|
operate.cmdType = CMD.Section.CMD_SECTION_SET_LIMIT_SPEED;
|
||||||
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
||||||
/** 区段取消限速*/
|
/** 区段取消限速*/
|
||||||
operate.operation = OperationEvent.Section.cancelSpeed.confirm2.operation;
|
operate.operation = OperationEvent.Section.cancelSpeed.confirm2.operation;
|
||||||
|
operate.cmdType = CMD.Section.CMD_SECTION_SET_LIMIT_SPEED;
|
||||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||||
/** 道岔设置限速*/
|
/** 道岔设置限速*/
|
||||||
operate.operation = OperationEvent.Switch.setSpeed.confirm2.operation;
|
operate.operation = OperationEvent.Switch.setSpeed.confirm2.operation;
|
||||||
|
operate.cmdType = CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED;
|
||||||
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||||
/** 道岔取消限速*/
|
/** 道岔取消限速*/
|
||||||
operate.operation = OperationEvent.Switch.cancelSpeed.confirm2.operation;
|
operate.operation = OperationEvent.Switch.cancelSpeed.confirm2.operation;
|
||||||
|
operate.cmdType = CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setMessage('');
|
this.setMessage('');
|
||||||
@ -507,9 +474,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
stop() {
|
stop() {
|
||||||
const operate = {
|
const operate = {};
|
||||||
type: this.type
|
|
||||||
};
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||||
/** 区段设置限速*/
|
/** 区段设置限速*/
|
||||||
@ -540,7 +505,6 @@ export default {
|
|||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: this.type,
|
|
||||||
operation: OperationEvent.Command.close.menu.operation
|
operation: OperationEvent.Command.close.menu.operation
|
||||||
};
|
};
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickToClose'), result: '' });
|
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickToClose'), result: '' });
|
||||||
|
@ -82,7 +82,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
import ConfirmControl from './childDialog/confirmControl';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -189,7 +190,6 @@ export default {
|
|||||||
},
|
},
|
||||||
strategySelectChange(strategy) {
|
strategySelectChange(strategy) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.StationStand.setBackStrategy.choose.operation,
|
operation: OperationEvent.StationStand.setBackStrategy.choose.operation,
|
||||||
val: `${strategy}`
|
val: `${strategy}`
|
||||||
};
|
};
|
||||||
@ -211,12 +211,14 @@ export default {
|
|||||||
commit() {
|
commit() {
|
||||||
if (this.isConfirm) {
|
if (this.isConfirm) {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
|
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
|
||||||
val: `${this.strategy}`
|
val: `${this.strategy}`,
|
||||||
|
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY,
|
||||||
|
param:{
|
||||||
|
Stand_ReentryStrategy:this.strategy
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -234,7 +236,7 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
over: true,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -26,8 +26,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandDetainTrain',
|
name: 'StandDetainTrain',
|
||||||
@ -51,7 +53,7 @@ export default {
|
|||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||||
@ -79,7 +81,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected) {
|
doShow(step, selected) {
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.standName = '';
|
this.standName = '';
|
||||||
if (selected) {
|
if (selected) {
|
||||||
@ -87,7 +89,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
this.operation = operate.operation;
|
this.operation = step.operation;
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
@ -122,77 +124,77 @@ export default {
|
|||||||
},
|
},
|
||||||
// 设置扣车
|
// 设置扣车
|
||||||
setDetainTrain() {
|
setDetainTrain() {
|
||||||
const operate = {
|
const step = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation
|
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消扣车
|
// 取消扣车
|
||||||
cancelDetainTrain() {
|
cancelDetainTrain() {
|
||||||
const operate = {
|
const step = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
|
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 强制取消扣车
|
// 强制取消扣车
|
||||||
cancelDetainTrainForce() {
|
cancelDetainTrainForce() {
|
||||||
const operate = {
|
const step = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation,
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation
|
cmdType: CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 提前发车
|
// 提前发车
|
||||||
earlyDeparture() {
|
earlyDeparture() {
|
||||||
const operate = {
|
const step = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
|
||||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation
|
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
@ -200,20 +202,20 @@ export default {
|
|||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 设置跳停
|
// 设置跳停
|
||||||
setJumpStop() {
|
setJumpStop() {
|
||||||
const operate = {
|
const step = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||||
val: this.selected.direction // 站台的上下行方向, 01:下行 /02:上行
|
val: this.selected.direction, // 站台的上下行方向, 01:下行 /02:上行
|
||||||
|
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
@ -221,20 +223,20 @@ export default {
|
|||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消跳停
|
// 取消跳停
|
||||||
cancelJumpStop() {
|
cancelJumpStop() {
|
||||||
const operate = {
|
const step = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||||
val: this.selected.direction // 站台的上下行方向, 01:下行 /02:上行
|
val: this.selected.direction, // 站台的上下行方向, 01:下行 /02:上行
|
||||||
|
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
@ -242,17 +244,16 @@ export default {
|
|||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const step = {
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
|
@ -42,9 +42,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandDetail',
|
name: 'StandDetail',
|
||||||
@ -145,8 +146,9 @@ export default {
|
|||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
over: true,
|
||||||
operation: OperationEvent.Command.close.confirm.operation
|
operation: OperationEvent.Command.close.confirm.operation,
|
||||||
|
cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -162,7 +164,6 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -55,8 +55,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandDetainTrainAll',
|
name: 'StandDetainTrainAll',
|
||||||
@ -109,7 +110,7 @@ export default {
|
|||||||
/** status 01: 未扣车*/
|
/** status 01: 未扣车*/
|
||||||
const stand = (this.$store.getters['map/getDeviceByCode'](elem.code) || {}).status;
|
const stand = (this.$store.getters['map/getDeviceByCode'](elem.code) || {}).status;
|
||||||
const station = (this.$store.getters['map/getDeviceByCode'](elem.stationCode) || {});
|
const station = (this.$store.getters['map/getDeviceByCode'](elem.stationCode) || {});
|
||||||
if (station && stand && stand.holdStatus != '01' && Number(elem.direction) == Number(this.upDown)) {
|
if (station && station.visible && stand && stand.holdStatus != '01' && Number(elem.direction) == Number(this.upDown)) {
|
||||||
this.tempData.push({ stationName: station.name, standName: elem.name });
|
this.tempData.push({ stationName: station.name, standName: elem.name });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -138,10 +139,8 @@ export default {
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
choose(upDown) {
|
choose(upDown) {
|
||||||
// 重新设置扣车站台
|
|
||||||
this.loadTableData();
|
this.loadTableData();
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrainAll.choose.operation,
|
operation: OperationEvent.StationStand.cancelDetainTrainAll.choose.operation,
|
||||||
val: `${upDown}`
|
val: `${upDown}`
|
||||||
};
|
};
|
||||||
@ -154,10 +153,13 @@ export default {
|
|||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
|
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
|
||||||
val: this.upDown
|
cmdType: CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN,
|
||||||
|
val: this.upDown,
|
||||||
|
param: {
|
||||||
|
Stand_AllLine: this.upDown
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -174,7 +176,6 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -63,9 +63,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
import ConfirmControl from './childDialog/confirmControl';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandRunLevel',
|
name: 'StandRunLevel',
|
||||||
@ -86,15 +87,6 @@ export default {
|
|||||||
time: ''
|
time: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
|
||||||
// 深度数据状态
|
|
||||||
tempData: {
|
|
||||||
handler(val, oldVal) {
|
|
||||||
this.checkTableDataSelction(val);
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'stationList',
|
'stationList',
|
||||||
@ -130,6 +122,15 @@ export default {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
// 深度数据状态
|
||||||
|
tempData: {
|
||||||
|
handler(val, oldVal) {
|
||||||
|
this.checkTableDataSelction(val);
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
@ -192,12 +193,14 @@ export default {
|
|||||||
},
|
},
|
||||||
timeSelectChange(time) {
|
timeSelectChange(time) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.StationStand.setRunLevel.choose.operation,
|
operation: OperationEvent.StationStand.setRunLevel.choose.operation,
|
||||||
val: time.toString()
|
val: time.toString(),
|
||||||
|
param: {
|
||||||
|
Stand_RunLevel: time
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.time = time.toString();
|
this.time = time;
|
||||||
this.isSelect = false;
|
this.isSelect = false;
|
||||||
this.isConfirm = true;
|
this.isConfirm = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -208,9 +211,11 @@ export default {
|
|||||||
},
|
},
|
||||||
checkChange(check) {
|
checkChange(check) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.StationStand.setRunLevel.check.operation,
|
operation: OperationEvent.StationStand.setRunLevel.check.operation,
|
||||||
val: check.toString()
|
val: check.toString(),
|
||||||
|
param: {
|
||||||
|
Stand_AlwaysValid: !!this.tempData[0].check
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -228,10 +233,13 @@ export default {
|
|||||||
if (this.isConfirm) {
|
if (this.isConfirm) {
|
||||||
const forver = !!this.tempData[0].check;
|
const forver = !!this.tempData[0].check;
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
||||||
messages: [`${this.$t('menu.menuStationStand.setRunLevel')}${this.$t('global.colon')}${this.tempData[0].name}-${this.standName},${this.tempData[0].time == 0 ? this.$t('menu.runTimeAutomatically') : `${this.$t('menu.runningTimeIs')}${this.tempData[0].time}s`},${this.$t('menu.effectiveFrequencyIs')}${this.tempData[0].check ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`],
|
val: [this.time, forver].join('::'),
|
||||||
val: [this.time, forver].join('::')
|
param:{
|
||||||
|
Stand_AlwaysValid:forver,
|
||||||
|
Stand_RunLevel:this.time
|
||||||
|
},
|
||||||
|
messages: [`${this.$t('menu.menuStationStand.setRunLevel')}${this.$t('global.colon')}${this.tempData[0].name}-${this.standName},${this.tempData[0].time == 0 ? this.$t('menu.runTimeAutomatically') : `${this.$t('menu.runningTimeIs')}${this.tempData[0].time}s`},${this.$t('menu.effectiveFrequencyIs')}${this.tempData[0].check ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`]
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -252,7 +260,6 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -72,9 +72,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
import ConfirmControl from './childDialog/confirmControl';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandStopTime',
|
name: 'StandStopTime',
|
||||||
@ -179,9 +180,11 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.StationStand.setStopTime.choose1.operation,
|
operation: OperationEvent.StationStand.setStopTime.choose1.operation,
|
||||||
val: `${control}`
|
val: `${control}`,
|
||||||
|
param: {
|
||||||
|
Stand_StopControl: `${control}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -192,9 +195,11 @@ export default {
|
|||||||
},
|
},
|
||||||
chooseEffective(effective) {
|
chooseEffective(effective) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.StationStand.setStopTime.choose2.operation,
|
operation: OperationEvent.StationStand.setStopTime.choose2.operation,
|
||||||
val: `${effective}`
|
val: `${effective}`,
|
||||||
|
param: {
|
||||||
|
Stand_AlwaysValid: `${effective}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -206,9 +211,11 @@ export default {
|
|||||||
inputTime(time) {
|
inputTime(time) {
|
||||||
const operate = {
|
const operate = {
|
||||||
repeat: true,
|
repeat: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.StationStand.setStopTime.input.operation,
|
operation: OperationEvent.StationStand.setStopTime.input.operation,
|
||||||
val: `${time}`
|
val: `${time}`,
|
||||||
|
param: {
|
||||||
|
Stand_StopTime: `${time}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -219,9 +226,13 @@ export default {
|
|||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
||||||
val: [`${this.control}`, this.time, this.effective].join('::'),
|
val: [`${this.control}`, this.time, this.effective].join('::'),
|
||||||
|
param:{
|
||||||
|
Stand_StopControl:this.control,
|
||||||
|
Stand_AlwaysValid:this.effective,
|
||||||
|
Stand_StopTime:this.time
|
||||||
|
},
|
||||||
messages: [`${this.$t('menu.stopTime') + this.$t('global.colon') + this.stationName} - ${this.standName}, ${this.$t('menu.stopTimeIs')}${this.control == '01' ? this.$t('menu.automatic2') : this.time + this.$t('global.second')}, ${this.$t('menu.effectiveFrequencyIs')}${this.effective == false ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`]
|
messages: [`${this.$t('menu.stopTime') + this.$t('global.colon') + this.stationName} - ${this.standName}, ${this.$t('menu.stopTimeIs')}${this.control == '01' ? this.$t('menu.automatic2') : this.time + this.$t('global.second')}, ${this.$t('menu.effectiveFrequencyIs')}${this.effective == false ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`]
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -240,7 +251,6 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.Command.close.menu.operation
|
operation: OperationEvent.Command.close.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { now } from '@/utils/date';
|
import { now } from '@/utils/date';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -253,7 +253,6 @@ export default {
|
|||||||
},
|
},
|
||||||
commandNoPopUp() {
|
commandNoPopUp() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Station.type
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||||
@ -280,7 +279,6 @@ export default {
|
|||||||
},
|
},
|
||||||
confirm1() {
|
confirm1() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Station.type
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||||
@ -309,16 +307,17 @@ export default {
|
|||||||
},
|
},
|
||||||
confirm2() {
|
confirm2() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true
|
||||||
type: MapDeviceType.Station.type
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||||
/** 上电解锁*/
|
/** 上电解锁*/
|
||||||
operate.operation = OperationEvent.Station.powerUnLock.confirm2.operation;
|
operate.operation = OperationEvent.Station.powerUnLock.confirm2.operation;
|
||||||
|
// operate.cmdType = CMD.Station.powerUnLock;
|
||||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||||
/** 执行关键操作测试*/
|
/** 执行关键操作测试*/
|
||||||
operate.operation = OperationEvent.Station.execKeyOperationTest.confirm2.operation;
|
operate.operation = OperationEvent.Station.execKeyOperationTest.confirm2.operation;
|
||||||
|
// operate.cmdType = CMD.Station.execKeyOperationTest;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setMessage('');
|
this.setMessage('');
|
||||||
@ -342,7 +341,6 @@ export default {
|
|||||||
},
|
},
|
||||||
stop() {
|
stop() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Station.type
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||||
@ -368,7 +366,6 @@ export default {
|
|||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Station.type,
|
|
||||||
operation: OperationEvent.Command.close.menu.operation
|
operation: OperationEvent.Command.close.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -27,8 +27,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationHumanControlAll',
|
name: 'StationHumanControlAll',
|
||||||
@ -80,10 +81,9 @@ export default {
|
|||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Station.type,
|
operation: OperationEvent.Station.humanControlALL.menu.operation,
|
||||||
label: MapDeviceType.Station.label,
|
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING
|
||||||
operation: OperationEvent.Station.humanControlALL.menu.operation
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -100,7 +100,6 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Station.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -39,8 +39,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationSetRouteControlAll',
|
name: 'StationSetRouteControlAll',
|
||||||
@ -98,11 +99,13 @@ export default {
|
|||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Station.type,
|
|
||||||
label: MapDeviceType.Station.label,
|
|
||||||
operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
|
operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
|
||||||
val: this.mode
|
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING,
|
||||||
|
val: this.mode,
|
||||||
|
param: {
|
||||||
|
CheckConflict: this.mode
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -119,7 +122,6 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Station.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -82,8 +82,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { now } from '@/utils/date';
|
import { now } from '@/utils/date';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SwitchCmdControl',
|
name: 'SwitchCmdControl',
|
||||||
@ -301,7 +302,7 @@ export default {
|
|||||||
},
|
},
|
||||||
commandNoPopUp() {
|
commandNoPopUp() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Switch.type
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||||
@ -334,7 +335,7 @@ export default {
|
|||||||
},
|
},
|
||||||
confirm1() {
|
confirm1() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Switch.type
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||||
@ -369,24 +370,26 @@ export default {
|
|||||||
},
|
},
|
||||||
confirm2() {
|
confirm2() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true
|
||||||
type: MapDeviceType.Switch.type
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||||
/** 道岔单解*/
|
/** 道岔单解*/
|
||||||
operate.operation = OperationEvent.Switch.unlock.confirm2.operation;
|
operate.operation = OperationEvent.Switch.unlock.confirm2.operation;
|
||||||
|
operate.cmdType = CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK;
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||||
/** 道岔解封*/
|
/** 道岔解封*/
|
||||||
operate.operation = OperationEvent.Switch.unblock.confirm2.operation;
|
operate.operation = OperationEvent.Switch.unblock.confirm2.operation;
|
||||||
|
operate.cmdType = CMD.Switch.CMD_SWITCH_UNBLOCK;
|
||||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||||
/** 道岔故障解锁*/
|
/** 道岔故障解锁*/
|
||||||
operate.operation = OperationEvent.Switch.fault.confirm2.operation;
|
operate.operation = OperationEvent.Switch.fault.confirm2.operation;
|
||||||
|
operate.cmdType = CMD.Switch.CMD_SWITCH_FAULT_UNLOCK;
|
||||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
||||||
/** 道岔计轴复位*/
|
/** 道岔计轴复位*/
|
||||||
operate.operation = OperationEvent.Switch.axlePreReset.confirm2.operation;
|
operate.operation = OperationEvent.Switch.axlePreReset.confirm2.operation;
|
||||||
|
operate.cmdType = CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setMessage('');
|
this.setMessage('');
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
|
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -408,7 +411,6 @@ export default {
|
|||||||
},
|
},
|
||||||
stop() {
|
stop() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Switch.type
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||||
@ -440,7 +442,6 @@ export default {
|
|||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Switch.type,
|
|
||||||
operation: OperationEvent.Command.close.menu.operation
|
operation: OperationEvent.Command.close.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -45,8 +45,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SwitchControl',
|
name: 'SwitchControl',
|
||||||
@ -72,7 +74,7 @@ export default {
|
|||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
||||||
@ -152,9 +154,9 @@ export default {
|
|||||||
// 道岔单锁
|
// 道岔单锁
|
||||||
lock() {
|
lock() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Switch.type,
|
operation: OperationEvent.Switch.lock.menu.operation,
|
||||||
operation: OperationEvent.Switch.lock.menu.operation
|
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -172,9 +174,9 @@ export default {
|
|||||||
// 道岔封锁
|
// 道岔封锁
|
||||||
block() {
|
block() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Switch.type,
|
operation: OperationEvent.Switch.block.menu.operation,
|
||||||
operation: OperationEvent.Switch.block.menu.operation
|
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -192,9 +194,9 @@ export default {
|
|||||||
// 道岔转动
|
// 道岔转动
|
||||||
turnout(operation) {
|
turnout(operation) {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Switch.type,
|
operation: OperationEvent.Switch.turnout.menu.operation,
|
||||||
operation: OperationEvent.Switch.turnout.menu.operation
|
cmdType: CMD.Switch.CMD_SWITCH_TURN
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -212,9 +214,9 @@ export default {
|
|||||||
// 道岔强扮
|
// 道岔强扮
|
||||||
turnoutForce() {
|
turnoutForce() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Switch.type,
|
operation: OperationEvent.Switch.turnoutForce.menu.operation,
|
||||||
operation: OperationEvent.Switch.turnoutForce.menu.operation
|
cmdType: CMD.Switch.CMD_SWITCH_FORCE_TURN
|
||||||
};
|
};
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -231,9 +233,9 @@ export default {
|
|||||||
// 区段切除
|
// 区段切除
|
||||||
split() {
|
split() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Switch.type,
|
operation: OperationEvent.Switch.split.menu.operation,
|
||||||
operation: OperationEvent.Switch.split.menu.operation
|
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||||
};
|
};
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -250,9 +252,9 @@ export default {
|
|||||||
// 区段激活
|
// 区段激活
|
||||||
active() {
|
active() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Switch.type,
|
operation: OperationEvent.Switch.active.menu.operation,
|
||||||
operation: OperationEvent.Switch.active.menu.operation
|
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
||||||
};
|
};
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -268,7 +270,6 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Switch.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -83,10 +83,11 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import ConfirmTrain from './childDialog/confirmTrain';
|
import ConfirmTrain from './childDialog/confirmTrain';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
import OperateHandler from '@/scripts/plugin/OperateHandler';
|
import Handler from '@/scripts/cmdPlugin/Handler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainControl',
|
name: 'TrainControl',
|
||||||
@ -303,7 +304,7 @@ export default {
|
|||||||
},
|
},
|
||||||
trainNumberChange(groupNumber) {
|
trainNumberChange(groupNumber) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
val: `${groupNumber}`,
|
val: `${groupNumber}`,
|
||||||
operation: ''
|
operation: ''
|
||||||
};
|
};
|
||||||
@ -322,7 +323,7 @@ export default {
|
|||||||
},
|
},
|
||||||
trainTypeChange(trainType) {
|
trainTypeChange(trainType) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
val: `${trainType}`,
|
val: `${trainType}`,
|
||||||
operation: ''
|
operation: ''
|
||||||
};
|
};
|
||||||
@ -342,17 +343,19 @@ export default {
|
|||||||
trainNoChange(tripNumber) {
|
trainNoChange(tripNumber) {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
val: tripNumber,
|
val: tripNumber,
|
||||||
operation: ''
|
operation: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
|
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
|
||||||
operate.operation = OperationEvent.Train.addTrainId.trainNoChange.operation;
|
operate.operation = OperationEvent.Train.addTrainId.trainNoChange.operation;
|
||||||
|
operate.cmdType = CMD.Train.addTrainId;
|
||||||
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
|
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
|
||||||
operate.operation = OperationEvent.Train.editTrainId.trainNoChange.operation;
|
operate.operation = OperationEvent.Train.editTrainId.trainNoChange.operation;
|
||||||
|
operate.cmdType = CMD.Train.editTrainId;
|
||||||
}
|
}
|
||||||
OperateHandler.backStep(1);
|
Handler.undo(1);
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
@ -394,8 +397,9 @@ export default {
|
|||||||
const model = this.formModel;
|
const model = this.formModel;
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
operation: OperationEvent.Train.addTrainId.menu.operation,
|
operation: OperationEvent.Train.addTrainId.menu.operation,
|
||||||
|
cmdType: CMD.Train.CMD_ADD_TRAIN_ID,
|
||||||
messages: [this.$t('tip.addTrainIdTip')],
|
messages: [this.$t('tip.addTrainIdTip')],
|
||||||
val: `${model.groupNumber}::${model.trainType}::${model.serviceNumber}::${model.tripNumber}::${model.targetCode}`
|
val: `${model.groupNumber}::${model.trainType}::${model.serviceNumber}::${model.tripNumber}::${model.targetCode}`
|
||||||
};
|
};
|
||||||
@ -424,8 +428,9 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||||
|
cmdType: CMD.Train.CMD_EDIT_TRAIN_ID,
|
||||||
messages: [this.$t('tip.editTrainIdTip')],
|
messages: [this.$t('tip.editTrainIdTip')],
|
||||||
val: `${this.formModel.trainType}::${this.formModel.tripNumber}`
|
val: `${this.formModel.trainType}::${this.formModel.tripNumber}`
|
||||||
};
|
};
|
||||||
@ -450,7 +455,7 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -38,8 +38,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteCreate',
|
name: 'RouteCreate',
|
||||||
@ -118,8 +119,9 @@ export default {
|
|||||||
commit() {
|
commit() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Section.type,
|
|
||||||
operation: OperationEvent.Section.newtrain.menu.operation,
|
operation: OperationEvent.Section.newtrain.menu.operation,
|
||||||
|
cmdType: CMD.Section.CMD_NEW_TRAIN,
|
||||||
val: '' + this.direction + '::' + this.trainCode
|
val: '' + this.direction + '::' + this.trainCode
|
||||||
};
|
};
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -136,7 +138,7 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Section.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -30,10 +30,11 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
// import { getPublishMapTrainNos } from '@/api/runplan';
|
// import { getPublishMapTrainNos } from '@/api/runplan';
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
import ConfirmControl from './childDialog/confirmControl';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainDelete',
|
name: 'TrainDelete',
|
||||||
@ -111,7 +112,7 @@ export default {
|
|||||||
},
|
},
|
||||||
trainNumberChange() {
|
trainNumberChange() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
val: `${this.formModel.groupNumber}`,
|
val: `${this.formModel.groupNumber}`,
|
||||||
operation: OperationEvent.Train.delTrainId.trainNumberChange.operation
|
operation: OperationEvent.Train.delTrainId.trainNumberChange.operation
|
||||||
};
|
};
|
||||||
@ -127,8 +128,9 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
operation: OperationEvent.Train.delTrainId.menu.operation,
|
operation: OperationEvent.Train.delTrainId.menu.operation,
|
||||||
|
cmdType: CMD.Train.CMD_DEL_TRAIN_ID,
|
||||||
val: this.formModel.groupNumber
|
val: this.formModel.groupNumber
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -150,7 +152,7 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -28,7 +28,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainMove',
|
name: 'TrainMove',
|
||||||
@ -90,8 +91,9 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
operation: OperationEvent.Train.editTrainNo.menu.operation
|
operation: OperationEvent.Train.editTrainNo.menu.operation,
|
||||||
|
cmdType: CMD.Train.CMD_EDIT_TRAIN_NO
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -111,7 +113,7 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -74,7 +74,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainMove',
|
name: 'TrainMove',
|
||||||
@ -152,8 +153,9 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
operation: OperationEvent.Train.moveTrainId.menu.operation
|
operation: OperationEvent.Train.moveTrainId.menu.operation,
|
||||||
|
cmdType: CMD.Train.CMD_MOVE_TRAIN_ID
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -174,7 +176,7 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -75,7 +75,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainSwitch',
|
name: 'TrainSwitch',
|
||||||
@ -157,8 +158,9 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
operation: OperationEvent.Train.moveTrainId.menu.operation
|
operation: OperationEvent.Train.moveTrainId.menu.operation,
|
||||||
|
cmdType: CMD.Train.CMD_MOVE_TRAIN_ID
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -179,7 +181,7 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -12,9 +12,7 @@
|
|||||||
<span class="nav-li-text">{{ item.title }}</span>
|
<span class="nav-li-text">{{ item.title }}</span>
|
||||||
<ul class="nav-ul" :class="{'active' :i==classA}">
|
<ul class="nav-ul" :class="{'active' :i==classA}">
|
||||||
<template v-for="(child,j) in item.children">
|
<template v-for="(child,j) in item.children">
|
||||||
<template
|
<template v-if="child.children&&child.children.length>0&&hasShowingChildren(child.children)">
|
||||||
v-if="child.children&&child.children.length>0&&hasShowingChildren(child.children)"
|
|
||||||
>
|
|
||||||
<li
|
<li
|
||||||
:id="child.operate.domId"
|
:id="child.operate.domId"
|
||||||
:key="j"
|
:key="j"
|
||||||
@ -84,9 +82,10 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { TrainingMode, OperationEvent } from '@/scripts/ConstDic';
|
import { TrainingMode } from '@/scripts/ConstDic';
|
||||||
// import { OperateMode } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler.js';
|
||||||
import { menuBarConvert, SystemType } from './utils/menuItemStatus';
|
import { State2SimulationMap } from '@/scripts/cmdPlugin/Config.js';
|
||||||
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import StationControlConvert from './menuDialog/stationControlConvert';
|
import StationControlConvert from './menuDialog/stationControlConvert';
|
||||||
import TrainAdd from './menuDialog/trainAdd';
|
import TrainAdd from './menuDialog/trainAdd';
|
||||||
import TrainTranstalet from './menuDialog/trainTranstalet';
|
import TrainTranstalet from './menuDialog/trainTranstalet';
|
||||||
@ -132,7 +131,7 @@ export default {
|
|||||||
valid: true,
|
valid: true,
|
||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
local: [
|
Local: [
|
||||||
{
|
{
|
||||||
title: this.$t('menu.menuBar.system'),
|
title: this.$t('menu.menuBar.system'),
|
||||||
operate: OperationEvent.Command.mBar.system,
|
operate: OperationEvent.Command.mBar.system,
|
||||||
@ -241,7 +240,7 @@ export default {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
central: [
|
Center: [
|
||||||
{
|
{
|
||||||
title: this.$t('menu.menuBar.system'),
|
title: this.$t('menu.menuBar.system'),
|
||||||
operate: OperationEvent.Command.mBar.system,
|
operate: OperationEvent.Command.mBar.system,
|
||||||
@ -438,7 +437,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initMenu(menu) {
|
initMenu(menu) {
|
||||||
this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.training.prdType]], this.$store.state.training.operatemode);
|
this.menu = MenuContextHandler.menuBarConvert(this.menuNormal[State2SimulationMap[this.$store.state.training.prdType]], this.$store.state.training.operatemode);
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
this.closeMenu(true);
|
this.closeMenu(true);
|
||||||
},
|
},
|
||||||
@ -487,7 +486,6 @@ export default {
|
|||||||
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
|
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'bar',
|
|
||||||
operation: item.operate.operation
|
operation: item.operate.operation
|
||||||
};
|
};
|
||||||
this.tempClassA = index;
|
this.tempClassA = index;
|
||||||
@ -509,7 +507,6 @@ export default {
|
|||||||
popupMenuB(item, index) {
|
popupMenuB(item, index) {
|
||||||
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
|
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'bar',
|
|
||||||
operation: item.operate.operation
|
operation: item.operate.operation
|
||||||
};
|
};
|
||||||
this.tempClassB = index;
|
this.tempClassB = index;
|
||||||
@ -522,7 +519,6 @@ export default {
|
|||||||
// 转为站控
|
// 转为站控
|
||||||
turnToStationControl(order) {
|
turnToStationControl(order) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'bar',
|
|
||||||
operation: order.operation
|
operation: order.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -536,7 +532,6 @@ export default {
|
|||||||
// 强制转为站控
|
// 强制转为站控
|
||||||
mandatoryStationControl(order) {
|
mandatoryStationControl(order) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'bar',
|
|
||||||
operation: order.operation
|
operation: order.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -550,7 +545,6 @@ export default {
|
|||||||
// 请求中控
|
// 请求中控
|
||||||
conterStationControl(order) {
|
conterStationControl(order) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'bar',
|
|
||||||
operation: order.operation
|
operation: order.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -564,7 +558,6 @@ export default {
|
|||||||
// 设置列车识别号显示
|
// 设置列车识别号显示
|
||||||
setTrainIdDisplay(order) {
|
setTrainIdDisplay(order) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'bar',
|
|
||||||
operation: order.operation
|
operation: order.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -578,7 +571,6 @@ export default {
|
|||||||
// 设置设备显示
|
// 设置设备显示
|
||||||
setNameDisplay(order) {
|
setNameDisplay(order) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'bar',
|
|
||||||
operation: order.operation
|
operation: order.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -592,7 +584,6 @@ export default {
|
|||||||
// 设置名称显示
|
// 设置名称显示
|
||||||
setDeviceDisplay(order) {
|
setDeviceDisplay(order) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'bar',
|
|
||||||
operation: order.operation
|
operation: order.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -606,7 +597,6 @@ export default {
|
|||||||
// 添加计划车
|
// 添加计划车
|
||||||
addPlanTrain(order) {
|
addPlanTrain(order) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'bar',
|
|
||||||
operation: order.operation
|
operation: order.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -620,7 +610,6 @@ export default {
|
|||||||
// 平移计划车
|
// 平移计划车
|
||||||
translatPlanTrain(order) {
|
translatPlanTrain(order) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'bar',
|
|
||||||
operation: order.operation
|
operation: order.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -634,7 +623,6 @@ export default {
|
|||||||
// 删除计划车
|
// 删除计划车
|
||||||
delPlanTrain(order) {
|
delPlanTrain(order) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'bar',
|
|
||||||
operation: order.operation
|
operation: order.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -648,7 +636,6 @@ export default {
|
|||||||
// 用户管理
|
// 用户管理
|
||||||
userManage(order) {
|
userManage(order) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'bar',
|
|
||||||
operation: order.operation
|
operation: order.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -662,7 +649,6 @@ export default {
|
|||||||
// 关于
|
// 关于
|
||||||
about(order) {
|
about(order) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'bar',
|
|
||||||
operation: order.operation
|
operation: order.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
@ -42,19 +42,9 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'stationList'
|
'stationList'
|
||||||
]),
|
])
|
||||||
isScreen() { // 大屏隐藏所有菜单
|
|
||||||
return this.$route.params.mode === 'dp' ||
|
|
||||||
this.$store.state.training.roles == 'BigScreen';
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.menuOperation.buttonOperation': function (val, old) {
|
|
||||||
if (!this.isScreen && this.menu && this.menu.length > 1) {
|
|
||||||
// this.menu[0].disabled = (this.menu[0] && val) ? true : true;
|
|
||||||
// this.menu[1].disabled = !((this.menu[1] && val));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
|
||||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
@ -100,11 +90,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this.isScreen) {
|
this.menu = [...this.menuNormal];
|
||||||
this.menu = [...this.menuScreen];
|
|
||||||
} else {
|
|
||||||
this.menu = [...this.menuNormal];
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
|
@ -30,8 +30,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TwoConfirmation',
|
name: 'TwoConfirmation',
|
||||||
@ -69,11 +71,11 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
this.domIdConfirm = '';
|
this.domIdConfirm = '';
|
||||||
if (checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
if (OperationHandler.checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||||
this.domIdConfirm = OperationEvent.StationControl.forcedStationControl.confirm.domId;
|
this.domIdConfirm = OperationEvent.StationControl.forcedStationControl.confirm.domId;
|
||||||
} else if (checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.requestStationControl)) {
|
} else if (OperationHandler.checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||||
this.domIdConfirm = OperationEvent.StationControl.requestStationControl.confirm.domId;
|
this.domIdConfirm = OperationEvent.StationControl.requestStationControl.confirm.domId;
|
||||||
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||||
this.domIdConfirm = OperationEvent.StationControl.requestCentralControl.confirm.domId;
|
this.domIdConfirm = OperationEvent.StationControl.requestCentralControl.confirm.domId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,7 +91,6 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Command.close.confirm.operation
|
operation: OperationEvent.Command.close.confirm.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -101,27 +102,26 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
forEachDoHandler(selection, handler) {
|
|
||||||
selection.forEach(elem => {
|
|
||||||
handler(elem);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
commit() {
|
commit() {
|
||||||
if (this.operate) {
|
if (this.operate) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.forEachDoHandler(this.operate.selection || [], elem => {
|
(this.operate.selection || []).forEach(elem => {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
val: elem.code,
|
||||||
type: this.operate.type,
|
param: {
|
||||||
val: elem.code
|
ControlMode_Code: elem.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||||
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation;
|
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation;
|
||||||
} else if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestStationControl)) {
|
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL;
|
||||||
|
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||||
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
|
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
|
||||||
} else if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestCentralControl)) {
|
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL;
|
||||||
|
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||||
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
|
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
|
||||||
|
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.doClose();
|
this.doClose();
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UserAdd',
|
name: 'UserAdd',
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UserDelete',
|
name: 'UserDelete',
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UserEdit',
|
name: 'UserEdit',
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ManageUser',
|
name: 'ManageUser',
|
||||||
|
@ -70,7 +70,7 @@ import { mapGetters } from 'vuex';
|
|||||||
import UserAdd from './childDialog/userAdd';
|
import UserAdd from './childDialog/userAdd';
|
||||||
import UserEdit from './childDialog/userEdit';
|
import UserEdit from './childDialog/userEdit';
|
||||||
import UserDelete from './childDialog/userDelete';
|
import UserDelete from './childDialog/userDelete';
|
||||||
import { OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ManageUser',
|
name: 'ManageUser',
|
||||||
|
@ -57,7 +57,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -87,7 +88,7 @@ export default {
|
|||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||||
/** 强制站控*/
|
/** 强制站控*/
|
||||||
return OperationEvent.StationControl.forcedStationControl.passwordConfirm.domId;
|
return OperationEvent.StationControl.forcedStationControl.passwordConfirm.domId;
|
||||||
}
|
}
|
||||||
@ -124,7 +125,6 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Command.close.password.operation
|
operation: OperationEvent.Command.close.password.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -136,10 +136,9 @@ export default {
|
|||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: this.operate.type
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||||
/** 强制站控*/
|
/** 强制站控*/
|
||||||
operate.operation = OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation;
|
operate.operation = OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation;
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import TwoConfirmation from './childDialog/twoConfirmation';
|
import TwoConfirmation from './childDialog/twoConfirmation';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -114,29 +115,29 @@ export default {
|
|||||||
},
|
},
|
||||||
isFork() {
|
isFork() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
return checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl);
|
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
isRequest() {
|
isRequest() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
return checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl);
|
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
isConter() {
|
isConter() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
return checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl);
|
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
domIdChoose() {
|
domIdChoose() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||||
return OperationEvent.StationControl.forcedStationControl.choose.domId;
|
return OperationEvent.StationControl.forcedStationControl.choose.domId;
|
||||||
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||||
return OperationEvent.StationControl.requestStationControl.choose.domId;
|
return OperationEvent.StationControl.requestStationControl.choose.domId;
|
||||||
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||||
return OperationEvent.StationControl.requestCentralControl.choose.domId;
|
return OperationEvent.StationControl.requestCentralControl.choose.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -207,9 +208,9 @@ export default {
|
|||||||
row[prop] = result[prop];
|
row[prop] = result[prop];
|
||||||
}
|
}
|
||||||
if (success) {
|
if (success) {
|
||||||
if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl) || checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl) || OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||||
row.control = this.controlProps['02']; // 01:中控, 02:站控
|
row.control = this.controlProps['02']; // 01:中控, 02:站控
|
||||||
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||||
row.control = this.controlProps['01']; // 01:中控, 02:站控
|
row.control = this.controlProps['01']; // 01:中控, 02:站控
|
||||||
}
|
}
|
||||||
row.disabled = true;
|
row.disabled = true;
|
||||||
@ -236,11 +237,11 @@ export default {
|
|||||||
},
|
},
|
||||||
checkBoxDisabled(row) {
|
checkBoxDisabled(row) {
|
||||||
const control = (this.$store.getters['map/getDeviceByCode'](row.code) || {});
|
const control = (this.$store.getters['map/getDeviceByCode'](row.code) || {});
|
||||||
if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl) || checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl) || OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||||
if (control && control.status == '02') { // 01:中控, 02:站控
|
if (control && control.status == '02') { // 01:中控, 02:站控
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||||
if (control && control.status == '01') { // 01:中控, 02:站控
|
if (control && control.status == '01') { // 01:中控, 02:站控
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -293,7 +294,6 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'bar',
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -333,30 +333,21 @@ export default {
|
|||||||
{ type: 'resp', timeout: 'true', stationControlCode: elem.code }
|
{ type: 'resp', timeout: 'true', stationControlCode: elem.code }
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
serializeCodeListWithSeparator(sep) {
|
|
||||||
const codeList = [];
|
|
||||||
if (this.selection && this.selection.length) {
|
|
||||||
this.selection.forEach(elem => {
|
|
||||||
codeList.push(elem.code);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return codeList.join(sep);
|
|
||||||
},
|
|
||||||
handleChooseChange(selection) {
|
handleChooseChange(selection) {
|
||||||
this.selection = selection;
|
this.selection = selection;
|
||||||
|
const stationCodeList = selection.map(elem => { return elem.code; });
|
||||||
if (selection && selection.length) {
|
if (selection && selection.length) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationControl.type,
|
|
||||||
operation: '',
|
operation: '',
|
||||||
val: this.serializeCodeListWithSeparator('::'),
|
val: stationCodeList.join('::'),
|
||||||
selection: selection
|
selection: selection
|
||||||
};
|
};
|
||||||
|
|
||||||
if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||||
operate.operation = OperationEvent.StationControl.forcedStationControl.choose.operation;
|
operate.operation = OperationEvent.StationControl.forcedStationControl.choose.operation;
|
||||||
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||||
operate.operation = OperationEvent.StationControl.requestStationControl.choose.operation;
|
operate.operation = OperationEvent.StationControl.requestStationControl.choose.operation;
|
||||||
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||||
operate.operation = OperationEvent.StationControl.requestCentralControl.choose.operation;
|
operate.operation = OperationEvent.StationControl.requestCentralControl.choose.operation;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -372,11 +363,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
requestCommit() {
|
requestCommit() {
|
||||||
|
const stationCodeList = this.selection.map(elem => { return elem.code; });
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationControl.type,
|
|
||||||
messages: [this.$t('menu.menuDialog.confirmStationControlTip')],
|
messages: [this.$t('menu.menuDialog.confirmStationControlTip')],
|
||||||
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
|
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
|
||||||
val: this.serializeCodeListWithSeparator('::'),
|
val: stationCodeList.join('::'),
|
||||||
selection: this.selection
|
selection: this.selection
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -397,11 +388,11 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
forkCommit() {
|
forkCommit() {
|
||||||
|
const stationCodeList = this.selection.map(elem => { return elem.code; });
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationControl.type,
|
|
||||||
messages: [this.$t('menu.menuDialog.confirmInTheControlTip')],
|
messages: [this.$t('menu.menuDialog.confirmInTheControlTip')],
|
||||||
operation: OperationEvent.StationControl.forcedStationControl.menu.operation,
|
operation: OperationEvent.StationControl.forcedStationControl.menu.operation,
|
||||||
val: this.serializeCodeListWithSeparator('::'),
|
val: stationCodeList.join('::'),
|
||||||
selection: this.selection
|
selection: this.selection
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -421,12 +412,12 @@ export default {
|
|||||||
this.disabledSure = false;
|
this.disabledSure = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
conterCommit() { // 请求中控
|
conterCommit() {
|
||||||
|
const stationCodeList = this.selection.map(elem => { return elem.code; });
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationControl.type,
|
|
||||||
messages: [this.$t('menu.menuDialog.confirmInTheControlTip')],
|
messages: [this.$t('menu.menuDialog.confirmInTheControlTip')],
|
||||||
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
|
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
|
||||||
val: this.serializeCodeListWithSeparator('::'),
|
val: stationCodeList.join('::'),
|
||||||
selection: this.selection
|
selection: this.selection
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainAdd',
|
name: 'TrainAdd',
|
||||||
@ -126,7 +126,7 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
operation: OperationEvent.Command.planTrain.addPlanTrain.operation
|
operation: OperationEvent.Command.planTrain.addPlanTrain.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -150,7 +150,7 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainAdd',
|
name: 'TrainAdd',
|
||||||
@ -108,7 +108,7 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
operation: OperationEvent.Command.planTrain.delPlanTrain.operation
|
operation: OperationEvent.Command.planTrain.delPlanTrain.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainTranstalet',
|
name: 'TrainTranstalet',
|
||||||
@ -125,7 +125,7 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
operation: OperationEvent.Command.planTrain.translatPlanTrain.operation
|
operation: OperationEvent.Command.planTrain.translatPlanTrain.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import deviceType from '@/jmap/constant/deviceType';
|
import deviceType from '@/jmap/constant/deviceType';
|
||||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
// import deviceType from '@/jmap/constant/deviceType';
|
// import deviceType from '@/jmap/constant/deviceType';
|
||||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
<section-control ref="sectionControl" />
|
<section-control ref="sectionControl" />
|
||||||
<section-cmd-control ref="sectionCmdControl" />
|
<section-cmd-control ref="sectionCmdControl" />
|
||||||
<speed-cmd-control ref="speedCmdControl" />
|
<speed-cmd-control ref="speedCmdControl" />
|
||||||
<train-create ref="trainCreate" />
|
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -14,12 +13,13 @@ import PopMenu from '@/components/PopMenu';
|
|||||||
import SectionControl from './dialog/sectionControl';
|
import SectionControl from './dialog/sectionControl';
|
||||||
import SectionCmdControl from './dialog/sectionCmdControl';
|
import SectionCmdControl from './dialog/sectionCmdControl';
|
||||||
import SpeedCmdControl from './dialog/speedCmdControl';
|
import SpeedCmdControl from './dialog/speedCmdControl';
|
||||||
import TrainCreate from './dialog/trainCreate';
|
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
import Handler from '@/scripts/cmdPlugin/Handler';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SectionMenu',
|
name: 'SectionMenu',
|
||||||
@ -28,7 +28,6 @@ export default {
|
|||||||
SectionControl,
|
SectionControl,
|
||||||
SectionCmdControl,
|
SectionCmdControl,
|
||||||
SpeedCmdControl,
|
SpeedCmdControl,
|
||||||
TrainCreate,
|
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@ -43,124 +42,97 @@ export default {
|
|||||||
return {
|
return {
|
||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
local: [
|
Local: [
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSection.sectionFaultUnlock'),
|
label: this.$t('menu.menuSection.sectionFaultUnlock'),
|
||||||
handler: this.fault,
|
handler: this.fault,
|
||||||
disabledCallback: MenuDisabledState.Section.fault,
|
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSection.sectionResection'),
|
label: this.$t('menu.menuSection.sectionResection'),
|
||||||
handler: this.split,
|
handler: this.split,
|
||||||
disabledCallback: MenuDisabledState.Section.split,
|
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSection.sectionActive'),
|
label: this.$t('menu.menuSection.sectionActive'),
|
||||||
handler: this.active,
|
handler: this.active,
|
||||||
disabledCallback: MenuDisabledState.Section.active,
|
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSection.sectionAxisPreReset'),
|
label: this.$t('menu.menuSection.sectionAxisPreReset'),
|
||||||
handler: this.axlePreReset,
|
handler: this.axlePreReset,
|
||||||
disabledCallback: MenuDisabledState.Section.axlePreReset,
|
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSection.sectionBlockade'),
|
label: this.$t('menu.menuSection.sectionBlockade'),
|
||||||
handler: this.lock,
|
handler: this.lock,
|
||||||
disabledCallback: MenuDisabledState.Section.lock,
|
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSection.sectionUnblock'),
|
label: this.$t('menu.menuSection.sectionUnblock'),
|
||||||
handler: this.unlock,
|
handler: this.unlock,
|
||||||
disabledCallback: MenuDisabledState.Section.unlock,
|
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSection.sectionSetSpeedLimit'),
|
label: this.$t('menu.menuSection.sectionSetSpeedLimit'),
|
||||||
handler: this.setSpeed,
|
handler: this.setSpeed,
|
||||||
disabledCallback: MenuDisabledState.Section.setSpeed,
|
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSection.sectionCancelSpeedLimit'),
|
label: this.$t('menu.menuSection.sectionCancelSpeedLimit'),
|
||||||
handler: this.cancelSpeed,
|
handler: this.cancelSpeed,
|
||||||
disabledCallback: MenuDisabledState.Section.cancelSpeed,
|
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
|
||||||
auth: { station: true, center: false }
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
central: [
|
Center: [
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSection.sectionFaultUnlock'),
|
label: this.$t('menu.menuSection.sectionFaultUnlock'),
|
||||||
handler: this.fault,
|
handler: this.fault,
|
||||||
disabledCallback: MenuDisabledState.Section.fault,
|
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||||
auth: { station: false, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSection.sectionResection'),
|
label: this.$t('menu.menuSection.sectionResection'),
|
||||||
handler: this.split,
|
handler: this.split,
|
||||||
disabledCallback: MenuDisabledState.Section.split,
|
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||||
auth: { station: false, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSection.sectionActive'),
|
label: this.$t('menu.menuSection.sectionActive'),
|
||||||
handler: this.active,
|
handler: this.active,
|
||||||
disabledCallback: MenuDisabledState.Section.active,
|
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||||
auth: { station: false, center: true }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: this.$t('menu.menuSection.axisPreReset'),
|
|
||||||
handler: this.axlePreReset,
|
|
||||||
disabledCallback: MenuDisabledState.Section.axlePreReset,
|
|
||||||
auth: { station: false, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSection.sectionBlockade'),
|
label: this.$t('menu.menuSection.sectionBlockade'),
|
||||||
handler: this.lock,
|
handler: this.lock,
|
||||||
disabledCallback: MenuDisabledState.Section.lock,
|
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||||
auth: { station: false, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSection.sectionUnblock'),
|
label: this.$t('menu.menuSection.sectionUnblock'),
|
||||||
handler: this.unlock,
|
handler: this.unlock,
|
||||||
disabledCallback: MenuDisabledState.Section.unlock,
|
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||||
auth: { station: false, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSection.sectionSetSpeedLimit'),
|
label: this.$t('menu.menuSection.sectionSetSpeedLimit'),
|
||||||
handler: this.setSpeed,
|
handler: this.setSpeed,
|
||||||
disabledCallback: MenuDisabledState.Section.setSpeed,
|
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||||
auth: { station: false, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSection.sectionCancelSpeedLimit'),
|
label: this.$t('menu.menuSection.sectionCancelSpeedLimit'),
|
||||||
handler: this.cancelSpeed,
|
handler: this.cancelSpeed,
|
||||||
disabledCallback: MenuDisabledState.Section.cancelSpeed,
|
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
|
||||||
auth: { station: false, center: true }
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
menuTrain: [
|
|
||||||
{
|
|
||||||
label: this.$t('menu.menuSection.createTrain'),
|
|
||||||
handler: this.newTrain,
|
|
||||||
disabledCallback: MenuDisabledState.Section.newTrain
|
|
||||||
}
|
|
||||||
],
|
|
||||||
menuForce: [
|
menuForce: [
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSection.setFault'),
|
label: this.$t('menu.menuSection.setFault'),
|
||||||
handler: this.setStoppage,
|
handler: this.setStoppage,
|
||||||
disabledCallback: MenuDisabledState.Section.setStoppage
|
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSection.cancelFault'),
|
label: this.$t('menu.menuSection.cancelFault'),
|
||||||
handler: this.cancelStoppage,
|
handler: this.cancelStoppage,
|
||||||
disabledCallback: MenuDisabledState.Section.cancelStoppage
|
cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@ -192,17 +164,12 @@ export default {
|
|||||||
},
|
},
|
||||||
initMenu() {
|
initMenu() {
|
||||||
// 编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
this.menu = menuFiltration(this.menuNormal);
|
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
if (this.operatemode === OperateMode.ADMIN) {
|
|
||||||
this.menu = [...this.menu, ...this.menuForce, ...this.menuTrain];
|
|
||||||
}
|
|
||||||
|
|
||||||
// 故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
this.menu = this.menuForce;
|
this.menu = this.menuForce;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.menu = menuConvert(this.menu);
|
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
@ -218,187 +185,183 @@ export default {
|
|||||||
},
|
},
|
||||||
// 设置故障
|
// 设置故障
|
||||||
setStoppage() {
|
setStoppage() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
code: `${this.selected.code}`,
|
||||||
code: this.selected.code,
|
operation: OperationEvent.Section.stoppage.menu.operation,
|
||||||
type: MapDeviceType.Section.type,
|
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT,
|
||||||
label: MapDeviceType.Section.label,
|
param: {
|
||||||
operation: OperationEvent.Section.stoppage.menu.operation
|
Section_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消故障
|
// 取消故障
|
||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
code: `${this.selected.code}`,
|
||||||
code: this.selected.code,
|
operation: OperationEvent.Section.cancelStoppage.menu.operation,
|
||||||
type: MapDeviceType.Section.type,
|
cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT,
|
||||||
label: MapDeviceType.Section.label,
|
param: {
|
||||||
operation: OperationEvent.Section.cancelStoppage.menu.operation
|
Section_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 故障解锁
|
// 故障解锁
|
||||||
fault() {
|
fault() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.Section.type,
|
operation: OperationEvent.Section.fault.menu.operation,
|
||||||
label: MapDeviceType.Section.label,
|
param: {
|
||||||
operation: OperationEvent.Section.fault.menu.operation
|
Section_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
this.$refs.sectionCmdControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 切除
|
// 切除
|
||||||
split() {
|
split() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.Section.type,
|
operation: OperationEvent.Section.split.menu.operation,
|
||||||
label: MapDeviceType.Section.label,
|
param: {
|
||||||
operation: OperationEvent.Section.split.menu.operation
|
Section_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
this.$refs.sectionControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 激活
|
// 激活
|
||||||
active() {
|
active() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.Section.type,
|
operation: OperationEvent.Section.active.menu.operation,
|
||||||
label: MapDeviceType.Section.label,
|
param: {
|
||||||
operation: OperationEvent.Section.active.menu.operation
|
Section_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
this.$refs.sectionControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 区段计轴预复位
|
// 区段计轴预复位
|
||||||
axlePreReset() {
|
axlePreReset() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.Section.type,
|
operation: OperationEvent.Section.axlePreReset.menu.operation,
|
||||||
label: MapDeviceType.Section.label,
|
param: {
|
||||||
operation: OperationEvent.Section.axlePreReset.menu.operation
|
Section_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
this.$refs.sectionCmdControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 区段解锁
|
// 区段解锁
|
||||||
lock() {
|
lock() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.Section.type,
|
operation: OperationEvent.Section.lock.menu.operation,
|
||||||
label: MapDeviceType.Section.label,
|
param: {
|
||||||
operation: OperationEvent.Section.lock.menu.operation
|
Section_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
this.$refs.sectionControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 区段封锁
|
// 区段封锁
|
||||||
unlock() {
|
unlock() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.Section.type,
|
operation: OperationEvent.Section.unlock.menu.operation,
|
||||||
label: MapDeviceType.Section.label,
|
param: {
|
||||||
operation: OperationEvent.Section.unlock.menu.operation
|
Section_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
this.$refs.sectionCmdControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 设置速度
|
// 设置速度
|
||||||
setSpeed() {
|
setSpeed() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.Section.type,
|
operation: OperationEvent.Section.setSpeed.menu.operation,
|
||||||
label: MapDeviceType.Section.label,
|
param: {
|
||||||
operation: OperationEvent.Section.setSpeed.menu.operation
|
Section_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.speedCmdControl.doShow(operate, this.selected);
|
this.$refs.speedCmdControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消速度
|
// 取消速度
|
||||||
cancelSpeed() {
|
cancelSpeed() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
code: `${this.selected.code}`,
|
||||||
code: this.selected.code,
|
operation: OperationEvent.Section.cancelSpeed.menu.operation,
|
||||||
type: MapDeviceType.Section.type,
|
param: {
|
||||||
label: MapDeviceType.Section.label,
|
Section_Code: `${this.selected.code}`
|
||||||
operation: OperationEvent.Section.cancelSpeed.menu.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
|
||||||
if (valid) {
|
|
||||||
const tempData = response.data;
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
},
|
|
||||||
// 新建列车
|
|
||||||
newTrain() {
|
|
||||||
const operate = {
|
|
||||||
start: true,
|
|
||||||
code: this.selected.code,
|
|
||||||
type: MapDeviceType.Section.type,
|
|
||||||
label: MapDeviceType.Section.label,
|
|
||||||
operation: OperationEvent.Section.newtrain.menu.operation
|
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.trainCreate.doShow(operate, this.selected);
|
Handler.execute(CMD.Section.CMD_QUERY, {}).then(resp => {
|
||||||
|
const tempData = resp.data;
|
||||||
|
this.$refs.speedCmdControl.doShow(step, this.selected, tempData);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -20,10 +20,12 @@ import RouteCmdControl from './dialog/routeCmdControl';
|
|||||||
import RouteHandControl from './dialog/routeHandControl';
|
import RouteHandControl from './dialog/routeHandControl';
|
||||||
import RouteDetail from './dialog/routeDetail';
|
import RouteDetail from './dialog/routeDetail';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
import { querySignalStatus } from '@/api/simulation';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SignalMenu',
|
name: 'SignalMenu',
|
||||||
@ -49,134 +51,103 @@ export default {
|
|||||||
return {
|
return {
|
||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
local: [
|
Local: [
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSignal.routeSelect'),
|
label: this.$t('menu.menuSignal.routeSelect'),
|
||||||
handler: this.arrangementRoute,
|
handler: this.arrangementRoute,
|
||||||
disabledCallback: MenuDisabledState.Signal.arrangementRoute,
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSignal.routeCancel'),
|
label: this.$t('menu.menuSignal.routeCancel'),
|
||||||
handler: this.cancelTrainRoute,
|
handler: this.cancelTrainRoute,
|
||||||
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSignal.signalBlock'),
|
label: this.$t('menu.menuSignal.signalBlock'),
|
||||||
handler: this.lock,
|
handler: this.lock,
|
||||||
disabledCallback: MenuDisabledState.Signal.lock,
|
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSignal.signalDeblock'),
|
label: this.$t('menu.menuSignal.signalDeblock'),
|
||||||
handler: this.unlock,
|
handler: this.unlock,
|
||||||
disabledCallback: MenuDisabledState.Signal.unlock,
|
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSignal.signalReopen'),
|
label: this.$t('menu.menuSignal.signalReopen'),
|
||||||
handler: this.reopenSignal,
|
handler: this.reopenSignal,
|
||||||
disabledCallback: MenuDisabledState.Signal.reopenSignal,
|
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSignal.guideRouteHandle'),
|
label: this.$t('menu.menuSignal.guideRouteHandle'),
|
||||||
handler: this.guide,
|
handler: this.guide,
|
||||||
disabledCallback: MenuDisabledState.Signal.guide,
|
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSignal.setInterlockAutoRoute'),
|
label: this.$t('menu.menuSignal.setInterlockAutoRoute'),
|
||||||
handler: this.setAutoInterlock,
|
handler: this.setAutoInterlock,
|
||||||
disabledCallback: MenuDisabledState.Signal.setAutoInterlock,
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSignal.cancelInterlockAutoRoute'),
|
label: this.$t('menu.menuSignal.cancelInterlockAutoRoute'),
|
||||||
handler: this.cancelAutoInterlock,
|
handler: this.cancelAutoInterlock,
|
||||||
disabledCallback: MenuDisabledState.Signal.cancelAutoInterlock,
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSignal.setInterlockAutoTrigger'),
|
label: this.$t('menu.menuSignal.setInterlockAutoTrigger'),
|
||||||
handler: this.setAutoTrigger,
|
handler: this.setAutoTrigger,
|
||||||
disabledCallback: MenuDisabledState.Signal.setAutoTrigger,
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSignal.cancelInterlockAutoTrigger'),
|
label: this.$t('menu.menuSignal.cancelInterlockAutoTrigger'),
|
||||||
handler: this.cancelAutoTrigger,
|
handler: this.cancelAutoTrigger,
|
||||||
disabledCallback: MenuDisabledState.Signal.cancelAutoTrigger,
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSignal.signalOff'),
|
label: this.$t('menu.menuSignal.signalOff'),
|
||||||
handler: this.signalClose,
|
handler: this.signalClose,
|
||||||
disabledCallback: MenuDisabledState.Signal.signalClose,
|
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||||
auth: { station: true, center: false }
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
central: [
|
Center: [
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSignal.routeSelect'),
|
label: this.$t('menu.menuSignal.routeSelect'),
|
||||||
handler: this.arrangementRoute,
|
handler: this.arrangementRoute,
|
||||||
disabledCallback: MenuDisabledState.Signal.arrangementRoute,
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||||
auth: { station: false, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSignal.routeCancel'),
|
label: this.$t('menu.menuSignal.routeCancel'),
|
||||||
handler: this.cancelTrainRoute,
|
handler: this.cancelTrainRoute,
|
||||||
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||||
auth: { station: false, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSignal.signalBlock'),
|
label: this.$t('menu.menuSignal.signalBlock'),
|
||||||
handler: this.lock,
|
handler: this.lock,
|
||||||
disabledCallback: MenuDisabledState.Signal.lock,
|
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||||
auth: { station: false, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSignal.signalDeblock'),
|
label: this.$t('menu.menuSignal.signalDeblock'),
|
||||||
handler: this.unlock,
|
handler: this.unlock,
|
||||||
disabledCallback: MenuDisabledState.Signal.unlock,
|
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||||
auth: { station: false, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSignal.signalOff'),
|
label: this.$t('menu.menuSignal.signalOff'),
|
||||||
handler: this.signalClose,
|
handler: this.signalClose,
|
||||||
disabledCallback: MenuDisabledState.Signal.signalClose,
|
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||||
auth: { station: false, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSignal.signalReopen'),
|
label: this.$t('menu.menuSignal.signalReopen'),
|
||||||
handler: this.reopenSignal,
|
handler: this.reopenSignal,
|
||||||
disabledCallback: MenuDisabledState.Signal.reopenSignal,
|
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||||
auth: { station: false, center: true }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: this.$t('menu.menuSignal.routeGuide'),
|
|
||||||
handler: this.guide,
|
|
||||||
disabledCallback: MenuDisabledState.Signal.guide,
|
|
||||||
auth: { station: false, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSignal.humanControl'),
|
label: this.$t('menu.menuSignal.humanControl'),
|
||||||
handler: this.humanControl,
|
handler: this.humanControl,
|
||||||
disabledCallback: MenuDisabledState.Signal.humanControl,
|
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||||
auth: { station: false, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSignal.atsAutoControl'),
|
label: this.$t('menu.menuSignal.atsAutoControl'),
|
||||||
handler: this.atsAutoControl,
|
handler: this.atsAutoControl,
|
||||||
disabledCallback: MenuDisabledState.Signal.atsAutoControl,
|
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||||
auth: { station: false, center: true }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: this.$t('menu.menuSignal.queryRouteControlMode'),
|
|
||||||
handler: this.detail,
|
|
||||||
disabledCallback: MenuDisabledState.Signal.detail,
|
|
||||||
auth: { station: true, center: true }
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -184,12 +155,12 @@ export default {
|
|||||||
{
|
{
|
||||||
label: this.$t('menu.menuSignal.setFault'),
|
label: this.$t('menu.menuSignal.setFault'),
|
||||||
handler: this.setStoppage,
|
handler: this.setStoppage,
|
||||||
disabledCallback: MenuDisabledState.Signal.setStoppage
|
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSignal.cancelFault'),
|
label: this.$t('menu.menuSignal.cancelFault'),
|
||||||
handler: this.cancelStoppage,
|
handler: this.cancelStoppage,
|
||||||
disabledCallback: MenuDisabledState.Signal.cancelStoppage
|
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@ -201,7 +172,10 @@ export default {
|
|||||||
]),
|
]),
|
||||||
...mapGetters('menuOperation', [
|
...mapGetters('menuOperation', [
|
||||||
'buttonOperation'
|
'buttonOperation'
|
||||||
])
|
]),
|
||||||
|
group() {
|
||||||
|
return this.$route.query.group;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
@ -220,19 +194,11 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
initMenu() {
|
initMenu() {
|
||||||
// 编辑模式菜单列表
|
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
this.menu = menuFiltration(this.menuNormal);
|
|
||||||
if (this.operatemode === OperateMode.ADMIN) {
|
|
||||||
this.menu = [...this.menu, ...this.menuForce];
|
|
||||||
}
|
|
||||||
|
|
||||||
// 故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
this.menu = this.menuForce;
|
this.menu = this.menuForce;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.menu = menuConvert(this.menu);
|
|
||||||
|
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
@ -248,291 +214,303 @@ export default {
|
|||||||
},
|
},
|
||||||
// 设置故障
|
// 设置故障
|
||||||
setStoppage() {
|
setStoppage() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
code: `${this.selected.code}`,
|
||||||
code: this.selected.code,
|
operation: OperationEvent.Signal.stoppage.menu.operation,
|
||||||
type: MapDeviceType.Signal.type,
|
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
|
||||||
label: MapDeviceType.Signal.label,
|
param: {
|
||||||
operation: OperationEvent.Signal.stoppage.menu.operation
|
Signal_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消故障
|
// 取消故障
|
||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
code: `${this.selected.code}`,
|
||||||
code: this.selected.code,
|
operation: OperationEvent.Signal.cancelStoppage.menu.operation,
|
||||||
type: MapDeviceType.Signal.type,
|
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
|
||||||
label: MapDeviceType.Signal.label,
|
param: {
|
||||||
operation: OperationEvent.Signal.cancelStoppage.menu.operation
|
Signal_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 排列进路
|
// 排列进路
|
||||||
arrangementRoute() {
|
arrangementRoute() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
code: `${this.selected.code}`,
|
||||||
code: this.selected.code,
|
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||||
type: MapDeviceType.Signal.type,
|
param: {
|
||||||
label: MapDeviceType.Signal.label,
|
Signal_Code: `${this.selected.code}`
|
||||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (valid) {
|
if (valid) {
|
||||||
var tempData = null;
|
querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
|
||||||
if (response) {
|
const tempData = resp.data;
|
||||||
tempData = response.data;
|
this.$refs.routeSelection.doShow(step.operation, this.selected, tempData);
|
||||||
}
|
});
|
||||||
this.$refs.routeSelection.doShow(operate.operation, this.selected, tempData);
|
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消进路
|
// 取消进路
|
||||||
cancelTrainRoute() {
|
cancelTrainRoute() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||||
label: MapDeviceType.Signal.label,
|
param: {
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
|
Signal_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.routeControl.doShow(operate, this.selected);
|
this.$refs.routeControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 信号封锁
|
// 信号封锁
|
||||||
lock() {
|
lock() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
code: `${this.selected.code}`,
|
||||||
code: this.selected.code,
|
operation: OperationEvent.Signal.lock.menu.operation,
|
||||||
type: MapDeviceType.Signal.type,
|
param: {
|
||||||
label: MapDeviceType.Signal.label,
|
Signal_Code: `${this.selected.code}`
|
||||||
operation: OperationEvent.Signal.lock.menu.operation
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeLock.doShow(operate.operation, this.selected);
|
this.$refs.routeLock.doShow(step.operation, this.selected);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 信号解封
|
// 信号解封
|
||||||
unlock() {
|
unlock() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.unlock.menu.operation,
|
||||||
label: MapDeviceType.Signal.label,
|
param: {
|
||||||
operation: OperationEvent.Signal.unlock.menu.operation
|
Signal_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeCmdControl.doShow(operate, this.selected);
|
this.$refs.routeCmdControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 信号重开
|
// 信号重开
|
||||||
reopenSignal() {
|
reopenSignal() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
||||||
label: MapDeviceType.Signal.label,
|
param: {
|
||||||
operation: OperationEvent.Signal.reopenSignal.menu.operation
|
Signal_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeControl.doShow(operate, this.selected);
|
this.$refs.routeControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 进路引导
|
// 进路引导
|
||||||
guide() {
|
guide() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.guide.menu.operation,
|
||||||
label: MapDeviceType.Signal.label,
|
param: {
|
||||||
operation: OperationEvent.Signal.guide.menu.operation
|
Signal_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.routeCmdControl.doShow(operate, this.selected);
|
this.$refs.routeCmdControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 设置联锁自动进路
|
// 设置联锁自动进路
|
||||||
setAutoInterlock() {
|
setAutoInterlock() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
|
||||||
label: MapDeviceType.Signal.label,
|
param: {
|
||||||
operation: OperationEvent.Signal.setAutoInterlock.menu.operation
|
Signal_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeControl.doShow(operate, this.selected);
|
this.$refs.routeControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消联锁自动进路
|
// 取消联锁自动进路
|
||||||
cancelAutoInterlock() {
|
cancelAutoInterlock() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
|
||||||
label: MapDeviceType.Signal.label,
|
param: {
|
||||||
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation
|
Signal_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeControl.doShow(operate, this.selected);
|
this.$refs.routeControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 设置联锁自动触发
|
// 设置联锁自动触发
|
||||||
setAutoTrigger() {
|
setAutoTrigger() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.setAutoTrigger.menu.operation,
|
||||||
label: MapDeviceType.Signal.label,
|
param: {
|
||||||
operation: OperationEvent.Signal.setAutoTrigger.menu.operation
|
Signal_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeControl.doShow(operate, this.selected);
|
this.$refs.routeControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消联锁自动触发
|
// 取消联锁自动触发
|
||||||
cancelAutoTrigger() {
|
cancelAutoTrigger() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation,
|
||||||
label: MapDeviceType.Signal.label,
|
param: {
|
||||||
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation
|
Signal_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeControl.doShow(operate, this.selected);
|
this.$refs.routeControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 信号关灯
|
// 信号关灯
|
||||||
signalClose() {
|
signalClose() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.signalClose.menu.operation,
|
||||||
label: MapDeviceType.Signal.label,
|
param: {
|
||||||
operation: OperationEvent.Signal.signalClose.menu.operation
|
Signal_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeControl.doShow(operate, this.selected);
|
this.$refs.routeControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 自排关(进路交人工控)
|
// 自排关(进路交人工控)
|
||||||
humanControl() {
|
humanControl() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
code: `${this.selected.code}`,
|
||||||
code: this.selected.code,
|
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||||
type: MapDeviceType.Signal.type,
|
param: {
|
||||||
label: MapDeviceType.Signal.label,
|
Signal_Code: `${this.selected.code}`
|
||||||
operation: OperationEvent.Signal.humanControl.menu.operation
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let tempData = null;
|
|
||||||
if (response) {
|
|
||||||
tempData = response.data;
|
|
||||||
}
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeHandControl.doShow(operate, this.selected, tempData);
|
querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
|
||||||
|
const tempData = resp.data;
|
||||||
|
this.$refs.routeHandControl.doShow(step, this.selected, tempData);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 自排关(进路交ATS自动控)
|
// 自排关(进路交ATS自动控)
|
||||||
atsAutoControl() {
|
atsAutoControl() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
Signal_Code: `${this.selected.code}`,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||||
label: MapDeviceType.Signal.label,
|
param: {
|
||||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation
|
Signal_Code: `${this.selected.code}`
|
||||||
};
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
|
||||||
if (valid) {
|
|
||||||
let tempData = null;
|
|
||||||
if (response) {
|
|
||||||
tempData = response.data;
|
|
||||||
}
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.routeHandControl.doShow(operate, this.selected, tempData);
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
},
|
|
||||||
// 查询进路状态
|
|
||||||
detail() {
|
|
||||||
const operate = {
|
|
||||||
start: true,
|
|
||||||
send: true,
|
|
||||||
code: this.selected.code,
|
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
label: MapDeviceType.Signal.label,
|
|
||||||
operation: OperationEvent.Signal.detail.menu.operation
|
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeDetail.doShow(operate, this.selected, response.data);
|
querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
|
||||||
|
const tempData = resp.data;
|
||||||
|
this.$refs.routeHandControl.doShow(step, this.selected, tempData);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// 查询进路状态
|
||||||
|
// detail() {
|
||||||
|
// const step = {
|
||||||
|
// start: true,
|
||||||
|
// code: `${this.selected.code}`,
|
||||||
|
// operation: OperationEvent.Signal.detail.menu.operation,
|
||||||
|
// param: {
|
||||||
|
// Signal_Code: `${this.selected.code}`
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
// this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
|
// if (valid) {
|
||||||
|
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
// querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
|
||||||
|
// const tempData = resp.data;
|
||||||
|
// this.$refs.routeDetail.doShow(step, this.selected, tempData);
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -15,9 +15,10 @@ import StationHumanControlAll from './dialog/stationHumanControlAll';
|
|||||||
import StationSetRouteControlAll from './dialog/stationSetRouteControlAll';
|
import StationSetRouteControlAll from './dialog/stationSetRouteControlAll';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationMenu',
|
name: 'StationMenu',
|
||||||
@ -40,63 +41,60 @@ export default {
|
|||||||
return {
|
return {
|
||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
local: [
|
Local: [
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStation.fullSiteSetInterlockAutoTrigger'),
|
label: this.$t('menu.menuStation.fullSiteSetInterlockAutoTrigger'),
|
||||||
handler: this.setAutoTrigger,
|
handler: this.setAutoTrigger,
|
||||||
disabledCallback: MenuDisabledState.Station.setAutoTrigger,
|
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStation.fullSiteCancelInterlockAutoTrigger'),
|
label: this.$t('menu.menuStation.fullSiteCancelInterlockAutoTrigger'),
|
||||||
handler: this.cancelAutoTrigger,
|
handler: this.cancelAutoTrigger,
|
||||||
disabledCallback: MenuDisabledState.Station.cancelAutoTrigger,
|
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: this.$t('menu.menuStation.powerUnLock'),
|
|
||||||
handler: this.powerUnLock,
|
|
||||||
disabledCallback: MenuDisabledState.Station.powerUnLock,
|
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: this.$t('menu.menuStation.execKeyOperationTest'),
|
|
||||||
handler: this.execKeyOperationTest,
|
|
||||||
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
|
|
||||||
auth: { station: true, center: false }
|
|
||||||
}
|
}
|
||||||
|
// {
|
||||||
|
// label: this.$t('menu.menuStation.powerUnLock'),
|
||||||
|
// handler: this.powerUnLock,
|
||||||
|
// auth: { station: true, center: false }
|
||||||
|
// // cmdType: CMD.Station.
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// label: this.$t('menu.menuStation.execKeyOperationTest'),
|
||||||
|
// handler: this.execKeyOperationTest,
|
||||||
|
// auth: { station: true, center: false }
|
||||||
|
// // cmdType: CMD.Station.
|
||||||
|
// }
|
||||||
],
|
],
|
||||||
central: [
|
Center: [
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStation.allHumanControl'),
|
label: this.$t('menu.menuStation.allHumanControl'),
|
||||||
handler: this.humanControlALL,
|
handler: this.humanControlALL,
|
||||||
disabledCallback: MenuDisabledState.Station.humanControlALL,
|
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING
|
||||||
auth: { station: false, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStation.allATSAutoControl'),
|
label: this.$t('menu.menuStation.allATSAutoControl'),
|
||||||
handler: this.atsAutoControlALL,
|
handler: this.atsAutoControlALL,
|
||||||
disabledCallback: MenuDisabledState.Station.atsAutoControlALL,
|
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
|
||||||
auth: { station: false, center: true }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: this.$t('menu.menuStation.execKeyOperationTest'),
|
|
||||||
handler: this.execKeyOperationTest,
|
|
||||||
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
|
|
||||||
auth: { station: false, center: true }
|
|
||||||
}
|
}
|
||||||
|
// {
|
||||||
|
// label: this.$t('menu.menuStation.execKeyOperationTest'),
|
||||||
|
// handler: this.execKeyOperationTest,
|
||||||
|
// auth: { station: false, center: true },
|
||||||
|
// cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
|
||||||
|
// // cmdType: CMD.Section.
|
||||||
|
// }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
menuForce: [
|
menuForce: [
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStation.setStoppage'),
|
label: this.$t('menu.menuStation.setStoppage'),
|
||||||
handler: this.setStoppage,
|
handler: this.setStoppage,
|
||||||
disabledCallback: MenuDisabledState.Station.setStoppage
|
cmdType: CMD.Station.CMD_STATION_ADD_FAULT
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStation.cancelStoppage'),
|
label: this.$t('menu.menuStation.cancelStoppage'),
|
||||||
handler: this.cancelStoppage,
|
handler: this.cancelStoppage,
|
||||||
disabledCallback: MenuDisabledState.Station.cancelStoppage
|
cmdType: CMD.Station.CMD_STATION_REMOVE_FAULT
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@ -130,7 +128,8 @@ export default {
|
|||||||
this.menu = [];
|
this.menu = [];
|
||||||
if (this.selected.concentrateStationCode == this.selected.code) {
|
if (this.selected.concentrateStationCode == this.selected.code) {
|
||||||
// 编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
this.menu = menuFiltration(this.menuNormal);
|
// this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
|
||||||
|
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
if (this.operatemode === OperateMode.ADMIN) {
|
if (this.operatemode === OperateMode.ADMIN) {
|
||||||
this.menu = [...this.menu, ...this.menuForce];
|
this.menu = [...this.menu, ...this.menuForce];
|
||||||
}
|
}
|
||||||
@ -143,7 +142,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.menu = menuConvert(this.menu);
|
// this.menu = MenuContextHandler.covert(this.menu);
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
@ -159,141 +158,149 @@ export default {
|
|||||||
},
|
},
|
||||||
// 设置故障
|
// 设置故障
|
||||||
setStoppage() {
|
setStoppage() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
code: `${this.selected.code}`,
|
||||||
code: this.selected.code,
|
operation: OperationEvent.Station.stoppage.menu.operation,
|
||||||
type: MapDeviceType.Station.type,
|
cmdType: CMD.Station.CMD_STOPPAGE,
|
||||||
label: MapDeviceType.Station.label,
|
param: {
|
||||||
operation: OperationEvent.Station.stoppage.menu.operation
|
Station_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消故障
|
// 取消故障
|
||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
code: `${this.selected.code}`,
|
||||||
code: this.selected.code,
|
operation: OperationEvent.Station.cancelStoppage.menu.operation,
|
||||||
type: MapDeviceType.Station.type,
|
cmdType: CMD.Station.CMD_CANCEL_STOPPAGE,
|
||||||
label: MapDeviceType.Station.label,
|
param: {
|
||||||
operation: OperationEvent.Station.cancelStoppage.menu.operation
|
Station_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 全站设置联锁自动触发
|
// 全站设置联锁自动触发
|
||||||
setAutoTrigger() {
|
setAutoTrigger() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
code: `${this.selected.code}`,
|
||||||
code: this.selected.code,
|
operation: OperationEvent.Station.setAutoTrigger.menu.operation,
|
||||||
type: MapDeviceType.Station.type,
|
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER,
|
||||||
label: MapDeviceType.Station.label,
|
param: {
|
||||||
operation: OperationEvent.Station.setAutoTrigger.menu.operation
|
Station_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 全站取消联锁自动触发
|
// 全站取消联锁自动触发
|
||||||
cancelAutoTrigger() {
|
cancelAutoTrigger() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
code: `${this.selected.code}`,
|
||||||
code: this.selected.code,
|
operation: OperationEvent.Station.cancelAutoTrigger.menu.operation,
|
||||||
type: MapDeviceType.Station.type,
|
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER,
|
||||||
label: MapDeviceType.Station.label,
|
param: {
|
||||||
operation: OperationEvent.Station.cancelAutoTrigger.menu.operation
|
Station_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 上电解锁
|
// 上电解锁
|
||||||
powerUnLock() {
|
powerUnLock() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.Station.type,
|
operation: OperationEvent.Station.powerUnLock.menu.operation,
|
||||||
label: MapDeviceType.Station.label,
|
param: {
|
||||||
operation: OperationEvent.Station.powerUnLock.menu.operation
|
Station_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.stationCmdControl.doShow(operate, this.selected);
|
this.$refs.stationCmdControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 执行关键操作测试
|
// 执行关键操作测试
|
||||||
execKeyOperationTest() {
|
execKeyOperationTest() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.Station.type,
|
operation: OperationEvent.Station.execKeyOperationTest.menu.operation,
|
||||||
label: MapDeviceType.Station.label,
|
param: {
|
||||||
operation: OperationEvent.Station.execKeyOperationTest.menu.operation
|
Station_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.stationCmdControl.doShow(operate, this.selected);
|
this.$refs.stationCmdControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 所有进路自排关
|
// 所有进路自排关
|
||||||
humanControlALL() {
|
humanControlALL() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.Station.type,
|
operation: OperationEvent.Station.humanControlALL.menu.operation,
|
||||||
label: MapDeviceType.Station.label,
|
param: {
|
||||||
operation: OperationEvent.Station.humanControlALL.menu.operation
|
Station_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.stationHumanControlAll.doShow(operate);
|
this.$refs.stationHumanControlAll.doShow(step);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 所有进路自排开
|
// 所有进路自排开
|
||||||
atsAutoControlALL() {
|
atsAutoControlALL() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.Station.type,
|
operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
|
||||||
label: MapDeviceType.Station.label,
|
param: {
|
||||||
operation: OperationEvent.Station.atsAutoControlALL.menu.operation
|
Station_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
|
this.$refs.stationSetRouteControlAll.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -20,10 +20,12 @@ import StandRunLevel from './dialog/standRunLevel';
|
|||||||
import StandStopTime from './dialog/standStopTime';
|
import StandStopTime from './dialog/standStopTime';
|
||||||
import StandDetainTrainAll from './dialog/standDetainTrainAll';
|
import StandDetainTrainAll from './dialog/standDetainTrainAll';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
|
import Handler from '@/scripts/cmdPlugin/Handler';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationStandMenu',
|
name: 'StationStandMenu',
|
||||||
@ -49,128 +51,103 @@ export default {
|
|||||||
return {
|
return {
|
||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
local: [
|
Local: [
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStationStand.detainTrain'),
|
label: this.$t('menu.menuStationStand.detainTrain'),
|
||||||
handler: this.setDetainTrain,
|
handler: this.setDetainTrain,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
|
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStationStand.cancelDetainTrain'),
|
label: this.$t('menu.menuStationStand.cancelDetainTrain'),
|
||||||
handler: this.cancelDetainTrain,
|
handler: this.cancelDetainTrain,
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
|
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStationStand.cancelDetainTrainForce'),
|
label: this.$t('menu.menuStationStand.cancelDetainTrainForce'),
|
||||||
handler: this.cancelDetainTrainForce,
|
handler: this.cancelDetainTrainForce,
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrainForce,
|
cmdType:CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStationStand.jumpStop'),
|
label: this.$t('menu.menuStationStand.jumpStop'),
|
||||||
handler: this.setJumpStop,
|
handler: this.setJumpStop,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
|
cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStationStand.cancelJumpStop'),
|
label: this.$t('menu.menuStationStand.cancelJumpStop'),
|
||||||
handler: this.cancelJumpStop,
|
handler: this.cancelJumpStop,
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
|
cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStationStand.setRunLevel'),
|
label: this.$t('menu.menuStationStand.setRunLevel'),
|
||||||
handler: this.setRunLevel,
|
handler: this.setRunLevel,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
|
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME
|
||||||
auth: { station: false, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStationStand.setEarlyDeparture'),
|
label: this.$t('menu.menuStationStand.setEarlyDeparture'),
|
||||||
handler: this.earlyDeparture,
|
handler: this.earlyDeparture,
|
||||||
disabledCallback: MenuDisabledState.StationStand.earlyDeparture,
|
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||||
auth: { station: false, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStationStand.setBackStrategy'),
|
label: this.$t('menu.menuStationStand.setBackStrategy'),
|
||||||
handler: this.setBackStrategy,
|
handler: this.setBackStrategy,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setBackStrategy,
|
cmdType:CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
|
||||||
auth: { station: false, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStationStand.getStationStandStatus'),
|
label: this.$t('menu.menuStationStand.getStationStandStatus'),
|
||||||
handler: this.detail,
|
handler: this.detail,
|
||||||
disabledCallback: MenuDisabledState.StationStand.detail,
|
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||||
auth: { station: true, center: false }
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
central: [
|
Center: [
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStationStand.detainTrain'),
|
label: this.$t('menu.menuStationStand.detainTrain'),
|
||||||
handler: this.setDetainTrain,
|
handler: this.setDetainTrain,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
|
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||||
auth: { station: false, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStationStand.cancelDetainTrain'),
|
label: this.$t('menu.menuStationStand.cancelDetainTrain'),
|
||||||
handler: this.cancelDetainTrain,
|
handler: this.cancelDetainTrain,
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
|
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||||
auth: { station: false, center: true }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: this.$t('menu.menuStationStand.cancelDetainTrainForce'),
|
|
||||||
handler: this.cancelDetainTrainForce,
|
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrainForce,
|
|
||||||
auth: { station: false, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStationStand.cancelDetainTrainAll'),
|
label: this.$t('menu.menuStationStand.cancelDetainTrainAll'),
|
||||||
handler: this.cancelDetainTrainAll,
|
handler: this.cancelDetainTrainAll,
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrainAll,
|
cmdType:CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN
|
||||||
auth: { station: false, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStationStand.jumpStop'),
|
label: this.$t('menu.menuStationStand.jumpStop'),
|
||||||
handler: this.setJumpStop,
|
handler: this.setJumpStop,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
|
cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
||||||
auth: { station: false, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStationStand.cancelJumpStop'),
|
label: this.$t('menu.menuStationStand.cancelJumpStop'),
|
||||||
handler: this.cancelJumpStop,
|
handler: this.cancelJumpStop,
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
|
cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||||
auth: { station: true, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStationStand.setStopTime'),
|
label: this.$t('menu.menuStationStand.setStopTime'),
|
||||||
handler: this.setStopTime,
|
handler: this.setStopTime,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setStopTime,
|
cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME
|
||||||
auth: { station: false, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStationStand.setRunLevel'),
|
label: this.$t('menu.menuStationStand.setRunLevel'),
|
||||||
handler: this.setRunLevel,
|
handler: this.setRunLevel,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
|
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME
|
||||||
auth: { station: false, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStationStand.setEarlyDeparture'),
|
label: this.$t('menu.menuStationStand.setEarlyDeparture'),
|
||||||
handler: this.earlyDeparture,
|
handler: this.earlyDeparture,
|
||||||
disabledCallback: MenuDisabledState.StationStand.earlyDeparture,
|
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||||
auth: { station: false, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStationStand.setBackStrategy'),
|
label: this.$t('menu.menuStationStand.setBackStrategy'),
|
||||||
handler: this.setBackStrategy,
|
handler: this.setBackStrategy,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setBackStrategy,
|
cmdType:CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
|
||||||
auth: { station: false, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStationStand.getStationStandStatus'),
|
label: this.$t('menu.menuStationStand.getStationStandStatus'),
|
||||||
handler: this.detail,
|
handler: this.detail,
|
||||||
disabledCallback: MenuDisabledState.StationStand.detail,
|
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||||
auth: { station: true, center: true }
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -178,12 +155,12 @@ export default {
|
|||||||
{
|
{
|
||||||
label: this.$t('menu.menuStationStand.setFault'),
|
label: this.$t('menu.menuStationStand.setFault'),
|
||||||
handler: this.setStoppage,
|
handler: this.setStoppage,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setStoppage
|
cmdType:CMD.Stand.CMD_STAND_ADD_FAULT
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStationStand.cancelFault'),
|
label: this.$t('menu.menuStationStand.cancelFault'),
|
||||||
handler: this.cancelStoppage,
|
handler: this.cancelStoppage,
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelStoppage
|
cmdType:CMD.Stand.CMD_STAND_REMOVE_FAULT
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@ -215,7 +192,8 @@ export default {
|
|||||||
},
|
},
|
||||||
initMenu() {
|
initMenu() {
|
||||||
// 编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
this.menu = menuFiltration(this.menuNormal);
|
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
|
// this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
|
||||||
if (this.operatemode === OperateMode.ADMIN) {
|
if (this.operatemode === OperateMode.ADMIN) {
|
||||||
this.menu = [...this.menu, ...this.menuForce];
|
this.menu = [...this.menu, ...this.menuForce];
|
||||||
}
|
}
|
||||||
@ -225,7 +203,7 @@ export default {
|
|||||||
this.menu = this.menuForce;
|
this.menu = this.menuForce;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.menu = menuConvert(this.menu);
|
// this.menu = MenuContextHandler.covert(this.menu);
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
@ -241,246 +219,253 @@ export default {
|
|||||||
},
|
},
|
||||||
// 设置故障
|
// 设置故障
|
||||||
setStoppage() {
|
setStoppage() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
code: `${this.selected.code}`,
|
||||||
code: this.selected.code,
|
operation: OperationEvent.StationStand.stoppage.menu.operation,
|
||||||
type: MapDeviceType.StationStand.type,
|
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
|
||||||
label: MapDeviceType.StationStand.label,
|
param: {
|
||||||
operation: OperationEvent.StationStand.stoppage.menu.operation
|
StationStand_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消故障
|
// 取消故障
|
||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
code: `${this.selected.code}`,
|
||||||
code: this.selected.code,
|
operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
|
||||||
type: MapDeviceType.StationStand.type,
|
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
|
||||||
label: MapDeviceType.StationStand.label,
|
param: {
|
||||||
operation: OperationEvent.StationStand.cancelStoppage.menu.operation
|
StationStand_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 设置扣车
|
// 设置扣车
|
||||||
setDetainTrain() {
|
setDetainTrain() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.StationStand.type,
|
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||||
label: MapDeviceType.StationStand.label,
|
param: {
|
||||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation
|
StationStand_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standControl.doShow(operate, this.selected);
|
this.$refs.standControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消扣车
|
// 取消扣车
|
||||||
cancelDetainTrain() {
|
cancelDetainTrain() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.StationStand.type,
|
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
||||||
label: MapDeviceType.StationStand.label,
|
param: {
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
|
StationStand_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standControl.doShow(operate, this.selected);
|
this.$refs.standControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 强制取消扣车
|
// 强制取消扣车
|
||||||
cancelDetainTrainForce() {
|
cancelDetainTrainForce() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.StationStand.type,
|
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation,
|
||||||
label: MapDeviceType.StationStand.label,
|
param: {
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation
|
StationStand_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standControl.doShow(operate, this.selected);
|
this.$refs.standControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 全线取消扣车
|
// 全线取消扣车
|
||||||
cancelDetainTrainAll() {
|
cancelDetainTrainAll() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.StationStand.type,
|
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
|
||||||
label: MapDeviceType.StationStand.label,
|
param: {
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation
|
StationStand_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standDetainTrainAll.doShow(operate, this.selected);
|
this.$refs.standDetainTrainAll.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 设置跳停
|
// 设置跳停
|
||||||
setJumpStop() {
|
setJumpStop() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.StationStand.type,
|
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||||
label: MapDeviceType.StationStand.label,
|
param: {
|
||||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation
|
StationStand_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standControl.doShow(operate, this.selected);
|
this.$refs.standControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消跳停
|
// 取消跳停
|
||||||
cancelJumpStop() {
|
cancelJumpStop() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.StationStand.type,
|
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||||
label: MapDeviceType.StationStand.label,
|
param: {
|
||||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation
|
StationStand_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standControl.doShow(operate, this.selected);
|
this.$refs.standControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 设置停站时间
|
// 设置停站时间
|
||||||
setStopTime() {
|
setStopTime() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
code: `${this.selected.code}`,
|
||||||
code: this.selected.code,
|
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
||||||
type: MapDeviceType.StationStand.type,
|
param: {
|
||||||
label: MapDeviceType.StationStand.label,
|
StationStand_Code: `${this.selected.code}`
|
||||||
operation: OperationEvent.StationStand.setStopTime.menu.operation
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let tempDate = null;
|
|
||||||
if (response) {
|
|
||||||
tempDate = response.data;
|
|
||||||
}
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standStopTime.doShow(operate, this.selected, tempDate);
|
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => {
|
||||||
|
const tempData = resp.data;
|
||||||
|
this.$refs.standStopTime.doShow(step, this.selected, tempData);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 设置运行等级
|
// 设置运行等级
|
||||||
setRunLevel() {
|
setRunLevel() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
code: `${this.selected.code}`,
|
||||||
code: this.selected.code,
|
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
||||||
type: MapDeviceType.StationStand.type,
|
param: {
|
||||||
label: MapDeviceType.StationStand.label,
|
StationStand_Code: `${this.selected.code}`
|
||||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let tempDate = null;
|
|
||||||
if (response) {
|
|
||||||
tempDate = response.data;
|
|
||||||
}
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standRunLevel.doShow(operate, this.selected, tempDate);
|
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => {
|
||||||
|
const tempData = resp.data;
|
||||||
|
this.$refs.standRunLevel.doShow(step, this.selected, tempData);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 设置提前发车
|
// 设置提前发车
|
||||||
earlyDeparture() {
|
earlyDeparture() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: `${this.selected.code}`,
|
||||||
type: MapDeviceType.StationStand.type,
|
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
|
||||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation
|
param: {
|
||||||
|
StationStand_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standControl.doShow(operate, this.selected);
|
this.$refs.standControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 设置折返策略
|
// 设置折返策略
|
||||||
setBackStrategy() {
|
setBackStrategy() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
code: `${this.selected.code}`,
|
||||||
code: this.selected.code,
|
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
|
||||||
type: MapDeviceType.StationStand.type,
|
param: {
|
||||||
operation: OperationEvent.StationStand.setBackStrategy.menu.operation
|
StationStand_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let tempDate = null;
|
|
||||||
if (response) {
|
|
||||||
tempDate = response.data;
|
|
||||||
}
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standBackStrategy.doShow(operate, this.selected, tempDate);
|
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => {
|
||||||
|
const tempData = resp.data;
|
||||||
|
this.$refs.standBackStrategy.doShow(step, this.selected, tempData);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 查询站台状态
|
// 查询站台状态
|
||||||
detail() {
|
detail() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
code: `${this.selected.code}`,
|
||||||
code: this.selected.code,
|
operation: OperationEvent.StationStand.detail.menu.operation,
|
||||||
type: MapDeviceType.StationStand.type,
|
param: {
|
||||||
label: MapDeviceType.StationStand.label,
|
StationStand_Code: `${this.selected.code}`
|
||||||
operation: OperationEvent.StationStand.detail.menu.operation
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let tempDate = null;
|
|
||||||
if (response) {
|
|
||||||
tempDate = response.data;
|
|
||||||
}
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standDetail.doShow(operate, this.selected, tempDate);
|
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => {
|
||||||
|
const tempData = resp.data;
|
||||||
|
this.$refs.standDetail.doShow(step, this.selected, tempData);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,10 +14,11 @@ import SwitchControl from './dialog/switchControl';
|
|||||||
import SwitchCmdControl from './dialog/switchCmdControl';
|
import SwitchCmdControl from './dialog/switchCmdControl';
|
||||||
import SpeedCmdControl from './dialog/speedCmdControl';
|
import SpeedCmdControl from './dialog/speedCmdControl';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SwitchMenu',
|
name: 'SwitchMenu',
|
||||||
@ -40,134 +41,132 @@ export default {
|
|||||||
return {
|
return {
|
||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
local: [
|
Local: [
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSwitch.switchLock'),
|
label: this.$t('menu.menuSwitch.switchLock'),
|
||||||
handler: this.lock,
|
handler: this.lock,
|
||||||
disabledCallback: MenuDisabledState.Switch.lock,
|
auth: { station: true, center: false },
|
||||||
auth: { station: true, center: false }
|
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSwitch.switchUnlock'),
|
label: this.$t('menu.menuSwitch.switchUnlock'),
|
||||||
handler: this.unlock,
|
handler: this.unlock,
|
||||||
disabledCallback: MenuDisabledState.Switch.unlock,
|
auth: { station: true, center: false },
|
||||||
auth: { station: true, center: false }
|
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSwitch.switchSectionBlockade'),
|
label: this.$t('menu.menuSwitch.switchSectionBlockade'),
|
||||||
handler: this.block,
|
handler: this.block,
|
||||||
disabledCallback: MenuDisabledState.Switch.block,
|
auth: { station: true, center: false },
|
||||||
auth: { station: true, center: false }
|
cmdType:CMD.Switch.CMD_SWITCH_BLOCK
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSwitch.switchSectionUnblock'),
|
label: this.$t('menu.menuSwitch.switchSectionUnblock'),
|
||||||
handler: this.unblock,
|
handler: this.unblock,
|
||||||
disabledCallback: MenuDisabledState.Switch.unblock,
|
auth: { station: true, center: false },
|
||||||
auth: { station: true, center: false }
|
cmdType:CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSwitch.switchTurnout'),
|
label: this.$t('menu.menuSwitch.switchTurnout'),
|
||||||
handler: this.switchTurnout,
|
handler: this.switchTurnout,
|
||||||
disabledCallback: MenuDisabledState.Switch.switchTurnout,
|
auth: { station: true, center: false },
|
||||||
auth: { station: true, center: false }
|
cmdType:CMD.Switch.CMD_SWITCH_TURN
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSwitch.switchSectionFaultUnlock'),
|
label: this.$t('menu.menuSwitch.switchSectionFaultUnlock'),
|
||||||
handler: this.fault,
|
handler: this.fault,
|
||||||
disabledCallback: MenuDisabledState.Switch.fault,
|
auth: { station: true, center: false },
|
||||||
auth: { station: true, center: false }
|
cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSwitch.switchSectionAxisPreReset'),
|
label: this.$t('menu.menuSwitch.switchSectionAxisPreReset'),
|
||||||
handler: this.axlePreReset,
|
handler: this.axlePreReset,
|
||||||
disabledCallback: MenuDisabledState.Switch.axlePreReset,
|
auth: { station: true, center: false },
|
||||||
auth: { station: true, center: false }
|
cmdType:CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSwitch.sectionResection'),
|
label: this.$t('menu.menuSwitch.sectionResection'),
|
||||||
handler: this.split,
|
handler: this.split,
|
||||||
disabledCallback: MenuDisabledState.Switch.split,
|
auth: { station: true, center: false },
|
||||||
auth: { station: true, center: false }
|
cmdType:CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSwitch.sectionActive'),
|
label: this.$t('menu.menuSwitch.sectionActive'),
|
||||||
handler: this.active,
|
handler: this.active,
|
||||||
disabledCallback: MenuDisabledState.Switch.active,
|
auth: { station: true, center: false },
|
||||||
auth: { station: true, center: false }
|
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSwitch.switchSectionSetSpeedLimit'),
|
label: this.$t('menu.menuSwitch.switchSectionSetSpeedLimit'),
|
||||||
handler: this.setSpeed,
|
handler: this.setSpeed,
|
||||||
disabledCallback: MenuDisabledState.Switch.setSpeed,
|
auth: { station: true, center: false },
|
||||||
auth: { station: true, center: false }
|
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSwitch.switchSectionCancelSpeedLimit'),
|
label: this.$t('menu.menuSwitch.switchSectionCancelSpeedLimit'),
|
||||||
handler: this.cancelSpeed,
|
handler: this.cancelSpeed,
|
||||||
disabledCallback: MenuDisabledState.Switch.cancelSpeed,
|
auth: { station: true, center: false },
|
||||||
auth: { station: true, center: false }
|
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
central: [
|
Center: [
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSwitch.switchLock'),
|
label: this.$t('menu.menuSwitch.switchLock'),
|
||||||
handler: this.lock,
|
handler: this.lock,
|
||||||
disabledCallback: MenuDisabledState.Switch.lock,
|
auth: { station: false, center: true },
|
||||||
auth: { station: false, center: true }
|
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSwitch.switchUnlock'),
|
label: this.$t('menu.menuSwitch.switchUnlock'),
|
||||||
handler: this.unlock,
|
handler: this.unlock,
|
||||||
disabledCallback: MenuDisabledState.Switch.unlock,
|
auth: { station: false, center: true },
|
||||||
auth: { station: false, center: true }
|
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSwitch.switchSectionBlockade'),
|
label: this.$t('menu.menuSwitch.switchSectionBlockade'),
|
||||||
handler: this.block,
|
handler: this.block,
|
||||||
disabledCallback: MenuDisabledState.Switch.block,
|
auth: { station: false, center: true },
|
||||||
auth: { station: false, center: true }
|
cmdType:CMD.Switch.CMD_SWITCH_BLOCK
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSwitch.switchSectionUnblock'),
|
label: this.$t('menu.menuSwitch.switchSectionUnblock'),
|
||||||
handler: this.unblock,
|
handler: this.unblock,
|
||||||
disabledCallback: MenuDisabledState.Switch.unblock,
|
auth: { station: false, center: true },
|
||||||
auth: { station: false, center: true }
|
cmdType:CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSwitch.switchTurnout'),
|
label: this.$t('menu.menuSwitch.switchTurnout'),
|
||||||
handler: this.switchTurnout,
|
handler: this.switchTurnout,
|
||||||
disabledCallback: MenuDisabledState.Switch.switchTurnout,
|
auth: { station: false, center: true },
|
||||||
auth: { station: false, center: true }
|
cmdType:CMD.Switch.CMD_SWITCH_TURN
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSwitch.switchSectionFaultUnlock'),
|
label: this.$t('menu.menuSwitch.switchSectionFaultUnlock'),
|
||||||
handler: this.fault,
|
handler: this.fault,
|
||||||
disabledCallback: MenuDisabledState.Switch.fault,
|
auth: { station: false, center: true },
|
||||||
auth: { station: false, center: true }
|
cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSwitch.sectionResection'),
|
label: this.$t('menu.menuSwitch.sectionResection'),
|
||||||
handler: this.split,
|
handler: this.split,
|
||||||
disabledCallback: MenuDisabledState.Switch.split,
|
auth: { station: true, center: true },
|
||||||
auth: { station: true, center: true }
|
cmdType:CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSwitch.sectionActive'),
|
label: this.$t('menu.menuSwitch.sectionActive'),
|
||||||
handler: this.active,
|
handler: this.active,
|
||||||
disabledCallback: MenuDisabledState.Switch.active,
|
auth: { station: true, center: true },
|
||||||
auth: { station: true, center: true }
|
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSwitch.switchSectionSetSpeedLimit'),
|
label: this.$t('menu.menuSwitch.switchSectionSetSpeedLimit'),
|
||||||
handler: this.setSpeed,
|
handler: this.setSpeed,
|
||||||
disabledCallback: MenuDisabledState.Switch.setSpeed,
|
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||||
auth: { station: false, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSwitch.switchSectionCancelSpeedLimit'),
|
label: this.$t('menu.menuSwitch.switchSectionCancelSpeedLimit'),
|
||||||
handler: this.cancelSpeed,
|
handler: this.cancelSpeed,
|
||||||
disabledCallback: MenuDisabledState.Switch.cancelSpeed,
|
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
|
||||||
auth: { station: false, center: true }
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -175,18 +174,18 @@ export default {
|
|||||||
{
|
{
|
||||||
label: this.$t('menu.menuSwitch.setFault'),
|
label: this.$t('menu.menuSwitch.setFault'),
|
||||||
handler: this.setStoppage,
|
handler: this.setStoppage,
|
||||||
disabledCallback: MenuDisabledState.Switch.setStoppage,
|
|
||||||
auth: {
|
auth: {
|
||||||
|
|
||||||
}
|
},
|
||||||
|
cmdType:CMD.Switch.CMD_SWITCH_ADD_FAULT
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSwitch.cancelFault'),
|
label: this.$t('menu.menuSwitch.cancelFault'),
|
||||||
handler: this.cancelStoppage,
|
handler: this.cancelStoppage,
|
||||||
disabledCallback: MenuDisabledState.Switch.cancelStoppage,
|
|
||||||
auth: {
|
auth: {
|
||||||
|
|
||||||
}
|
},
|
||||||
|
cmdType:CMD.Switch.CMD_SWITCH_REMOVE_FAULT
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@ -218,7 +217,8 @@ export default {
|
|||||||
},
|
},
|
||||||
initMenu() {
|
initMenu() {
|
||||||
// 编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
this.menu = menuFiltration(this.menuNormal);
|
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
|
// this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
|
||||||
if (this.operatemode === OperateMode.ADMIN) {
|
if (this.operatemode === OperateMode.ADMIN) {
|
||||||
this.menu = [...this.menu, ...this.menuForce];
|
this.menu = [...this.menu, ...this.menuForce];
|
||||||
}
|
}
|
||||||
@ -228,7 +228,7 @@ export default {
|
|||||||
this.menu = this.menuForce;
|
this.menu = this.menuForce;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.menu = menuConvert(this.menu);
|
// this.menu = MenuContextHandler.covert(this.menu);
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
@ -244,242 +244,255 @@ export default {
|
|||||||
},
|
},
|
||||||
// 设置故障
|
// 设置故障
|
||||||
setStoppage() {
|
setStoppage() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
|
||||||
code: this.selected.code,
|
operation: OperationEvent.Switch.stoppage.menu.operation,
|
||||||
type: MapDeviceType.Switch.type,
|
cmdType: CMD.Switch.CMD_STOPPAGE,
|
||||||
label: MapDeviceType.Switch.label,
|
param: {
|
||||||
operation: OperationEvent.Switch.stoppage.menu.operation
|
Switch_Code: this.selected.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消故障
|
// 取消故障
|
||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
|
||||||
code: this.selected.code,
|
operation: OperationEvent.Switch.cancelStoppage.menu.operation,
|
||||||
type: MapDeviceType.Switch.type,
|
cmdType: CMD.Switch.CMD_CANCEL_STOPPAGE,
|
||||||
label: MapDeviceType.Switch.label,
|
param: {
|
||||||
operation: OperationEvent.Switch.cancelStoppage.menu.operation
|
Switch_Code: this.selected.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 道岔单锁
|
// 道岔单锁
|
||||||
lock() {
|
lock() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
|
||||||
type: MapDeviceType.Switch.type,
|
operation: OperationEvent.Switch.lock.menu.operation,
|
||||||
label: MapDeviceType.Switch.label,
|
param: {
|
||||||
operation: OperationEvent.Switch.lock.menu.operation
|
Switch_Code: this.selected.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
this.$refs.switchControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 道岔解封
|
// 道岔解封
|
||||||
unlock() {
|
unlock() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
|
||||||
type: MapDeviceType.Switch.type,
|
operation: OperationEvent.Switch.unlock.menu.operation,
|
||||||
label: MapDeviceType.Switch.label,
|
param: {
|
||||||
operation: OperationEvent.Switch.unlock.menu.operation
|
Switch_Code: this.selected.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchCmdControl.doShow(operate, this.selected);
|
this.$refs.switchCmdControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 道岔封锁
|
// 道岔封锁
|
||||||
block() {
|
block() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
|
||||||
type: MapDeviceType.Switch.type,
|
operation: OperationEvent.Switch.block.menu.operation,
|
||||||
label: MapDeviceType.Switch.label,
|
param: {
|
||||||
operation: OperationEvent.Switch.block.menu.operation
|
Switch_Code: this.selected.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
this.$refs.switchControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 道岔解封
|
// 道岔解封
|
||||||
unblock() {
|
unblock() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
|
||||||
type: MapDeviceType.Switch.type,
|
operation: OperationEvent.Switch.unblock.menu.operation,
|
||||||
label: MapDeviceType.Switch.label,
|
param: {
|
||||||
operation: OperationEvent.Switch.unblock.menu.operation
|
Switch_Code: this.selected.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchCmdControl.doShow(operate, this.selected);
|
this.$refs.switchCmdControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 道岔强扳
|
// 道岔强扳
|
||||||
switchTurnoutForce() {
|
switchTurnoutForce() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
|
||||||
type: MapDeviceType.Switch.type,
|
operation: OperationEvent.Switch.turnoutForce.menu.operation,
|
||||||
label: MapDeviceType.Switch.label,
|
param: {
|
||||||
operation: OperationEvent.Switch.turnoutForce.menu.operation
|
Switch_Code: this.selected.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
this.$refs.switchControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 道岔转动
|
// 道岔转动
|
||||||
switchTurnout() {
|
switchTurnout() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
|
||||||
type: MapDeviceType.Switch.type,
|
operation: OperationEvent.Switch.turnout.menu.operation,
|
||||||
label: MapDeviceType.Switch.label,
|
param: {
|
||||||
operation: OperationEvent.Switch.turnout.menu.operation
|
Switch_Code: this.selected.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (operate.operation) {
|
if (step.operation) {
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
this.$refs.switchControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 道岔故障解锁
|
// 道岔故障解锁
|
||||||
fault() {
|
fault() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
|
||||||
type: MapDeviceType.Switch.type,
|
operation: OperationEvent.Switch.fault.menu.operation,
|
||||||
label: MapDeviceType.Switch.label,
|
param: {
|
||||||
operation: OperationEvent.Switch.fault.menu.operation
|
Switch_Code: this.selected.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchCmdControl.doShow(operate, this.selected);
|
this.$refs.switchCmdControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 道岔计轴预复位
|
// 道岔计轴预复位
|
||||||
axlePreReset() {
|
axlePreReset() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
|
||||||
type: MapDeviceType.Switch.type,
|
operation: OperationEvent.Switch.axlePreReset.menu.operation,
|
||||||
label: MapDeviceType.Switch.label,
|
param: {
|
||||||
operation: OperationEvent.Switch.axlePreReset.menu.operation
|
Switch_Code: this.selected.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchCmdControl.doShow(operate, this.selected);
|
this.$refs.switchCmdControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 区段切除
|
// 区段切除
|
||||||
split() {
|
split() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
|
||||||
type: MapDeviceType.Switch.type,
|
operation: OperationEvent.Switch.split.menu.operation,
|
||||||
label: MapDeviceType.Switch.label,
|
param: {
|
||||||
operation: OperationEvent.Switch.split.menu.operation
|
Switch_Code: this.selected.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
this.$refs.switchControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 区段激活
|
// 区段激活
|
||||||
active() {
|
active() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
|
||||||
type: MapDeviceType.Switch.type,
|
operation: OperationEvent.Switch.active.menu.operation,
|
||||||
label: MapDeviceType.Switch.label,
|
param: {
|
||||||
operation: OperationEvent.Switch.active.menu.operation
|
Switch_Code: this.selected.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
this.$refs.switchControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 道岔设置速度
|
// 道岔设置速度
|
||||||
setSpeed() {
|
setSpeed() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
|
||||||
type: MapDeviceType.Switch.type,
|
operation: OperationEvent.Switch.setSpeed.menu.operation,
|
||||||
label: MapDeviceType.Switch.label,
|
param: {
|
||||||
operation: OperationEvent.Switch.setSpeed.menu.operation
|
Switch_Code: this.selected.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.speedCmdControl.doShow(operate, this.selected);
|
this.$refs.speedCmdControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 道岔取消速度
|
// 道岔取消速度
|
||||||
cancelSpeed() {
|
cancelSpeed() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
|
||||||
code: this.selected.code,
|
operation: OperationEvent.Switch.cancelSpeed.menu.operation,
|
||||||
type: MapDeviceType.Switch.type,
|
cmdType: CMD.Switch.CMD_CANCEL_SPEED,
|
||||||
label: MapDeviceType.Switch.label,
|
param: {
|
||||||
operation: OperationEvent.Switch.cancelSpeed.menu.operation
|
Switch_Code: this.selected.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const tempData = response.data;
|
const tempData = response.data;
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
|
this.$refs.speedCmdControl.doShow(step, this.selected, tempData);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -14,14 +14,15 @@
|
|||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import { MenuDisabledState, menuConvert, trainMenuFiltration } from './utils/menuItemStatus';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import TrainControl from './dialog/trainControl';
|
import TrainControl from './dialog/trainControl';
|
||||||
import TrainDelete from './dialog/trainDelete';
|
import TrainDelete from './dialog/trainDelete';
|
||||||
import TrainMove from './dialog/trainMove';
|
import TrainMove from './dialog/trainMove';
|
||||||
import TrainSwitch from './dialog/trainSwitch';
|
import TrainSwitch from './dialog/trainSwitch';
|
||||||
import TrainEditNumber from './dialog/trainEditNumber';
|
import TrainEditNumber from './dialog/trainEditNumber';
|
||||||
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MenuTrain',
|
name: 'MenuTrain',
|
||||||
@ -46,63 +47,63 @@ export default {
|
|||||||
return {
|
return {
|
||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
local: [],
|
Local: [],
|
||||||
central: [
|
Center: [
|
||||||
{
|
// {
|
||||||
label: this.$t('menu.menuTrain.addTrainId'),
|
// label: this.$t('menu.menuTrain.addTrainId'),
|
||||||
handler: this.addTrainId,
|
// handler: this.addTrainId,
|
||||||
disabledCallback: MenuDisabledState.Train.addTrainId,
|
// auth: { station: true, center: true },
|
||||||
auth: { station: true, center: true }
|
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: this.$t('menu.menuTrain.deleteTrainId'),
|
// label: this.$t('menu.menuTrain.deleteTrainId'),
|
||||||
handler: this.delTrainId,
|
// handler: this.delTrainId,
|
||||||
disabledCallback: MenuDisabledState.Train.delTrainId,
|
// auth: { station: true, center: true },
|
||||||
auth: { station: true, center: true }
|
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: this.$t('menu.menuTrain.editTrainId'),
|
// label: this.$t('menu.menuTrain.editTrainId'),
|
||||||
handler: this.editTrainId,
|
// handler: this.editTrainId,
|
||||||
disabledCallback: MenuDisabledState.Train.editTrainId,
|
// auth: { station: true, center: true },
|
||||||
auth: { station: true, center: true }
|
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: this.$t('menu.menuTrain.editTrainNo'),
|
// label: this.$t('menu.menuTrain.editTrainNo'),
|
||||||
handler: this.editTrainNo,
|
// handler: this.editTrainNo,
|
||||||
disabledCallback: MenuDisabledState.Train.editTrainNo,
|
// auth: { station: true, center: true },
|
||||||
auth: { station: true, center: true }
|
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: this.$t('menu.menuTrain.moveTrainId'),
|
// label: this.$t('menu.menuTrain.moveTrainId'),
|
||||||
handler: this.moveTrainId,
|
// handler: this.moveTrainId,
|
||||||
disabledCallback: MenuDisabledState.Train.moveTrainId,
|
// auth: { station: true, center: true },
|
||||||
auth: { station: true, center: true }
|
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: this.$t('menu.menuTrain.switchTrainId'),
|
// label: this.$t('menu.menuTrain.switchTrainId'),
|
||||||
handler: this.switchTrainId,
|
// handler: this.switchTrainId,
|
||||||
disabledCallback: MenuDisabledState.Train.switchTrainId,
|
// auth: { station: true, center: true },
|
||||||
auth: { station: true, center: true }
|
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
|
||||||
}
|
// }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
menuForce: [
|
menuForce: [
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuTrain.setCommunicationFault'),
|
label: this.$t('menu.menuTrain.setCommunicationFault'),
|
||||||
handler: this.setStoppage,
|
handler: this.setStoppage,
|
||||||
disabledCallback: MenuDisabledState.Train.setStoppage
|
cmdType:CMD.Train.CMD_TRAIN_ADD_FAULT
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuTrain.cancelCommunicationFault'),
|
label: this.$t('menu.menuTrain.cancelCommunicationFault'),
|
||||||
handler: this.cancelStoppage,
|
handler: this.cancelStoppage,
|
||||||
disabledCallback: MenuDisabledState.Train.cancelStoppage
|
cmdType:CMD.Train.CMD_TRAIN_REMOVE_FAULT
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
menuSpeed: [
|
menuSpeed: [
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuTrain.confirmRunToFrontStation'),
|
label: this.$t('menu.menuTrain.confirmRunToFrontStation'),
|
||||||
handler: this.limitSpeed,
|
handler: this.limitSpeed,
|
||||||
disabledCallback: MenuDisabledState.Train.limitSpeed
|
cmdType:CMD.Train.CMD_TRAIN_MANUAL_LIMIT_DRIVE
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@ -134,7 +135,8 @@ export default {
|
|||||||
},
|
},
|
||||||
initMenu() {
|
initMenu() {
|
||||||
// 编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
this.menu = trainMenuFiltration(this.menuNormal);
|
// this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
|
||||||
|
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
if (this.operatemode === OperateMode.ADMIN) {
|
if (this.operatemode === OperateMode.ADMIN) {
|
||||||
this.menu = [...this.menu, ...this.menuForce, ...this.menuSpeed];
|
this.menu = [...this.menu, ...this.menuForce, ...this.menuSpeed];
|
||||||
}
|
}
|
||||||
@ -144,7 +146,7 @@ export default {
|
|||||||
this.menu = [...this.menuForce, ...this.menuSpeed];
|
this.menu = [...this.menuForce, ...this.menuSpeed];
|
||||||
}
|
}
|
||||||
|
|
||||||
this.menu = menuConvert(this.menu);
|
// this.menu = MenuContextHandler.covert(this.menu);
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
@ -162,157 +164,166 @@ export default {
|
|||||||
},
|
},
|
||||||
// 设置故障
|
// 设置故障
|
||||||
setStoppage() {
|
setStoppage() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
|
||||||
code: this.selected.code,
|
operation: OperationEvent.Train.stoppage.menu.operation,
|
||||||
type: MapDeviceType.Train.type,
|
cmdType: CMD.Train.CMD_STOPPAGE,
|
||||||
label: MapDeviceType.Train.label,
|
param: {
|
||||||
operation: OperationEvent.Train.stoppage.menu.operation
|
code: this.selected.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消故障
|
// 取消故障
|
||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
|
||||||
code: this.selected.code,
|
operation: OperationEvent.Train.cancelStoppage.menu.operation,
|
||||||
type: MapDeviceType.Train.type,
|
cmdType: CMD.Train.CMD_CANCEL_STOPPAGE,
|
||||||
label: MapDeviceType.Train.label,
|
param: {
|
||||||
operation: OperationEvent.Train.cancelStoppage.menu.operation
|
code: this.selected.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 限速行驶
|
// 限速行驶
|
||||||
limitSpeed() {
|
limitSpeed() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
|
||||||
code: this.selected.code,
|
operation: OperationEvent.Train.limitSpeed.menu.operation,
|
||||||
type: MapDeviceType.Train.type,
|
cmdType: CMD.Train.CMD_LIMIT_SPEED,
|
||||||
label: MapDeviceType.Train.label,
|
param: {
|
||||||
operation: OperationEvent.Train.limitSpeed.menu.operation
|
code: this.selected.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 添加列车识别号
|
// 添加列车识别号
|
||||||
addTrainId() {
|
addTrainId() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
|
||||||
type: MapDeviceType.Train.type,
|
operation: OperationEvent.Train.addTrainId.menu.operation,
|
||||||
label: MapDeviceType.Train.label,
|
param: {
|
||||||
operation: OperationEvent.Train.addTrainId.menu.operation
|
code: this.selected.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.trainControl.doShow(operate, this.selected);
|
this.$refs.trainControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 删除列车识别号
|
// 删除列车识别号
|
||||||
delTrainId() {
|
delTrainId() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
|
||||||
type: MapDeviceType.Train.type,
|
operation: OperationEvent.Train.delTrainId.menu.operation,
|
||||||
label: MapDeviceType.Train.label,
|
param: {
|
||||||
operation: OperationEvent.Train.delTrainId.menu.operation
|
code: this.selected.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.trainDelete.doShow(operate, this.selected);
|
this.$refs.trainDelete.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 修改列车识别号
|
// 修改列车识别号
|
||||||
editTrainId() {
|
editTrainId() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
|
||||||
type: MapDeviceType.Train.type,
|
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||||
label: MapDeviceType.Train.label,
|
param: {
|
||||||
operation: OperationEvent.Train.editTrainId.menu.operation
|
code: this.selected.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.trainControl.doShow(operate, this.selected);
|
this.$refs.trainControl.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 修改车组号
|
// 修改车组号
|
||||||
editTrainNo() {
|
editTrainNo() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
|
||||||
type: MapDeviceType.Train.type,
|
operation: OperationEvent.Train.editTrainNo.menu.operation,
|
||||||
label: MapDeviceType.Train.label,
|
param: {
|
||||||
operation: OperationEvent.Train.editTrainNo.menu.operation
|
code: this.selected.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.trainEditNumber.doShow(operate, this.selected);
|
this.$refs.trainEditNumber.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 移动列车识别号
|
// 移动列车识别号
|
||||||
moveTrainId() {
|
moveTrainId() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
|
||||||
type: MapDeviceType.Train.type,
|
operation: OperationEvent.Train.moveTrainId.menu.operation,
|
||||||
label: MapDeviceType.Train.label,
|
param: {
|
||||||
operation: OperationEvent.Train.moveTrainId.menu.operation
|
code: this.selected.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.trainMove.doShow(operate, this.selected);
|
this.$refs.trainMove.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 交换列车识别号
|
// 交换列车识别号
|
||||||
switchTrainId() {
|
switchTrainId() {
|
||||||
const operate = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
|
||||||
type: MapDeviceType.Train.type,
|
operation: OperationEvent.Train.switchTrainId.menu.operation,
|
||||||
label: MapDeviceType.Train.label,
|
param: {
|
||||||
operation: OperationEvent.Train.switchTrainId.menu.operation
|
code: this.selected.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.trainSwitch.doShow(operate, this.selected);
|
this.$refs.trainSwitch.doShow(step, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AlarmDetail',
|
name: 'AlarmDetail',
|
||||||
@ -176,7 +176,6 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Command.close.alarm.operation
|
operation: OperationEvent.Command.close.alarm.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -189,7 +188,6 @@ export default {
|
|||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Command.close.alarm.operation
|
operation: OperationEvent.Command.close.alarm.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
@ -59,8 +59,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RequestControl',
|
name: 'RequestControl',
|
||||||
@ -203,7 +204,6 @@ export default {
|
|||||||
|
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
type: MapDeviceType.StationControl.type,
|
|
||||||
operation: OperationEvent.StationControl.controlResponse.menu.operation
|
operation: OperationEvent.StationControl.controlResponse.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -227,22 +227,13 @@ export default {
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
this.$refs.multipleTable.setCurrentRow();
|
this.$refs.multipleTable.setCurrentRow();
|
||||||
},
|
},
|
||||||
serializeCodeListWithSeparator(sep) {
|
|
||||||
const codeList = [];
|
|
||||||
if (this.selection && this.selection.length) {
|
|
||||||
this.selection.forEach(elem => {
|
|
||||||
codeList.push(elem.code);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return codeList.join(sep);
|
|
||||||
},
|
|
||||||
handleChooseChange(selection) {
|
handleChooseChange(selection) {
|
||||||
this.selection = selection;
|
this.selection = selection;
|
||||||
if (selection && selection.length) {
|
if (selection && selection.length) {
|
||||||
|
const codeList = selection.map(elem => { return elem.code; });
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationControl.type,
|
|
||||||
operation: OperationEvent.StationControl.controlResponse.choose.operation,
|
operation: OperationEvent.StationControl.controlResponse.choose.operation,
|
||||||
val: this.serializeCodeListWithSeparator('::')
|
val: codeList.join('::')
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -257,13 +248,16 @@ export default {
|
|||||||
},
|
},
|
||||||
agree() {
|
agree() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
start: true,
|
||||||
over: true,
|
|
||||||
type: MapDeviceType.StationControl.type,
|
|
||||||
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
||||||
code: this.selection[0].code,
|
code: this.tableData[0].code,
|
||||||
val: this.commandId,
|
val: this.commandId,
|
||||||
prdType: this.$store.state.training.prdType
|
cmdType: this.$store.state.training.prdType == '01' ? CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL : CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL,
|
||||||
|
param: {
|
||||||
|
ControlMode_Code: this.tableData[0].code,
|
||||||
|
Reply_Command_Id: this.commandId,
|
||||||
|
ControlMode_Reply: true
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.clearTimer();
|
this.clearTimer();
|
||||||
@ -279,17 +273,17 @@ export default {
|
|||||||
},
|
},
|
||||||
refuse() {
|
refuse() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
start: true,
|
||||||
over: true,
|
|
||||||
type: MapDeviceType.StationControl.type,
|
|
||||||
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
|
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
|
||||||
code: this.selection.length ? this.selection[0].code : '',
|
code: this.tableData[0].code,
|
||||||
val: this.commandId,
|
val: this.commandId,
|
||||||
prdType: this.$store.state.training.prdType
|
cmdType: this.$store.state.training.prdType == '01' ? CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL : CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL,
|
||||||
|
param: {
|
||||||
|
ControlMode_Code: this.tableData[0].code,
|
||||||
|
Reply_Command_Id: this.commandId,
|
||||||
|
ControlMode_Reply: false
|
||||||
|
}
|
||||||
};
|
};
|
||||||
if (!operate.code) {
|
|
||||||
operate.code = this.tableData[0].code;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.clearTimer();
|
this.clearTimer();
|
||||||
this.disabledAgree = true;
|
this.disabledAgree = true;
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
export default {
|
export default {
|
||||||
name: 'CmdNotice',
|
name: 'CmdNotice',
|
||||||
data() {
|
data() {
|
||||||
@ -41,11 +41,9 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
'$store.state.socket.msgHead': function (elem) {
|
'$store.state.socket.msgHead': function (elem) {
|
||||||
if (elem && elem.type == 'resp' && (elem.timeout || !elem.agree)) {
|
if (elem && elem.type == 'resp' && (elem.timeout || !elem.agree)) {
|
||||||
const operate = this.$store.state.training.operate;
|
|
||||||
const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
|
const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
||||||
const newOperate = {
|
const newOperate = {
|
||||||
type: operate.type,
|
|
||||||
name: station.name
|
name: station.name
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -83,7 +81,6 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Command.close.notice.operation
|
operation: OperationEvent.Command.close.notice.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -96,7 +93,6 @@ export default {
|
|||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Command.close.notice.operation
|
operation: OperationEvent.Command.close.notice.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
@ -7,12 +7,12 @@ export function getCurrentStateObject() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 系统类型 */
|
/** 系统类型 */
|
||||||
export const SystemType = {
|
export const State2SimulationMap = {
|
||||||
'01': 'local', // 现地工作站
|
'01': 'local', // 现地工作站
|
||||||
'02': 'central' // 中心调度工作站
|
'02': 'central' // 中心调度工作站
|
||||||
};
|
};
|
||||||
|
|
||||||
export const StationControlType = {
|
export const State2ControlMap = {
|
||||||
'01': 'center', // 中控
|
'01': 'center', // 中控
|
||||||
'02': 'station', // 站控
|
'02': 'station', // 站控
|
||||||
'03': 'station'
|
'03': 'station'
|
||||||
@ -521,8 +521,8 @@ export function menuFiltration(menuObj) {
|
|||||||
|
|
||||||
if (control) {
|
if (control) {
|
||||||
if (store.state.training.prdType != '') {
|
if (store.state.training.prdType != '') {
|
||||||
const type = SystemType[store.state.training.prdType];
|
const type = State2SimulationMap[store.state.training.prdType];
|
||||||
const status = StationControlType[control.status];
|
const status = State2ControlMap[control.status];
|
||||||
menu = [...menuObj[type]];
|
menu = [...menuObj[type]];
|
||||||
if (menu.constructor === Array) {
|
if (menu.constructor === Array) {
|
||||||
menu.forEach(elem => {
|
menu.forEach(elem => {
|
||||||
@ -552,7 +552,7 @@ export function menuFiltration(menuObj) {
|
|||||||
export function trainMenuFiltration(menuObj) {
|
export function trainMenuFiltration(menuObj) {
|
||||||
var menu = [];
|
var menu = [];
|
||||||
if (store.state.training.prdType != '') {
|
if (store.state.training.prdType != '') {
|
||||||
const type = SystemType[store.state.training.prdType];
|
const type = State2SimulationMap[store.state.training.prdType];
|
||||||
menu = [...menuObj[type]];
|
menu = [...menuObj[type]];
|
||||||
if (menu.constructor === Array) {
|
if (menu.constructor === Array) {
|
||||||
menu.forEach(elem => {
|
menu.forEach(elem => {
|
||||||
|
@ -22,11 +22,17 @@ import StandRunLevel from './dialog/standRunLevel';
|
|||||||
import StandStopTime from './dialog/standStopTime';
|
import StandStopTime from './dialog/standStopTime';
|
||||||
import StandDetainTrainAll from './dialog/standDetainTrainAll';
|
import StandDetainTrainAll from './dialog/standDetainTrainAll';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
|
// import { mapGetters } from 'vuex';
|
||||||
|
// import { OperateMode } from '@/scripts/ConstDic';
|
||||||
|
// import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||||
|
// import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||||
|
// import { mouseCancelState } from './utils/menuItemStatus';
|
||||||
|
import Handler from '@/scripts/cmdPlugin/Handler';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import { mouseCancelState } from './utils/menuItemStatus';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationStandMenu',
|
name: 'StationStandMenu',
|
||||||
@ -55,28 +61,24 @@ export default {
|
|||||||
menuNormal: {
|
menuNormal: {
|
||||||
local: [
|
local: [
|
||||||
{
|
{
|
||||||
label: '设置扣车',
|
label: '扣车',
|
||||||
handler: this.setDetainTrain,
|
handler: this.setDetainTrain,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
|
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消扣车',
|
label: '取消扣车',
|
||||||
handler: this.cancelDetainTrain,
|
handler: this.cancelDetainTrain,
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
|
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||||
auth: { station: true, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '设置跳停',
|
label: '设置跳停',
|
||||||
handler: this.setJumpStop,
|
handler: this.setJumpStop,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
|
cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消跳停',
|
label: '取消跳停',
|
||||||
handler: this.cancelJumpStop,
|
handler: this.cancelJumpStop,
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
|
cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||||
auth: { station: true, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'separator'
|
type: 'separator'
|
||||||
@ -84,14 +86,12 @@ export default {
|
|||||||
{
|
{
|
||||||
label: '提前发车',
|
label: '提前发车',
|
||||||
handler: this.earlyDeparture,
|
handler: this.earlyDeparture,
|
||||||
disabledCallback: MenuDisabledState.StationStand.earlyDeparture,
|
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||||
auth: { station: true, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '设置停站时间',
|
label: '设置停站时间',
|
||||||
handler: this.setStopTime,
|
handler: this.setStopTime,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setStopTime,
|
cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME
|
||||||
auth: { station: true, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'separator'
|
type: 'separator'
|
||||||
@ -99,64 +99,39 @@ export default {
|
|||||||
{
|
{
|
||||||
label: '站台详细信息',
|
label: '站台详细信息',
|
||||||
handler: this.detail,
|
handler: this.detail,
|
||||||
disabledCallback: MenuDisabledState.StationStand.detail,
|
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||||
auth: { station: true, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '运行时间控制',
|
label: '运行时间控制',
|
||||||
handler: this.setRunLevel,
|
handler: this.setRunLevel,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
|
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME
|
||||||
auth: { station: false, center: false }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '设置提前发车',
|
|
||||||
handler: this.earlyDeparture,
|
|
||||||
disabledCallback: MenuDisabledState.StationStand.earlyDeparture,
|
|
||||||
auth: { station: false, center: false }
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// label: '人工折返策略设置',
|
|
||||||
// handler: this.setBackStrategy,
|
|
||||||
// disabledCallback: MenuDisabledState.StationStand.setBackStrategy,
|
|
||||||
// auth: { station: false, center: false }
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
label: '查询站台状态',
|
|
||||||
handler: this.detail,
|
|
||||||
disabledCallback: MenuDisabledState.StationStand.detail,
|
|
||||||
auth: { station: false, center: false }
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
central: [
|
central: [
|
||||||
{
|
{
|
||||||
label: '扣车',
|
label: '扣车',
|
||||||
handler: this.setDetainTrain,
|
handler: this.setDetainTrain,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
|
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||||
auth: { station: true, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消扣车',
|
label: '取消扣车',
|
||||||
handler: this.cancelDetainTrain,
|
handler: this.cancelDetainTrain,
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
|
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||||
auth: { station: true, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '提前发车',
|
label: '提前发车',
|
||||||
handler: this.earlyDeparture,
|
handler: this.earlyDeparture,
|
||||||
disabledCallback: MenuDisabledState.StationStand.earlyDeparture,
|
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||||
auth: { station: true, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '设置跳停',
|
label: '设置跳停',
|
||||||
handler: this.setJumpStop,
|
handler: this.setJumpStop,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
|
cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
||||||
auth: { station: true, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消跳停',
|
label: '取消跳停',
|
||||||
handler: this.cancelJumpStop,
|
handler: this.cancelJumpStop,
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
|
cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||||
auth: { station: true, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'separator'
|
type: 'separator'
|
||||||
@ -164,44 +139,35 @@ export default {
|
|||||||
{
|
{
|
||||||
label: '设置停站时间',
|
label: '设置停站时间',
|
||||||
handler: this.setStopTime,
|
handler: this.setStopTime,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setStopTime,
|
cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME
|
||||||
auth: { station: true, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '设置运行等级',
|
label: '设置运行等级',
|
||||||
handler: this.setRunLevel,
|
handler: this.setRunLevel,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
|
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME
|
||||||
auth: { station: true, center: true }
|
},
|
||||||
|
{
|
||||||
|
type: 'separator'
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// label: '变通策略管理',
|
// label: '区间列车数量限制',
|
||||||
// handler: this.setBackStrategy,
|
// handler: this.setDetainTrainAll,
|
||||||
// disabledCallback: MenuDisabledState.StationStand.setBackStrategy,
|
// disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
|
||||||
// auth: { station: true, center: true }
|
// auth: { station: true, center: true }
|
||||||
// },
|
// },
|
||||||
{
|
// {
|
||||||
type: 'separator'
|
// label: '取消区间列车数量限制',
|
||||||
},
|
// handler: this.cancelDetainTrainAll,
|
||||||
{
|
// disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
|
||||||
label: '区间列车数量限制',
|
// auth: { station: true, center: true }
|
||||||
handler: this.setDetainTrainAll,
|
// },
|
||||||
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
|
// {
|
||||||
auth: { station: true, center: true }
|
// type: 'separator'
|
||||||
},
|
// },
|
||||||
{
|
|
||||||
label: '取消区间列车数量限制',
|
|
||||||
handler: this.cancelDetainTrainAll,
|
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
|
|
||||||
auth: { station: true, center: true }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'separator'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '查看站台信息',
|
label: '查看站台信息',
|
||||||
handler: this.detail,
|
handler: this.detail,
|
||||||
disabledCallback: MenuDisabledState.StationStand.detail,
|
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||||
auth: { station: true, center: true }
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -209,12 +175,12 @@ export default {
|
|||||||
{
|
{
|
||||||
label: '设置故障',
|
label: '设置故障',
|
||||||
handler: this.setStoppage,
|
handler: this.setStoppage,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setStoppage
|
cmdType:CMD.Stand.CMD_STAND_ADD_FAULT
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消故障',
|
label: '取消故障',
|
||||||
handler: this.cancelStoppage,
|
handler: this.cancelStoppage,
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelStoppage
|
cmdType:CMD.Stand.CMD_STAND_REMOVE_FAULT
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@ -246,17 +212,16 @@ export default {
|
|||||||
},
|
},
|
||||||
initMenu() {
|
initMenu() {
|
||||||
// 编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
this.menu = menuFiltration(this.menuNormal);
|
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
if (this.operatemode === OperateMode.ADMIN) {
|
if (this.operatemode === OperateMode.ADMIN) {
|
||||||
this.menu = [...this.menu, ...this.menuForce];
|
this.menu = [...this.menu, ...this.menuForce];
|
||||||
}
|
}
|
||||||
|
console.log(this.menu, '----new---');
|
||||||
|
|
||||||
// 故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
this.menu = this.menuForce;
|
this.menu = this.menuForce;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.menu = menuConvert(this.menu);
|
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
|
@ -90,7 +90,7 @@ class MenuContextHandler {
|
|||||||
if (control) {
|
if (control) {
|
||||||
if ( this.getPrdType() != '') {
|
if ( this.getPrdType() != '') {
|
||||||
const type = State2SimulationMap[this.getPrdType()];
|
const type = State2SimulationMap[this.getPrdType()];
|
||||||
const status = State2ControlMap[control.status];
|
const status = State2ControlMap[control.status]; // 缺少车站控制模式字段
|
||||||
menu = [...menuList[type]];
|
menu = [...menuList[type]];
|
||||||
if (menu.constructor === Array) {
|
if (menu.constructor === Array) {
|
||||||
menu.forEach(elem => {
|
menu.forEach(elem => {
|
||||||
|
@ -495,6 +495,22 @@ const map = {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return device;
|
||||||
|
},
|
||||||
|
|
||||||
|
// 查询所属车站关联的控制模式
|
||||||
|
getDeviceStationCodeByStationCode: (state) => (code) => {
|
||||||
|
let device = null;
|
||||||
|
if (code &&
|
||||||
|
state.map &&
|
||||||
|
state.map.stationList && state.map.stationList.length) {
|
||||||
|
state.map.stationList.forEach(elem => {
|
||||||
|
if (elem.code == code) {
|
||||||
|
device = state.mapDevice[elem.code];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return device;
|
return device;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user