Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
b2bb43b47f
@ -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);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -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 = {
|
||||
|
@ -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
|
||||
|
@ -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');
|
||||
|
@ -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 = {
|
||||
|
@ -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 = {
|
||||
|
@ -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 = {
|
||||
|
@ -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 }) => {
|
||||
|
@ -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 '';
|
||||
|
@ -53,23 +53,23 @@ import MenuBar from './menuBar';
|
||||
import StatusBar from './statusBar';
|
||||
import Schedule from './schedule';
|
||||
import Parameter from './menus/parameter/index';
|
||||
import OffLine from './menus/offLine';
|
||||
import AddPlanningTrain from './menus/addPlanningTrain';
|
||||
import OffLine from '../components/menus/offLine';
|
||||
import AddPlanningTrain from '../components/menus/addPlanningTrain';
|
||||
import EditPlanningTrain from './menus/editPlanningTrain';
|
||||
import EditPlanName from './menus/editPlanName';
|
||||
import DuplicateTrain from './menus/duplicateTrain';
|
||||
import SystermOut from './menus/systermOut';
|
||||
import AddTask from './menus/addTask';
|
||||
import DeleteTask from './menus/deleteTask';
|
||||
import DeleteTask from '../components/menus/deleteTask';
|
||||
import ModifyingTask from './menus/modifyingTask';
|
||||
import ModifyingRouting from './menus/modifyingRouting';
|
||||
import ModifyingBeginTime from './menus/modifyingBeginTime';
|
||||
import EditStationBetweenTime from './menus/editStationBetweenTime';
|
||||
import GernaratePlan from './menus/gernaratePlanTrain';
|
||||
import GernaratePlan from '../components/menus/gernaratePlanTrain';
|
||||
import MovePlaningTrain from './menus/movePlaningTrain';
|
||||
import ModifyingStationIntervalTime from './menus/modifyingStationIntervalTime';
|
||||
import ModifyingStationStopTime from './menus/modifyingStationStopTime';
|
||||
import PopulatingGenericData from './menus/populatingGenericData';
|
||||
import ModifyingStationIntervalTime from '../components/menus/modifyingStationIntervalTime';
|
||||
import ModifyingStationStopTime from '../components/menus/modifyingStationStopTime';
|
||||
import PopulatingGenericData from '../components/menus/populatingGenericData';
|
||||
import { deletePlanService } from '@/api/runplan';
|
||||
import { checkLoginLine } from '@/api/login';
|
||||
import { loadMapDataById } from '@/utils/loaddata';
|
||||
|
@ -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() {
|
||||
|
@ -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 = [];
|
||||
|
@ -23,14 +23,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ModifyService from './menus/modifyService';
|
||||
import ModifyService from '../components/menus/modifyService';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { getStationList, queryRunPlan } from '@/api/runplan';
|
||||
import {getRpDetailByUserMapId, getUserMapDetailByMapId} from '@/api/designPlatform';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import {getMapDetail} from '@/api/jmap/mapdraft';
|
||||
import DataTable from './menus/components/dataTable';
|
||||
import DataTable from '../components/menus/components/dataTable';
|
||||
import echarts from 'echarts';
|
||||
|
||||
export default {
|
||||
|
@ -53,23 +53,23 @@ import MenuBar from './menuBar';
|
||||
import StatusBar from './statusBar';
|
||||
import Schedule from './schedule';
|
||||
import Parameter from './menus/parameter/index';
|
||||
import OffLine from './menus/offLine';
|
||||
import AddPlanningTrain from './menus/addPlanningTrain';
|
||||
import OffLine from '../components/menus/offLine';
|
||||
import AddPlanningTrain from '../components/menus/addPlanningTrain';
|
||||
import EditPlanningTrain from './menus/editPlanningTrain';
|
||||
import EditPlanName from './menus/editPlanName';
|
||||
import DuplicateTrain from './menus/duplicateTrain';
|
||||
import SystermOut from './menus/systermOut';
|
||||
import AddTask from './menus/addTask';
|
||||
import DeleteTask from './menus/deleteTask';
|
||||
import DeleteTask from '../components/menus/deleteTask';
|
||||
import ModifyingTask from './menus/modifyingTask';
|
||||
import ModifyingRouting from './menus/modifyingRouting';
|
||||
import ModifyingBeginTime from './menus/modifyingBeginTime';
|
||||
import EditStationBetweenTime from './menus/editStationBetweenTime';
|
||||
import GernaratePlan from './menus/gernaratePlanTrain';
|
||||
import GernaratePlan from '../components/menus/gernaratePlanTrain';
|
||||
import MovePlaningTrain from './menus/movePlaningTrain';
|
||||
import ModifyingStationIntervalTime from './menus/modifyingStationIntervalTime';
|
||||
import ModifyingStationStopTime from './menus/modifyingStationStopTime';
|
||||
import PopulatingGenericData from './menus/populatingGenericData';
|
||||
import ModifyingStationIntervalTime from '../components/menus/modifyingStationIntervalTime';
|
||||
import ModifyingStationStopTime from '../components/menus/modifyingStationStopTime';
|
||||
import PopulatingGenericData from '../components/menus/populatingGenericData';
|
||||
import { deletePlanService } from '@/api/runplan';
|
||||
import { checkLoginLine } from '@/api/login';
|
||||
import { loadMapDataById } from '@/utils/loaddata';
|
||||
|
@ -1,162 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="planEdit__tool add-planning-train"
|
||||
:title="title"
|
||||
:visible.sync="dialogShow"
|
||||
width="300px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" :rules="rules" :model="formModel" label-width="100px" size="medium" @submit.native.prevent>
|
||||
<el-form-item prop="serviceNumber" :label="$t('planMonitor.serviceNumber2')+$t('global.colon')" :required="true">
|
||||
<el-input v-model="formModel.serviceNumber" type="text" size="mini" maxlength="3" minlength="2" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="medium" @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button type="primary" size="medium" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { checkServiceNumberExist } from '@/api/runplan';
|
||||
|
||||
export default {
|
||||
name: 'AddPlanningTrain',
|
||||
props: {
|
||||
loadRunPlanId: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
formModel:{
|
||||
serviceNumber: ''
|
||||
},
|
||||
rules:{
|
||||
serviceNumber:[
|
||||
{required: true, validator: this.validateServiceNumber, trigger: 'blur'},
|
||||
{required: true, validator: this.validateServiceNo, trigger: 'change'}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return this.$t('planMonitor.addPlanTrain');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
validateServiceNo(rule, value, callback) {
|
||||
if (typeof value == 'string' && value.trim().length == 0) {
|
||||
return callback(new Error('请填写服务号'));
|
||||
} else {
|
||||
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
|
||||
if (serviceNumberList.includes(value)) {
|
||||
// new Error('该服务号已存在')
|
||||
return callback();
|
||||
} else {
|
||||
return callback();
|
||||
}
|
||||
}
|
||||
},
|
||||
validateServiceNumber(rule, value, callback) {
|
||||
if (typeof value == 'string' && value.trim().length == 0) {
|
||||
return callback(new Error('请填写服务号'));
|
||||
} else {
|
||||
let newValue = parseInt(value);
|
||||
if (newValue) {
|
||||
if (newValue > 0 & newValue < 9) {
|
||||
newValue = '00' + newValue;
|
||||
} else if (newValue > 10 & newValue < 99) {
|
||||
newValue = '0' + newValue;
|
||||
}
|
||||
this.formModel.serviceNumber = newValue;
|
||||
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
|
||||
if (serviceNumberList.includes(value)) {
|
||||
// new Error('该服务号已存在')
|
||||
return callback();
|
||||
} else {
|
||||
return callback();
|
||||
}
|
||||
} else {
|
||||
this.formModel.serviceNumber = '';
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
handleCommit() {
|
||||
this.$refs.form.validate(() => {
|
||||
if (this.$route.query.planId || this.loadRunPlanId) {
|
||||
checkServiceNumberExist({ planId: this.$route.query.planId || this.loadRunPlanId, serviceNumber: this.formModel.serviceNumber }).then(resp => {
|
||||
if (resp.data) {
|
||||
this.$emit('dispatchDialog', {
|
||||
name: 'offLine',
|
||||
params: {
|
||||
type: 'warning',
|
||||
operate: 'AddPlanningTrain',
|
||||
width: 460,
|
||||
message: this.$t('tip.serviceNumberExistHint')
|
||||
}
|
||||
});
|
||||
|
||||
this.doClose();
|
||||
} else {
|
||||
this.handleConfirm(true);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$messageBox(this.$t('tip.chooseToOpenTheRunGraph'));
|
||||
}
|
||||
});
|
||||
// if (this.serviceNumber.length >= 2 && this.serviceNumber.length <= 3) {
|
||||
// } else {
|
||||
// this.$messageBox('长度在二到三位');
|
||||
// }
|
||||
},
|
||||
handleConfirm(isNew = false) {
|
||||
this.doClose();
|
||||
this.$store.dispatch('runPlan/addserviceNumber', this.formModel.serviceNumber);
|
||||
this.$emit('dispatchDialog', { name: 'editPlanningTrain', params: { serviceNumber: this.formModel.serviceNumber, isNew:isNew } });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
/deep/ {
|
||||
.el-input {
|
||||
width: 120px;
|
||||
}
|
||||
}
|
||||
.add-planning-train{
|
||||
/deep/ {
|
||||
.el-dialog__body{
|
||||
padding: 10px 20px;
|
||||
}
|
||||
.dialog-footer{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -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() {
|
||||
|
@ -1,233 +0,0 @@
|
||||
<template>
|
||||
<div v-if="show">
|
||||
<template v-if="maxmini">
|
||||
<div class="nav">
|
||||
<div class="title">{{ config.title }}</div>
|
||||
<el-tooltip class="item" effect="dark" placement="bottom">
|
||||
<div slot="content" v-html="config.handleTips" />
|
||||
<div class="el-icon-info handleTips" />
|
||||
</el-tooltip>
|
||||
<!-- <div v-show="config.showClose" class="cls-status" @click="touch('Close')"><span /></div>
|
||||
<div class="min-status" @click="touch('Minim')"><span /></div> -->
|
||||
</div>
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="config.data"
|
||||
:highlight-current-row="config.highlightCurrentRow"
|
||||
class="table_box"
|
||||
:show-header="config.showHeader"
|
||||
border
|
||||
@current-change="handleChange"
|
||||
@cell-dblclick="handleModify"
|
||||
>
|
||||
<template v-for="(item,index) in config.columns">
|
||||
<el-table-column :key="index" :prop="item.prop" :label="item.label" :width="item.width" />
|
||||
</template>
|
||||
</el-table>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="nav">
|
||||
<!-- <div class="title">{{ config.title }}</div> -->
|
||||
<!-- <div class="max-status" @click="touch('Maxim')"><span /></div> -->
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'DataTable',
|
||||
props: {
|
||||
config: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: true,
|
||||
maxmini: true,
|
||||
touchStrategy: {
|
||||
'Close': [false, true],
|
||||
'Minim': [true, false],
|
||||
'Maxim': [true, true]
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleChange(row) {
|
||||
if (this.config.handleChange) {
|
||||
this.config.handleChange(row);
|
||||
}
|
||||
},
|
||||
handleModify(row) {
|
||||
if (this.config.handleModify) {
|
||||
this.config.handleModify(row);
|
||||
}
|
||||
},
|
||||
setCurrentRow(row) {
|
||||
this.$refs.table.setCurrentRow(row);
|
||||
},
|
||||
touch(operate) {
|
||||
this.$nextTick(() => {
|
||||
[this.show, this.maxmini] = this.touchStrategy[operate];
|
||||
this.$emit('touch', this.maxmini);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
@import "src/styles/mixin.scss";
|
||||
$height: 20px;
|
||||
$width: 20px;
|
||||
|
||||
.nav {
|
||||
display: table;
|
||||
float: right;
|
||||
width: 100%;
|
||||
color: #0000;
|
||||
background: -webkit-linear-gradient(#FDFDFE, #B1CBF3);
|
||||
background: -o-linear-gradient(#FDFDFE, #B1CBF3);
|
||||
background: -moz-linear-gradient(#FDFDFE, #B1CBF3);
|
||||
background: linear-gradient(#FDFDFE, #B1CBF3);
|
||||
border: 1px solid #B6BCCC !important;
|
||||
border-bottom: 2px solid #B6BCCC !important;
|
||||
list-style: none;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
.title{
|
||||
float: left;
|
||||
color: #000;
|
||||
font-size: 13px;
|
||||
line-height: 21px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
}
|
||||
.table_box{
|
||||
height: calc(100% - 20px);
|
||||
overflow: auto;
|
||||
}
|
||||
.handleTips{
|
||||
font-size: 16px;
|
||||
color: #316AC5;
|
||||
margin-left: 0px;
|
||||
margin-top: 2px;
|
||||
display: table;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/deep/ {
|
||||
.el-table--border th.gutter {
|
||||
background: #EBEADB !important;
|
||||
}
|
||||
|
||||
.el-table {
|
||||
width: 100%;
|
||||
|
||||
th.is-leaf {
|
||||
padding: 0px 0;
|
||||
background: #EBEADB;
|
||||
border-right: none !important;
|
||||
border-left: 1px solid #D1CDBD !important;
|
||||
border-top: 1px solid #D1CDBD !important;
|
||||
border-bottom: 1px inset #D1CDBD !important;
|
||||
color: #000;
|
||||
|
||||
.cell {
|
||||
height: $height;
|
||||
line-height: $height;
|
||||
}
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 0px 0;
|
||||
|
||||
.cell {
|
||||
height: $height;
|
||||
line-height: $height;
|
||||
font-size: smaller !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.current-row>td {
|
||||
background: #316AC5 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
}
|
||||
|
||||
.cls-status {
|
||||
float: right;
|
||||
width: 12px;
|
||||
height: 100%;
|
||||
line-height: 100%;
|
||||
margin-left: 5px;
|
||||
cursor: pointer;
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
content: '/';
|
||||
background: black;
|
||||
width: 2px;
|
||||
height: 12px;
|
||||
vertical-align: middle;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
span::after {
|
||||
display: block;
|
||||
content: '/';
|
||||
background: black;
|
||||
width: 2px;
|
||||
height: 12px;
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
}
|
||||
|
||||
.min-status {
|
||||
float: right;
|
||||
width: 20px;
|
||||
height: 100%;
|
||||
line-height: 100%;
|
||||
cursor: pointer;
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
content: '-';
|
||||
background: black;
|
||||
width: 2px;
|
||||
height: 12px;
|
||||
vertical-align: middle;
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
}
|
||||
|
||||
.max-status {
|
||||
float: right;
|
||||
width: 20px;
|
||||
height: 100%;
|
||||
line-height: 100%;
|
||||
cursor: pointer;
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
content: '';
|
||||
background: black;
|
||||
width: 2px;
|
||||
height: 12px;
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
span::after {
|
||||
display: block;
|
||||
content: '';
|
||||
background: black;
|
||||
width: 2px;
|
||||
height: 12px;
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,113 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="planEdit__tool delete-task"
|
||||
:title="title"
|
||||
:visible.sync="dialogShow"
|
||||
width="400px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-radio v-model="model.deleteBefore" :label="true">{{ $t('planMonitor.deleteAllPreviousTasks') }}</el-radio>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-radio v-model="model.deleteBefore" :label="false">{{ $t('planMonitor.deleteAllSubsequentTasks') }}</el-radio>
|
||||
</el-row>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="medium" @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button type="primary" size="medium" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { deletePlanTrip } from '@/api/runplan';
|
||||
|
||||
export default {
|
||||
name: 'DeleteTask',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
isPlan: false,
|
||||
model: {
|
||||
routingCode: '',
|
||||
deleteBefore: false,
|
||||
tripNumber: '',
|
||||
serviceNumber: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return this.$t('planMonitor.deleteTask');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.isPlan = params.isPlan;
|
||||
this.model.taskIndex = params.taskIndex;
|
||||
this.model.tripNumber = params.tripNumber;
|
||||
this.model.serviceNumber = params.serviceNumber;
|
||||
this.model.routingCode = params.routingCode;
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
if (this.isPlan) {
|
||||
// 计划删除任务
|
||||
this.$emit('dispatchOperate', { dialogName: 'editPlanningTrain', operate: 'handleConfirmDeleteTask', params: this.model });
|
||||
} else {
|
||||
// 直接删除任务
|
||||
const model = {
|
||||
planId: this.$route.query.planId,
|
||||
SDTNumber: `${this.model.serviceNumber}${this.model.tripNumber}`,
|
||||
deleteBefore: this.model.deleteBefore
|
||||
};
|
||||
|
||||
deletePlanTrip(model).then(resp => {
|
||||
this.$store.dispatch('runPlan/setSelected', {});
|
||||
this.$emit('refresh');
|
||||
// this.$emit('dispatchOperate', {
|
||||
// dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: Object.assign({refresh: true}, this.$route.query)
|
||||
// });
|
||||
this.$message.success(this.$t('tip.deleteTaskSuccessfully'));
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.deleteTaskFailed'));
|
||||
});
|
||||
}
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
/deep/ {
|
||||
.el-row {
|
||||
margin: 10px;
|
||||
}
|
||||
}
|
||||
.delete-task{
|
||||
/deep/ {
|
||||
.el-dialog__body{
|
||||
padding: 0 20px;
|
||||
}
|
||||
.dialog-footer{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,233 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="planEdit__tool gernarate-plan-train"
|
||||
:title="title"
|
||||
:visible.sync="dialogShow"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
top="10vh"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button type="primary" size="small" :loading="loading" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { generatePlanTrain, listUserRoutingData } from '@/api/runplan';
|
||||
export default {
|
||||
props: {
|
||||
loadRunPlanId: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
routingList: [],
|
||||
loading: false,
|
||||
runLevelList: [
|
||||
{ value: 1, label: '等级一' },
|
||||
{ value: 2, label: '等级二' },
|
||||
{ value: 3, label: '等级三'},
|
||||
{ value: 4, label: '等级四' },
|
||||
{ value: 5, label: '等级五' }
|
||||
],
|
||||
formModel: {
|
||||
gernarateType:'01',
|
||||
serviceNumber:'', // 服务号
|
||||
beginTime: '', // 开始时间
|
||||
overTime: '', // 结束时间
|
||||
runLevel:'', // 运行等级
|
||||
departureInterval:180, // 发车间隔
|
||||
// reentryTime:120, // 折返时间
|
||||
inboundRouting:'', // 回库交路code
|
||||
outboundRouting:'', // 出库交路code
|
||||
runningRouting1: '', // 环路code1
|
||||
runningRouting2: '' // 环路code2
|
||||
},
|
||||
|
||||
rules: {
|
||||
serviceNumber:[
|
||||
{required: true, validator: this.validateServiceNumber, trigger: 'blur'},
|
||||
// {required: true, validator: this.validateServiceNumber, trigger: 'change'}
|
||||
{required: true, validator: this.validateServiceNo, trigger: 'change'}
|
||||
],
|
||||
beginTime: [
|
||||
{ required: true, message: '请填写开始时间', trigger: 'blur' }
|
||||
],
|
||||
overTime: [
|
||||
{ required: true, message: '请填写结束时间', trigger: 'blur' }
|
||||
],
|
||||
runLevel: [
|
||||
{ required: true, message: '请选择运行等级', trigger: 'change' }
|
||||
],
|
||||
departureInterval:[
|
||||
{ required: true, message: '请填写发车间隔', trigger: 'blur' }
|
||||
],
|
||||
// reentryTime:[
|
||||
// { required: true, message: '请填写折返时间', trigger: 'blur' }
|
||||
// ],
|
||||
inboundRouting: [
|
||||
{ required: true, message: '请选择回库交路', trigger: 'change' }
|
||||
],
|
||||
outboundRouting: [
|
||||
{ required: true, message: '请选择出库交路', trigger: 'change' }
|
||||
],
|
||||
runningRouting1: [
|
||||
// message: '请选择环路',
|
||||
{ required: true, validator: this.validateRunningRouting, trigger: 'change' },
|
||||
{ required: true, validator: this.validateRunningRouting, trigger: 'blur' }
|
||||
],
|
||||
runningRouting2: [
|
||||
{ required: true, validator: this.validateRunningRouting, trigger: 'change' },
|
||||
{ required: true, validator: this.validateRunningRouting, trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '生成计划';
|
||||
},
|
||||
form() {
|
||||
return {
|
||||
labelWidth: '100px',
|
||||
size:'small',
|
||||
items: [
|
||||
{ prop: 'gernarateType', label: '生成类型', type: 'checkBox', children: [
|
||||
{ name: '单条服务', value: '01' },
|
||||
{ name: '多条服务', value: '02' }
|
||||
] },
|
||||
{ prop: 'serviceNumber', label: '服务号', type: 'text', rightWidth:true, maxlength:3, show:this.formModel.gernarateType == '01'},
|
||||
{ prop: 'beginTime', label: '开始时间', type: 'timePicker', selectableRange:'02:00:00-23:59:59'},
|
||||
{ prop: 'overTime', label: '结束时间', type: 'timePicker', selectableRange:'02:00:00-23:59:59'},
|
||||
{ prop: 'runLevel', label: '运行等级', type: 'select', options: this.runLevelList },
|
||||
{ prop: 'departureInterval', label: '发车间隔', type: 'number', show:this.formModel.gernarateType == '02', min:0, step:1, precisionFlag:true, precision:0, message:'s'},
|
||||
// { prop: 'reentryTime', label: '折返时间', type: 'number', min:120, step:1, precisionFlag:true, precision:0, message:'s' },
|
||||
{ prop: 'outboundRouting', label: '出库交路', type: 'select', options: this.covertRouting('OUTBOUND'), noDataText:'请先设置交路'},
|
||||
{ prop: 'runningRouting1', label: '环路交路1', type: 'select', show:true, options: this.covertRouting('LOOP'), noDataText:'请先设置交路', change:true, onChange:this.changeRoute2 },
|
||||
{ prop: 'runningRouting2', label: '环路交路2', type: 'select', show:true, options: this.covertRouting('LOOP'), noDataText:'请先设置交路', change:true, onChange:this.changeRoute1},
|
||||
{ prop: 'inboundRouting', label: '入库交路', type: 'select', options: this.covertRouting('INBOUND'), noDataText:'请先设置交路'}
|
||||
]
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.loading = false;
|
||||
const mapId = this.$route.query.mapId;
|
||||
if (mapId) {
|
||||
listUserRoutingData(mapId).then(response => {
|
||||
this.routingList = response.data.map(elem => { return { value: elem.code, label: elem.name, routingType:elem.routingType }; });
|
||||
}).catch(() => {
|
||||
this.$messageBox(`获取交路列表失败`);
|
||||
});
|
||||
}
|
||||
this.dialogShow = true;
|
||||
},
|
||||
validateServiceNumber(rule, value, callback) {
|
||||
if (typeof value == 'string' && value.trim().length == 0) {
|
||||
return callback(new Error('请填写服务号'));
|
||||
} else {
|
||||
let newValue = parseInt(value);
|
||||
if (newValue) {
|
||||
if (newValue > 0 & newValue < 9) {
|
||||
newValue = '00' + newValue;
|
||||
} else if (newValue > 10 & newValue < 99) {
|
||||
newValue = '0' + newValue;
|
||||
}
|
||||
this.formModel.serviceNumber = newValue;
|
||||
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
|
||||
if (serviceNumberList.includes(value)) {
|
||||
return callback(new Error('该服务号已存在'));
|
||||
} else {
|
||||
return callback();
|
||||
}
|
||||
} else {
|
||||
this.formModel.serviceNumber = '';
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
validateServiceNo(rule, value, callback) {
|
||||
if (typeof value == 'string' && value.trim().length == 0) {
|
||||
return callback(new Error('请填写服务号'));
|
||||
} else {
|
||||
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
|
||||
if (serviceNumberList.includes(value)) {
|
||||
return callback(new Error('该服务号已存在'));
|
||||
} else {
|
||||
return callback();
|
||||
}
|
||||
}
|
||||
},
|
||||
validateRunningRouting(rule, value, callback) {
|
||||
if (value.trim().length == 0) {
|
||||
return callback(new Error('请选择环路'));
|
||||
} else {
|
||||
if (this.formModel.runningRouting1 == this.formModel.runningRouting2) {
|
||||
return callback(new Error('环路交路1和环路交路2不能相同'));
|
||||
} else {
|
||||
return callback();
|
||||
}
|
||||
}
|
||||
},
|
||||
changeRoute2() {
|
||||
this.changeRoute('runningRouting2');
|
||||
},
|
||||
changeRoute1() {
|
||||
this.changeRoute('runningRouting1');
|
||||
},
|
||||
changeRoute(runningRouting) {
|
||||
if (this.formModel[runningRouting]) { this.$refs.dataform.validateField([runningRouting]); }
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.$refs.dataform.resetForm();
|
||||
this.dialogShow = false;
|
||||
},
|
||||
covertRouting(routingType) {
|
||||
return this.routingList.filter(route=>{ return route.routingType == routingType; });
|
||||
},
|
||||
handleCommit() {
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
if (this.formModel.overTime <= this.formModel.beginTime) {
|
||||
this.$messageBox('结束时间必须大于开始时间');
|
||||
return false;
|
||||
}
|
||||
const formModel = Object.assign({}, this.formModel);
|
||||
if (formModel.gernarateType == '01') {
|
||||
delete formModel.departureInterval;
|
||||
} else {
|
||||
delete formModel.serviceNumber;
|
||||
}
|
||||
delete formModel.gernarateType;
|
||||
this.loading = true;
|
||||
generatePlanTrain(this.$route.query.planId || this.loadRunPlanId, formModel).then(res => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.dataform.resetForm();
|
||||
this.$store.dispatch('runPlan/refresh');
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
// this.doClose();
|
||||
this.loading = false;
|
||||
this.$messageBox(error.message);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
</style>
|
@ -1,120 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="planEdit__tool modify-service"
|
||||
:title="title"
|
||||
:visible.sync="dialogShow"
|
||||
width="400px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div v-if="isModifyServiceNumber">
|
||||
<div class="ModifyServiceName">计划号:</div>
|
||||
<div class="ModifyServiceInput">
|
||||
<el-input v-model="serviceNumber" type="text" :style="{width: '80%'}" :minlength="2" :maxlength="3" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="ModifyServiceName">车次号:</div>
|
||||
<div class="ModifyServiceInput">
|
||||
<el-input v-model="tripNumber" type="text" :style="{width: '80%'}" :maxlength="10" />
|
||||
</div>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="medium" @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button type="primary" size="medium" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { updateTripNumber, updateServiceNumber } from '@/api/runplan';
|
||||
export default {
|
||||
name:'ModifyService',
|
||||
data() {
|
||||
return {
|
||||
dialogShow:false,
|
||||
isModifyServiceNumber:false,
|
||||
serviceNumber:'',
|
||||
tripNumber:'',
|
||||
title:'',
|
||||
oldServiceNumber:'',
|
||||
oldTripNumber:''
|
||||
};
|
||||
},
|
||||
methods:{
|
||||
doShow(data) {
|
||||
if (data.tripNumber) {
|
||||
this.oldServiceNumber = data.serviceNumber;
|
||||
this.oldTripNumber = data.tripNumber;
|
||||
this.isModifyServiceNumber = false;
|
||||
this.title = '修改车次号';
|
||||
// this.tripNumber = data.tripNumber;
|
||||
} else {
|
||||
this.oldServiceNumber = data.serviceNumber;
|
||||
this.isModifyServiceNumber = true;
|
||||
this.title = '修改计划号';
|
||||
this.serviceNumber = data.serviceNumber;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
if (this.isModifyServiceNumber) {
|
||||
const result = /^\d{2,}$/.test(this.serviceNumber);
|
||||
if (this.serviceNumber && result) {
|
||||
updateServiceNumber(this.$route.query.planId, this.oldServiceNumber, this.serviceNumber).then(res=>{
|
||||
this.$message.success('修改计划号成功');
|
||||
// this.$emit('refresh');
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('runPlan/refresh');
|
||||
}).catch(()=>{
|
||||
this.$message.error('修改计划号失败');
|
||||
});
|
||||
} else {
|
||||
this.$message.error('请输入正确的计划号(两位以上数字)');
|
||||
}
|
||||
|
||||
} else {
|
||||
const result = /^\d{2,}$/.test(this.tripNumber);
|
||||
if (this.tripNumber && result) {
|
||||
const SDTNumber = this.oldServiceNumber + this.oldTripNumber;
|
||||
updateTripNumber(this.$route.query.planId, SDTNumber, this.tripNumber).then(res=>{
|
||||
this.$message.success('修改车次号成功');
|
||||
// this.$emit('refresh');
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('runPlan/refresh');
|
||||
}).catch(()=>{
|
||||
this.$message.error('修改车次号失败');
|
||||
});
|
||||
} else {
|
||||
this.$message.error('请输入正确的车次号(两位以上数字)');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.ModifyServiceName{
|
||||
width: 100px;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
text-align: right;
|
||||
padding-right: 15px;
|
||||
vertical-align: top;
|
||||
margin-top: 11px;
|
||||
font-size: 15px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.ModifyServiceInput{
|
||||
width: 180px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
@ -1,246 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="planEdit__tool add-planning-train"
|
||||
:title="title"
|
||||
:visible.sync="dialogShow"
|
||||
width="1020px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row :gutter="15">
|
||||
<el-form ref="form" :model="form" label-width="60px" size="mini">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="等级一:">
|
||||
<el-input v-model="form.level1" @blur="handleBlur(form.level1, '1')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="等级二:">
|
||||
<el-input v-model="form.level2" @blur="handleBlur(form.level2, '2')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="等级三:">
|
||||
<el-input v-model="form.level3" @blur="handleBlur(form.level3, '3')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="等级四:">
|
||||
<el-input v-model="form.level4" @blur="handleBlur(form.level4, '4')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="等级五:">
|
||||
<el-input v-model="form.level5" @blur="handleBlur(form.level5, '5')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div style="line-height: 29px; font-size: 15px;">速度单位: (Km/h)</div>
|
||||
</el-col>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="stationIntervalData" border style="width: 100%" height="320">
|
||||
<el-table-column prop="startStationCode" :label="$t('planMonitor.modifying.startingStation')" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ formatName(scope.row.startStationCode) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="startSectionCode" :label="$t('planMonitor.modifying.startSection')" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ formatName(scope.row.startSectionCode) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="endStationCode" :label="$t('planMonitor.modifying.endStation')" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ formatName(scope.row.endStationCode) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="endSectionCode" :label="$t('planMonitor.modifying.endSection')" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ formatName(scope.row.endSectionCode) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="right" :label="$t('planMonitor.modifying.direction')" width="60">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.right?'上行':'下行' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="distance" :label="$t('planMonitor.modifying.distance')" width="85">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.distance }}</span>
|
||||
<!-- <el-input v-model="scope.row.distance" class="input_text_box" /> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<div>
|
||||
<el-table-column prop="l1" :label="$t('planMonitor.updateStation.level1')" width="70">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.l1" class="input_text_box" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="l2" :label="$t('planMonitor.updateStation.level2')" width="70">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.l2" class="input_text_box" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="l3" :label="$t('planMonitor.updateStation.level3')" width="70">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.l3" class="input_text_box" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="l2" :label="$t('planMonitor.updateStation.level4')" width="70">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.l4" class="input_text_box" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="l2" :label="$t('planMonitor.updateStation.level5')" width="70">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.l5" class="input_text_box" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</div>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<div class="button-group" style="text-align: center; margin-top: 10px;">
|
||||
<el-button @click="handleStationDistance">更新距离</el-button>
|
||||
<el-button @click="doClose">关闭</el-button>
|
||||
<el-button @click="handleStationTime">更新</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { formatName } from '@/utils/runPlan';
|
||||
import { setStationRunning, getMapStationRunUser, updateRunlevelDistance } from '@/api/runplan';
|
||||
|
||||
export default {
|
||||
name: 'ModifyingStationIntervalTime',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
DirectionCodeMap: {},
|
||||
stationIntervalData: [],
|
||||
params: {},
|
||||
form: {
|
||||
level1: '',
|
||||
level2: '',
|
||||
level3: '',
|
||||
level4: '',
|
||||
level5: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return this.$t('planMonitor.modifying.modifyRunLevel') + ' (单位:秒)';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
formatName(code) {
|
||||
return formatName(code);
|
||||
},
|
||||
loadInitData() {
|
||||
this.DirectionCodeMap = {};
|
||||
this.$ConstSelect.DirectionCodeList.forEach(elem => {
|
||||
this.DirectionCodeMap[elem.value] = elem.label;
|
||||
});
|
||||
if (this.$route.query.lineCode) {
|
||||
getMapStationRunUser(this.$route.query.mapId).then(resp =>{
|
||||
const list = resp.data.list;
|
||||
this.stationIntervalData = [];
|
||||
this.stationIntervalData = list;
|
||||
this.form.level1 = '';
|
||||
this.form.level2 = '';
|
||||
this.form.level3 = '';
|
||||
this.form.level4 = '';
|
||||
this.form.level5 = '';
|
||||
|
||||
});
|
||||
}
|
||||
},
|
||||
handleBlur(limit, level) {
|
||||
if (limit) {
|
||||
this.stationIntervalData.forEach(item => {
|
||||
if (level == '1') {
|
||||
item.l1 = Math.round(item.distance / (this.form.level1 / 3.6));
|
||||
} else if (level == '2') {
|
||||
item.l2 = Math.round(item.distance / (this.form.level2 / 3.6));
|
||||
} else if (level == '3') {
|
||||
item.l3 = Math.round(item.distance / (this.form.level3 / 3.6));
|
||||
} else if (level == '4') {
|
||||
item.l4 = Math.round(item.distance / (this.form.level4 / 3.6));
|
||||
} else if (level == '5') {
|
||||
item.l5 = Math.round(item.distance / (this.form.level5 / 3.6));
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
handleStationTime() {
|
||||
setStationRunning(this.$route.query.mapId, this.stationIntervalData).then(resp => {
|
||||
this.$message.success(this.$t('planMonitor.modifying.modifySuccess'));
|
||||
}).catch((error) => {
|
||||
this.$messageBox(this.$t('planMonitor.modifying.modifyFailed') + ': ' + error.message);
|
||||
});
|
||||
},
|
||||
handleStationDistance() {
|
||||
updateRunlevelDistance(this.$route.query.mapId).then(resp => {
|
||||
if (resp.data) {
|
||||
this.$message.success('更新成功');
|
||||
const list = resp.data;
|
||||
const stationIntervalData = [];
|
||||
this.stationIntervalData.forEach(station=>{
|
||||
if (list[station.id]) {
|
||||
const tempStation = Object.assign({}, station);
|
||||
tempStation.distance = list[station.id];
|
||||
stationIntervalData.push(tempStation);
|
||||
}
|
||||
});
|
||||
this.stationIntervalData = stationIntervalData;
|
||||
} else {
|
||||
this.$messageBox('更新失败:数据为空');
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$messageBox('更新失败: ' + error.message);
|
||||
});
|
||||
},
|
||||
doShow(params) {
|
||||
this.params = params || {};
|
||||
this.loadInitData();
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
.planEdit__tool {
|
||||
/deep/{
|
||||
.el-dialog__body{
|
||||
padding-top: 0;
|
||||
}
|
||||
.el-form-item--mini.el-form-item, .el-form-item--small.el-form-item{
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.input_text_box{
|
||||
/deep/{
|
||||
.el-input__inner{
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,134 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="planEdit__tool add-planning-train"
|
||||
:title="title"
|
||||
:visible.sync="dialogShow"
|
||||
width="600px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-table :data="stationIntervalData" border style="width: 100%" height="320">
|
||||
<el-table-column prop="startStationCode" label="车站名称">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ formatName(scope.row.stationCode) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="startSectionCode" label="区段名称">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ formatName(scope.row.sectionCode) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="right" label="所属站台">
|
||||
<template slot-scope="scope">
|
||||
<!-- ?'上行站台':'下行站台' -->
|
||||
<span style="margin-left: 10px">{{ formatSelect(scope.row.sectionCode) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="parkingTime" label="停站时间" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.parkingTime" class="input_text_box" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<div class="button-group" style="text-align: center; margin-top: 10px;">
|
||||
<el-button @click="doClose">关闭</el-button>
|
||||
<el-button @click="handleStationTime">更新</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { formatName } from '@/utils/runPlan';
|
||||
import { setStationStopTime, getStationStopTime } from '@/api/runplan';
|
||||
|
||||
export default {
|
||||
name: 'ModifyingStationIntervalTime',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
DirectionCodeMap: {},
|
||||
stationIntervalData: [],
|
||||
params: {}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return this.$t('planMonitor.modifying.modifyStopTime');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
formatName(code) {
|
||||
return formatName(code);
|
||||
},
|
||||
formatSelect(code) {
|
||||
const device = this.$store.state.map.map && this.$store.state.map.map.stationStandList.find(ele => ele.standTrackCode == code);
|
||||
console.log(device.right);
|
||||
if (device) {
|
||||
return device.right ? '上行站台' : '下行站台';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
loadInitData() {
|
||||
this.DirectionCodeMap = {};
|
||||
this.$ConstSelect.DirectionCodeList.forEach(elem => {
|
||||
this.DirectionCodeMap[elem.value] = elem.label;
|
||||
});
|
||||
|
||||
this.stationIntervalData = [];
|
||||
if (this.$route.query.lineCode) {
|
||||
getStationStopTime(this.$route.query.mapId).then(resp =>{
|
||||
const list = resp.data.list;
|
||||
this.stationIntervalData = list;
|
||||
});
|
||||
}
|
||||
},
|
||||
handleStationTime() {
|
||||
setStationStopTime(this.$route.query.mapId, this.stationIntervalData).then(resp => {
|
||||
this.$message.success(this.$t('planMonitor.modifying.modifySuccess'));
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('planMonitor.modifying.modifyFailed'));
|
||||
});
|
||||
},
|
||||
doShow(params) {
|
||||
this.params = params || {};
|
||||
this.loadInitData();
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
.planEdit__tool {
|
||||
/deep/{
|
||||
.el-dialog__body{
|
||||
padding-top: 0;
|
||||
}
|
||||
.el-form-item--mini.el-form-item, .el-form-item--small.el-form-item{
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.input_text_box{
|
||||
/deep/{
|
||||
.el-input__inner{
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -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 = [];
|
||||
|
@ -1,92 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="planEdit__tool add-planning-train"
|
||||
:title="title"
|
||||
:visible.sync="dialogShow"
|
||||
:width="width + 'px'"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24" :offset="1">
|
||||
<i class="el-icon-warning" />
|
||||
{{ params.message }}
|
||||
</el-col>
|
||||
</el-row>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="medium" @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button type="primary" size="medium" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'OffLine',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
params: {},
|
||||
title:this.$t('planMonitor.updateStation.deletePlanCar')
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
width() {
|
||||
if (this.params.width) {
|
||||
return this.params.width;
|
||||
} else {
|
||||
return 400;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
if (params.operate == 'AddPlanningTrain') {
|
||||
this.title = this.$t('planMonitor.addPlanTrain');
|
||||
} else {
|
||||
this.title = this.$t('planMonitor.updateStation.deletePlanCar');
|
||||
}
|
||||
this.params = params || {};
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
this.$emit('handleConfirm', this.params);
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
/deep/ {
|
||||
.el-input {
|
||||
width: 40px;
|
||||
}
|
||||
}
|
||||
.add-planning-train{
|
||||
/deep/ {
|
||||
.el-dialog__body{
|
||||
padding: 10px 20px;
|
||||
}
|
||||
.dialog-footer{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,189 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="planEdit__tool duplicate-train"
|
||||
:title="title"
|
||||
:visible.sync="dialogShow"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="medium" @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button type="primary" size="medium" :loading="loading" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listUserRoutingData, populatingGenericData } from '@/api/runplan';
|
||||
export default {
|
||||
props: {
|
||||
loadRunPlanId: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
// stationList: [],
|
||||
routingList: [],
|
||||
loading: false,
|
||||
formModel: {
|
||||
stationRunningTime: 60, // 站间运行时间
|
||||
right: 3, // 是否向右发车 不填未同时发车
|
||||
beginTime: '',
|
||||
overTime: '',
|
||||
departureTimeInterval: 180, // 发车间隔时间
|
||||
// parkedTime: 30, // 停止时间
|
||||
// reentryTime: 120, // 折返时间
|
||||
runningRouting1:'', // 环路code1
|
||||
runningRouting2:'' // 环路code2
|
||||
// startStationCode: '',
|
||||
// endStationCode: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
beginTime: [
|
||||
{ required: true, message: '请填写开始时间', trigger: 'blur' }
|
||||
],
|
||||
overTime: [
|
||||
{ required: true, message: '请填写结束时间', trigger: 'blur' }
|
||||
],
|
||||
departureTimeInterval: [
|
||||
{ required: true, message: '请填写发车间隔', trigger: 'blur' }
|
||||
],
|
||||
// parkedTime: [
|
||||
// { required: true, message: '请填写停站时间', trigger: 'blur' }
|
||||
// ],
|
||||
// reentryTime: [
|
||||
// { required: true, message: '请填写折返时间', trigger: 'blur' }
|
||||
// ],
|
||||
runningRouting1: [
|
||||
{ required: true, validator: this.validateRunningRouting, trigger: 'change' }
|
||||
],
|
||||
runningRouting2: [
|
||||
{ required: true, validator: this.validateRunningRouting, trigger: 'change' }
|
||||
]
|
||||
// startStationCode: [
|
||||
// { required: true, message: '请选择起始站', trigger: 'change' }
|
||||
// ],
|
||||
// endStationCode: [
|
||||
// { required: true, message: '请选择终止站', trigger: 'change' }
|
||||
// ]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '创建运行图';
|
||||
},
|
||||
form() {
|
||||
return {
|
||||
labelWidth: '100px',
|
||||
items: [
|
||||
{ prop: 'beginTime', label: '开始时间', type: 'timePicker', selectableRange:'02:00:00-23:59:59'},
|
||||
{ prop: 'overTime', label: '结束时间', type: 'timePicker', selectableRange:'02:00:00-23:59:59'},
|
||||
{ prop: 'departureTimeInterval', label: '发车间隔', type: 'number', min:0, step:1, precisionFlag:true, precision:0, message:'s'},
|
||||
// { prop: 'parkedTime', label: '停站时间', type: 'number', min:0, step:1, precisionFlag:true, precision:0},
|
||||
// { prop: 'reentryTime', label: '折返时间', type: 'number', min:120, step:1, precisionFlag:true, precision:0, message:'s'},
|
||||
{ prop: 'right', label: '发车类型', type: 'checkBox', children: [
|
||||
{ name: '上行发车', value: 1 },
|
||||
{ name: '下次发车', value: 2 },
|
||||
{ name: '同时发车', value: 3 }
|
||||
] },
|
||||
{ prop: 'runningRouting1', label: '环路交路1', type: 'select', show:true, options: this.covertRouting('LOOP'), noDataText:'请先设置交路', change:true, onChange:this.changeRoute2 },
|
||||
{ prop: 'runningRouting2', label: '环路交路2', type: 'select', show:true, options: this.covertRouting('LOOP'), noDataText:'请先设置交路', change:true, onChange:this.changeRoute1}
|
||||
// { prop: 'startStationCode', label: '起始站', type: 'select', options: this.stationList },
|
||||
// { prop: 'endStationCode', label: '终止站', type: 'select', options: this.stationList }
|
||||
]
|
||||
};
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// const mapId = this.$route.query.mapId;
|
||||
// if (mapId) {
|
||||
// getStationList(mapId).then(response => {
|
||||
// this.stationList = response.data.map(elem => { return { value: elem.code, label: elem.name }; });
|
||||
// }).catch(() => {
|
||||
// this.$messageBox(`获取车站列表失败`);
|
||||
// });
|
||||
// }
|
||||
},
|
||||
methods: {
|
||||
doShow(params) {
|
||||
this.loading = false;
|
||||
const mapId = this.$route.query.mapId;
|
||||
if (mapId) {
|
||||
listUserRoutingData(mapId).then(response => {
|
||||
this.routingList = response.data.map(elem => { return { value: elem.code, label: elem.name, routingType:elem.routingType }; });
|
||||
}).catch(() => {
|
||||
this.$messageBox(`获取交路列表失败`);
|
||||
});
|
||||
}
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.$refs.dataform.resetForm();
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
if (this.formModel.right == 1) {
|
||||
this.formModel.right = true;
|
||||
} else if (this.formModel.right == 2) {
|
||||
this.formModel.right = false;
|
||||
} else {
|
||||
this.formModel.right = null;
|
||||
}
|
||||
if (this.formModel.overTime > this.formModel.beginTime) {
|
||||
this.loading = true;
|
||||
populatingGenericData(this.$route.query.planId || this.loadRunPlanId, this.formModel).then(res => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$store.dispatch('runPlan/refresh');
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
this.$messageBox('生成通用数据失败: ' + error.message);
|
||||
this.doClose();
|
||||
});
|
||||
} else {
|
||||
this.$messageBox('结束时间必须大于开始时间');
|
||||
}
|
||||
});
|
||||
},
|
||||
validateRunningRouting(rule, value, callback) {
|
||||
if (value.trim().length == 0) {
|
||||
return callback(new Error('请选择环路'));
|
||||
} else {
|
||||
if (this.formModel.runningRouting1 == this.formModel.runningRouting2) {
|
||||
return callback(new Error('环路交路1和环路交路2不能相同'));
|
||||
} else {
|
||||
return callback();
|
||||
}
|
||||
}
|
||||
},
|
||||
changeRoute2() {
|
||||
this.changeRoute('runningRouting2');
|
||||
},
|
||||
changeRoute1() {
|
||||
this.changeRoute('runningRouting1');
|
||||
},
|
||||
changeRoute(runningRouting) {
|
||||
if (this.formModel[runningRouting]) { this.$refs.dataform.validateField([runningRouting]); }
|
||||
},
|
||||
covertRouting(routingType) {
|
||||
return this.routingList.filter(route=>{ return route.routingType == routingType; });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
</style>
|
@ -23,14 +23,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ModifyService from './menus/modifyService';
|
||||
import ModifyService from '../components/menus/modifyService';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { getStationList, queryRunPlan } from '@/api/runplan';
|
||||
import {getRpDetailByUserMapId, getUserMapDetailByMapId} from '@/api/designPlatform';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import {getMapDetail} from '@/api/jmap/mapdraft';
|
||||
import DataTable from './menus/components/dataTable';
|
||||
import DataTable from '../components/menus/components/dataTable';
|
||||
import echarts from 'echarts';
|
||||
|
||||
export default {
|
||||
|
Loading…
Reference in New Issue
Block a user