区段切除报错调整

This commit is contained in:
fan 2020-08-27 10:45:06 +08:00
parent 7a7ae9591a
commit a01267abe1
5 changed files with 462 additions and 26 deletions

View File

@ -2,8 +2,8 @@ class Theme {
constructor(code) { constructor(code) {
this._code = '02'; this._code = '02';
this._mapMenu = { this._mapMenu = {
'01': 'chengdu_01', // '01': 'chengdu_01',
// '01': 'ningbo_03', '01': 'ningbo_03',
'02': 'fuzhou_01', '02': 'fuzhou_01',
'03': 'beijing_01', '03': 'beijing_01',
'04': 'chengdu_03', '04': 'chengdu_03',

View File

@ -94,6 +94,8 @@
<interval-stop-number ref="intervalStopNumber" /> <interval-stop-number ref="intervalStopNumber" />
<allocate-time ref="allocateTime" /> <allocate-time ref="allocateTime" />
<station-control ref="stationControl" /> <station-control ref="stationControl" />
<stand-detail ref="standDetail" />
<switch-command ref="switchCommand" />
</div> </div>
</template> </template>
<script> <script>
@ -107,9 +109,11 @@ import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import TrainDistribution from './menuDialog/trainDistribution'; import TrainDistribution from './menuDialog/trainDistribution';
import StandControl from './menuDialog/standControl'; import StandControl from './menuDialog/standControl';
import StandDetain from './menuDialog/standDetain'; import StandDetain from './menuDialog/standDetain';
import StandDetail from './menuDialog/standDetail';
import IntervalStopNumber from './menuDialog/intervalStopNumber'; import IntervalStopNumber from './menuDialog/intervalStopNumber';
import AllocateTime from './menuDialog/allocateTime'; import AllocateTime from './menuDialog/allocateTime';
import StationControl from './menuDialog/stationControl'; import StationControl from './menuDialog/stationControl';
import SwitchCommand from './menuDialog/switchCommand';
export default { export default {
name: 'MenuBar', name: 'MenuBar',
@ -121,7 +125,9 @@ export default {
StandDetain, StandDetain,
IntervalStopNumber, IntervalStopNumber,
AllocateTime, AllocateTime,
StationControl StationControl,
StandDetail,
SwitchCommand
}, },
props: { props: {
selected: { selected: {
@ -282,7 +288,7 @@ export default {
}, },
{ {
title: '显示', title: '显示',
click: this.undeveloped click: this.showStandDetail
} }
] ]
}, },
@ -292,7 +298,7 @@ export default {
children: [ children: [
{ {
title: '命令', title: '命令',
click: this.undeveloped click: this.setSwitchCommand
}, },
{ {
title: '封锁', title: '封锁',
@ -696,7 +702,7 @@ export default {
}, },
{ {
title: '显示', title: '显示',
click: this.undeveloped click: this.showStandDetail
} }
] ]
}, },
@ -706,7 +712,7 @@ export default {
children: [ children: [
{ {
title: '命令', title: '命令',
click: this.undeveloped click: this.setSwitchCommand
}, },
{ {
title: '封锁', title: '封锁',
@ -1121,32 +1127,121 @@ export default {
}); });
}, },
handleArrangeRoute() { handleArrangeRoute() {
this.closeMenu(true); const operate = {
this.$refs.arrangeRoute.doShow(); type: 'bar',
operation: ''
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.arrangeRoute.doShow();
}
});
}, },
handleTrainDistribution() { handleTrainDistribution() {
this.closeMenu(true); const operate = {
this.$refs.trainDistribution.doShow(); type: 'bar',
operation: ''
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDistribution.doShow();
}
});
}, },
standOpenOrClose() { standOpenOrClose() {
this.closeMenu(true); const operate = {
this.$refs.standControl.doShow(); type: 'bar',
operation: ''
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow();
}
});
}, },
setStandDetain() { setStandDetain() {
this.closeMenu(true); const operate = {
this.$refs.standDetain.doShow(); type: 'bar',
operation: ''
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standDetain.doShow();
}
});
}, },
setIntervalStopNumber() { setIntervalStopNumber() {
this.closeMenu(true); const operate = {
this.$refs.intervalStopNumber.doShow(); type: 'bar',
operation: ''
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.intervalStopNumber.doShow();
}
});
}, },
setAllocateTime() { setAllocateTime() {
this.closeMenu(true); const operate = {
this.$refs.allocateTime.doShow(); type: 'bar',
operation: ''
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.allocateTime.doShow();
}
});
}, },
authorizeTransfer() { authorizeTransfer() {
this.closeMenu(true); const operate = {
this.$refs.stationControl.doShow(); type: 'bar',
operation: ''
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationControl.doShow();
}
});
},
showStandDetail() {
const operate = {
type: 'bar',
operation: ''
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standDetail.doShow();
}
});
},
setSwitchCommand() {
const operate = {
type: 'bar',
operation: ''
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
this.$refs.switchCommand.doShow();
}
});
} }
} }
}; };
@ -1237,7 +1332,7 @@ export default {
padding-left: 0 !important; padding-left: 0 !important;
background: #F0F0F0; background: #F0F0F0;
line-height: $menuItemHeight; line-height: $menuItemHeight;
width: $menuItemWidth; width: $menuItemWidth + 20;
} }
.active { .active {

View File

@ -0,0 +1,143 @@
<template>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="600px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row style="width: 100%;overflow-x: auto;">
<el-table :data="stationStandList" border height="350px">
<el-table-column prop="name" width="80" label="站台" />
<el-table-column prop="status" width="80" label="状态" />
<el-table-column prop="minTime" width="130" label="最小停站时间" />
<el-table-column prop="time" width="130" label="规定停站时间" />
<el-table-column prop="maxTime" width="130" label="最大停站时间" />
<el-table-column prop="hold" width="80" label="扣车" />
<el-table-column prop="section" width="80" label="轨道" />
<el-table-column prop="parkTime" width="130" label="当前停站时间" />
<el-table-column prop="emergencyButton" width="80" label="紧急按钮" />
<el-table-column prop="setting" width="80" label="门设置" />
<el-table-column prop="bypass" width="80" label="门旁路" />
</el-table>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">打印(P)</el-button>
</el-col>
<el-col :span="6" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
</el-col>
<el-col :span="6" :offset="2">
<el-button>帮助(H)</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
</el-dialog>
</template>
<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 { mapGetters } from 'vuex';
export default {
name: 'StandDetain',
components: {
NoticeInfo
},
data() {
return {
status: false,
standStatus: true,
allChecked: false,
dialogShow: false,
loading: false,
selected: null
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
},
title() {
return '站台信息显示';
}
},
watch: {
'$store.state.map.keyboardEnterCount': function (val) {
if (this.show) {
this.commit();
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
},
handleClick() {
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.menu-li {
height: 30px;
line-height: 30px;
text-align: left;
list-style:none;
padding-left: 5px;
border-right: 2px solid #696969;
color: #000;
}
.set-status-box {
position: relative;
top: 200px;
border: 1px solid #AFAFAF;
padding-left: 10px;
}
.set-status-title{
position: relative;
top: -15px;
background: #F0F0F0;
width: 60px;
text-align: center;
}
</style>

View File

@ -19,8 +19,8 @@
</el-table> </el-table>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<div style="position: relative;top: 110px;left: 20px;color: #000;width: 60px;text-align: center;background: #F0F0F0;">接收转移</div> <div class="radio-box-title">接收转移</div>
<div style="position: relative; top: 100px;border: 1px solid #BBBBBB; text-align: center;width: 100px;left: 18px;padding: 10px;"> <div class="radio-box">
<el-radio v-model="accept" :label="true" style="display: block;margin-bottom: 10px;"></el-radio> <el-radio v-model="accept" :label="true" style="display: block;margin-bottom: 10px;"></el-radio>
<el-radio v-model="accept" :label="false" style="display: block;"></el-radio> <el-radio v-model="accept" :label="false" style="display: block;"></el-radio>
</div> </div>
@ -59,6 +59,7 @@ export default {
tableData: [], tableData: [],
accept: false, accept: false,
operate: null, operate: null,
loading: false,
dialogShow: false, dialogShow: false,
disabledClose: false, disabledClose: false,
disabledCommit: false, disabledCommit: false,
@ -106,6 +107,9 @@ export default {
return ''; return '';
} }
}, },
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
},
domIdCancel() { domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}, },
@ -229,12 +233,30 @@ export default {
</script> </script>
<style scoped rel="stylesheet/scss" lang="scss" scoped> <style scoped rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
.radio-box {
position: relative;
top: 100px;
border: 1px solid #BBBBBB;
text-align: center;
width: 100px;
left: 18px;
padding: 15px;
}
.radio-box-title {
position: relative;
top: 115px;
left: 20px;
color: #000;
width: 60px;
text-align: center;
background: #F0F0F0;
z-index: 1;
}
/deep/ { /deep/ {
.el-radio { .el-radio {
color: #000; color: #000;
font-weight: bold; font-weight: bold;
} }
.el-cascader-node>.el-radio, .el-radio:last-child{ .el-cascader-node>.el-radio, .el-radio:last-child{
margin-right: 20px; margin-right: 20px;
} }

View File

@ -0,0 +1,176 @@
<template>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="650px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-col :span="18">
<el-table :data="stationStandList" height="350px">
<el-table-column prop="name" label="道岔" />
<el-table-column prop="mode" label="模式" />
<el-table-column prop="position" label="位置" />
<el-table-column prop="reserved" label="预留" />
<el-table-column prop="status" label="状态" />
</el-table>
</el-col>
<el-col :span="6">
<div class="radio-box-title">设置模式</div>
<div class="radio-box">
<el-radio v-model="mode" label="auto" style="display: block;margin-bottom: 10px;">自动</el-radio>
<el-radio v-model="mode" label="artificial" style="display: block;">人工</el-radio>
</div>
<div class="radio-box-title">设置位置</div>
<div class="radio-box">
<el-radio v-model="position" label="normal" style="display: block;margin-bottom: 10px;">定位</el-radio>
<el-radio v-model="position" label="reverse" style="display: block;">反位</el-radio>
</div>
<div class="radio-box-title">设置预留</div>
<div class="radio-box">
<el-radio v-model="position" label="normal" style="display: block;margin-bottom: 10px;">自动与预留</el-radio>
<el-radio v-model="position" label="reverse" style="display: block;margin-bottom: 10px;">预留</el-radio>
<el-radio v-model="position" label="reverse" style="display: block;">释放</el-radio>
</div>
</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-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">应用(A)</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-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
</el-dialog>
</template>
<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 { mapGetters } from 'vuex';
export default {
name: 'StandDetain',
components: {
NoticeInfo
},
data() {
return {
status: false,
standStatus: true,
allChecked: false,
dialogShow: false,
loading: false,
selected: null,
mode: '',
position: '',
reserved: ''
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
},
title() {
return '道岔命令';
}
},
watch: {
'$store.state.map.keyboardEnterCount': function (val) {
if (this.show) {
this.commit();
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
},
handleClick() {
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.menu-li {
height: 30px;
line-height: 30px;
text-align: left;
list-style:none;
padding-left: 5px;
border-right: 2px solid #696969;
color: #000;
}
.radio-box {
position: relative;
border: 1px solid #BBBBBB;
width: 130px;
left: 18px;
padding: 15px;
}
.radio-box-title {
position: relative;
left: 28px;
top: 15px;
text-align: center;
color: #000;
width: 60px;
background: #F0F0F0;
z-index: 1;
}
/deep/ {
.el-radio {
color: #000;
font-weight: bold;
}
.el-cascader-node>.el-radio, .el-radio:last-child{
margin-right: 20px;
}
}
</style>