宁波三号线操作

This commit is contained in:
fan 2020-12-10 14:40:41 +08:00
parent c297594128
commit 9114578e22
7 changed files with 269 additions and 58 deletions

View File

@ -132,6 +132,7 @@
<all-train-detail ref="allTrainDetail" />
<route-detail ref="routeDetail" />
<init-section-open ref="initSectionOpen" />
<init-section-limit-speed ref="initSectionLimitSpeed" />
</div>
</template>
<script>
@ -162,6 +163,7 @@ import SignalCanBlock 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';
@ -234,7 +236,8 @@ export default {
TrainDetail,
AllTrainDetail,
RouteDetail,
InitSectionOpen
InitSectionOpen,
InitSectionLimitSpeed
},
props: {
selected: {
@ -1599,7 +1602,7 @@ export default {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
this.$refs.sectionLimitSpeed.doShow();
this.$refs.initSectionLimitSpeed.doShow();
}
});
},

View File

@ -1,15 +1,15 @@
<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="sectionList" highlight-current-row height="300px" @current-change="selectLine1">
<el-table-column prop="name" label="轨道" />
<el-table-column prop="blockStatus" label="MAU">
<el-col :span="20">
<el-table ref="singleTable1" :data="tempData" highlight-current-row height="300px" @current-change="selectLine1">
<el-table-column prop="name" width="100" label="轨道" />
<el-table-column prop="blockStatus" width="120" label="MAU">
<template slot-scope="scope">
<span>{{ getStationName(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" label="临时限速">
<el-table-column prop="blockProcess" width="80" label="临时限速">
<template slot-scope="scope">
<span>{{ getLimitSpeed(scope.row.code) }}</span>
</template>
@ -19,23 +19,27 @@
<span>{{ getIsLimit(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" label="设置临时限速进程" width="140" />
<el-table-column prop="blockProcess" label="设置临时限速进程" width="140">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" label="用户里程起点" width="110" />
<el-table-column prop="unblockProcess" label="用户里程终点" width="110" />
</el-table>
</el-col>
<el-col :span="3">
<el-table ref="singleTable1" :data="limitList" highlight-current-row height="300px" @current-change="selectLine2">
<el-col :span="4">
<el-table ref="singleTable2" :data="limitList" highlight-current-row height="300px" @current-change="selectLine2">
<el-table-column prop="name" label="速度" />
</el-table>
</el-col>
</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">确定(O)</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || speedLimitValue<=0" @click="commit">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">应用(A)</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading">应用(A)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
@ -45,6 +49,7 @@
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<section-limit-speed ref="sectionLimitSpeed" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</el-dialog>
</template>
@ -53,11 +58,13 @@ 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 { mapGetters } from 'vuex';
import SectionLimitSpeed from './sectionLimitSpeed';
export default {
name: 'SwitchActive',
components: {
NoticeInfo
NoticeInfo,
SectionLimitSpeed
},
data() {
return {
@ -88,7 +95,10 @@ export default {
{ name: '70', value: 70 },
{ name: '75', value: 75 },
{ name: '80', value: 80 }
]
],
initEle: null,
commandEleCode:null,
speedLimitValue: 0
};
},
computed: {
@ -108,7 +118,7 @@ export default {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
},
title() {
return '确认/取消设置临时限速区域';
return '初始化设置临时限速区域';
}
},
watch: {
@ -125,8 +135,16 @@ export default {
},
methods: {
doShow(operate, selected) {
this.tempData = [];
this.sectionList.forEach(item => {
if (item.type === '01' || item.type === '04') {
this.tempData.push(item);
}
});
this.selected = selected;
//
this.initEle = null;
this.commandEleCode = null;
this.speedLimitValue = 0;
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
@ -135,26 +153,104 @@ export default {
doClose() {
this.loading = false;
this.dialogShow = false;
this.$refs.singleTable1.setCurrentRow();
this.$refs.singleTable2.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
selectLine1(val) {
if (!val) { return; }
this.initEle = null;
this.commandEleCode = null;
const step = {
code: `${val.code}`,
operation: OperationEvent.Section.setSpeed.choose.operation,
param: {}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.selected = val;
const sectionEle = this.$store.getters['map/getDeviceByCode'](val.code);
this.speedLimitValue = sectionEle.speedUpLimit;
if (this.speedLimitValue > 0) {
this.$refs.singleTable2.setCurrentRow(this.limitList[this.speedLimitValue / 5 - 1]);
} else {
this.$refs.singleTable2.setCurrentRow();
}
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
selectLine2(val) {
if (!val) { return; }
this.initEle = null;
this.commandEleCode = null;
const step = {
operation: OperationEvent.Section.setSpeed.choose1.operation,
param: {speedLimitValue: val.value}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.speedLimitValue = val.value;
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
getStationName(val) {
const stationElm = this.$store.getters['map/getDeviceByCode'](val.stationCode);
return stationElm.name;
},
getIsLimit(code) {
if (this.commandEleCode === code) {
return this.speedLimitValue > 0 ? '开启' : '关闭';
}
const sectionEle = this.$store.getters['map/getDeviceByCode'](code);
return sectionEle.speedUpLimit ? '开启' : '关闭';
return sectionEle.speedUpLimit > 0 ? '开启' : '关闭';
},
getLimitSpeed(code) {
if (this.commandEleCode === code) {
return this.speedLimitValue > 0 ? this.speedLimitValue : 0;
}
const sectionEle = this.$store.getters['map/getDeviceByCode'](code);
return sectionEle.speedUpLimit;
return sectionEle.speedUpLimit > 0 ? sectionEle.speedUpLimit : 0;
},
getProcess(code) {
if (this.commandEleCode && this.commandEleCode === code) {
return '完成';
} else if (this.initEle && this.initEle.code === code) {
return '已初始化';
} else {
return '';
}
},
commit() {
const step = {
code: `${this.selected.code}`,
operation: OperationEvent.Section.setSpeed.confirm.operation,
param: {}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionLimitSpeed.doShow(step, this.selected, this.speedLimitValue);
this.initEle = this.selected;
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
commandSuccess(code, val) {
this.commandEleCode = code;
if (!val) {
this.speedLimitValue = 0;
this.$refs.singleTable2.setCurrentRow();
}
},
cancelCommand() {
this.initEle = null;
},
handleClick() {

View File

@ -1,7 +1,7 @@
<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-table ref="singleTable" :data="sectionList" highlight-current-row height="300px" @current-change="selectLine">
<el-table ref="singleTable" :data="tempData" highlight-current-row height="300px" @current-change="selectLine">
<el-table-column prop="name" label="轨道" />
<el-table-column prop="blockStatus" label="MAU">
<template slot-scope="scope">
@ -25,7 +25,7 @@
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">应用(A)</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading">应用(A)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
@ -93,7 +93,8 @@ export default {
return this.isBlock ? '初始化关闭轨道' : '初始化开放轨道';
},
commitDisabled() {
return !this.selected || (this.selected.blockade && this.isBlock) || (!this.selected.blockade && !this.isBlock);
const sectionEle = this.$store.getters['map/getDeviceByCode']((this.selected || {}).code);
return !this.selected || (sectionEle.blockade && this.isBlock) || (!sectionEle.blockade && !this.isBlock);
}
},
watch: {
@ -110,6 +111,12 @@ export default {
},
methods: {
doShow(operate, selected) {
this.tempData = [];
this.sectionList.forEach(item => {
if (item.type === '01' || item.type === '04') {
this.tempData.push(item);
}
});
this.initEle = null;
this.commandEleCode = null;
this.selected = selected;
@ -138,7 +145,7 @@ export default {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.selected = this.$store.getters['map/getDeviceByCode'](val.code);
this.selected = val;
}
}).catch(() => {
this.$refs.noticeInfo.doShow();

View File

@ -2,27 +2,43 @@
<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 :data="sectionList" highlight-current-row height="300px" @current-change="selectLine">
<el-table ref="singleTable1" :data="tempData" highlight-current-row height="300px" @current-change="selectLine1">
<el-table-column prop="name" label="轨道" />
<el-table-column prop="blockStatus" label="MAU" />
<el-table-column prop="blockProcess" label="临时限速" />
<el-table-column prop="unblockProcess" label="PM临时限速" width="110" />
<el-table-column prop="blockProcess" label="设置临时限速进程" width="140" />
<el-table-column prop="blockStatus" width="120" label="MAU">
<template slot-scope="scope">
<span>{{ getStationName(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" width="80" label="临时限速">
<template slot-scope="scope">
<span>{{ getLimitSpeed(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" label="PM临时限速" width="110">
<template slot-scope="scope">
<span>{{ getIsLimit(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" label="设置临时限速进程" width="140">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" label="用户里程起点" width="110" />
<el-table-column prop="unblockProcess" label="用户里程终点" width="110" />
</el-table>
</el-col>
<el-col :span="3">
<el-table :data="limitList" highlight-current-row height="300px" @current-change="selectLine">
<el-table ref="singleTable2" :data="limitList" highlight-current-row height="300px" @current-change="selectLine2">
<el-table-column prop="name" label="速度" />
</el-table>
</el-col>
<el-col v-if="selectShow" :span="3">
<el-col :span="3">
<fieldset style="padding-left: 10px;">
<legend class="card_title">命令</legend>
<el-radio-group v-model="radio">
<el-radio label="1" style="margin-bottom: 10px;">确认(F)</el-radio>
<el-radio label="2">取消(N)</el-radio>
<el-radio-group v-model="command">
<el-radio :label="true" style="margin-bottom: 10px;">确认(F)</el-radio>
<el-radio :label="false">取消(N)</el-radio>
</el-radio-group>
</fieldset>
</el-col>
@ -32,7 +48,7 @@
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">应用(A)</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading">应用(A)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
@ -50,6 +66,7 @@ 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 { mapGetters } from 'vuex';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'SwitchActive',
@ -65,10 +82,11 @@ export default {
loading: false,
selected: null,
active: false,
selectShow: false,
activeName: 'first',
tempData: [],
radio: '1',
command: true,
operate: null,
speedLimitValue: 0,
limitList: [
{ name: '5', value: 5 },
{ name: '10', value: 10 },
@ -122,11 +140,21 @@ export default {
});
},
methods: {
doShow(operate, selected) {
doShow(operate, selected, value) {
this.tempData = [];
this.sectionList.forEach(item => {
if (item.type === '01' || item.type === '04') {
this.tempData.push(item);
}
});
this.selected = selected;
//
this.operate = operate;
this.speedLimitValue = value;
this.dialogShow = true;
this.$nextTick(function () {
this.$refs.singleTable1.setCurrentRow(selected);
this.$refs.singleTable2.setCurrentRow(this.limitList[value / 5 - 1]);
this.$store.dispatch('training/emitTipFresh');
});
},
@ -135,14 +163,46 @@ export default {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
selectLine(val) {
// console.log(val);
this.selectShow = true;
selectLine1(val) {
this.$refs.singleTable1.setCurrentRow(this.selected);
},
selectLine2(val) {
this.$refs.singleTable2.setCurrentRow(this.limitList[this.speedLimitValue / 5 - 1]);
},
getStationName(val) {
const stationElm = this.$store.getters['map/getDeviceByCode'](val.stationCode);
return stationElm.name;
},
getIsLimit(code) {
const sectionEle = this.$store.getters['map/getDeviceByCode'](code);
return sectionEle.speedUpLimit > 0 ? '开启' : '关闭';
},
getLimitSpeed(code) {
const sectionEle = this.$store.getters['map/getDeviceByCode'](code);
return sectionEle.speedUpLimit > 0 ? sectionEle.speedUpLimit : 0;
},
getProcess(code) {
if (this.selected && this.selected.code === code) {
return '等待确认/取消';
} else {
return '';
}
},
commit() {
},
handleClick() {
const operate = {
cmdType: this.command ? CMD.Section.CMD_SECTION_SET_LIMIT_SPEED : CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED,
operation: this.command ? OperationEvent.Section.setSpeed.confirm1.operation : OperationEvent.Section.cancelSpeed.confirm1.operation,
over: true,
param: {sectionCode: this.selected.code, speedLimitValue:this.speedLimitValue}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
this.$emit('commandSuccess', this.selected.code, this.command ? this.speedLimitValue : 0);
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
cancel() {
const operate = {

View File

@ -2,7 +2,7 @@
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-col :span="18">
<el-table ref="singleTable" :data="sectionList" highlight-current-row height="300px" @current-change="selectLine">
<el-table ref="singleTable" :data="tempData" highlight-current-row height="300px" @current-change="selectLine">
<el-table-column prop="name" label="轨道" />
<el-table-column prop="blockStatus" label="MAU">
<template slot-scope="scope">
@ -114,6 +114,12 @@ export default {
},
methods: {
doShow(operate, selected) {
this.tempData = [];
this.sectionList.forEach(item => {
if (item.type === '01' || item.type === '04') {
this.tempData.push(item);
}
});
this.selected = selected;
this.operate = operate;
this.dialogShow = true;

View File

@ -2,32 +2,48 @@
<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="sectionList" highlight-current-row height="300px" @current-change="selectLine">
<el-table-column prop="name" label="轨道" />
<el-table-column prop="blockStatus" label="MAU" />
<el-table-column prop="blockProcess" label="状态" />
<el-table-column prop="unblockProcess" label="临时限速" />
<el-table-column prop="unblockProcess" label="PM临时限速" />
<el-table :data="tempData" 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">
<span>{{ getStationName(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" width="150" label="状态">
<template slot-scope="scope">
<span>{{ getSectionStatus(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" label="临时限速">
<template slot-scope="scope">
<span>{{ getLimitSpeed(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" width="100" label="PM临时限速">
<template slot-scope="scope">
<span>{{ getIsLimit(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" label="站台" />
<el-table-column prop="unblockProcess" label="闭塞区段" />
<el-table-column prop="unblockProcess" label="打开进程" />
<el-table-column prop="unblockProcess" label="关闭进程" />
<el-table-column prop="unblockProcess" label="设置临时限速进程" />
<el-table-column prop="unblockProcess" label="清除临时限速进程" />
<el-table-column prop="unblockProcess" label="用户里程起点" />
<el-table-column prop="unblockProcess" label="用户里程终点" />
<el-table-column prop="unblockProcess" width="140" label="设置临时限速进程" />
<el-table-column prop="unblockProcess" width="140" label="清除临时限速进程" />
<el-table-column prop="unblockProcess" width="120" label="用户里程起点" />
<el-table-column prop="unblockProcess" width="120" label="用户里程终点" />
</el-table>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="5">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">打印(P)</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="true">打印(P)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button>帮助(H)</el-button>
<el-button :disabled="true">帮助(H)</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
@ -94,6 +110,12 @@ export default {
},
methods: {
doShow(operate, selected) {
this.tempData = [];
this.sectionList.forEach(item => {
if (item.type === '01' || item.type === '04') {
this.tempData.push(item);
}
});
this.selected = selected;
//
this.dialogShow = true;
@ -112,8 +134,21 @@ export default {
},
commit() {
},
handleClick() {
getStationName(val) {
const stationElm = this.$store.getters['map/getDeviceByCode'](val.stationCode);
return stationElm.name;
},
getLimitSpeed(code) {
const sectionEle = this.$store.getters['map/getDeviceByCode'](code);
return sectionEle.speedUpLimit > 0 ? sectionEle.speedUpLimit : 0;
},
getSectionStatus(val) {
const sectionEle = this.$store.getters['map/getDeviceByCode'](val.code);
return sectionEle.blockade ? '关闭双向:所有列车' : '打开';
},
getIsLimit(code) {
const sectionEle = this.$store.getters['map/getDeviceByCode'](code);
return sectionEle.speedUpLimit > 0 ? '开启' : '关闭';
},
cancel() {
const operate = {

View File

@ -1337,6 +1337,10 @@ export const OperationEvent = {
menuButton: {
operation: '4077',
domId: '_Tips-Section-SetSpeed-Menu{BOTTOM}'
},
choose1: {
operation: '4078',
domId: '_Tips-Section-SetSpeed-Choose1'
}
},
// 取消速度