1.宁波3号线 操作修正
2.运行图编辑修改数据计算错误的问题
This commit is contained in:
parent
5352671383
commit
605280e7d5
@ -6,49 +6,58 @@
|
|||||||
<train-distribution ref="trainDistribution" />
|
<train-distribution ref="trainDistribution" />
|
||||||
<stand-control ref="standControl" />
|
<stand-control ref="standControl" />
|
||||||
<stand-detain ref="standDetain" />
|
<stand-detain ref="standDetain" />
|
||||||
<interval-stop-number ref="intervalStopNumber" />
|
<stand-detail ref="standDetail" />
|
||||||
|
<interval-stop-number ref="intervalStopNumber" />
|
||||||
<allocate-time ref="allocateTime" />
|
<allocate-time ref="allocateTime" />
|
||||||
<station-transfer ref="stationTransfer" />
|
<station-transfer ref="stationTransfer" />
|
||||||
<station-request ref="stationRequest" />
|
<station-request ref="stationRequest" />
|
||||||
<station-devolution ref="stationDevolution" />
|
<station-devolution ref="stationDevolution" />
|
||||||
<station-reclaim ref="stationReclaim" />
|
<station-reclaim ref="stationReclaim" />
|
||||||
<stand-detail ref="standDetail" />
|
|
||||||
<switch-command ref="switchCommand" />
|
<switch-command ref="switchCommand" />
|
||||||
<switch-block-init ref="switchBlockInit" :initCodeListMap="initCodeListMap" :initSelect="initSelect" @initSelect="onChangeInitSelect"/>
|
<switch-active ref="switchActive" />
|
||||||
<switch-block-sure ref="switchBlockSure" :initCodeListMap="initCodeListMap" :initSelect="initSelect" />
|
|
||||||
<switch-active ref="switchActive" />
|
|
||||||
<switch-detail ref="switchDetail" />
|
<switch-detail ref="switchDetail" />
|
||||||
<signal-guide-init ref="signalGuideInit" :initCodeListMap="initCodeListMap" :initSelect="initSelect" @initSelect="onChangeInitSelect"/>
|
<signal-model ref="signalModel" />
|
||||||
<signal-guide-sure ref="signalGuideSure" :initCodeListMap="initCodeListMap" :initSelect="initSelect"/>
|
<signal-detail ref="signalDetail" />
|
||||||
<signal-can-block-init ref="signalCanBlockInit" :initCodeListMap="initCodeListMap" :initSelect="initSelect" @initSelect="onChangeInitSelect"/>
|
|
||||||
<signal-can-block-sure ref="signalCanBlockSure" :initCodeListMap="initCodeListMap" :initSelect="initSelect"/>
|
|
||||||
<route-command ref="routeCommand" />
|
|
||||||
<section-open ref="sectionOpen" />
|
|
||||||
<section-limit-speed ref="sectionLimitSpeed" />
|
|
||||||
<section-show ref="sectionShow" />
|
<section-show ref="sectionShow" />
|
||||||
<section-lock ref="sectionLock" />
|
<section-lock ref="sectionLock" />
|
||||||
<signal-model ref="signalModel" />
|
|
||||||
<init-signal-block ref="initSignalBlock" />
|
|
||||||
<signal-block ref="signalBlock" />
|
|
||||||
<signal-detail ref="signalDetail" />
|
|
||||||
<init-signal-mode ref="initSignalMode" />
|
|
||||||
<signal-mode ref="signalMode" />
|
|
||||||
<running-interval ref="runningInterval" />
|
<running-interval ref="runningInterval" />
|
||||||
<adjust-strategy ref="adjustStrategy" />
|
<adjust-strategy ref="adjustStrategy" />
|
||||||
<train-depart ref="trainDepart" />
|
<train-depart ref="trainDepart" />
|
||||||
<train-jump-stop ref="trainJumpStop" />
|
<train-jump-stop ref="trainJumpStop" />
|
||||||
<train-cancel-deviation ref="trainCancelDeviation" />
|
<train-cancel-deviation ref="trainCancelDeviation" />
|
||||||
<train-update-deviation ref="trainUpdateDeviation" />
|
<train-update-deviation ref="trainUpdateDeviation" />
|
||||||
<cancel-route ref="cancelRoute" />
|
|
||||||
<train-id-associated ref="trainIdAssociated" />
|
<train-id-associated ref="trainIdAssociated" />
|
||||||
<occupancy-train-correlation ref="occupancyTrainCorrelation" />
|
<occupancy-train-correlation ref="occupancyTrainCorrelation" />
|
||||||
<modify-train-number ref="modifyTrainNumber" />
|
<modify-train-number ref="modifyTrainNumber" />
|
||||||
<train-run-type ref="trainRunType" />
|
<train-run-type ref="trainRunType" />
|
||||||
<train-detail ref="trainDetail" />
|
<train-detail ref="trainDetail" />
|
||||||
<all-train-detail ref="allTrainDetail" />
|
<all-train-detail ref="allTrainDetail" />
|
||||||
|
<cancel-route ref="cancelRoute" />
|
||||||
<route-detail ref="routeDetail" />
|
<route-detail ref="routeDetail" />
|
||||||
<init-section-open ref="initSectionOpen" />
|
<route-command ref="routeCommand" />
|
||||||
<init-section-limit-speed ref="initSectionLimitSpeed" />
|
|
||||||
|
<switch-block-init ref="switchBlockInit" :initCodeListMap="initCodeListMap" :initSelect="initSelect" @initSelect="onChangeInitSelect"/>
|
||||||
|
<switch-block-sure ref="switchBlockSure" :initCodeListMap="initCodeListMap" :initSelect="initSelect" />
|
||||||
|
|
||||||
|
<signal-guide-init ref="signalGuideInit" :initCodeListMap="initCodeListMap" :initSelect="initSelect" @initSelect="onChangeInitSelect"/>
|
||||||
|
<signal-guide-sure ref="signalGuideSure" :initCodeListMap="initCodeListMap" :initSelect="initSelect"/>
|
||||||
|
|
||||||
|
<signal-can-block-init ref="signalCanBlockInit" :initCodeListMap="initCodeListMap" :initSelect="initSelect" @initSelect="onChangeInitSelect"/>
|
||||||
|
<signal-can-block-sure ref="signalCanBlockSure" :initCodeListMap="initCodeListMap" :initSelect="initSelect"/>
|
||||||
|
|
||||||
|
<signal-block-init ref="signalBlockInit" :initCodeListMap="initCodeListMap" :initSelect="initSelect" @initSelect="onChangeInitSelect"/>
|
||||||
|
<signal-block-sure ref="signalBlockSure" :initCodeListMap="initCodeListMap" :initSelect="initSelect" />
|
||||||
|
|
||||||
|
<section-open-init ref="sectionOpenInit" :initCodeListMap="initCodeListMap" :initSelect="initSelect" @initSelect="onChangeInitSelect" />
|
||||||
|
<section-open-sure ref="sectionOpenSure" :initCodeListMap="initCodeListMap" :initSelect="initSelect"/>
|
||||||
|
|
||||||
|
<section-limit-speed-init ref="sectionLimitSpeedInit" :initCodeListMap="initCodeListMap" :initSelect="initSelect" @initSelect="onChangeInitSelect"/>
|
||||||
|
<section-limit-speed-sure ref="sectionLimitSpeedSure" :initCodeListMap="initCodeListMap" :initSelect="initSelect"/>
|
||||||
|
|
||||||
|
<signal-mode-init ref="signalModeInit" :initCodeListMap="initCodeListMap" :initSelect="initSelect" @initSelect="onChangeInitSelect"/>
|
||||||
|
<signal-mode-sure ref="signalModeSure" :initCodeListMap="initCodeListMap" :initSelect="initSelect"/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -67,26 +76,13 @@ import StationRequest from './menuDialog/stationRequest';
|
|||||||
import StationDevolution from './menuDialog/stationDevolution';
|
import StationDevolution from './menuDialog/stationDevolution';
|
||||||
import StationReclaim from './menuDialog/stationReclaim';
|
import StationReclaim from './menuDialog/stationReclaim';
|
||||||
import SwitchCommand from './menuDialog/switchCommand';
|
import SwitchCommand from './menuDialog/switchCommand';
|
||||||
import SwitchBlockInit from './menuDialog/switchBlock';
|
import RouteCommand from './menuDialog/routeCommand';
|
||||||
import SwitchBlockSure from './menuDialog/switchBlock';
|
|
||||||
import SwitchActive from './menuDialog/switchActive';
|
import SwitchActive from './menuDialog/switchActive';
|
||||||
import SwitchDetail from './menuDialog/switchDetail';
|
import SwitchDetail from './menuDialog/switchDetail';
|
||||||
import SignalGuideInit from './menuDialog/signalGuide';
|
|
||||||
import SignalGuideSure from './menuDialog/signalGuide';
|
|
||||||
import SignalCanBlockInit from './menuDialog/signalCanBlock';
|
|
||||||
import SignalCanBlockSure from './menuDialog/signalCanBlock';
|
|
||||||
import RouteCommand from './menuDialog/routeCommand';
|
|
||||||
import SectionOpen from './menuDialog/sectionOpen';
|
|
||||||
import SectionLimitSpeed from './menuDialog/sectionLimitSpeed';
|
|
||||||
import InitSectionLimitSpeed from './menuDialog/initSectionLimitSpeed';
|
|
||||||
import SectionShow from './menuDialog/sectionShow';
|
import SectionShow from './menuDialog/sectionShow';
|
||||||
import SectionLock from './menuDialog/sectionLock';
|
import SectionLock from './menuDialog/sectionLock';
|
||||||
import SignalModel from './menuDialog/signalModel';
|
import SignalModel from './menuDialog/signalModel';
|
||||||
import InitSignalBlock from './menuDialog/initSignalBlock';
|
|
||||||
import SignalBlock from './menuDialog/signalBlock';
|
|
||||||
import SignalDetail from './menuDialog/signalDetail';
|
import SignalDetail from './menuDialog/signalDetail';
|
||||||
import InitSignalMode from './menuDialog/initSignalMode';
|
|
||||||
import SignalMode from './menuDialog/signalMode';
|
|
||||||
import RunningInterval from './menuDialog/runningInterval';
|
import RunningInterval from './menuDialog/runningInterval';
|
||||||
import AdjustStrategy from './menuDialog/adjustStrategy';
|
import AdjustStrategy from './menuDialog/adjustStrategy';
|
||||||
import TrainDepart from './menuDialog/trainDepart';
|
import TrainDepart from './menuDialog/trainDepart';
|
||||||
@ -101,13 +97,25 @@ import TrainRunType from './menuDialog/trainRunType';
|
|||||||
import TrainDetail from './menuDialog/trainDetail';
|
import TrainDetail from './menuDialog/trainDetail';
|
||||||
import AllTrainDetail from './menuDialog/allTrainDetail';
|
import AllTrainDetail from './menuDialog/allTrainDetail';
|
||||||
import RouteDetail from './menuDialog/routeDetail';
|
import RouteDetail from './menuDialog/routeDetail';
|
||||||
import InitSectionOpen from './menuDialog/initSectionOpen';
|
import SwitchBlockInit from './menuDialog/switchBlock';
|
||||||
|
import SwitchBlockSure from './menuDialog/switchBlock';
|
||||||
|
import SignalGuideInit from './menuDialog/signalGuide';
|
||||||
|
import SignalGuideSure from './menuDialog/signalGuide';
|
||||||
|
import SignalCanBlockInit from './menuDialog/signalCanBlock';
|
||||||
|
import SignalCanBlockSure from './menuDialog/signalCanBlock';
|
||||||
|
import SectionOpenInit from './menuDialog/sectionOpen';
|
||||||
|
import SectionOpenSure from './menuDialog/sectionOpen';
|
||||||
|
import SectionLimitSpeedInit from './menuDialog/sectionLimitSpeed';
|
||||||
|
import SectionLimitSpeedSure from './menuDialog/sectionLimitSpeed';
|
||||||
|
import SignalBlockInit from './menuDialog/signalBlock';
|
||||||
|
import SignalBlockSure from './menuDialog/signalBlock';
|
||||||
|
import SignalModeInit from './menuDialog/signalMode';
|
||||||
|
import SignalModeSure from './menuDialog/signalMode';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MenuBarNingbo3',
|
name: 'MenuBarNingbo3',
|
||||||
components: {
|
components: {
|
||||||
MenuBar,
|
MenuBar,
|
||||||
// NoticeInfo,
|
|
||||||
ArrangeRoute,
|
ArrangeRoute,
|
||||||
TrainDistribution,
|
TrainDistribution,
|
||||||
StandControl,
|
StandControl,
|
||||||
@ -130,15 +138,17 @@ export default {
|
|||||||
SignalCanBlockSure,
|
SignalCanBlockSure,
|
||||||
RouteCommand,
|
RouteCommand,
|
||||||
SignalModel,
|
SignalModel,
|
||||||
InitSignalBlock,
|
SignalBlockInit,
|
||||||
SignalBlock,
|
SignalBlockSure,
|
||||||
SignalDetail,
|
SignalDetail,
|
||||||
SectionOpen,
|
SectionOpenInit,
|
||||||
SectionLimitSpeed,
|
SectionOpenSure,
|
||||||
|
SectionLimitSpeedInit,
|
||||||
|
SectionLimitSpeedSure,
|
||||||
SectionShow,
|
SectionShow,
|
||||||
SectionLock,
|
SectionLock,
|
||||||
InitSignalMode,
|
SignalModeInit,
|
||||||
SignalMode,
|
SignalModeSure,
|
||||||
RunningInterval,
|
RunningInterval,
|
||||||
AdjustStrategy,
|
AdjustStrategy,
|
||||||
TrainDepart,
|
TrainDepart,
|
||||||
@ -152,9 +162,7 @@ export default {
|
|||||||
TrainRunType,
|
TrainRunType,
|
||||||
TrainDetail,
|
TrainDetail,
|
||||||
AllTrainDetail,
|
AllTrainDetail,
|
||||||
RouteDetail,
|
RouteDetail
|
||||||
InitSectionOpen,
|
|
||||||
InitSectionLimitSpeed
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -565,12 +573,13 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
title: '初始化',
|
title: '初始化',
|
||||||
operate: OperationEvent.Command.commandNingBo3.line_section_open
|
operate: OperationEvent.Command.commandNingBo3.line_section_open,
|
||||||
|
click: e => this.setOpenSection(e, false)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '确定/取消',
|
title: '确定/取消',
|
||||||
operate: OperationEvent.Command.commandNingBo3.line_section_open,
|
operate: OperationEvent.Command.commandNingBo3.line_section_open,
|
||||||
click: this.handleOpenSection
|
click: e => this.setOpenSection(e, true)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -580,12 +589,13 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
title: '初始化',
|
title: '初始化',
|
||||||
operate: OperationEvent.Command.commandNingBo3.line_section_close
|
operate: OperationEvent.Command.commandNingBo3.line_section_close,
|
||||||
|
click: e => this.setCloseSection(e, false)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '确定/取消',
|
title: '确定/取消',
|
||||||
operate: OperationEvent.Command.commandNingBo3.line_section_close,
|
operate: OperationEvent.Command.commandNingBo3.line_section_close,
|
||||||
click: this.handleCloseSection
|
click: e => this.setCloseSection(e, true)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -599,12 +609,13 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
title: '初始化',
|
title: '初始化',
|
||||||
operate: OperationEvent.Command.commandNingBo3.line_section_limitSpeed
|
operate: OperationEvent.Command.commandNingBo3.line_section_limitSpeed,
|
||||||
|
click: e => this.setLimitSpeed(e, false)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '确定/取消',
|
title: '确定/取消',
|
||||||
operate: OperationEvent.Command.commandNingBo3.line_section_limitSpeed,
|
operate: OperationEvent.Command.commandNingBo3.line_section_limitSpeed,
|
||||||
click: this.handleLimitSpeed
|
click: e => this.setLimitSpeed(e, true)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -648,8 +659,6 @@ export default {
|
|||||||
operate: OperationEvent.Command.commandNingBo3.line_section_limitSpeed
|
operate: OperationEvent.Command.commandNingBo3.line_section_limitSpeed
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
// click: this.handleLock
|
|
||||||
// click: this.undeveloped
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '取消过岔锁闭',
|
title: '取消过岔锁闭',
|
||||||
@ -664,8 +673,6 @@ export default {
|
|||||||
operate: OperationEvent.Command.commandNingBo3.line_section_limitSpeed
|
operate: OperationEvent.Command.commandNingBo3.line_section_limitSpeed
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
// click: this.handleUnLock
|
|
||||||
// click: this.undeveloped
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '远程预复位使能',
|
title: '远程预复位使能',
|
||||||
@ -680,8 +687,6 @@ export default {
|
|||||||
operate: OperationEvent.Command.commandNingBo3.line_section_limitSpeed
|
operate: OperationEvent.Command.commandNingBo3.line_section_limitSpeed
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
// click: this.handleRestoration
|
|
||||||
// click: this.undeveloped
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '复位',
|
title: '复位',
|
||||||
@ -764,8 +769,6 @@ export default {
|
|||||||
{
|
{
|
||||||
title: '后备',
|
title: '后备',
|
||||||
operate:'',
|
operate:'',
|
||||||
// click: this.setReserveMode
|
|
||||||
// click: this.undeveloped
|
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
title: '初始化',
|
title: '初始化',
|
||||||
@ -1199,7 +1202,7 @@ export default {
|
|||||||
{
|
{
|
||||||
title: '确定/取消',
|
title: '确定/取消',
|
||||||
operate: OperationEvent.Command.commandNingBo3.line_switch_block,
|
operate: OperationEvent.Command.commandNingBo3.line_switch_block,
|
||||||
click: e => this.setBlockSwitch(e, false)
|
click: e => this.setBlockSwitch(e, true)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -1363,12 +1366,13 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
title: '初始化',
|
title: '初始化',
|
||||||
operate: OperationEvent.Command.commandNingBo3.line_section_open
|
operate: OperationEvent.Command.commandNingBo3.line_section_open,
|
||||||
|
click: e => this.setOpenSection(e, false)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '确定/取消',
|
title: '确定/取消',
|
||||||
operate: OperationEvent.Command.commandNingBo3.line_section_open,
|
operate: OperationEvent.Command.commandNingBo3.line_section_open,
|
||||||
click: this.handleOpenSection
|
click: e => this.setOpenSection(e, true)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -1378,12 +1382,13 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
title: '初始化',
|
title: '初始化',
|
||||||
operate: OperationEvent.Command.commandNingBo3.line_section_close
|
operate: OperationEvent.Command.commandNingBo3.line_section_close,
|
||||||
|
click: e => this.setCloseSection(e, false)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '确定/取消',
|
title: '确定/取消',
|
||||||
operate: OperationEvent.Command.commandNingBo3.line_section_close,
|
operate: OperationEvent.Command.commandNingBo3.line_section_close,
|
||||||
click: this.handleCloseSection
|
click: e => this.setCloseSection(e, true)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -1397,12 +1402,13 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
title: '初始化',
|
title: '初始化',
|
||||||
operate: OperationEvent.Command.commandNingBo3.line_section_limitSpeed
|
operate: OperationEvent.Command.commandNingBo3.line_section_limitSpeed,
|
||||||
|
click: e => this.setLimitSpeed(e, false)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '确定/取消',
|
title: '确定/取消',
|
||||||
operate: OperationEvent.Command.commandNingBo3.line_section_limitSpeed,
|
operate: OperationEvent.Command.commandNingBo3.line_section_limitSpeed,
|
||||||
click: this.handleLimitSpeed
|
click: e => this.setLimitSpeed(e, true)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -2115,9 +2121,19 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 初始化 信号引导
|
// 进路指令
|
||||||
setInitialSignalGuide(item) {
|
setRouteCommand(item) {
|
||||||
this.setSignalGuideCommand(item, true);
|
const operate = {
|
||||||
|
type: 'bar',
|
||||||
|
operation: item.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$refs.menuBar.closeMenu(true);
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
|
||||||
|
this.$refs.routeCommand.doShow();
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 信号引导
|
// 信号引导
|
||||||
setSignalGuide(item, sure=false) {
|
setSignalGuide(item, sure=false) {
|
||||||
@ -2143,12 +2159,11 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.menuBar.closeMenu(true);
|
this.$refs.menuBar.closeMenu(true);
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
|
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
|
||||||
this.$refs[sure? 'signalCanBlockInit': 'signalCanBlockSure'].doShow(operate, sure);
|
this.$refs[sure? 'signalCanBlockSure': 'signalCanBlockInit'].doShow(operate, sure);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 进路指令
|
setOpenSection(item, sure=false) {
|
||||||
setRouteCommand(item) {
|
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
operation: item.operation
|
operation: item.operation
|
||||||
@ -2157,11 +2172,11 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.menuBar.closeMenu(true);
|
this.$refs.menuBar.closeMenu(true);
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
|
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
|
||||||
this.$refs.routeCommand.doShow();
|
this.$refs[sure? 'sectionOpenSure': 'sectionOpenInit'].doShow(operate, sure);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleOpenSection(item) {
|
setCloseSection(item, sure=false) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
operation: item.operation
|
operation: item.operation
|
||||||
@ -2170,11 +2185,11 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.menuBar.closeMenu(true);
|
this.$refs.menuBar.closeMenu(true);
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
|
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
|
||||||
this.$refs.initSectionOpen.doShow(operate);
|
this.$refs[sure? 'sectionOpenSure': 'sectionOpenInit'].doShow(operate, sure);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleCloseSection(item) {
|
setLimitSpeed(item, sure=false) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
operation: item.operation
|
operation: item.operation
|
||||||
@ -2183,20 +2198,7 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.menuBar.closeMenu(true);
|
this.$refs.menuBar.closeMenu(true);
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
|
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
|
||||||
this.$refs.initSectionOpen.doShow(operate);
|
this.$refs[sure ? 'sectionLimitSpeedSure': 'sectionLimitSpeedInit'].doShow(operate, sure);
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handleLimitSpeed(item) {
|
|
||||||
const operate = {
|
|
||||||
type: 'bar',
|
|
||||||
operation: item.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.menuBar.closeMenu(true);
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
|
|
||||||
this.$refs.initSectionLimitSpeed.doShow();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -2291,7 +2293,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
setSignalBlock(item) {
|
setSignalBlock(item, sure=false) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
operation: item.operation
|
operation: item.operation
|
||||||
@ -2300,11 +2302,11 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.menuBar.closeMenu(true);
|
this.$refs.menuBar.closeMenu(true);
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
|
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
|
||||||
this.$refs.initSignalBlock.doShow(operate);
|
this.$refs[sure? 'signalBlockSure': 'signalBlockInit'].doShow(operate, sure);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
setSignalCancelBlock(item) {
|
setSignalCancelBlock(item, sure=false) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
operation: item.operation
|
operation: item.operation
|
||||||
@ -2313,7 +2315,7 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.menuBar.closeMenu(true);
|
this.$refs.menuBar.closeMenu(true);
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
|
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
|
||||||
this.$refs.initSignalBlock.doShow(operate);
|
this.$refs[sure? 'signalBlockSure': 'signalBlockInit'].doShow(operate, sure);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -2343,7 +2345,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
setReserveMode(item) {
|
setReserveMode(item, sure=false) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
operation: item.operation
|
operation: item.operation
|
||||||
@ -2352,7 +2354,7 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.menuBar.closeMenu(true);
|
this.$refs.menuBar.closeMenu(true);
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
|
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
|
||||||
this.$refs.initSignalMode.doShow(operate);
|
this.$refs[sure? 'signalModeSure': 'signalModeInit'].doShow(operate, sure);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="1000px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="1000px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="18">
|
<el-col :span="sure? 18: 21">
|
||||||
<el-table ref="singleTable1" :data="tempData" highlight-current-row height="300px" @current-change="selectLine1">
|
<el-table ref="singleTable1" :data="tempList" highlight-current-row height="300px" @current-change="selectLine1">
|
||||||
<el-table-column prop="name" label="轨道" />
|
<el-table-column prop="name" label="轨道" />
|
||||||
<el-table-column prop="blockStatus" width="120" label="MAU">
|
<el-table-column prop="blockStatus" width="120" label="MAU">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -33,7 +33,7 @@
|
|||||||
<el-table-column prop="name" label="速度" />
|
<el-table-column prop="name" label="速度" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3">
|
<el-col :span="3" v-if="sure">
|
||||||
<fieldset style="padding-left: 10px;">
|
<fieldset style="padding-left: 10px;">
|
||||||
<legend class="card_title">命令</legend>
|
<legend class="card_title">命令</legend>
|
||||||
<el-radio-group v-model="command">
|
<el-radio-group v-model="command">
|
||||||
@ -45,10 +45,10 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
<el-col :span="4" :offset="1">
|
<el-col :span="4" :offset="1">
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit(true)">确定(O)</el-button>
|
<el-button :id="domIdConfirm" type="primary" :disabled="!!disabled" :loading="loading" @click="commit(true)">确定(O)</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4" :offset="2">
|
<el-col :span="4" :offset="2">
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit(false)">应用(A)</el-button>
|
<el-button :id="domIdConfirm" type="primary" :disabled="!!disabled" :loading="loading" @click="commit(false)">应用(A)</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4" :offset="2">
|
<el-col :span="4" :offset="2">
|
||||||
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
|
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
|
||||||
@ -69,20 +69,34 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SwitchActive',
|
name: 'SwitchActive',
|
||||||
|
props: {
|
||||||
|
initCodeListMap: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
initSelect: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
title: '',
|
||||||
status: false,
|
status: false,
|
||||||
standStatus: true,
|
standStatus: true,
|
||||||
allChecked: false,
|
allChecked: false,
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
active: false,
|
active: false,
|
||||||
command: false,
|
command: true,
|
||||||
activeName: 'first',
|
activeName: 'first',
|
||||||
tempData: [],
|
|
||||||
operate: null,
|
operate: null,
|
||||||
speedLimitValue: 0,
|
speedLimitValue: 0,
|
||||||
limitList: [
|
limitList: [
|
||||||
@ -102,7 +116,10 @@ export default {
|
|||||||
{ name: '70', value: 70 },
|
{ name: '70', value: 70 },
|
||||||
{ name: '75', value: 75 },
|
{ name: '75', value: 75 },
|
||||||
{ name: '80', value: 80 }
|
{ name: '80', value: 80 }
|
||||||
]
|
],
|
||||||
|
sure: false,
|
||||||
|
disabled: false,
|
||||||
|
currentSelect: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -112,9 +129,12 @@ export default {
|
|||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
selected() {
|
tempList() {
|
||||||
return this.$store.state.menuOperation.selected;
|
return this.sectionList.filter(el => ['01', '04'].includes(el.type) )
|
||||||
},
|
},
|
||||||
|
cmdType() {
|
||||||
|
return this.speedLimitValue ? CMD.Section.CMD_SECTION_SET_LIMIT_SPEED : CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED;
|
||||||
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? OperationEvent.Command.common.confirm1.domId : '';
|
return this.dialogShow ? OperationEvent.Command.common.confirm1.domId : '';
|
||||||
},
|
},
|
||||||
@ -123,9 +143,6 @@ export default {
|
|||||||
},
|
},
|
||||||
domIdClose() {
|
domIdClose() {
|
||||||
return this.dialogShow ? OperationEvent.Command.common.close1.domId : '';
|
return this.dialogShow ? OperationEvent.Command.common.close1.domId : '';
|
||||||
},
|
|
||||||
title() {
|
|
||||||
return '确认/取消设置临时限速区域';
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -136,35 +153,87 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected, value) {
|
doShow(operate, sure, value=0) {
|
||||||
this.tempData = [];
|
this.operate = operate;
|
||||||
this.sectionList.forEach(item => {
|
this.sure = sure;
|
||||||
if (item.type === '01' || item.type === '04') {
|
this.title = `${sure ? '确认/取消设置临时限速区域' : '初始化设置临时限速区域'}`;
|
||||||
this.tempData.push(item);
|
this.speedLimitValue = value;
|
||||||
}
|
|
||||||
});
|
|
||||||
this.command = true;
|
|
||||||
this.$store.dispatch('menuOperation/setSelected', {device: selected});
|
|
||||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
|
||||||
this.operate = operate;
|
|
||||||
this.speedLimitValue = value;
|
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$refs.singleTable1.setCurrentRow(selected);
|
this.$refs.singleTable1.setCurrentRow(sure? this.initSelect: null);
|
||||||
this.$refs.singleTable2.setCurrentRow(this.limitList[value / 5 - 1]);
|
this.$refs.singleTable2.setCurrentRow(this.limitList[value / 5 - 1]);
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
|
this.sure && this.$refs.singleTable1.setCurrentRow();
|
||||||
|
this.sure && this.$refs.singleTable2.setCurrentRow();
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
},
|
||||||
|
commit(isClose = true) {
|
||||||
|
if (this.initSelect &&
|
||||||
|
this.currentSelect &&
|
||||||
|
this.currentSelect.code == this.initSelect.code) {
|
||||||
|
const operate = {
|
||||||
|
cmdType: this.sure ? this.cmdType : null,
|
||||||
|
operation: isClose ? OperationEvent.Command.common.confirm1.operation : OperationEvent.Command.common.apply1.operation,
|
||||||
|
over: this.sure,
|
||||||
|
param: {sectionCode: this.currentSelect.code, speedLimitValue:this.speedLimitValue}
|
||||||
|
};
|
||||||
|
|
||||||
|
const sectionEle = this.$store.getters['map/getDeviceByCode'](this.currentSelect.code);
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.sure || this.$root.$emit('initCodes', this.cmdType.value, sectionEle.code);
|
||||||
|
this.$store.dispatch('map/flushMapRef');
|
||||||
|
isClose && this.doClose();
|
||||||
|
sectionEle.__done = this.sure? 'two': 'one';
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.$refs.noticeInfo.doShow();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$messageBox('两次选择不一致');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
selectLine1(val) {
|
selectLine1(val) {
|
||||||
this.$refs.singleTable1.setCurrentRow(this.selected);
|
if (!val) { return; }
|
||||||
|
const step = {
|
||||||
|
code: val.code,
|
||||||
|
operation: OperationEvent.Command.common.choose.operation,
|
||||||
|
val: val.code
|
||||||
|
};
|
||||||
|
|
||||||
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||||
|
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.sure || this.$emit('initSelect', this.currentSelect);
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.$refs.noticeInfo.doShow();
|
||||||
|
});
|
||||||
|
// this.$refs.singleTable1.setCurrentRow(this.currentSelect);
|
||||||
},
|
},
|
||||||
selectLine2(val) {
|
selectLine2(val) {
|
||||||
this.$refs.singleTable2.setCurrentRow(this.limitList[this.speedLimitValue / 5 - 1]);
|
if (!val) { return; }
|
||||||
|
const step = {
|
||||||
|
code: val.code,
|
||||||
|
operation: OperationEvent.Command.common.choose1.operation,
|
||||||
|
val: val.code
|
||||||
|
};
|
||||||
|
|
||||||
|
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.$refs.noticeInfo.doShow();
|
||||||
|
});
|
||||||
|
// this.$refs.singleTable2.setCurrentRow(this.limitList[this.speedLimitValue / 5 - 1]);
|
||||||
},
|
},
|
||||||
getStationName(val) {
|
getStationName(val) {
|
||||||
const stationElm = this.$store.getters['map/getDeviceByCode'](val.stationCode);
|
const stationElm = this.$store.getters['map/getDeviceByCode'](val.stationCode);
|
||||||
@ -179,28 +248,16 @@ export default {
|
|||||||
return sectionEle.speedUpLimit > 0 ? sectionEle.speedUpLimit : 0;
|
return sectionEle.speedUpLimit > 0 ? sectionEle.speedUpLimit : 0;
|
||||||
},
|
},
|
||||||
getProcess(code) {
|
getProcess(code) {
|
||||||
if (this.selected && this.selected.code === code) {
|
const codeList = this.initCodeListMap[this.cmdType.value]||[];
|
||||||
return '等待确认/取消';
|
if (codeList.includes(code)) {
|
||||||
} else {
|
const sectionEle = this.$store.getters['map/getDeviceByCode'](code);
|
||||||
return '';
|
if (this.sure) {
|
||||||
}
|
return sectionEle.__done == 'two' ? '确认设置限速完成' : '等待确认/取消';
|
||||||
},
|
} else {
|
||||||
commit(isClose = true) {
|
return sectionEle.__done == 'one' ? '已初始化' : ''
|
||||||
const operate = {
|
}
|
||||||
cmdType: this.speedLimitValue ? CMD.Section.CMD_SECTION_SET_LIMIT_SPEED : CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED,
|
}
|
||||||
// cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED,
|
return '';
|
||||||
operation: isClose ? OperationEvent.Command.common.confirm1.operation : OperationEvent.Command.common.apply1.operation,
|
|
||||||
over: true,
|
|
||||||
param: {sectionCode: this.selected.code, speedLimitValue:this.speedLimitValue}
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
isClose && this.doClose();
|
|
||||||
this.$emit('commandSuccess', this.selected.code, this.speedLimitValue);
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.$refs.noticeInfo.doShow();
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="18">
|
<el-col :span="sure? 18: 24">
|
||||||
<el-table :id="domIdChoose" ref="sectionable" :data="tempData" highlight-current-row height="300px" @current-change="handleChangeLine">
|
<el-table :id="domIdChoose" ref="table" :data="tempList" highlight-current-row height="300px" @current-change="handleChangeLine">
|
||||||
<el-table-column prop="name" label="轨道" />
|
<el-table-column prop="name" label="轨道" />
|
||||||
<el-table-column prop="blockStatus" label="MAU">
|
<el-table-column prop="blockStatus" label="MAU">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -21,7 +21,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5" :offset="1">
|
<el-col :span="5" :offset="1" v-if="sure">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend class="card_title">命令</legend>
|
<legend class="card_title">命令</legend>
|
||||||
<el-radio-group v-model="command">
|
<el-radio-group v-model="command">
|
||||||
@ -33,10 +33,10 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
<el-col :span="4" :offset="1">
|
<el-col :span="4" :offset="1">
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit(true)">确定(O)</el-button>
|
<el-button :id="domIdConfirm" type="primary" :disabled="!!disabled" :loading="loading" @click="commit(true)">确定(O)</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4" :offset="2">
|
<el-col :span="4" :offset="2">
|
||||||
<el-button :id="domIdApply" type="primary" :loading="loading" @click="commit(false)">应用(A)</el-button>
|
<el-button :id="domIdApply" type="primary" :disabled="!!disabled" :loading="loading" @click="commit(false)">应用(A)</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4" :offset="2">
|
<el-col :span="4" :offset="2">
|
||||||
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
|
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
|
||||||
@ -60,8 +60,23 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
initCodeListMap: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
initSelect: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
title: '',
|
||||||
status: false,
|
status: false,
|
||||||
standStatus: true,
|
standStatus: true,
|
||||||
allChecked: false,
|
allChecked: false,
|
||||||
@ -69,10 +84,12 @@ export default {
|
|||||||
loading: false,
|
loading: false,
|
||||||
active: false,
|
active: false,
|
||||||
activeName: 'first',
|
activeName: 'first',
|
||||||
tempData: [],
|
|
||||||
radio: '1',
|
radio: '1',
|
||||||
operate: null,
|
operate: null,
|
||||||
command: true
|
command: true,
|
||||||
|
sure: false,
|
||||||
|
disabled: true,
|
||||||
|
currentSelect: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -80,14 +97,17 @@ export default {
|
|||||||
'sectionList'
|
'sectionList'
|
||||||
]),
|
]),
|
||||||
isBlock() {
|
isBlock() {
|
||||||
return !!this.operate && this.operate.isBlock;
|
return this.operate && this.operate.operation === OperationEvent.Command.commandNingBo3.line_section_close.operation;
|
||||||
},
|
},
|
||||||
|
cmdType() {
|
||||||
|
return this.isBlock ? CMD.Section.CMD_SECTION_BLOCK : CMD.Section.CMD_SECTION_UNBLOCK
|
||||||
|
},
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
selected() {
|
tempList() {
|
||||||
return this.$store.state.menuOperation.selected;
|
return this.sectionList.filter(el => ['01', '04'].includes(el.type) )
|
||||||
},
|
},
|
||||||
domIdChoose() {
|
domIdChoose() {
|
||||||
return this.dialogShow ? OperationEvent.Command.common.choose1.domId : '';
|
return this.dialogShow ? OperationEvent.Command.common.choose1.domId : '';
|
||||||
},
|
},
|
||||||
@ -99,9 +119,6 @@ export default {
|
|||||||
},
|
},
|
||||||
domIdClose() {
|
domIdClose() {
|
||||||
return this.dialogShow ? OperationEvent.Command.common.close1.domId : '';
|
return this.dialogShow ? OperationEvent.Command.common.close1.domId : '';
|
||||||
},
|
|
||||||
title() {
|
|
||||||
return this.isBlock ? '确认/取消关闭轨道' : '确认/取消开放轨道';
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -112,48 +129,88 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate, sure) {
|
||||||
this.tempData = [];
|
this.operate = operate;
|
||||||
this.sectionList.forEach(item => {
|
this.sure = sure;
|
||||||
if (item.type === '01' || item.type === '04') {
|
|
||||||
this.tempData.push(item);
|
if (sure) {
|
||||||
}
|
this.title = `${this.isBlock ? '确认/取消关闭轨道' : '确认/取消开放轨道'}`;
|
||||||
});
|
} else {
|
||||||
this.operate = operate;
|
this.title = `${this.isBlock ? '初始化关闭轨道': '初始化开放轨道'}`;
|
||||||
|
}
|
||||||
|
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$refs.sectionable.setCurrentRow(this.selected);
|
this.$refs.table.setCurrentRow(sure? this.initSelect: null);
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
|
this.sure && this.$refs.table.setCurrentRow();
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
handleChangeLine(val) {
|
commit(isClose = true) {
|
||||||
|
if (this.initSelect &&
|
||||||
|
this.currentSelect &&
|
||||||
|
this.currentSelect.code == this.initSelect.code) {
|
||||||
|
if (this.command) {
|
||||||
|
const operate = {
|
||||||
|
cmdType: this.sure ? this.cmdType : null,
|
||||||
|
operation: isClose ? OperationEvent.Command.common.confirm1.operation : OperationEvent.Command.common.apply1.operation,
|
||||||
|
over: this.sure,
|
||||||
|
param: {sectionCode: this.currentSelect.code}
|
||||||
|
};
|
||||||
|
|
||||||
|
const sectionEle = this.$store.getters['map/getDeviceByCode'](this.currentSelect.code);
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.sure || this.$root.$emit('initCodes', this.cmdType.value, sectionEle.code);
|
||||||
|
this.$store.dispatch('map/flushMapRef');
|
||||||
|
isClose && this.doClose();
|
||||||
|
sectionEle.__done = this.sure? 'two': 'one';
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
isClose && this.isClose();
|
||||||
|
this.$refs.noticeInfo.doShow();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$messageBox('两次选择不一致');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleChangeLine(val) {
|
||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
const step = {
|
const step = {
|
||||||
code: val.code,
|
code: val.code,
|
||||||
operation: OperationEvent.Command.common.choose1.operation,
|
operation: OperationEvent.Command.common.choose1.operation,
|
||||||
val: val.code
|
val: val.code
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$store.dispatch('menuOperation/setSelected', {device: val});
|
this.disabled = this.isBlock? this.currentSelect.blockade: !this.currentSelect.blockade;
|
||||||
this.$refs.sectionable.setCurrentRow(this.selected);
|
this.sure || this.$emit('initSelect', this.currentSelect);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getProcess(code) {
|
getProcess(code) {
|
||||||
if (this.selected && this.selected.code === code) {
|
const codeList = this.initCodeListMap[this.cmdType.value]||[];
|
||||||
return '等待确认/取消';
|
if (codeList.includes(code)) {
|
||||||
} else {
|
const sectionEle = this.$store.getters['map/getDeviceByCode'](code);
|
||||||
return '';
|
if (this.sure) {
|
||||||
}
|
return sectionEle.__done == 'two' ? this.needBlock ? '确认关闭轨道完成' : '确认开放轨道完成' : '等待确认/取消';
|
||||||
|
} else {
|
||||||
|
return sectionEle.__done == 'one' ? '已初始化' : ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
getStationName(val) {
|
getStationName(val) {
|
||||||
const stationElm = this.$store.getters['map/getDeviceByCode'](val.stationCode);
|
const stationElm = this.$store.getters['map/getDeviceByCode'](val.stationCode);
|
||||||
@ -163,27 +220,6 @@ export default {
|
|||||||
const sectionElm = this.$store.getters['map/getDeviceByCode'](code);
|
const sectionElm = this.$store.getters['map/getDeviceByCode'](code);
|
||||||
return sectionElm.blockade ? '关闭双向:所有列车' : '打开';
|
return sectionElm.blockade ? '关闭双向:所有列车' : '打开';
|
||||||
},
|
},
|
||||||
commit(isClose = true) {
|
|
||||||
if (this.command) {
|
|
||||||
const operate = {
|
|
||||||
cmdType: this.isBlock ? CMD.Section.CMD_SECTION_BLOCK : CMD.Section.CMD_SECTION_UNBLOCK,
|
|
||||||
operation: isClose ? OperationEvent.Command.common.confirm1.operation : OperationEvent.Command.common.apply1.operation,
|
|
||||||
over: true,
|
|
||||||
param: {sectionCode: this.selected.code}
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
isClose && this.doClose();
|
|
||||||
this.$emit('commandSuccess', this.selected.code);
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
isClose && this.isClose();
|
|
||||||
this.$refs.noticeInfo.doShow();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.cancel();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
operation: OperationEvent.Command.common.close1.operation
|
operation: OperationEvent.Command.common.close1.operation
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-table :data="tempData" highlight-current-row height="350px" @current-change="selectLine">
|
<el-table :data="tempList" highlight-current-row height="350px" @current-change="selectLine">
|
||||||
<el-table-column prop="name" width="100" label="轨道" />
|
<el-table-column prop="name" width="100" label="轨道" />
|
||||||
<el-table-column prop="blockStatus" width="120" label="MAU">
|
<el-table-column prop="blockStatus" width="120" label="MAU">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -40,7 +40,7 @@
|
|||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="true">打印(P)</el-button>
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="true">打印(P)</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4" :offset="2">
|
<el-col :span="4" :offset="2">
|
||||||
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
|
<el-button :id="domIdClose" type="primary" @click="cancel">关闭(C)</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4" :offset="2">
|
<el-col :span="4" :offset="2">
|
||||||
<el-button :disabled="true">帮助(H)</el-button>
|
<el-button :disabled="true">帮助(H)</el-button>
|
||||||
@ -71,7 +71,6 @@ export default {
|
|||||||
active: false,
|
active: false,
|
||||||
selectShow: false,
|
selectShow: false,
|
||||||
activeName: 'first',
|
activeName: 'first',
|
||||||
tempData: [],
|
|
||||||
radio: '1'
|
radio: '1'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -82,9 +81,9 @@ export default {
|
|||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
selected() {
|
tempList() {
|
||||||
return this.$store.state.menuOperation.selected;
|
return this.sectionList.filter(el => ['01', '04'].includes(el.type) )
|
||||||
},
|
},
|
||||||
domIdClose() {
|
domIdClose() {
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
},
|
},
|
||||||
@ -107,13 +106,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
this.tempData = [];
|
this.operate = operate;
|
||||||
this.sectionList.forEach(item => {
|
|
||||||
if (item.type === '01' || item.type === '04') {
|
|
||||||
this.tempData.push(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="750px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="750px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="18">
|
<el-col :span="sure? 18: 24">
|
||||||
<el-table
|
<el-table
|
||||||
ref="table"
|
ref="table"
|
||||||
:data="signalList"
|
:data="tempList"
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
height="350px"
|
height="350px"
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
@ -27,7 +27,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5" :offset="1">
|
<el-col :span="5" :offset="1" v-if="sure">
|
||||||
<div class="set-status-title">命令</div>
|
<div class="set-status-title">命令</div>
|
||||||
<div class="set-status-box">
|
<div class="set-status-box">
|
||||||
<el-radio v-model="command" :label="true">确认</el-radio>
|
<el-radio v-model="command" :label="true">确认</el-radio>
|
||||||
@ -38,10 +38,10 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
<el-col :span="4" :offset="1">
|
<el-col :span="4" :offset="1">
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit(true)">确定(O)</el-button>
|
<el-button :id="domIdConfirm" type="primary" :disabled="!!disabled" :loading="loading" @click="commit(true)">确定(O)</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4" :offset="2">
|
<el-col :span="4" :offset="2">
|
||||||
<el-button :id="domIdApply" :loading="loading" @click="commit(false)">应用(A)</el-button>
|
<el-button :id="domIdApply" type="primary" :disabled="!!disabled" :loading="loading" @click="commit(false)">应用(A)</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4" :offset="2">
|
<el-col :span="4" :offset="2">
|
||||||
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
|
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
|
||||||
@ -62,18 +62,35 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SignalBlock',
|
name: 'SignalBlock',
|
||||||
|
props: {
|
||||||
|
initCodeListMap: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
initSelect: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
title: '',
|
||||||
status: false,
|
status: false,
|
||||||
command: true,
|
command: true,
|
||||||
allChecked: false,
|
allChecked: false,
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
operate: {},
|
operate: {},
|
||||||
title: ''
|
sure: false,
|
||||||
|
disabled: true,
|
||||||
|
currentSelect: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -86,9 +103,12 @@ export default {
|
|||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
selected() {
|
tempList() {
|
||||||
return this.$store.state.menuOperation.selected;
|
return this.signalList;
|
||||||
},
|
},
|
||||||
|
cmdType() {
|
||||||
|
return this.needBlock ? CMD.Signal.CMD_SIGNAL_BLOCK : CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||||
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? OperationEvent.Command.common.confirm1.domId : '';
|
return this.dialogShow ? OperationEvent.Command.common.confirm1.domId : '';
|
||||||
},
|
},
|
||||||
@ -107,59 +127,95 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate, sure) {
|
||||||
this.operate = operate;
|
this.operate = operate;
|
||||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
this.sure = sure;
|
||||||
this.title = this.needBlock ? '确认/取消信号机封锁' : '确认/取消信号机解除封锁';
|
|
||||||
|
if (sure) {
|
||||||
|
this.title = `${this.needBlock ? '确认/取消信号机封锁' : '确认/取消信号机解除封锁'}`;
|
||||||
|
} else {
|
||||||
|
this.title = `${this.needBlock ? '初始化信号机封锁': '初始化信号机解除封锁'}`;
|
||||||
|
}
|
||||||
|
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$refs.table.setCurrentRow(this.selected);
|
this.$refs.table.setCurrentRow(sure? this.initSelect: null);
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
|
this.sure && this.$refs.table.setCurrentRow();
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit(isClose = false) {
|
commit(isClose = false) {
|
||||||
if (this.command) {
|
if (this.initSelect &&
|
||||||
const operate = {
|
this.currentSelect &&
|
||||||
cmdType: this.needBlock ? CMD.Signal.CMD_SIGNAL_BLOCK : CMD.Signal.CMD_SIGNAL_UNBLOCK,
|
this.currentSelect.code == this.initSelect.code) {
|
||||||
operation: isClose ? OperationEvent.Command.common.confirm1.operation : OperationEvent.Command.common.apply1.operation,
|
if (this.command) {
|
||||||
over: true,
|
const operate = {
|
||||||
param: {signalCode: this.selected.code}
|
cmdType: this.sure ? this.cmdType : null,
|
||||||
};
|
operation: isClose ? OperationEvent.Command.common.confirm1.operation : OperationEvent.Command.common.apply1.operation,
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
over: this.sure,
|
||||||
if (valid) {
|
param: {signalCode: this.currentSelect.code}
|
||||||
isClose && this.doClose();
|
};
|
||||||
this.$emit('commandSuccess', this.selected.code);
|
|
||||||
}
|
const signalEle = this.$store.getters['map/getDeviceByCode'](this.currentSelect.code);
|
||||||
}).catch(() => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
isClose && this.doClose();
|
if (valid) {
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
});
|
this.sure || this.$root.$emit('initCodes', this.cmdType.value, signalEle.code);
|
||||||
} else {
|
this.$store.dispatch('map/flushMapRef');
|
||||||
this.cancel();
|
isClose && this.doClose();
|
||||||
}
|
signalEle.__done = this.sure? 'two': 'one';
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
isClose && this.doClose();
|
||||||
|
this.$refs.noticeInfo.doShow();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$messageBox('两次选择不一致');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
this.$refs.table.setCurrentRow(this.selected);
|
if (!val) { return; }
|
||||||
|
const step = {
|
||||||
|
code: val.code,
|
||||||
|
operation: OperationEvent.Command.common.choose.operation,
|
||||||
|
val: val.code
|
||||||
|
};
|
||||||
|
|
||||||
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||||
|
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.disabled = this.needBlock? this.currentSelect.blockade: !this.currentSelect.blockade;
|
||||||
|
this.sure || this.$emit('initSelect', this.currentSelect);
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.$refs.noticeInfo.doShow();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
getSignalStatus(code) {
|
getSignalStatus(code) {
|
||||||
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
|
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
|
||||||
if (signalEle.blockade) {
|
return signalEle.blockade? '锁闭的': '未设锁闭';
|
||||||
return '锁闭的';
|
|
||||||
} else {
|
|
||||||
return '未设锁闭';
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
getProcess(code, type) {
|
getProcess(code, type) {
|
||||||
if (this.selected.code === code && ((type === 'lock' && this.needBlock) || (type === 'unlock' && !this.needBlock))) {
|
const blockType = this.needBlock ? 'lock': 'unlock';
|
||||||
return '等待确认/取消';
|
const codeList = this.initCodeListMap[this.cmdType.value]||[];
|
||||||
} else {
|
if (blockType==type) {
|
||||||
return '';
|
if (codeList.includes(code)) {
|
||||||
}
|
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
|
||||||
|
if (this.sure) {
|
||||||
|
return signalEle.__done == 'two' ? this.needBlock ? '确认封锁完成' : '确认解除封锁完成' : '等待确认/取消';
|
||||||
|
} else {
|
||||||
|
return signalEle.__done == 'one' ? '已初始化' : ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<el-col :span="sure? 18: 24">
|
<el-col :span="sure? 18: 24">
|
||||||
<el-table
|
<el-table
|
||||||
ref="table"
|
ref="table"
|
||||||
:data="signalList"
|
:data="tempList"
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
height="300px"
|
height="300px"
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
@ -33,10 +33,10 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
<el-col :span="4" :offset="1">
|
<el-col :span="4" :offset="1">
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit(true)">确定(O)</el-button>
|
<el-button :id="domIdConfirm" type="primary" :disabled="!!disabled" :loading="loading" @click="commit(true)">确定(O)</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4" :offset="2">
|
<el-col :span="4" :offset="2">
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit(false)">应用(A)</el-button>
|
<el-button :id="domIdConfirm" type="primary" :disabled="!!disabled" :loading="loading" @click="commit(false)">应用(A)</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4" :offset="2">
|
<el-col :span="4" :offset="2">
|
||||||
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
|
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
|
||||||
@ -57,6 +57,20 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SignalCanBlock',
|
name: 'SignalCanBlock',
|
||||||
|
props: {
|
||||||
|
initCodeListMap: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
initSelect: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
@ -82,6 +96,9 @@ export default {
|
|||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
|
tempList() {
|
||||||
|
return this.signalList;
|
||||||
|
},
|
||||||
cmdType() {
|
cmdType() {
|
||||||
return this.needBlock ? CMD.Signal.CMD_SIGNAL_BLOCK : CMD.Signal.CMD_SIGNAL_UNBLOCK
|
return this.needBlock ? CMD.Signal.CMD_SIGNAL_BLOCK : CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||||
},
|
},
|
||||||
@ -116,8 +133,7 @@ export default {
|
|||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.$refs.table.setCurrentRow();
|
this.sure && this.$refs.table.setCurrentRow();
|
||||||
this.$store.dispatch('menuOperation/setSelected', {device: {}});
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit(isClose = false) {
|
commit(isClose = false) {
|
||||||
@ -134,9 +150,11 @@ export default {
|
|||||||
const signalEle = this.$store.getters['map/getDeviceByCode'](this.currentSelect.code);
|
const signalEle = this.$store.getters['map/getDeviceByCode'](this.currentSelect.code);
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.sure || this.$root.$emit('initCodes', this.cmdType.value, this.currentSelect.code);
|
||||||
|
this.$store.dispatch('map/flushMapRef');
|
||||||
isClose && this.doClose();
|
isClose && this.doClose();
|
||||||
signalEle.__done = this.sure? 'two': 'one';
|
signalEle.__done = this.sure? 'two': 'one';
|
||||||
this.sure || this.$root.$emit('initCodes', this.cmdType.value, signalEle.code);
|
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
isClose && this.doClose();
|
isClose && this.doClose();
|
||||||
@ -154,13 +172,12 @@ export default {
|
|||||||
val: val.code
|
val: val.code
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.disabled = this.currentSelect.blockade;
|
this.disabled = this.currentSelect.blockade;
|
||||||
this.sure || this.$emit('initSelect', this.currentSelect);
|
this.sure || this.$emit('initSelect', this.currentSelect);
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
}
|
||||||
}).catch(_ => {
|
}).catch(_ => {
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
@ -168,22 +185,19 @@ export default {
|
|||||||
},
|
},
|
||||||
getSignalBlock(code) {
|
getSignalBlock(code) {
|
||||||
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
|
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
|
||||||
if (signalEle.blockade) {
|
return signalEle.blockade? '关闭': '开启';
|
||||||
return '关闭';
|
|
||||||
} else {
|
|
||||||
return '开启';
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
getProcess(code) {
|
getProcess(code) {
|
||||||
const codeList = this.initCodeListMap[this.cmdType.value]||[];
|
const codeList = this.initCodeListMap[this.cmdType.value]||[];
|
||||||
if (codeList.includes(code)) {
|
if (codeList.includes(code)) {
|
||||||
const switchEle = this.$store.getters['map/getDeviceByCode'](code);
|
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
|
||||||
if (this.sure) {
|
if (this.sure) {
|
||||||
return switchEle.__done == 'two' ? '确认允许锁闭完成' : '等待确认/取消';
|
return signalEle.__done == 'two' ? '确认允许锁闭完成' : '等待确认/取消';
|
||||||
} else {
|
} else {
|
||||||
return switchEle.__done == 'one' ? '已初始化' : ''
|
return signalEle.__done == 'one' ? '已初始化' : ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<el-col :span="sure? 18: 24">
|
<el-col :span="sure? 18: 24">
|
||||||
<el-table
|
<el-table
|
||||||
ref="table"
|
ref="table"
|
||||||
:data="signalList"
|
:data="tempList"
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
height="300px"
|
height="300px"
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
@ -38,10 +38,10 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
<el-col :span="4" :offset="1">
|
<el-col :span="4" :offset="1">
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit(true)">确定(O)</el-button>
|
<el-button :id="domIdConfirm" type="primary" :disabled="!!disabled" :loading="loading" @click="commit(true)">确定(O)</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4" :offset="2">
|
<el-col :span="4" :offset="2">
|
||||||
<el-button :id="domIdApply" type="primary" :loading="loading" @click="commit(false)">应用(A)</el-button>
|
<el-button :id="domIdApply" type="primary" :disabled="!!disabled" :loading="loading" @click="commit(false)">应用(A)</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4" :offset="2">
|
<el-col :span="4" :offset="2">
|
||||||
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
|
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
|
||||||
@ -100,6 +100,9 @@ export default {
|
|||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
|
tempList() {
|
||||||
|
return this.signalList;
|
||||||
|
},
|
||||||
cmdType() {
|
cmdType() {
|
||||||
return this.command
|
return this.command
|
||||||
? CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
? CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||||
@ -139,8 +142,7 @@ export default {
|
|||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.$refs.table.setCurrentRow();
|
this.sure && this.$refs.table.setCurrentRow();
|
||||||
this.$store.dispatch('menuOperation/setSelected', {device: {}});
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit(isClose = false) {
|
commit(isClose = false) {
|
||||||
@ -159,9 +161,11 @@ export default {
|
|||||||
const signalEle = this.$store.getters['map/getDeviceByCode'](this.currentSelect.code);
|
const signalEle = this.$store.getters['map/getDeviceByCode'](this.currentSelect.code);
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.sure || this.$root.$emit('initCodes', this.cmdType.value, signalEle.code);
|
||||||
|
this.$store.dispatch('map/flushMapRef');
|
||||||
isClose && this.doClose();
|
isClose && this.doClose();
|
||||||
signalEle.__done = this.sure? 'two': 'one';
|
signalEle.__done = this.sure? 'two': 'one';
|
||||||
this.sure || this.$root.$emit('initCodes', this.cmdType.value, signalEle.code);
|
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
isClose && this.doClose();
|
isClose && this.doClose();
|
||||||
@ -179,13 +183,12 @@ export default {
|
|||||||
val: val.code
|
val: val.code
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.disabled = this.currentSelect.callOn;
|
this.disabled = this.currentSelect.callOn;
|
||||||
this.sure || this.$emit('initSelect', this.currentSelect);
|
this.sure || this.$emit('initSelect', this.currentSelect);
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
}
|
||||||
}).catch(_ => {
|
}).catch(_ => {
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
@ -201,28 +204,25 @@ export default {
|
|||||||
return '黄';
|
return '黄';
|
||||||
} else if (signalEle.redOpen && signalEle.yellowOpen && !signalEle.greenOpen) {
|
} else if (signalEle.redOpen && signalEle.yellowOpen && !signalEle.greenOpen) {
|
||||||
return '引导';
|
return '引导';
|
||||||
} else {
|
|
||||||
return '';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
getCanGuide(code) {
|
getCanGuide(code) {
|
||||||
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
|
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
|
||||||
if (signalEle.callOn) {
|
return signalEle.callOn ? '是': '否';
|
||||||
return '是';
|
|
||||||
} else {
|
|
||||||
return '否';
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
getProcess(code) {
|
getProcess(code) {
|
||||||
const codeList = this.initCodeListMap[this.cmdType.value]||[];
|
const codeList = this.initCodeListMap[this.cmdType.value]||[];
|
||||||
if (codeList.includes(code)) {
|
if (codeList.includes(code)) {
|
||||||
const switchEle = this.$store.getters['map/getDeviceByCode'](code);
|
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
|
||||||
if (this.sure) {
|
if (this.sure) {
|
||||||
return switchEle.__done == 'two' ? '确认引导完成' : '等待确认/取消';
|
return signalEle.__done == 'two' ? '确认引导完成' : '等待确认/取消';
|
||||||
} else {
|
} else {
|
||||||
return switchEle.__done == 'one' ? '已初始化' : ''
|
return signalEle.__done == 'one' ? '已初始化' : ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="750px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="750px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="18">
|
<el-col :span="sure? 18: 24">
|
||||||
<el-table
|
<el-table
|
||||||
ref="table"
|
ref="table"
|
||||||
:data="signalList"
|
:data="tempList"
|
||||||
height="300px"
|
height="300px"
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
:dom-id-choose="domIdChoose"
|
:dom-id-choose="domIdChoose"
|
||||||
@ -18,7 +18,7 @@
|
|||||||
<el-table-column v-if="!isCbtc" prop="status" label="后备模式进程" />
|
<el-table-column v-if="!isCbtc" prop="status" label="后备模式进程" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5" :offset="1">
|
<el-col :span="5" :offset="1" v-if="sure">
|
||||||
<div class="set-status-title">命令</div>
|
<div class="set-status-title">命令</div>
|
||||||
<div class="set-status-box">
|
<div class="set-status-box">
|
||||||
<el-radio v-model="command" :label="true">确认</el-radio>
|
<el-radio v-model="command" :label="true">确认</el-radio>
|
||||||
@ -29,10 +29,10 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
<el-col :span="4" :offset="1">
|
<el-col :span="4" :offset="1">
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit(true)">确定(O)</el-button>
|
<el-button :id="domIdConfirm" type="primary" :disabled="!!disabled" :loading="loading" @click="commit(true)">确定(O)</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4" :offset="2">
|
<el-col :span="4" :offset="2">
|
||||||
<el-button :id="domIdConfirm" :loading="loading" :disabled="!selected" @click="commit(false)">应用(A)</el-button>
|
<el-button :id="domIdConfirm" type="primary" :disabled="!!disabled" :loading="loading" @click="commit(false)">应用(A)</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4" :offset="2">
|
<el-col :span="4" :offset="2">
|
||||||
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
|
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
|
||||||
@ -48,23 +48,41 @@
|
|||||||
<script>
|
<script>
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SignalBlock',
|
name: 'SignalBlock',
|
||||||
|
props: {
|
||||||
|
initCodeListMap: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
initSelect: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
title: '',
|
||||||
status: false,
|
status: false,
|
||||||
command: true,
|
command: true,
|
||||||
allChecked: false,
|
allChecked: false,
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
operate: {}
|
disabled:false,
|
||||||
|
operate: {},
|
||||||
|
sure: false,
|
||||||
|
disabled: true,
|
||||||
|
currentSelect: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -74,12 +92,15 @@ export default {
|
|||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
selected() {
|
tempList() {
|
||||||
return this.$store.state.menuOperation.selected;
|
return this.signalList;
|
||||||
},
|
},
|
||||||
isCbtc() {
|
isCbtc() {
|
||||||
return this.operate.operation === OperationEvent.Command.mBar.cbtcMode.operation;
|
return this.operate.operation === OperationEvent.Command.mBar.cbtcMode.operation;
|
||||||
},
|
},
|
||||||
|
cmdType() {
|
||||||
|
return this.isCbtc ? CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING : CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING;
|
||||||
|
},
|
||||||
domIdChoose() {
|
domIdChoose() {
|
||||||
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
|
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
|
||||||
},
|
},
|
||||||
@ -104,7 +125,29 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleCurrentChange(val) {
|
doShow(operate, sure) {
|
||||||
|
this.operate = operate;
|
||||||
|
this.sure = sure;
|
||||||
|
|
||||||
|
if (sure) {
|
||||||
|
this.title = `${this.isCbtc ? '确认/取消CBTC模式' : '确认/取消后备模式'}`;
|
||||||
|
} else {
|
||||||
|
this.title = `${this.isCbtc ? '初始化CBTC模式' : '初始化后备模式'}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.$nextTick(function () {
|
||||||
|
this.$refs.table.setCurrentRow(sure? this.initSelect: null);
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.loading = false;
|
||||||
|
this.dialogShow = false;
|
||||||
|
this.sure && this.$refs.table.setCurrentRow();
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
const step = {
|
const step = {
|
||||||
code: val.code,
|
code: val.code,
|
||||||
@ -115,33 +158,18 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$store.dispatch('menuOperation/setSelected', {device: val});
|
this.$store.dispatch('menuOperation/setSelected', {device: val});
|
||||||
this.$refs.table.setCurrentRow(this.selected);
|
this.$refs.table.setCurrentRow(this.currentSelect);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doShow(operate) {
|
|
||||||
this.operate = operate;
|
|
||||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$refs.table.setCurrentRow();
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$refs.table.setCurrentRow();
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
},
|
|
||||||
commit(isClose = false) {
|
commit(isClose = false) {
|
||||||
const step = {
|
const step = {
|
||||||
cmdType: this.isCbtc ? CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING : CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING,
|
cmdType: this.sure? this.cmdType: null,
|
||||||
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
|
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
|
||||||
over: true,
|
over: this.sure,
|
||||||
param: { signalCode: this.selected.code }
|
param: { signalCode: this.currentSelect.code }
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<el-table
|
<el-table
|
||||||
:id="domIdChoose"
|
:id="domIdChoose"
|
||||||
ref="table"
|
ref="table"
|
||||||
:data="switchList"
|
:data="tempList"
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
height="350px"
|
height="350px"
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
@ -81,6 +81,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
title: '',
|
||||||
status: false,
|
status: false,
|
||||||
standStatus: true,
|
standStatus: true,
|
||||||
allChecked: false,
|
allChecked: false,
|
||||||
@ -90,8 +91,7 @@ export default {
|
|||||||
sure: false,
|
sure: false,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
operate: {},
|
operate: {},
|
||||||
currentSelect: null,
|
currentSelect: null
|
||||||
title: ''
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -101,6 +101,9 @@ export default {
|
|||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
|
tempList() {
|
||||||
|
return this.switchList;
|
||||||
|
},
|
||||||
isBlock() {
|
isBlock() {
|
||||||
return this.operate && this.operate.operation === OperationEvent.Command.commandNingBo3.line_switch_block.operation;
|
return this.operate && this.operate.operation === OperationEvent.Command.commandNingBo3.line_switch_block.operation;
|
||||||
},
|
},
|
||||||
@ -156,9 +159,7 @@ export default {
|
|||||||
this.currentSelect.code == this.initSelect.code) {
|
this.currentSelect.code == this.initSelect.code) {
|
||||||
if (this.command) {
|
if (this.command) {
|
||||||
const operate = {
|
const operate = {
|
||||||
cmdType: this.sure
|
cmdType: this.sure ? this.cmdType : null,
|
||||||
? this.cmdType
|
|
||||||
: null,
|
|
||||||
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
|
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
|
||||||
over: this.sure,
|
over: this.sure,
|
||||||
param: { switchCode: this.currentSelect.code }
|
param: { switchCode: this.currentSelect.code }
|
||||||
@ -167,9 +168,11 @@ export default {
|
|||||||
const switchEle = this.$store.getters['map/getDeviceByCode'](this.currentSelect.code);
|
const switchEle = this.$store.getters['map/getDeviceByCode'](this.currentSelect.code);
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.sure || this.$root.$emit('initCodes', this.cmdType.value, switchEle.code);
|
||||||
|
this.$store.dispatch('map/flushMapRef');
|
||||||
isClose && this.doClose();
|
isClose && this.doClose();
|
||||||
switchEle.__done = this.sure? 'two': 'one';
|
switchEle.__done = this.sure? 'two': 'one';
|
||||||
this.sure || this.$root.$emit('initCodes', this.cmdType.value, switchEle.code);
|
|
||||||
}
|
}
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
isClose && this.doClose();
|
isClose && this.doClose();
|
||||||
@ -192,9 +195,9 @@ export default {
|
|||||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.disabled = this.isBlock? this.currentSelect.blockade: !this.currentSelect.blockade;
|
this.disabled = this.isBlock? this.currentSelect.blockade: !this.currentSelect.blockade;
|
||||||
this.sure || this.$emit('initSelect', this.currentSelect);
|
this.sure || this.$emit('initSelect', this.currentSelect);
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
@ -202,11 +205,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getSwitchStatus(code) {
|
getSwitchStatus(code) {
|
||||||
const switchEle = this.$store.getters['map/getDeviceByCode'](code);
|
const switchEle = this.$store.getters['map/getDeviceByCode'](code);
|
||||||
if (switchEle.blockade) {
|
return switchEle.blockade? '锁闭的': '未锁闭的';
|
||||||
return '锁闭的';
|
|
||||||
} else {
|
|
||||||
return '未锁闭的';
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
getProcess(code, type) {
|
getProcess(code, type) {
|
||||||
const blockType = this.isBlock ? 'block': 'unblock';
|
const blockType = this.isBlock ? 'block': 'unblock';
|
||||||
@ -219,8 +218,6 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
return switchEle.__done == 'one' ? '已初始化' : ''
|
return switchEle.__done == 'one' ? '已初始化' : ''
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
return ''
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
|
@ -204,23 +204,19 @@ export default {
|
|||||||
defaultSpeedLevel: 'l1',
|
defaultSpeedLevel: 'l1',
|
||||||
reentryData: {},
|
reentryData: {},
|
||||||
addModel: {
|
addModel: {
|
||||||
// forward: false,
|
|
||||||
routingCode: '',
|
routingCode: '',
|
||||||
endStationCode: '',
|
endStationCode: '',
|
||||||
startStationCode: '',
|
startStationCode: '',
|
||||||
startTime: '00:00:00',
|
startTime: '02:00:00',
|
||||||
endTime: '',
|
endTime: '',
|
||||||
arriveConfigList: [],
|
arriveConfigList: [],
|
||||||
tripNumber: '',
|
tripNumber: '',
|
||||||
planId: '',
|
planId: '',
|
||||||
serviceNumber: ''
|
serviceNumber: '',
|
||||||
},
|
startTbFront: false,
|
||||||
frontModel: {
|
|
||||||
startTbFront: false,
|
|
||||||
endTbFront: false
|
endTbFront: false
|
||||||
},
|
},
|
||||||
tripNumberList: [{ value: '', label: this.$t('planMonitor.automatic') }],
|
tripNumberList: [{ value: '', label: this.$t('planMonitor.automatic') }],
|
||||||
// defaultStopTimeList: [{ value: '30', label: this.$t('planMonitor.default') }, { value: '0', label: '0' }],
|
|
||||||
defaultSpeedLevelList: [
|
defaultSpeedLevelList: [
|
||||||
{ value: 'l1', label: '等级一' },
|
{ value: 'l1', label: '等级一' },
|
||||||
{ value: 'l2', label: '等级二' },
|
{ value: 'l2', label: '等级二' },
|
||||||
@ -328,8 +324,8 @@ export default {
|
|||||||
compuntedRunTime(list, index, runLevel) {
|
compuntedRunTime(list, index, runLevel) {
|
||||||
let runTime = 0;
|
let runTime = 0;
|
||||||
|
|
||||||
if ((index == 0 && String(this.frontModel.startTbFront) != 'undefined') ||
|
if ((index == 0 && String(this.addModel.startTbFront) != 'undefined') ||
|
||||||
(index == list.length-1 && String(this.frontModel.endTbFront) != 'undefined')) {
|
(index == list.length-1 && String(this.addModel.endTbFront) != 'undefined')) {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -376,10 +372,10 @@ export default {
|
|||||||
elem.speedLevel = runLevelObj.label;
|
elem.speedLevel = runLevelObj.label;
|
||||||
|
|
||||||
let fronTime = 0;
|
let fronTime = 0;
|
||||||
if (index == 0 && String(this.frontModel.startTbFront) == 'false') {
|
if (index == 0 && String(this.addModel.startTbFront) == 'false') {
|
||||||
const data = this.reentryData[elem.stationCode]||{};
|
const data = this.reentryData[elem.stationCode]||{};
|
||||||
fronTime = data.tbTo || 0;
|
fronTime = data.tbTo || 0;
|
||||||
} else if (index == list.length - 2 && String(this.frontModel.endTbFront) == 'false') {
|
} else if (index == list.length - 2 && String(this.addModel.endTbFront) == 'false') {
|
||||||
const data = this.reentryData[list[index+1].stationCode]||{};
|
const data = this.reentryData[list[index+1].stationCode]||{};
|
||||||
fronTime = data.tbTo || 0;
|
fronTime = data.tbTo || 0;
|
||||||
}
|
}
|
||||||
@ -401,8 +397,8 @@ export default {
|
|||||||
this.addModel.endSectionCode = row.endSectionCode;
|
this.addModel.endSectionCode = row.endSectionCode;
|
||||||
this.addModel.startSectionCode = row.startSectionCode;
|
this.addModel.startSectionCode = row.startSectionCode;
|
||||||
this.addModel.routingCode = row.code;
|
this.addModel.routingCode = row.code;
|
||||||
this.frontModel.startTbFront = row.startTbFront;
|
this.addModel.startTbFront = row.startTbFront;
|
||||||
this.frontModel.endTbFront = row.endTbFront;
|
this.addModel.endTbFront = row.endTbFront;
|
||||||
this.computedDetailList('routingCode');
|
this.computedDetailList('routingCode');
|
||||||
},
|
},
|
||||||
handleCommit() {
|
handleCommit() {
|
||||||
|
@ -292,26 +292,19 @@ export default {
|
|||||||
serviceNumber: '',
|
serviceNumber: '',
|
||||||
planId: '',
|
planId: '',
|
||||||
editModel: {
|
editModel: {
|
||||||
routingCode: '',
|
routingCode: '',
|
||||||
endStationCode: '',
|
endStationCode: '',
|
||||||
startStationCode: '',
|
startStationCode: '',
|
||||||
startTime: '00:00:00',
|
startTime: '02:00:00',
|
||||||
endTime: '',
|
endTime: '',
|
||||||
arriveConfigList: []
|
arriveConfigList: [],
|
||||||
// serialNumber: '',
|
tripNumber: '',
|
||||||
// trainManual: false,
|
planId: '',
|
||||||
// serialManual: false,
|
serviceNumber: '',
|
||||||
// clearGuest: false,
|
startTbFront: false,
|
||||||
// continuationPlan: false,
|
endTbFront: false
|
||||||
// firstTrain: false,
|
|
||||||
// lastTrain: false,
|
|
||||||
// inStock: false,
|
|
||||||
// outStock: false
|
|
||||||
},
|
},
|
||||||
tripNumberList: [{ value: '', label: this.$t('planMonitor.modifying.automatic') }],
|
tripNumberList: [{ value: '', label: this.$t('planMonitor.modifying.automatic') }],
|
||||||
// defaultStopTimeList: [{ value: '', label: this.$t('planMonitor.modifying.default') }],
|
|
||||||
// defaultSpeedLevelList: [{ value: '', label: this.$t('planMonitor.modifying.default') }],
|
|
||||||
// serialNumberList: [],
|
|
||||||
reentryData: {},
|
reentryData: {},
|
||||||
defaultSpeedLevelList: [
|
defaultSpeedLevelList: [
|
||||||
{ value: 'l1', label: '等级一' },
|
{ value: 'l1', label: '等级一' },
|
||||||
@ -342,9 +335,6 @@ export default {
|
|||||||
'editModel.startTime': function () {
|
'editModel.startTime': function () {
|
||||||
this.computedDetailList();
|
this.computedDetailList();
|
||||||
},
|
},
|
||||||
// 'defaultStopTime': function () {
|
|
||||||
// this.computedDetailList('defaultStopTime');
|
|
||||||
// },
|
|
||||||
'defaultSpeedLevel': function () {
|
'defaultSpeedLevel': function () {
|
||||||
this.computedDetailList('defaultSpeedLevel');
|
this.computedDetailList('defaultSpeedLevel');
|
||||||
}
|
}
|
||||||
@ -364,8 +354,8 @@ export default {
|
|||||||
compuntedRunTime(list, index, runLevel) {
|
compuntedRunTime(list, index, runLevel) {
|
||||||
let runTime = 0;
|
let runTime = 0;
|
||||||
|
|
||||||
if ((index == 0 && String(this.frontModel.startTbFront) != 'undefined') ||
|
if ((index == 0 && String(this.editModel.startTbFront) != 'undefined') ||
|
||||||
(index == list.length-1 && String(this.frontModel.endTbFront) != 'undefined')) {
|
(index == list.length-1 && String(this.editModel.endTbFront) != 'undefined')) {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -385,9 +375,9 @@ export default {
|
|||||||
return runTime;
|
return runTime;
|
||||||
},
|
},
|
||||||
computedDetailList(type = null) {
|
computedDetailList(type = null) {
|
||||||
if (this.addModel.routingCode) {
|
if (this.editModel.routingCode) {
|
||||||
let tempTime = this.computedTimeByString(this.addModel.startTime) / 1000;
|
let tempTime = this.computedTimeByString(this.editModel.startTime) / 1000;
|
||||||
const list = Object.assign([], this.addModel.arriveConfigList);
|
const list = Object.assign([], this.editModel.arriveConfigList);
|
||||||
const runLevel = this.defaultSpeedLevel || 'l1'; // 默认等级三
|
const runLevel = this.defaultSpeedLevel || 'l1'; // 默认等级三
|
||||||
|
|
||||||
list.forEach((elem, index) => {
|
list.forEach((elem, index) => {
|
||||||
@ -413,10 +403,10 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
let fronTime = 0;
|
let fronTime = 0;
|
||||||
if (index == 0 && String(this.frontModel.startTbFront) == 'false') {
|
if (index == 0 && String(this.editModel.startTbFront) == 'false') {
|
||||||
const data = this.reentryData[elem.stationCode]||{};
|
const data = this.reentryData[elem.stationCode]||{};
|
||||||
fronTime = data.tbTo || 0;
|
fronTime = data.tbTo || 0;
|
||||||
} else if (index == list.length - 2 && String(this.frontModel.endTbFront) == 'false') {
|
} else if (index == list.length - 2 && String(this.editModel.endTbFront) == 'false') {
|
||||||
const data = this.reentryData[list[index+1].stationCode]||{};
|
const data = this.reentryData[list[index+1].stationCode]||{};
|
||||||
fronTime = data.tbTo || 0;
|
fronTime = data.tbTo || 0;
|
||||||
}
|
}
|
||||||
@ -424,7 +414,7 @@ export default {
|
|||||||
tempTime = tempTime + fronTime + elem.stopTime + elem.speedLevelTime;
|
tempTime = tempTime + fronTime + elem.stopTime + elem.speedLevelTime;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.addModel.endTime = formatTime(tempTime - list[list.length - 1].stopTime);
|
this.editModel.endTime = formatTime(tempTime - list[list.length - 1].stopTime);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
loadInitData(params) {
|
loadInitData(params) {
|
||||||
@ -463,7 +453,6 @@ export default {
|
|||||||
if (params.rowData && params.rowData.arriveConfigList.length > 0) {
|
if (params.rowData && params.rowData.arriveConfigList.length > 0) {
|
||||||
const paramData = params.rowData;
|
const paramData = params.rowData;
|
||||||
this.initRunlevel(paramData);
|
this.initRunlevel(paramData);
|
||||||
// const runLevelObj = this.defaultSpeedLevelList.find(speedLevel=>{ return speedLevel.label == ; });
|
|
||||||
this.editModel.arriveConfigList = paramData.arriveConfigList;
|
this.editModel.arriveConfigList = paramData.arriveConfigList;
|
||||||
this.editModel.routingCode = paramData.routingCode;
|
this.editModel.routingCode = paramData.routingCode;
|
||||||
this.editModel.startStationCode = paramData.startStationCode;
|
this.editModel.startStationCode = paramData.startStationCode;
|
||||||
@ -473,6 +462,8 @@ export default {
|
|||||||
this.editModel.endSectionCode = paramData.endSectionCode;
|
this.editModel.endSectionCode = paramData.endSectionCode;
|
||||||
this.editModel.startSectionCode = paramData.startSectionCode;
|
this.editModel.startSectionCode = paramData.startSectionCode;
|
||||||
this.editModel.id = paramData.id;
|
this.editModel.id = paramData.id;
|
||||||
|
this.editModel.startTbFront = paramData.startTbFront;
|
||||||
|
this.editModel.endTbFront = paramData.endTbFront;
|
||||||
this.routingList = [];
|
this.routingList = [];
|
||||||
this.routingList.push({
|
this.routingList.push({
|
||||||
code:paramData.routingCode,
|
code:paramData.routingCode,
|
||||||
@ -498,17 +489,19 @@ export default {
|
|||||||
startStationCode:resp.data.startStationCode,
|
startStationCode:resp.data.startStationCode,
|
||||||
endStationCode:resp.data.endStationCode,
|
endStationCode:resp.data.endStationCode,
|
||||||
endSectionCode:resp.data.endSectionCode,
|
endSectionCode:resp.data.endSectionCode,
|
||||||
startTbFront: resp.data.startTbFront,
|
|
||||||
endTbFront: resp.data.endTbFront,
|
|
||||||
startSectionCode:resp.data.startSectionCode
|
startSectionCode:resp.data.startSectionCode
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.editModel = {
|
this.editModel = {
|
||||||
tripNumber: this.tripNumber,
|
tripNumber: this.tripNumber,
|
||||||
startTime: formatTime(trainInfo.stationTimeList[1].secondTime + 7200),
|
startTime: formatTime(trainInfo.stationTimeList[1].secondTime + 7200),
|
||||||
endTime: formatTime(trainInfo.stationTimeList[lastIndex].secondTime + 7200),
|
endTime: formatTime(trainInfo.stationTimeList[lastIndex].secondTime + 7200),
|
||||||
routingCode : resp.data.code,
|
routingCode : resp.data.code,
|
||||||
arriveConfigList: []
|
arriveConfigList: [],
|
||||||
|
startTbFront: resp.data.startTbFront,
|
||||||
|
endTbFront: resp.data.endTbFront
|
||||||
};
|
};
|
||||||
|
|
||||||
const newstationTimeList = [];
|
const newstationTimeList = [];
|
||||||
|
@ -112,17 +112,17 @@
|
|||||||
{{ formatName(scope.row.endSectionCode) }}
|
{{ formatName(scope.row.endSectionCode) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="routingType" label="交路类型">
|
<el-table-column prop="routingType" label="交路类型">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ routingTypeMap[scope.row.routingType] }}
|
{{ routingTypeMap[scope.row.routingType] }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="类别" width="240">
|
<el-table-column label="类别" width="240">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ `${frontMap[String(scope.row.startTbFront)]} - ${frontMap[String(scope.row.endTbFront)]}` }}
|
{{ `${frontMap[String(scope.row.startTbFront)]} - ${frontMap[String(scope.row.endTbFront)]}` }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="remarks" width="auto" :label="this.$t('planMonitor.description')" />
|
<el-table-column prop="remarks" width="auto" :label="this.$t('planMonitor.description')" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
||||||
@ -202,25 +202,21 @@ export default {
|
|||||||
endStationFilters:[],
|
endStationFilters:[],
|
||||||
// defaultStopTime: '30',
|
// defaultStopTime: '30',
|
||||||
defaultSpeedLevel: 'l1',
|
defaultSpeedLevel: 'l1',
|
||||||
reentryData: {},
|
reentryData: {},
|
||||||
addModel: {
|
addModel: {
|
||||||
// forward: false,
|
|
||||||
routingCode: '',
|
routingCode: '',
|
||||||
endStationCode: '',
|
endStationCode: '',
|
||||||
startStationCode: '',
|
startStationCode: '',
|
||||||
startTime: '00:00:00',
|
startTime: '02:00:00',
|
||||||
endTime: '',
|
endTime: '',
|
||||||
arriveConfigList: [],
|
arriveConfigList: [],
|
||||||
tripNumber: '',
|
tripNumber: '',
|
||||||
planId: '',
|
planId: '',
|
||||||
serviceNumber: ''
|
serviceNumber: '',
|
||||||
},
|
|
||||||
frontModel: {
|
|
||||||
startTbFront: false,
|
startTbFront: false,
|
||||||
endTbFront: false
|
endTbFront: false
|
||||||
},
|
},
|
||||||
tripNumberList: [{ value: '', label: this.$t('planMonitor.automatic') }],
|
tripNumberList: [{ value: '', label: this.$t('planMonitor.automatic') }],
|
||||||
// defaultStopTimeList: [{ value: '30', label: this.$t('planMonitor.default') }, { value: '0', label: '0' }],
|
|
||||||
defaultSpeedLevelList: [
|
defaultSpeedLevelList: [
|
||||||
{ value: 'l1', label: '等级一' },
|
{ value: 'l1', label: '等级一' },
|
||||||
{ value: 'l2', label: '等级二' },
|
{ value: 'l2', label: '等级二' },
|
||||||
@ -228,17 +224,17 @@ export default {
|
|||||||
{ value: 'l4', label: '等级四' },
|
{ value: 'l4', label: '等级四' },
|
||||||
{ value: 'l5', label: '等级五' }
|
{ value: 'l5', label: '等级五' }
|
||||||
],
|
],
|
||||||
routingTypeMap: {
|
routingTypeMap: {
|
||||||
OUTBOUND: '出库',
|
OUTBOUND: '出库',
|
||||||
INBOUND: '入库',
|
INBOUND: '入库',
|
||||||
LOOP: '环路'
|
LOOP: '环路'
|
||||||
},
|
},
|
||||||
frontMap: {
|
frontMap: {
|
||||||
'true': '折返轨(站前)',
|
'true': '折返轨(站前)',
|
||||||
'false': '折返轨(站后)',
|
'false': '折返轨(站后)',
|
||||||
'undefined': '转换轨',
|
'undefined': '转换轨',
|
||||||
'null': '转换轨'
|
'null': '转换轨'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -267,14 +263,14 @@ export default {
|
|||||||
this.addModel.arriveConfigList = [];
|
this.addModel.arriveConfigList = [];
|
||||||
const mapId = this.$route.query.mapId;
|
const mapId = this.$route.query.mapId;
|
||||||
|
|
||||||
if (mapId) {
|
if (mapId) {
|
||||||
getRunplanConfig(mapId).then(resp => {
|
getRunplanConfig(mapId).then(resp => {
|
||||||
const data = resp.data;
|
const data = resp.data;
|
||||||
this.reentryData = data.config.reentryData;
|
this.reentryData = data.config.reentryData;
|
||||||
});
|
});
|
||||||
|
|
||||||
listUserRoutingData(mapId).then(resp => {
|
listUserRoutingData(mapId).then(resp => {
|
||||||
this.routingList = resp.data;
|
this.routingList = resp.data;
|
||||||
const startStationFilterMap = {};
|
const startStationFilterMap = {};
|
||||||
const endStationFilterMap = {};
|
const endStationFilterMap = {};
|
||||||
this.routingList.forEach(routing=>{
|
this.routingList.forEach(routing=>{
|
||||||
@ -328,13 +324,13 @@ export default {
|
|||||||
compuntedRunTime(list, index, runLevel) {
|
compuntedRunTime(list, index, runLevel) {
|
||||||
let runTime = 0;
|
let runTime = 0;
|
||||||
|
|
||||||
if ((index == 0 && String(this.frontModel.startTbFront) != 'undefined') ||
|
if ((index == 0 && String(this.addModel.startTbFront) != 'undefined') ||
|
||||||
(index == list.length-1 && String(this.frontModel.endTbFront) != 'undefined')) {
|
(index == list.length-1 && String(this.addModel.endTbFront) != 'undefined')) {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index < list.length - 1) {
|
if (index < list.length - 1) {
|
||||||
const stopStationObj = this.stopStationMap[[list[index].sectionCode, list[index + 1].sectionCode].toString()];
|
const stopStationObj = this.stopStationMap[[list[index].sectionCode, list[index + 1].sectionCode].toString()];
|
||||||
if (stopStationObj) {
|
if (stopStationObj) {
|
||||||
if (stopStationObj.runPlanLevelVO) {
|
if (stopStationObj.runPlanLevelVO) {
|
||||||
runTime = parseInt(stopStationObj.runPlanLevelVO[runLevel]);
|
runTime = parseInt(stopStationObj.runPlanLevelVO[runLevel]);
|
||||||
@ -351,41 +347,40 @@ export default {
|
|||||||
computedDetailList(type = null) {
|
computedDetailList(type = null) {
|
||||||
if (this.addModel.routingCode) {
|
if (this.addModel.routingCode) {
|
||||||
let tempTime = this.computedTimeByString(this.addModel.startTime) / 1000;
|
let tempTime = this.computedTimeByString(this.addModel.startTime) / 1000;
|
||||||
const list = Object.assign([], this.addModel.arriveConfigList);
|
const list = Object.assign([], this.addModel.arriveConfigList);
|
||||||
const runLevel = this.defaultSpeedLevel || 'l1'; // 默认等级三
|
const runLevel = this.defaultSpeedLevel || 'l1'; // 默认等级三
|
||||||
|
|
||||||
list.forEach((elem, index) => {
|
list.forEach((elem, index) => {
|
||||||
if (type == 'routingCode') {
|
if (type == 'routingCode') {
|
||||||
if (index == 0 || index == list.length - 1) {
|
if (index == 0 || index == list.length - 1) {
|
||||||
elem.stopTime = 0;
|
elem.stopTime = 0;
|
||||||
} else if (this.stopTimeMap[elem.stationCode]) {
|
} else if (this.stopTimeMap[elem.stationCode]) {
|
||||||
elem.stopTime = this.stopTimeMap[elem.stationCode].parkingTime;
|
elem.stopTime = this.stopTimeMap[elem.stationCode].parkingTime;
|
||||||
} else {
|
} else {
|
||||||
elem.stopTime = 0;
|
elem.stopTime = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tempTime = tempTime? tempTime: this.computedTimeByString('23:59:59') / 1000 + 1;
|
tempTime = tempTime || this.computedTimeByString('23:59:59') / 1000 + 1;
|
||||||
elem.arriveTime = formatTime(tempTime)
|
elem.arriveTime = formatTime(tempTime);
|
||||||
elem.departureTime = formatTime(tempTime + elem.stopTime);
|
elem.departureTime = formatTime(tempTime + elem.stopTime);
|
||||||
|
|
||||||
const runLevelObj = this.defaultSpeedLevelList.find(speedLevel=>{ return speedLevel.value == runLevel; });
|
const runLevelObj = this.defaultSpeedLevelList.find(speedLevel=>{ return speedLevel.value == runLevel; });
|
||||||
const realRunlevel = this.compuntedRunTime(list, index, runLevel);
|
const realRunlevel = this.compuntedRunTime(list, index, runLevel);
|
||||||
|
|
||||||
elem.speedLevelTime = realRunlevel;
|
|
||||||
elem.speedLevel = runLevelObj.label;
|
|
||||||
|
|
||||||
|
elem.speedLevelTime = realRunlevel;
|
||||||
|
elem.speedLevel = runLevelObj.label;
|
||||||
|
|
||||||
let fronTime = 0;
|
let fronTime = 0;
|
||||||
if (index == 0 && String(this.frontModel.startTbFront) == 'false') {
|
if (index == 0 && String(this.addModel.startTbFront) == 'false') {
|
||||||
const data = this.reentryData[elem.stationCode]||{};
|
const data = this.reentryData[elem.stationCode]||{};
|
||||||
fronTime = data.tbTo || 0;
|
fronTime = data.tbTo || 0;
|
||||||
} else if (index == list.length - 2 && String(this.frontModel.endTbFront) == 'false') {
|
} else if (index == list.length - 2 && String(this.addModel.endTbFront) == 'false') {
|
||||||
const data = this.reentryData[list[index+1].stationCode]||{};
|
const data = this.reentryData[list[index+1].stationCode]||{};
|
||||||
fronTime = data.tbTo || 0;
|
fronTime = data.tbTo || 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
tempTime = tempTime + fronTime + elem.stopTime + elem.speedLevelTime;
|
tempTime = tempTime + fronTime + elem.stopTime + elem.speedLevelTime;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.addModel.endTime = formatTime(tempTime - list[list.length - 1].stopTime);
|
this.addModel.endTime = formatTime(tempTime - list[list.length - 1].stopTime);
|
||||||
@ -402,8 +397,8 @@ export default {
|
|||||||
this.addModel.endSectionCode = row.endSectionCode;
|
this.addModel.endSectionCode = row.endSectionCode;
|
||||||
this.addModel.startSectionCode = row.startSectionCode;
|
this.addModel.startSectionCode = row.startSectionCode;
|
||||||
this.addModel.routingCode = row.code;
|
this.addModel.routingCode = row.code;
|
||||||
this.frontModel.startTbFront = row.startTbFront;
|
this.addModel.startTbFront = row.startTbFront;
|
||||||
this.frontModel.endTbFront = row.endTbFront;
|
this.addModel.endTbFront = row.endTbFront;
|
||||||
this.computedDetailList('routingCode');
|
this.computedDetailList('routingCode');
|
||||||
},
|
},
|
||||||
handleCommit() {
|
handleCommit() {
|
||||||
|
@ -292,26 +292,19 @@ export default {
|
|||||||
serviceNumber: '',
|
serviceNumber: '',
|
||||||
planId: '',
|
planId: '',
|
||||||
editModel: {
|
editModel: {
|
||||||
routingCode: '',
|
routingCode: '',
|
||||||
endStationCode: '',
|
endStationCode: '',
|
||||||
startStationCode: '',
|
startStationCode: '',
|
||||||
startTime: '00:00:00',
|
startTime: '02:00:00',
|
||||||
endTime: '',
|
endTime: '',
|
||||||
arriveConfigList: []
|
arriveConfigList: [],
|
||||||
// serialNumber: '',
|
tripNumber: '',
|
||||||
// trainManual: false,
|
planId: '',
|
||||||
// serialManual: false,
|
serviceNumber: '',
|
||||||
// clearGuest: false,
|
startTbFront: false,
|
||||||
// continuationPlan: false,
|
endTbFront: false
|
||||||
// firstTrain: false,
|
|
||||||
// lastTrain: false,
|
|
||||||
// inStock: false,
|
|
||||||
// outStock: false
|
|
||||||
},
|
},
|
||||||
tripNumberList: [{ value: '', label: this.$t('planMonitor.modifying.automatic') }],
|
tripNumberList: [{ value: '', label: this.$t('planMonitor.modifying.automatic') }],
|
||||||
// defaultStopTimeList: [{ value: '', label: this.$t('planMonitor.modifying.default') }],
|
|
||||||
// defaultSpeedLevelList: [{ value: '', label: this.$t('planMonitor.modifying.default') }],
|
|
||||||
// serialNumberList: [],
|
|
||||||
reentryData: {},
|
reentryData: {},
|
||||||
defaultSpeedLevelList: [
|
defaultSpeedLevelList: [
|
||||||
{ value: 'l1', label: '等级一' },
|
{ value: 'l1', label: '等级一' },
|
||||||
@ -342,9 +335,6 @@ export default {
|
|||||||
'editModel.startTime': function () {
|
'editModel.startTime': function () {
|
||||||
this.computedDetailList();
|
this.computedDetailList();
|
||||||
},
|
},
|
||||||
// 'defaultStopTime': function () {
|
|
||||||
// this.computedDetailList('defaultStopTime');
|
|
||||||
// },
|
|
||||||
'defaultSpeedLevel': function () {
|
'defaultSpeedLevel': function () {
|
||||||
this.computedDetailList('defaultSpeedLevel');
|
this.computedDetailList('defaultSpeedLevel');
|
||||||
}
|
}
|
||||||
@ -364,8 +354,8 @@ export default {
|
|||||||
compuntedRunTime(list, index, runLevel) {
|
compuntedRunTime(list, index, runLevel) {
|
||||||
let runTime = 0;
|
let runTime = 0;
|
||||||
|
|
||||||
if ((index == 0 && String(this.frontModel.startTbFront) != 'undefined') ||
|
if ((index == 0 && String(this.editModel.startTbFront) != 'undefined') ||
|
||||||
(index == list.length-1 && String(this.frontModel.endTbFront) != 'undefined')) {
|
(index == list.length-1 && String(this.editModel.endTbFront) != 'undefined')) {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -385,9 +375,9 @@ export default {
|
|||||||
return runTime;
|
return runTime;
|
||||||
},
|
},
|
||||||
computedDetailList(type = null) {
|
computedDetailList(type = null) {
|
||||||
if (this.addModel.routingCode) {
|
if (this.editModel.routingCode) {
|
||||||
let tempTime = this.computedTimeByString(this.addModel.startTime) / 1000;
|
let tempTime = this.computedTimeByString(this.editModel.startTime) / 1000;
|
||||||
const list = Object.assign([], this.addModel.arriveConfigList);
|
const list = Object.assign([], this.editModel.arriveConfigList);
|
||||||
const runLevel = this.defaultSpeedLevel || 'l1'; // 默认等级三
|
const runLevel = this.defaultSpeedLevel || 'l1'; // 默认等级三
|
||||||
|
|
||||||
list.forEach((elem, index) => {
|
list.forEach((elem, index) => {
|
||||||
@ -413,10 +403,10 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
let fronTime = 0;
|
let fronTime = 0;
|
||||||
if (index == 0 && String(this.frontModel.startTbFront) == 'false') {
|
if (index == 0 && String(this.editModel.startTbFront) == 'false') {
|
||||||
const data = this.reentryData[elem.stationCode]||{};
|
const data = this.reentryData[elem.stationCode]||{};
|
||||||
fronTime = data.tbTo || 0;
|
fronTime = data.tbTo || 0;
|
||||||
} else if (index == list.length - 2 && String(this.frontModel.endTbFront) == 'false') {
|
} else if (index == list.length - 2 && String(this.editModel.endTbFront) == 'false') {
|
||||||
const data = this.reentryData[list[index+1].stationCode]||{};
|
const data = this.reentryData[list[index+1].stationCode]||{};
|
||||||
fronTime = data.tbTo || 0;
|
fronTime = data.tbTo || 0;
|
||||||
}
|
}
|
||||||
@ -424,7 +414,7 @@ export default {
|
|||||||
tempTime = tempTime + fronTime + elem.stopTime + elem.speedLevelTime;
|
tempTime = tempTime + fronTime + elem.stopTime + elem.speedLevelTime;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.addModel.endTime = formatTime(tempTime - list[list.length - 1].stopTime);
|
this.editModel.endTime = formatTime(tempTime - list[list.length - 1].stopTime);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
loadInitData(params) {
|
loadInitData(params) {
|
||||||
@ -463,7 +453,6 @@ export default {
|
|||||||
if (params.rowData && params.rowData.arriveConfigList.length > 0) {
|
if (params.rowData && params.rowData.arriveConfigList.length > 0) {
|
||||||
const paramData = params.rowData;
|
const paramData = params.rowData;
|
||||||
this.initRunlevel(paramData);
|
this.initRunlevel(paramData);
|
||||||
// const runLevelObj = this.defaultSpeedLevelList.find(speedLevel=>{ return speedLevel.label == ; });
|
|
||||||
this.editModel.arriveConfigList = paramData.arriveConfigList;
|
this.editModel.arriveConfigList = paramData.arriveConfigList;
|
||||||
this.editModel.routingCode = paramData.routingCode;
|
this.editModel.routingCode = paramData.routingCode;
|
||||||
this.editModel.startStationCode = paramData.startStationCode;
|
this.editModel.startStationCode = paramData.startStationCode;
|
||||||
@ -473,6 +462,8 @@ export default {
|
|||||||
this.editModel.endSectionCode = paramData.endSectionCode;
|
this.editModel.endSectionCode = paramData.endSectionCode;
|
||||||
this.editModel.startSectionCode = paramData.startSectionCode;
|
this.editModel.startSectionCode = paramData.startSectionCode;
|
||||||
this.editModel.id = paramData.id;
|
this.editModel.id = paramData.id;
|
||||||
|
this.editModel.startTbFront = paramData.startTbFront;
|
||||||
|
this.editModel.endTbFront = paramData.endTbFront;
|
||||||
this.routingList = [];
|
this.routingList = [];
|
||||||
this.routingList.push({
|
this.routingList.push({
|
||||||
code:paramData.routingCode,
|
code:paramData.routingCode,
|
||||||
@ -498,17 +489,19 @@ export default {
|
|||||||
startStationCode:resp.data.startStationCode,
|
startStationCode:resp.data.startStationCode,
|
||||||
endStationCode:resp.data.endStationCode,
|
endStationCode:resp.data.endStationCode,
|
||||||
endSectionCode:resp.data.endSectionCode,
|
endSectionCode:resp.data.endSectionCode,
|
||||||
startTbFront: resp.data.startTbFront,
|
|
||||||
endTbFront: resp.data.endTbFront,
|
|
||||||
startSectionCode:resp.data.startSectionCode
|
startSectionCode:resp.data.startSectionCode
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.editModel = {
|
this.editModel = {
|
||||||
tripNumber: this.tripNumber,
|
tripNumber: this.tripNumber,
|
||||||
startTime: formatTime(trainInfo.stationTimeList[1].secondTime + 7200),
|
startTime: formatTime(trainInfo.stationTimeList[1].secondTime + 7200),
|
||||||
endTime: formatTime(trainInfo.stationTimeList[lastIndex].secondTime + 7200),
|
endTime: formatTime(trainInfo.stationTimeList[lastIndex].secondTime + 7200),
|
||||||
routingCode : resp.data.code,
|
routingCode : resp.data.code,
|
||||||
arriveConfigList: []
|
arriveConfigList: [],
|
||||||
|
startTbFront: resp.data.startTbFront,
|
||||||
|
endTbFront: resp.data.endTbFront
|
||||||
};
|
};
|
||||||
|
|
||||||
const newstationTimeList = [];
|
const newstationTimeList = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user