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

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,56 +1,58 @@
<template> <template>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="1000px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false"> <div>
<el-row> <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-col :span="20"> <el-row>
<el-table ref="singleTable1" :data="tempData" highlight-current-row height="300px" @current-change="selectLine1"> <el-col :span="20">
<el-table-column prop="name" width="100" label="轨道" /> <el-table ref="singleTable1" :data="tempData" highlight-current-row height="300px" @current-change="selectLine1">
<el-table-column prop="blockStatus" width="120" label="MAU"> <el-table-column prop="name" width="100" label="轨道" />
<template slot-scope="scope"> <el-table-column prop="blockStatus" width="120" label="MAU">
<span>{{ getStationName(scope.row) }}</span> <template slot-scope="scope">
</template> <span>{{ getStationName(scope.row) }}</span>
</el-table-column> </template>
<el-table-column prop="blockProcess" width="80" label="临时限速"> </el-table-column>
<template slot-scope="scope"> <el-table-column prop="blockProcess" width="80" label="临时限速">
<span>{{ getLimitSpeed(scope.row.code) }}</span> <template slot-scope="scope">
</template> <span>{{ getLimitSpeed(scope.row.code) }}</span>
</el-table-column> </template>
<el-table-column prop="unblockProcess" label="PM临时限速" width="110"> </el-table-column>
<template slot-scope="scope"> <el-table-column prop="unblockProcess" label="PM临时限速" width="110">
<span>{{ getIsLimit(scope.row.code) }}</span> <template slot-scope="scope">
</template> <span>{{ getIsLimit(scope.row.code) }}</span>
</el-table-column> </template>
<el-table-column prop="blockProcess" label="设置临时限速进程" width="140"> </el-table-column>
<template slot-scope="scope"> <el-table-column prop="blockProcess" label="设置临时限速进程" width="140">
<span>{{ getProcess(scope.row.code) }}</span> <template slot-scope="scope">
</template> <span>{{ getProcess(scope.row.code) }}</span>
</el-table-column> </template>
<el-table-column prop="unblockProcess" label="用户里程起点" width="110" /> </el-table-column>
<el-table-column prop="unblockProcess" label="用户里程终点" width="110" /> <el-table-column prop="unblockProcess" label="用户里程起点" width="110" />
</el-table> <el-table-column prop="unblockProcess" label="用户里程终点" width="110" />
</el-col> </el-table>
<el-col :span="4"> </el-col>
<el-table ref="singleTable2" :data="limitList" highlight-current-row height="300px" @current-change="selectLine2"> <el-col :span="4">
<el-table-column prop="name" label="速度" /> <el-table ref="singleTable2" :data="limitList" highlight-current-row height="300px" @current-change="selectLine2">
</el-table> <el-table-column prop="name" label="速度" />
</el-col> </el-table>
</el-row> </el-col>
<el-row justify="center" class="button-group"> </el-row>
<el-col :span="4" :offset="1"> <el-row justify="center" class="button-group">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || speedLimitValue<=0" @click="commit">确定(O)</el-button> <el-col :span="4" :offset="1">
</el-col> <el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || speedLimitValue<=0" @click="commit">确定(O)</el-button>
<el-col :span="4" :offset="2"> </el-col>
<el-button :id="domIdConfirm" type="primary" :loading="loading">应用(A)</el-button> <el-col :span="4" :offset="2">
</el-col> <el-button :id="domIdConfirm" type="primary" :disabled="!selected || speedLimitValue<=0" :loading="loading" @click="apply">应用(A)</el-button>
<el-col :span="4" :offset="2"> </el-col>
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button> <el-col :span="4" :offset="2">
</el-col> <el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
<el-col :span="4" :offset="2"> </el-col>
<el-button>帮助(H)</el-button> <el-col :span="4" :offset="2">
</el-col> <el-button>帮助(H)</el-button>
</el-row> </el-col>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" /> </el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
</el-dialog>
<section-limit-speed ref="sectionLimitSpeed" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" /> <section-limit-speed ref="sectionLimitSpeed" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</el-dialog> </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,42 +1,44 @@
<template> <template>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false"> <div>
<el-row> <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-table ref="singleTable" :data="tempData" highlight-current-row height="300px" @current-change="selectLine"> <el-row>
<el-table-column prop="name" label="轨道" /> <el-table ref="singleTable" :data="tempData" highlight-current-row height="300px" @current-change="selectLine">
<el-table-column prop="blockStatus" label="MAU"> <el-table-column prop="name" label="轨道" />
<template slot-scope="scope"> <el-table-column prop="blockStatus" label="MAU">
<span>{{ getStationName(scope.row) }}</span> <template slot-scope="scope">
</template> <span>{{ getStationName(scope.row) }}</span>
</el-table-column> </template>
<el-table-column prop="blockProcess" label="状态"> </el-table-column>
<template slot-scope="scope"> <el-table-column prop="blockProcess" label="状态">
<span>{{ getSectionStatus(scope.row.code) }}</span> <template slot-scope="scope">
</template> <span>{{ getSectionStatus(scope.row.code) }}</span>
</el-table-column> </template>
<el-table-column prop="unblockProcess" :label="isBlock?'关闭进程':'打开进程'"> </el-table-column>
<template slot-scope="scope"> <el-table-column prop="unblockProcess" :label="isBlock?'关闭进程':'打开进程'">
<span>{{ getProcess(scope.row.code) }}</span> <template slot-scope="scope">
</template> <span>{{ getProcess(scope.row.code) }}</span>
</el-table-column> </template>
</el-table> </el-table-column>
</el-row> </el-table>
<el-row justify="center" class="button-group"> </el-row>
<el-col :span="4" :offset="1"> <el-row justify="center" class="button-group">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">确定(O)</el-button> <el-col :span="4" :offset="1">
</el-col> <el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">确定(O)</el-button>
<el-col :span="4" :offset="2"> </el-col>
<el-button :id="domIdConfirm" type="primary" :loading="loading">应用(A)</el-button> <el-col :span="4" :offset="2">
</el-col> <el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="apply">应用(A)</el-button>
<el-col :span="4" :offset="2"> </el-col>
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button> <el-col :span="4" :offset="2">
</el-col> <el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
<el-col :span="4" :offset="2"> </el-col>
<el-button>帮助(H)</el-button> <el-col :span="4" :offset="2">
</el-col> <el-button>帮助(H)</el-button>
</el-row> </el-col>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" /> </el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
</el-dialog>
<section-open ref="sectionOpen" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" /> <section-open ref="sectionOpen" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</el-dialog> </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: {