1.宁波3号线 操作修正

2.运行图编辑修改数据计算错误的问题
This commit is contained in:
ival 2021-03-09 14:57:14 +08:00
parent 5352671383
commit 605280e7d5
13 changed files with 634 additions and 474 deletions

View File

@ -6,49 +6,58 @@
<train-distribution ref="trainDistribution" />
<stand-control ref="standControl" />
<stand-detain ref="standDetain" />
<interval-stop-number ref="intervalStopNumber" />
<stand-detail ref="standDetail" />
<interval-stop-number ref="intervalStopNumber" />
<allocate-time ref="allocateTime" />
<station-transfer ref="stationTransfer" />
<station-request ref="stationRequest" />
<station-devolution ref="stationDevolution" />
<station-reclaim ref="stationReclaim" />
<stand-detail ref="standDetail" />
<switch-command ref="switchCommand" />
<switch-block-init ref="switchBlockInit" :initCodeListMap="initCodeListMap" :initSelect="initSelect" @initSelect="onChangeInitSelect"/>
<switch-block-sure ref="switchBlockSure" :initCodeListMap="initCodeListMap" :initSelect="initSelect" />
<switch-active ref="switchActive" />
<switch-active ref="switchActive" />
<switch-detail ref="switchDetail" />
<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"/>
<route-command ref="routeCommand" />
<section-open ref="sectionOpen" />
<section-limit-speed ref="sectionLimitSpeed" />
<signal-model ref="signalModel" />
<signal-detail ref="signalDetail" />
<section-show ref="sectionShow" />
<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" />
<adjust-strategy ref="adjustStrategy" />
<train-depart ref="trainDepart" />
<train-jump-stop ref="trainJumpStop" />
<train-cancel-deviation ref="trainCancelDeviation" />
<train-update-deviation ref="trainUpdateDeviation" />
<cancel-route ref="cancelRoute" />
<train-id-associated ref="trainIdAssociated" />
<occupancy-train-correlation ref="occupancyTrainCorrelation" />
<modify-train-number ref="modifyTrainNumber" />
<train-run-type ref="trainRunType" />
<train-detail ref="trainDetail" />
<all-train-detail ref="allTrainDetail" />
<cancel-route ref="cancelRoute" />
<route-detail ref="routeDetail" />
<init-section-open ref="initSectionOpen" />
<init-section-limit-speed ref="initSectionLimitSpeed" />
<route-command ref="routeCommand" />
<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>
</template>
<script>
@ -67,26 +76,13 @@ import StationRequest from './menuDialog/stationRequest';
import StationDevolution from './menuDialog/stationDevolution';
import StationReclaim from './menuDialog/stationReclaim';
import SwitchCommand from './menuDialog/switchCommand';
import SwitchBlockInit from './menuDialog/switchBlock';
import SwitchBlockSure from './menuDialog/switchBlock';
import RouteCommand from './menuDialog/routeCommand';
import SwitchActive from './menuDialog/switchActive';
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 SectionLock from './menuDialog/sectionLock';
import SignalModel from './menuDialog/signalModel';
import InitSignalBlock from './menuDialog/initSignalBlock';
import SignalBlock from './menuDialog/signalBlock';
import SignalDetail from './menuDialog/signalDetail';
import InitSignalMode from './menuDialog/initSignalMode';
import SignalMode from './menuDialog/signalMode';
import RunningInterval from './menuDialog/runningInterval';
import AdjustStrategy from './menuDialog/adjustStrategy';
import TrainDepart from './menuDialog/trainDepart';
@ -101,13 +97,25 @@ import TrainRunType from './menuDialog/trainRunType';
import TrainDetail from './menuDialog/trainDetail';
import AllTrainDetail from './menuDialog/allTrainDetail';
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 {
name: 'MenuBarNingbo3',
components: {
MenuBar,
// NoticeInfo,
ArrangeRoute,
TrainDistribution,
StandControl,
@ -130,15 +138,17 @@ export default {
SignalCanBlockSure,
RouteCommand,
SignalModel,
InitSignalBlock,
SignalBlock,
SignalBlockInit,
SignalBlockSure,
SignalDetail,
SectionOpen,
SectionLimitSpeed,
SectionOpenInit,
SectionOpenSure,
SectionLimitSpeedInit,
SectionLimitSpeedSure,
SectionShow,
SectionLock,
InitSignalMode,
SignalMode,
SignalModeInit,
SignalModeSure,
RunningInterval,
AdjustStrategy,
TrainDepart,
@ -152,9 +162,7 @@ export default {
TrainRunType,
TrainDetail,
AllTrainDetail,
RouteDetail,
InitSectionOpen,
InitSectionLimitSpeed
RouteDetail
},
data() {
return {
@ -565,12 +573,13 @@ export default {
children: [
{
title: '初始化',
operate: OperationEvent.Command.commandNingBo3.line_section_open
operate: OperationEvent.Command.commandNingBo3.line_section_open,
click: e => this.setOpenSection(e, false)
},
{
title: '确定/取消',
operate: OperationEvent.Command.commandNingBo3.line_section_open,
click: this.handleOpenSection
click: e => this.setOpenSection(e, true)
}
]
},
@ -580,12 +589,13 @@ export default {
children: [
{
title: '初始化',
operate: OperationEvent.Command.commandNingBo3.line_section_close
operate: OperationEvent.Command.commandNingBo3.line_section_close,
click: e => this.setCloseSection(e, false)
},
{
title: '确定/取消',
operate: OperationEvent.Command.commandNingBo3.line_section_close,
click: this.handleCloseSection
click: e => this.setCloseSection(e, true)
}
]
},
@ -599,12 +609,13 @@ export default {
children: [
{
title: '初始化',
operate: OperationEvent.Command.commandNingBo3.line_section_limitSpeed
operate: OperationEvent.Command.commandNingBo3.line_section_limitSpeed,
click: e => this.setLimitSpeed(e, false)
},
{
title: '确定/取消',
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
}
]
// click: this.handleLock
// click: this.undeveloped
},
{
title: '取消过岔锁闭',
@ -664,8 +673,6 @@ export default {
operate: OperationEvent.Command.commandNingBo3.line_section_limitSpeed
}
]
// click: this.handleUnLock
// click: this.undeveloped
},
{
title: '远程预复位使能',
@ -680,8 +687,6 @@ export default {
operate: OperationEvent.Command.commandNingBo3.line_section_limitSpeed
}
]
// click: this.handleRestoration
// click: this.undeveloped
},
{
title: '复位',
@ -764,8 +769,6 @@ export default {
{
title: '后备',
operate:'',
// click: this.setReserveMode
// click: this.undeveloped
children: [
{
title: '初始化',
@ -1199,7 +1202,7 @@ export default {
{
title: '确定/取消',
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: [
{
title: '初始化',
operate: OperationEvent.Command.commandNingBo3.line_section_open
operate: OperationEvent.Command.commandNingBo3.line_section_open,
click: e => this.setOpenSection(e, false)
},
{
title: '确定/取消',
operate: OperationEvent.Command.commandNingBo3.line_section_open,
click: this.handleOpenSection
click: e => this.setOpenSection(e, true)
}
]
},
@ -1378,12 +1382,13 @@ export default {
children: [
{
title: '初始化',
operate: OperationEvent.Command.commandNingBo3.line_section_close
operate: OperationEvent.Command.commandNingBo3.line_section_close,
click: e => this.setCloseSection(e, false)
},
{
title: '确定/取消',
operate: OperationEvent.Command.commandNingBo3.line_section_close,
click: this.handleCloseSection
click: e => this.setCloseSection(e, true)
}
]
},
@ -1397,12 +1402,13 @@ export default {
children: [
{
title: '初始化',
operate: OperationEvent.Command.commandNingBo3.line_section_limitSpeed
operate: OperationEvent.Command.commandNingBo3.line_section_limitSpeed,
click: e => this.setLimitSpeed(e, false)
},
{
title: '确定/取消',
operate: OperationEvent.Command.commandNingBo3.line_section_limitSpeed,
click: this.handleLimitSpeed
click: e => this.setLimitSpeed(e, true)
}
]
},
@ -2115,9 +2121,19 @@ export default {
}
});
},
//
setInitialSignalGuide(item) {
this.setSignalGuideCommand(item, true);
//
setRouteCommand(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.routeCommand.doShow();
}
});
},
//
setSignalGuide(item, sure=false) {
@ -2143,12 +2159,11 @@ export default {
if (valid) {
this.$refs.menuBar.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
this.$refs[sure? 'signalCanBlockInit': 'signalCanBlockSure'].doShow(operate, sure);
this.$refs[sure? 'signalCanBlockSure': 'signalCanBlockInit'].doShow(operate, sure);
}
});
},
//
setRouteCommand(item) {
setOpenSection(item, sure=false) {
const operate = {
type: 'bar',
operation: item.operation
@ -2157,11 +2172,11 @@ export default {
if (valid) {
this.$refs.menuBar.closeMenu(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 = {
type: 'bar',
operation: item.operation
@ -2170,11 +2185,11 @@ export default {
if (valid) {
this.$refs.menuBar.closeMenu(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 = {
type: 'bar',
operation: item.operation
@ -2183,20 +2198,7 @@ export default {
if (valid) {
this.$refs.menuBar.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
this.$refs.initSectionOpen.doShow(operate);
}
});
},
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();
this.$refs[sure ? 'sectionLimitSpeedSure': 'sectionLimitSpeedInit'].doShow(operate, sure);
}
});
},
@ -2291,7 +2293,7 @@ export default {
}
});
},
setSignalBlock(item) {
setSignalBlock(item, sure=false) {
const operate = {
type: 'bar',
operation: item.operation
@ -2300,11 +2302,11 @@ export default {
if (valid) {
this.$refs.menuBar.closeMenu(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 = {
type: 'bar',
operation: item.operation
@ -2313,7 +2315,7 @@ export default {
if (valid) {
this.$refs.menuBar.closeMenu(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 = {
type: 'bar',
operation: item.operation
@ -2352,7 +2354,7 @@ export default {
if (valid) {
this.$refs.menuBar.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
this.$refs.initSignalMode.doShow(operate);
this.$refs[sure? 'signalModeSure': 'signalModeInit'].doShow(operate, sure);
}
});
},

View File

@ -1,8 +1,8 @@
<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-row>
<el-col :span="18">
<el-table ref="singleTable1" :data="tempData" highlight-current-row height="300px" @current-change="selectLine1">
<el-col :span="sure? 18: 21">
<el-table ref="singleTable1" :data="tempList" highlight-current-row height="300px" @current-change="selectLine1">
<el-table-column prop="name" label="轨道" />
<el-table-column prop="blockStatus" width="120" label="MAU">
<template slot-scope="scope">
@ -33,7 +33,7 @@
<el-table-column prop="name" label="速度" />
</el-table>
</el-col>
<el-col :span="3">
<el-col :span="3" v-if="sure">
<fieldset style="padding-left: 10px;">
<legend class="card_title">命令</legend>
<el-radio-group v-model="command">
@ -45,10 +45,10 @@
</el-row>
<el-row justify="center" class="button-group">
<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 :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 :span="4" :offset="2">
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
@ -69,20 +69,34 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'SwitchActive',
props: {
initCodeListMap: {
type: Object,
default() {
return {}
}
},
initSelect: {
type: Object,
default() {
return null
}
}
},
components: {
NoticeInfo
},
data() {
return {
title: '',
status: false,
standStatus: true,
allChecked: false,
dialogShow: false,
loading: false,
active: false,
command: false,
command: true,
activeName: 'first',
tempData: [],
operate: null,
speedLimitValue: 0,
limitList: [
@ -102,7 +116,10 @@ export default {
{ name: '70', value: 70 },
{ name: '75', value: 75 },
{ name: '80', value: 80 }
]
],
sure: false,
disabled: false,
currentSelect: null
};
},
computed: {
@ -112,9 +129,12 @@ export default {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
selected() {
return this.$store.state.menuOperation.selected;
},
tempList() {
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() {
return this.dialogShow ? OperationEvent.Command.common.confirm1.domId : '';
},
@ -123,9 +143,6 @@ export default {
},
domIdClose() {
return this.dialogShow ? OperationEvent.Command.common.close1.domId : '';
},
title() {
return '确认/取消设置临时限速区域';
}
},
watch: {
@ -136,35 +153,87 @@ export default {
}
},
methods: {
doShow(operate, selected, value) {
this.tempData = [];
this.sectionList.forEach(item => {
if (item.type === '01' || item.type === '04') {
this.tempData.push(item);
}
});
this.command = true;
this.$store.dispatch('menuOperation/setSelected', {device: selected});
//
this.operate = operate;
this.speedLimitValue = value;
doShow(operate, sure, value=0) {
this.operate = operate;
this.sure = sure;
this.title = `${sure ? '确认/取消设置临时限速区域' : '初始化设置临时限速区域'}`;
this.speedLimitValue = value;
this.dialogShow = true;
this.$nextTick(function () {
this.$refs.singleTable1.setCurrentRow(selected);
this.$refs.singleTable2.setCurrentRow(this.limitList[value / 5 - 1]);
this.$refs.singleTable1.setCurrentRow(sure? this.initSelect: null);
this.$refs.singleTable2.setCurrentRow(this.limitList[value / 5 - 1]);
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.sure && this.$refs.singleTable1.setCurrentRow();
this.sure && this.$refs.singleTable2.setCurrentRow();
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) {
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) {
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) {
const stationElm = this.$store.getters['map/getDeviceByCode'](val.stationCode);
@ -179,28 +248,16 @@ export default {
return sectionEle.speedUpLimit > 0 ? sectionEle.speedUpLimit : 0;
},
getProcess(code) {
if (this.selected && this.selected.code === code) {
return '等待确认/取消';
} else {
return '';
}
},
commit(isClose = true) {
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,
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();
});
const codeList = this.initCodeListMap[this.cmdType.value]||[];
if (codeList.includes(code)) {
const sectionEle = this.$store.getters['map/getDeviceByCode'](code);
if (this.sure) {
return sectionEle.__done == 'two' ? '确认设置限速完成' : '等待确认/取消';
} else {
return sectionEle.__done == 'one' ? '已初始化' : ''
}
}
return '';
},
cancel() {
const operate = {

View File

@ -1,8 +1,8 @@
<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-row>
<el-col :span="18">
<el-table :id="domIdChoose" ref="sectionable" :data="tempData" highlight-current-row height="300px" @current-change="handleChangeLine">
<el-col :span="sure? 18: 24">
<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="blockStatus" label="MAU">
<template slot-scope="scope">
@ -21,7 +21,7 @@
</el-table-column>
</el-table>
</el-col>
<el-col :span="5" :offset="1">
<el-col :span="5" :offset="1" v-if="sure">
<fieldset>
<legend class="card_title">命令</legend>
<el-radio-group v-model="command">
@ -33,10 +33,10 @@
</el-row>
<el-row justify="center" class="button-group">
<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 :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 :span="4" :offset="2">
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
@ -60,8 +60,23 @@ export default {
components: {
NoticeInfo
},
props: {
initCodeListMap: {
type: Object,
default() {
return {}
}
},
initSelect: {
type: Object,
default() {
return null
}
}
},
data() {
return {
title: '',
status: false,
standStatus: true,
allChecked: false,
@ -69,10 +84,12 @@ export default {
loading: false,
active: false,
activeName: 'first',
tempData: [],
radio: '1',
operate: null,
command: true
command: true,
sure: false,
disabled: true,
currentSelect: null
};
},
computed: {
@ -80,14 +97,17 @@ export default {
'sectionList'
]),
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() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
selected() {
return this.$store.state.menuOperation.selected;
},
tempList() {
return this.sectionList.filter(el => ['01', '04'].includes(el.type) )
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Command.common.choose1.domId : '';
},
@ -99,9 +119,6 @@ export default {
},
domIdClose() {
return this.dialogShow ? OperationEvent.Command.common.close1.domId : '';
},
title() {
return this.isBlock ? '确认/取消关闭轨道' : '确认/取消开放轨道';
}
},
watch: {
@ -112,48 +129,88 @@ export default {
}
},
methods: {
doShow(operate) {
this.tempData = [];
this.sectionList.forEach(item => {
if (item.type === '01' || item.type === '04') {
this.tempData.push(item);
}
});
this.operate = operate;
doShow(operate, sure) {
this.operate = operate;
this.sure = sure;
if (sure) {
this.title = `${this.isBlock ? '确认/取消关闭轨道' : '确认/取消开放轨道'}`;
} else {
this.title = `${this.isBlock ? '初始化关闭轨道': '初始化开放轨道'}`;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$refs.sectionable.setCurrentRow(this.selected);
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');
},
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; }
const step = {
code: val.code,
operation: OperationEvent.Command.common.choose1.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.$store.dispatch('menuOperation/setSelected', {device: val});
this.$refs.sectionable.setCurrentRow(this.selected);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.disabled = this.isBlock? this.currentSelect.blockade: !this.currentSelect.blockade;
this.sure || this.$emit('initSelect', this.currentSelect);
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
getProcess(code) {
if (this.selected && this.selected.code === code) {
return '等待确认/取消';
} else {
return '';
}
getProcess(code) {
const codeList = this.initCodeListMap[this.cmdType.value]||[];
if (codeList.includes(code)) {
const sectionEle = this.$store.getters['map/getDeviceByCode'](code);
if (this.sure) {
return sectionEle.__done == 'two' ? this.needBlock ? '确认关闭轨道完成' : '确认开放轨道完成' : '等待确认/取消';
} else {
return sectionEle.__done == 'one' ? '已初始化' : ''
}
}
return '';
},
getStationName(val) {
const stationElm = this.$store.getters['map/getDeviceByCode'](val.stationCode);
@ -163,27 +220,6 @@ export default {
const sectionElm = this.$store.getters['map/getDeviceByCode'](code);
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() {
const operate = {
operation: OperationEvent.Command.common.close1.operation

View File

@ -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-row>
<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="blockStatus" width="120" label="MAU">
<template slot-scope="scope">
@ -40,7 +40,7 @@
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="true">打印(P)</el-button>
</el-col>
<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 :span="4" :offset="2">
<el-button :disabled="true">帮助(H)</el-button>
@ -71,7 +71,6 @@ export default {
active: false,
selectShow: false,
activeName: 'first',
tempData: [],
radio: '1'
};
},
@ -82,9 +81,9 @@ export default {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
selected() {
return this.$store.state.menuOperation.selected;
},
tempList() {
return this.sectionList.filter(el => ['01', '04'].includes(el.type) )
},
domIdClose() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
@ -107,13 +106,7 @@ export default {
},
methods: {
doShow(operate) {
this.tempData = [];
this.sectionList.forEach(item => {
if (item.type === '01' || item.type === '04') {
this.tempData.push(item);
}
});
//
this.operate = operate;
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');

View File

@ -1,10 +1,10 @@
<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-row>
<el-col :span="18">
<el-col :span="sure? 18: 24">
<el-table
ref="table"
:data="signalList"
:data="tempList"
highlight-current-row
height="350px"
@current-change="handleCurrentChange"
@ -27,7 +27,7 @@
</el-table-column>
</el-table>
</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-box">
<el-radio v-model="command" :label="true">确认</el-radio>
@ -38,10 +38,10 @@
</el-row>
<el-row justify="center" class="button-group">
<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 :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 :span="4" :offset="2">
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
@ -62,18 +62,35 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'SignalBlock',
props: {
initCodeListMap: {
type: Object,
default() {
return {}
}
},
initSelect: {
type: Object,
default() {
return null
}
}
},
components: {
NoticeInfo
},
data() {
return {
title: '',
status: false,
command: true,
allChecked: false,
dialogShow: false,
loading: false,
operate: {},
title: ''
sure: false,
disabled: true,
currentSelect: null
};
},
computed: {
@ -86,9 +103,12 @@ export default {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
selected() {
return this.$store.state.menuOperation.selected;
},
tempList() {
return this.signalList;
},
cmdType() {
return this.needBlock ? CMD.Signal.CMD_SIGNAL_BLOCK : CMD.Signal.CMD_SIGNAL_UNBLOCK
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.common.confirm1.domId : '';
},
@ -107,59 +127,95 @@ export default {
}
},
methods: {
doShow(operate) {
this.operate = operate;
//
this.title = this.needBlock ? '确认/取消信号机封锁' : '确认/取消信号机解除封锁';
doShow(operate, sure) {
this.operate = operate;
this.sure = sure;
if (sure) {
this.title = `${this.needBlock ? '确认/取消信号机封锁' : '确认/取消信号机解除封锁'}`;
} else {
this.title = `${this.needBlock ? '初始化信号机封锁': '初始化信号机解除封锁'}`;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$refs.table.setCurrentRow(this.selected);
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');
},
commit(isClose = false) {
if (this.command) {
const operate = {
cmdType: this.needBlock ? CMD.Signal.CMD_SIGNAL_BLOCK : CMD.Signal.CMD_SIGNAL_UNBLOCK,
operation: isClose ? OperationEvent.Command.common.confirm1.operation : OperationEvent.Command.common.apply1.operation,
over: true,
param: {signalCode: 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.doClose();
this.$refs.noticeInfo.doShow();
});
} else {
this.cancel();
}
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: {signalCode: this.currentSelect.code}
};
const signalEle = 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, signalEle.code);
this.$store.dispatch('map/flushMapRef');
isClose && this.doClose();
signalEle.__done = this.sure? 'two': 'one';
}
}).catch(() => {
isClose && this.doClose();
this.$refs.noticeInfo.doShow();
});
}
} else {
this.$messageBox('两次选择不一致');
}
},
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) {
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
if (signalEle.blockade) {
return '锁闭的';
} else {
return '未设锁闭';
}
return signalEle.blockade? '锁闭的': '未设锁闭';
},
getProcess(code, type) {
if (this.selected.code === code && ((type === 'lock' && this.needBlock) || (type === 'unlock' && !this.needBlock))) {
return '等待确认/取消';
} else {
return '';
}
const blockType = this.needBlock ? 'lock': 'unlock';
const codeList = this.initCodeListMap[this.cmdType.value]||[];
if (blockType==type) {
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() {
const operate = {

View File

@ -4,7 +4,7 @@
<el-col :span="sure? 18: 24">
<el-table
ref="table"
:data="signalList"
:data="tempList"
highlight-current-row
height="300px"
@current-change="handleCurrentChange"
@ -33,10 +33,10 @@
</el-row>
<el-row justify="center" class="button-group">
<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 :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 :span="4" :offset="2">
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
@ -57,6 +57,20 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'SignalCanBlock',
props: {
initCodeListMap: {
type: Object,
default() {
return {}
}
},
initSelect: {
type: Object,
default() {
return null
}
}
},
components: {
NoticeInfo
},
@ -82,6 +96,9 @@ export default {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
tempList() {
return this.signalList;
},
cmdType() {
return this.needBlock ? CMD.Signal.CMD_SIGNAL_BLOCK : CMD.Signal.CMD_SIGNAL_UNBLOCK
},
@ -116,8 +133,7 @@ export default {
doClose() {
this.loading = false;
this.dialogShow = false;
this.$refs.table.setCurrentRow();
this.$store.dispatch('menuOperation/setSelected', {device: {}});
this.sure && this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
commit(isClose = false) {
@ -134,9 +150,11 @@ export default {
const signalEle = 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, this.currentSelect.code);
this.$store.dispatch('map/flushMapRef');
isClose && this.doClose();
signalEle.__done = this.sure? 'two': 'one';
this.sure || this.$root.$emit('initCodes', this.cmdType.value, signalEle.code);
}
}).catch(() => {
isClose && this.doClose();
@ -154,13 +172,12 @@ export default {
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.currentSelect.blockade;
this.sure || this.$emit('initSelect', this.currentSelect);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(_ => {
this.$refs.noticeInfo.doShow();
@ -168,22 +185,19 @@ export default {
},
getSignalBlock(code) {
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
if (signalEle.blockade) {
return '关闭';
} else {
return '开启';
}
return signalEle.blockade? '关闭': '开启';
},
getProcess(code) {
const codeList = this.initCodeListMap[this.cmdType.value]||[];
if (codeList.includes(code)) {
const switchEle = this.$store.getters['map/getDeviceByCode'](code);
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
if (this.sure) {
return switchEle.__done == 'two' ? '确认允许锁闭完成' : '等待确认/取消';
return signalEle.__done == 'two' ? '确认允许锁闭完成' : '等待确认/取消';
} else {
return switchEle.__done == 'one' ? '已初始化' : ''
return signalEle.__done == 'one' ? '已初始化' : ''
}
}
return '';
},
cancel() {
const operate = {

View File

@ -4,7 +4,7 @@
<el-col :span="sure? 18: 24">
<el-table
ref="table"
:data="signalList"
:data="tempList"
highlight-current-row
height="300px"
@current-change="handleCurrentChange"
@ -38,10 +38,10 @@
</el-row>
<el-row justify="center" class="button-group">
<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 :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 :span="4" :offset="2">
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
@ -100,6 +100,9 @@ export default {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
tempList() {
return this.signalList;
},
cmdType() {
return this.command
? CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
@ -139,8 +142,7 @@ export default {
doClose() {
this.loading = false;
this.dialogShow = false;
this.$refs.table.setCurrentRow();
this.$store.dispatch('menuOperation/setSelected', {device: {}});
this.sure && this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
commit(isClose = false) {
@ -159,9 +161,11 @@ export default {
const signalEle = 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, signalEle.code);
this.$store.dispatch('map/flushMapRef');
isClose && this.doClose();
signalEle.__done = this.sure? 'two': 'one';
this.sure || this.$root.$emit('initCodes', this.cmdType.value, signalEle.code);
}
}).catch(() => {
isClose && this.doClose();
@ -179,13 +183,12 @@ export default {
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.currentSelect.callOn;
this.sure || this.$emit('initSelect', this.currentSelect);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(_ => {
this.$refs.noticeInfo.doShow();
@ -201,28 +204,25 @@ export default {
return '黄';
} else if (signalEle.redOpen && signalEle.yellowOpen && !signalEle.greenOpen) {
return '引导';
} else {
return '';
}
return '';
},
getCanGuide(code) {
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
if (signalEle.callOn) {
return '是';
} else {
return '否';
}
return signalEle.callOn ? '是': '否';
},
getProcess(code) {
const codeList = this.initCodeListMap[this.cmdType.value]||[];
if (codeList.includes(code)) {
const switchEle = this.$store.getters['map/getDeviceByCode'](code);
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
if (this.sure) {
return switchEle.__done == 'two' ? '确认引导完成' : '等待确认/取消';
return signalEle.__done == 'two' ? '确认引导完成' : '等待确认/取消';
} else {
return switchEle.__done == 'one' ? '已初始化' : ''
return signalEle.__done == 'one' ? '已初始化' : ''
}
}
return '';
},
cancel() {
const operate = {

View File

@ -1,10 +1,10 @@
<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-row>
<el-col :span="18">
<el-col :span="sure? 18: 24">
<el-table
ref="table"
:data="signalList"
:data="tempList"
height="300px"
highlight-current-row
:dom-id-choose="domIdChoose"
@ -18,7 +18,7 @@
<el-table-column v-if="!isCbtc" prop="status" label="后备模式进程" />
</el-table>
</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-box">
<el-radio v-model="command" :label="true">确认</el-radio>
@ -29,10 +29,10 @@
</el-row>
<el-row justify="center" class="button-group">
<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 :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 :span="4" :offset="2">
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
@ -48,23 +48,41 @@
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
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 { mapGetters } from 'vuex';
export default {
name: 'SignalBlock',
props: {
initCodeListMap: {
type: Object,
default() {
return {}
}
},
initSelect: {
type: Object,
default() {
return null
}
}
},
components: {
NoticeInfo
},
data() {
return {
title: '',
status: false,
command: true,
allChecked: false,
dialogShow: false,
loading: false,
operate: {}
disabled:false,
operate: {},
sure: false,
disabled: true,
currentSelect: null
};
},
computed: {
@ -74,12 +92,15 @@ export default {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
selected() {
return this.$store.state.menuOperation.selected;
},
tempList() {
return this.signalList;
},
isCbtc() {
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() {
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
},
@ -104,7 +125,29 @@ export default {
}
},
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; }
const step = {
code: val.code,
@ -115,33 +158,18 @@ export default {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/setSelected', {device: val});
this.$refs.table.setCurrentRow(this.selected);
this.$refs.table.setCurrentRow(this.currentSelect);
}
}).catch(() => {
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) {
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,
over: true,
param: { signalCode: this.selected.code }
over: this.sure,
param: { signalCode: this.currentSelect.code }
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {

View File

@ -5,7 +5,7 @@
<el-table
:id="domIdChoose"
ref="table"
:data="switchList"
:data="tempList"
highlight-current-row
height="350px"
@current-change="handleCurrentChange"
@ -81,6 +81,7 @@ export default {
},
data() {
return {
title: '',
status: false,
standStatus: true,
allChecked: false,
@ -90,8 +91,7 @@ export default {
sure: false,
disabled: true,
operate: {},
currentSelect: null,
title: ''
currentSelect: null
};
},
computed: {
@ -101,6 +101,9 @@ export default {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
tempList() {
return this.switchList;
},
isBlock() {
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) {
if (this.command) {
const operate = {
cmdType: this.sure
? this.cmdType
: null,
cmdType: this.sure ? this.cmdType : null,
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
over: this.sure,
param: { switchCode: this.currentSelect.code }
@ -167,9 +168,11 @@ export default {
const switchEle = 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, switchEle.code);
this.$store.dispatch('map/flushMapRef');
isClose && this.doClose();
switchEle.__done = this.sure? 'two': 'one';
this.sure || this.$root.$emit('initCodes', this.cmdType.value, switchEle.code);
}
}).catch(e => {
isClose && this.doClose();
@ -192,9 +195,9 @@ export default {
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.isBlock? this.currentSelect.blockade: !this.currentSelect.blockade;
this.sure || this.$emit('initSelect', this.currentSelect);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
@ -202,11 +205,7 @@ export default {
},
getSwitchStatus(code) {
const switchEle = this.$store.getters['map/getDeviceByCode'](code);
if (switchEle.blockade) {
return '锁闭的';
} else {
return '未锁闭的';
}
return switchEle.blockade? '锁闭的': '未锁闭的';
},
getProcess(code, type) {
const blockType = this.isBlock ? 'block': 'unblock';
@ -219,8 +218,6 @@ export default {
} else {
return switchEle.__done == 'one' ? '已初始化' : ''
}
} else {
return ''
}
}
return '';

View File

@ -204,23 +204,19 @@ export default {
defaultSpeedLevel: 'l1',
reentryData: {},
addModel: {
// forward: false,
routingCode: '',
endStationCode: '',
startStationCode: '',
startTime: '00:00:00',
startTime: '02:00:00',
endTime: '',
arriveConfigList: [],
tripNumber: '',
planId: '',
serviceNumber: ''
},
frontModel: {
startTbFront: false,
serviceNumber: '',
startTbFront: false,
endTbFront: false
},
tripNumberList: [{ value: '', label: this.$t('planMonitor.automatic') }],
// defaultStopTimeList: [{ value: '30', label: this.$t('planMonitor.default') }, { value: '0', label: '0' }],
defaultSpeedLevelList: [
{ value: 'l1', label: '等级一' },
{ value: 'l2', label: '等级二' },
@ -328,8 +324,8 @@ export default {
compuntedRunTime(list, index, runLevel) {
let runTime = 0;
if ((index == 0 && String(this.frontModel.startTbFront) != 'undefined') ||
(index == list.length-1 && String(this.frontModel.endTbFront) != 'undefined')) {
if ((index == 0 && String(this.addModel.startTbFront) != 'undefined') ||
(index == list.length-1 && String(this.addModel.endTbFront) != 'undefined')) {
return 0
}
@ -376,10 +372,10 @@ export default {
elem.speedLevel = runLevelObj.label;
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]||{};
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]||{};
fronTime = data.tbTo || 0;
}
@ -401,8 +397,8 @@ export default {
this.addModel.endSectionCode = row.endSectionCode;
this.addModel.startSectionCode = row.startSectionCode;
this.addModel.routingCode = row.code;
this.frontModel.startTbFront = row.startTbFront;
this.frontModel.endTbFront = row.endTbFront;
this.addModel.startTbFront = row.startTbFront;
this.addModel.endTbFront = row.endTbFront;
this.computedDetailList('routingCode');
},
handleCommit() {

View File

@ -292,26 +292,19 @@ export default {
serviceNumber: '',
planId: '',
editModel: {
routingCode: '',
routingCode: '',
endStationCode: '',
startStationCode: '',
startTime: '00:00:00',
startTime: '02:00:00',
endTime: '',
arriveConfigList: []
// serialNumber: '',
// trainManual: false,
// serialManual: false,
// clearGuest: false,
// continuationPlan: false,
// firstTrain: false,
// lastTrain: false,
// inStock: false,
// outStock: false
arriveConfigList: [],
tripNumber: '',
planId: '',
serviceNumber: '',
startTbFront: false,
endTbFront: false
},
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: {},
defaultSpeedLevelList: [
{ value: 'l1', label: '等级一' },
@ -342,9 +335,6 @@ export default {
'editModel.startTime': function () {
this.computedDetailList();
},
// 'defaultStopTime': function () {
// this.computedDetailList('defaultStopTime');
// },
'defaultSpeedLevel': function () {
this.computedDetailList('defaultSpeedLevel');
}
@ -364,8 +354,8 @@ export default {
compuntedRunTime(list, index, runLevel) {
let runTime = 0;
if ((index == 0 && String(this.frontModel.startTbFront) != 'undefined') ||
(index == list.length-1 && String(this.frontModel.endTbFront) != 'undefined')) {
if ((index == 0 && String(this.editModel.startTbFront) != 'undefined') ||
(index == list.length-1 && String(this.editModel.endTbFront) != 'undefined')) {
return 0
}
@ -385,9 +375,9 @@ export default {
return runTime;
},
computedDetailList(type = null) {
if (this.addModel.routingCode) {
let tempTime = this.computedTimeByString(this.addModel.startTime) / 1000;
const list = Object.assign([], this.addModel.arriveConfigList);
if (this.editModel.routingCode) {
let tempTime = this.computedTimeByString(this.editModel.startTime) / 1000;
const list = Object.assign([], this.editModel.arriveConfigList);
const runLevel = this.defaultSpeedLevel || 'l1'; //
list.forEach((elem, index) => {
@ -413,10 +403,10 @@ export default {
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]||{};
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]||{};
fronTime = data.tbTo || 0;
}
@ -424,7 +414,7 @@ export default {
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) {
@ -463,7 +453,6 @@ export default {
if (params.rowData && params.rowData.arriveConfigList.length > 0) {
const paramData = params.rowData;
this.initRunlevel(paramData);
// const runLevelObj = this.defaultSpeedLevelList.find(speedLevel=>{ return speedLevel.label == ; });
this.editModel.arriveConfigList = paramData.arriveConfigList;
this.editModel.routingCode = paramData.routingCode;
this.editModel.startStationCode = paramData.startStationCode;
@ -473,6 +462,8 @@ export default {
this.editModel.endSectionCode = paramData.endSectionCode;
this.editModel.startSectionCode = paramData.startSectionCode;
this.editModel.id = paramData.id;
this.editModel.startTbFront = paramData.startTbFront;
this.editModel.endTbFront = paramData.endTbFront;
this.routingList = [];
this.routingList.push({
code:paramData.routingCode,
@ -498,17 +489,19 @@ export default {
startStationCode:resp.data.startStationCode,
endStationCode:resp.data.endStationCode,
endSectionCode:resp.data.endSectionCode,
startTbFront: resp.data.startTbFront,
endTbFront: resp.data.endTbFront,
startSectionCode:resp.data.startSectionCode
});
this.editModel = {
tripNumber: this.tripNumber,
startTime: formatTime(trainInfo.stationTimeList[1].secondTime + 7200),
endTime: formatTime(trainInfo.stationTimeList[lastIndex].secondTime + 7200),
routingCode : resp.data.code,
arriveConfigList: []
arriveConfigList: [],
startTbFront: resp.data.startTbFront,
endTbFront: resp.data.endTbFront
};
const newstationTimeList = [];

View File

@ -112,17 +112,17 @@
{{ formatName(scope.row.endSectionCode) }}
</template>
</el-table-column>
<el-table-column prop="routingType" label="交路类型">
<template slot-scope="scope">
{{ routingTypeMap[scope.row.routingType] }}
</template>
<el-table-column prop="routingType" label="交路类型">
<template slot-scope="scope">
{{ routingTypeMap[scope.row.routingType] }}
</template>
</el-table-column>
<el-table-column label="类别" width="240">
<template slot-scope="scope">
{{ `${frontMap[String(scope.row.startTbFront)]} - ${frontMap[String(scope.row.endTbFront)]}` }}
</template>
<el-table-column label="类别" width="240">
<template slot-scope="scope">
{{ `${frontMap[String(scope.row.startTbFront)]} - ${frontMap[String(scope.row.endTbFront)]}` }}
</template>
</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-row>
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
@ -202,25 +202,21 @@ export default {
endStationFilters:[],
// defaultStopTime: '30',
defaultSpeedLevel: 'l1',
reentryData: {},
reentryData: {},
addModel: {
// forward: false,
routingCode: '',
endStationCode: '',
startStationCode: '',
startTime: '00:00:00',
startTime: '02:00:00',
endTime: '',
arriveConfigList: [],
tripNumber: '',
planId: '',
serviceNumber: ''
},
frontModel: {
serviceNumber: '',
startTbFront: false,
endTbFront: false
},
endTbFront: false
},
tripNumberList: [{ value: '', label: this.$t('planMonitor.automatic') }],
// defaultStopTimeList: [{ value: '30', label: this.$t('planMonitor.default') }, { value: '0', label: '0' }],
defaultSpeedLevelList: [
{ value: 'l1', label: '等级一' },
{ value: 'l2', label: '等级二' },
@ -228,17 +224,17 @@ export default {
{ value: 'l4', label: '等级四' },
{ value: 'l5', label: '等级五' }
],
routingTypeMap: {
OUTBOUND: '出库',
INBOUND: '入库',
LOOP: '环路'
},
frontMap: {
'true': '折返轨(站前)',
'false': '折返轨(站后)',
'undefined': '转换轨',
'null': '转换轨'
}
routingTypeMap: {
OUTBOUND: '出库',
INBOUND: '入库',
LOOP: '环路'
},
frontMap: {
'true': '折返轨(站前)',
'false': '折返轨(站后)',
'undefined': '转换轨',
'null': '转换轨'
}
};
},
computed: {
@ -267,14 +263,14 @@ export default {
this.addModel.arriveConfigList = [];
const mapId = this.$route.query.mapId;
if (mapId) {
getRunplanConfig(mapId).then(resp => {
const data = resp.data;
this.reentryData = data.config.reentryData;
});
if (mapId) {
getRunplanConfig(mapId).then(resp => {
const data = resp.data;
this.reentryData = data.config.reentryData;
});
listUserRoutingData(mapId).then(resp => {
this.routingList = resp.data;
listUserRoutingData(mapId).then(resp => {
this.routingList = resp.data;
const startStationFilterMap = {};
const endStationFilterMap = {};
this.routingList.forEach(routing=>{
@ -328,13 +324,13 @@ export default {
compuntedRunTime(list, index, runLevel) {
let runTime = 0;
if ((index == 0 && String(this.frontModel.startTbFront) != 'undefined') ||
(index == list.length-1 && String(this.frontModel.endTbFront) != 'undefined')) {
if ((index == 0 && String(this.addModel.startTbFront) != 'undefined') ||
(index == list.length-1 && String(this.addModel.endTbFront) != 'undefined')) {
return 0
}
if (index < list.length - 1) {
const stopStationObj = this.stopStationMap[[list[index].sectionCode, list[index + 1].sectionCode].toString()];
if (index < list.length - 1) {
const stopStationObj = this.stopStationMap[[list[index].sectionCode, list[index + 1].sectionCode].toString()];
if (stopStationObj) {
if (stopStationObj.runPlanLevelVO) {
runTime = parseInt(stopStationObj.runPlanLevelVO[runLevel]);
@ -351,41 +347,40 @@ export default {
computedDetailList(type = null) {
if (this.addModel.routingCode) {
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'; //
list.forEach((elem, index) => {
if (type == 'routingCode') {
if (index == 0 || index == list.length - 1) {
elem.stopTime = 0;
} else if (this.stopTimeMap[elem.stationCode]) {
elem.stopTime = this.stopTimeMap[elem.stationCode].parkingTime;
} else {
elem.stopTime = 0;
}
if (type == 'routingCode') {
if (index == 0 || index == list.length - 1) {
elem.stopTime = 0;
} else if (this.stopTimeMap[elem.stationCode]) {
elem.stopTime = this.stopTimeMap[elem.stationCode].parkingTime;
} else {
elem.stopTime = 0;
}
}
tempTime = tempTime? tempTime: this.computedTimeByString('23:59:59') / 1000 + 1;
elem.arriveTime = formatTime(tempTime)
elem.departureTime = formatTime(tempTime + elem.stopTime);
tempTime = tempTime || this.computedTimeByString('23:59:59') / 1000 + 1;
elem.arriveTime = formatTime(tempTime);
elem.departureTime = formatTime(tempTime + elem.stopTime);
const runLevelObj = this.defaultSpeedLevelList.find(speedLevel=>{ return speedLevel.value == runLevel; });
const realRunlevel = this.compuntedRunTime(list, index, runLevel);
elem.speedLevelTime = realRunlevel;
elem.speedLevel = runLevelObj.label;
const runLevelObj = this.defaultSpeedLevelList.find(speedLevel=>{ return speedLevel.value == runLevel; });
const realRunlevel = this.compuntedRunTime(list, index, runLevel);
elem.speedLevelTime = realRunlevel;
elem.speedLevel = runLevelObj.label;
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]||{};
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]||{};
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);
@ -402,8 +397,8 @@ export default {
this.addModel.endSectionCode = row.endSectionCode;
this.addModel.startSectionCode = row.startSectionCode;
this.addModel.routingCode = row.code;
this.frontModel.startTbFront = row.startTbFront;
this.frontModel.endTbFront = row.endTbFront;
this.addModel.startTbFront = row.startTbFront;
this.addModel.endTbFront = row.endTbFront;
this.computedDetailList('routingCode');
},
handleCommit() {

View File

@ -292,26 +292,19 @@ export default {
serviceNumber: '',
planId: '',
editModel: {
routingCode: '',
routingCode: '',
endStationCode: '',
startStationCode: '',
startTime: '00:00:00',
startTime: '02:00:00',
endTime: '',
arriveConfigList: []
// serialNumber: '',
// trainManual: false,
// serialManual: false,
// clearGuest: false,
// continuationPlan: false,
// firstTrain: false,
// lastTrain: false,
// inStock: false,
// outStock: false
arriveConfigList: [],
tripNumber: '',
planId: '',
serviceNumber: '',
startTbFront: false,
endTbFront: false
},
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: {},
defaultSpeedLevelList: [
{ value: 'l1', label: '等级一' },
@ -342,9 +335,6 @@ export default {
'editModel.startTime': function () {
this.computedDetailList();
},
// 'defaultStopTime': function () {
// this.computedDetailList('defaultStopTime');
// },
'defaultSpeedLevel': function () {
this.computedDetailList('defaultSpeedLevel');
}
@ -364,8 +354,8 @@ export default {
compuntedRunTime(list, index, runLevel) {
let runTime = 0;
if ((index == 0 && String(this.frontModel.startTbFront) != 'undefined') ||
(index == list.length-1 && String(this.frontModel.endTbFront) != 'undefined')) {
if ((index == 0 && String(this.editModel.startTbFront) != 'undefined') ||
(index == list.length-1 && String(this.editModel.endTbFront) != 'undefined')) {
return 0
}
@ -385,9 +375,9 @@ export default {
return runTime;
},
computedDetailList(type = null) {
if (this.addModel.routingCode) {
let tempTime = this.computedTimeByString(this.addModel.startTime) / 1000;
const list = Object.assign([], this.addModel.arriveConfigList);
if (this.editModel.routingCode) {
let tempTime = this.computedTimeByString(this.editModel.startTime) / 1000;
const list = Object.assign([], this.editModel.arriveConfigList);
const runLevel = this.defaultSpeedLevel || 'l1'; //
list.forEach((elem, index) => {
@ -413,10 +403,10 @@ export default {
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]||{};
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]||{};
fronTime = data.tbTo || 0;
}
@ -424,7 +414,7 @@ export default {
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) {
@ -463,7 +453,6 @@ export default {
if (params.rowData && params.rowData.arriveConfigList.length > 0) {
const paramData = params.rowData;
this.initRunlevel(paramData);
// const runLevelObj = this.defaultSpeedLevelList.find(speedLevel=>{ return speedLevel.label == ; });
this.editModel.arriveConfigList = paramData.arriveConfigList;
this.editModel.routingCode = paramData.routingCode;
this.editModel.startStationCode = paramData.startStationCode;
@ -473,6 +462,8 @@ export default {
this.editModel.endSectionCode = paramData.endSectionCode;
this.editModel.startSectionCode = paramData.startSectionCode;
this.editModel.id = paramData.id;
this.editModel.startTbFront = paramData.startTbFront;
this.editModel.endTbFront = paramData.endTbFront;
this.routingList = [];
this.routingList.push({
code:paramData.routingCode,
@ -498,17 +489,19 @@ export default {
startStationCode:resp.data.startStationCode,
endStationCode:resp.data.endStationCode,
endSectionCode:resp.data.endSectionCode,
startTbFront: resp.data.startTbFront,
endTbFront: resp.data.endTbFront,
startSectionCode:resp.data.startSectionCode
});
this.editModel = {
tripNumber: this.tripNumber,
startTime: formatTime(trainInfo.stationTimeList[1].secondTime + 7200),
endTime: formatTime(trainInfo.stationTimeList[lastIndex].secondTime + 7200),
routingCode : resp.data.code,
arriveConfigList: []
arriveConfigList: [],
startTbFront: resp.data.startTbFront,
endTbFront: resp.data.endTbFront
};
const newstationTimeList = [];