宁波三号线 行调操作代码调整

This commit is contained in:
joylink_cuiweidong 2020-12-25 18:06:08 +08:00
parent 18a8b75a98
commit 418e8b86a4
4 changed files with 109 additions and 93 deletions

View File

@ -1,4 +1,5 @@
<template> <template>
<div>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="1000px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false"> <el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="1000px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row> <el-row>
<el-col :span="20"> <el-col :span="20">
@ -39,7 +40,7 @@
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || speedLimitValue<=0" @click="commit">确定(O)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || speedLimitValue<=0" @click="commit">确定(O)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading">应用(A)</el-button> <el-button :id="domIdConfirm" type="primary" :disabled="!selected || speedLimitValue<=0" :loading="loading" @click="apply">应用(A)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button> <el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
@ -49,8 +50,9 @@
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<section-limit-speed ref="sectionLimitSpeed" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</el-dialog> </el-dialog>
<section-limit-speed ref="sectionLimitSpeed" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</div>
</template> </template>
<script> <script>
@ -141,7 +143,7 @@ export default {
this.tempData.push(item); this.tempData.push(item);
} }
}); });
this.selected = selected; // this.selected = selected;
this.initEle = null; this.initEle = null;
this.commandEleCode = null; this.commandEleCode = null;
this.speedLimitValue = 0; this.speedLimitValue = 0;
@ -226,7 +228,7 @@ export default {
return ''; return '';
} }
}, },
commit() { commit(isClosed = true) {
const step = { const step = {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.Section.setSpeed.confirm.operation, operation: OperationEvent.Section.setSpeed.confirm.operation,
@ -237,11 +239,17 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionLimitSpeed.doShow(step, this.selected, this.speedLimitValue); this.$refs.sectionLimitSpeed.doShow(step, this.selected, this.speedLimitValue);
this.initEle = this.selected; this.initEle = this.selected;
if (isClosed) {
this.doClose();
}
} }
}).catch(() => { }).catch(() => {
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
}, },
apply() {
this.commit(false);
},
commandSuccess(code, val) { commandSuccess(code, val) {
this.commandEleCode = code; this.commandEleCode = code;
if (!val) { if (!val) {

View File

@ -1,4 +1,5 @@
<template> <template>
<div>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false"> <el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row> <el-row>
<el-table ref="singleTable" :data="tempData" highlight-current-row height="300px" @current-change="selectLine"> <el-table ref="singleTable" :data="tempData" highlight-current-row height="300px" @current-change="selectLine">
@ -25,7 +26,7 @@
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">确定(O)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">确定(O)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading">应用(A)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="apply">应用(A)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button> <el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
@ -35,8 +36,9 @@
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<section-open ref="sectionOpen" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</el-dialog> </el-dialog>
<section-open ref="sectionOpen" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</div>
</template> </template>
<script> <script>
@ -133,6 +135,9 @@ export default {
this.$refs.singleTable.setCurrentRow(); this.$refs.singleTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
apply() {
this.commit(false);
},
selectLine(val) { selectLine(val) {
if (!val) { return; } if (!val) { return; }
this.initEle = null; this.initEle = null;
@ -173,7 +178,7 @@ export default {
} }
return sectionElm.blockade ? '关闭双向:所有列车' : '打开'; return sectionElm.blockade ? '关闭双向:所有列车' : '打开';
}, },
commit() { commit(isClosed = true) {
const step = { const step = {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: this.isBlock ? OperationEvent.Section.lock.confirm.operation : OperationEvent.Section.unlock.confirm.operation, operation: this.isBlock ? OperationEvent.Section.lock.confirm.operation : OperationEvent.Section.unlock.confirm.operation,
@ -184,6 +189,9 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionOpen.doShow(step, this.selected); this.$refs.sectionOpen.doShow(step, this.selected);
this.initEle = this.selected; this.initEle = this.selected;
if (isClosed) {
this.doClose();
}
} }
}).catch(() => { }).catch(() => {
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();

View File

@ -48,7 +48,7 @@
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading">应用(A)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">应用(A)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button> <el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>

View File

@ -97,7 +97,7 @@ export default {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : ''; return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
}, },
title() { title() {
return this.isBlock ? '初始化关闭轨道' : '初始化开放轨道'; return this.isBlock ? '确认/取消关闭轨道' : '确认/取消开放轨道';
} }
}, },
watch: { watch: {