冲突检测 代码调整
冲突进路办理确认代码调整
This commit is contained in:
parent
ae28541ae1
commit
dfab1da1c6
@ -39,9 +39,14 @@
|
||||
<span>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="控制状态" width="100">
|
||||
<el-table-column prop="status" label="控制状态" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
<div v-if="systemName=='xian-01__systerm'">
|
||||
{{ scope.row.atsControl == '0' ? '人工' : scope.row.checkConflict?'自动 (进行冲突检查)':'自动 (不进行冲突检查)' }}
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -112,7 +117,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, tempData) {
|
||||
this.$root.$emit('dialogOpen', selected);
|
||||
this.$root.$emit('dialogOpen', selected);
|
||||
this.selected = selected;
|
||||
// 如果不是因为断点激活则需要,初始化菜单初始值
|
||||
if (!this.dialogShow) {
|
||||
@ -142,7 +147,7 @@ export default {
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$root.$emit('dialogClose', this.selected);
|
||||
this.$root.$emit('dialogClose', this.selected);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
// mouseCancelState(this.selected);
|
||||
},
|
||||
|
@ -54,9 +54,8 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="systemName == 'xian-01__systerm'" prop="conflict" label="冲突检测" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="title == '进路交ATS自动控'&& scope.row.atsControl==0" slot-scope="scope">
|
||||
<el-checkbox
|
||||
v-if="scope.row.atsControl==0"
|
||||
v-model="checkConflictList[scope.$index].value"
|
||||
style="text-align: center; display: block;"
|
||||
/>
|
||||
@ -99,7 +98,6 @@ import NingBoConfirmTip from '../../../ningbo_01/menus/dialog/childDialog/confir
|
||||
// import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from '../childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '../../utils/menuOperate';
|
||||
import { delimiter } from 'path';
|
||||
|
||||
export default {
|
||||
name: 'RouteHandControl',
|
||||
@ -186,7 +184,8 @@ export default {
|
||||
this.selected = selected;
|
||||
this.allSelect = false;
|
||||
this.changeList = [];
|
||||
this.checkConflictList.splice(0, this.checkConflictList.length - 1);
|
||||
this.checkConflictList = [];
|
||||
// .splice(0, this.checkConflictList.length - 1);
|
||||
this.commitDisabled = true;
|
||||
this.selection = [];
|
||||
this.disabledLength = 0;
|
||||
@ -217,14 +216,14 @@ export default {
|
||||
if (elem.atsControl == '1') {
|
||||
elem.disabled = true;
|
||||
that.disabledLength++;
|
||||
that.checkConflictList.push({code:elem.code, value:null});
|
||||
} else {
|
||||
if (that.systemName == 'xian-01__systerm') {
|
||||
this.checkConflictList.push({code:elem.code, value:false});
|
||||
that.checkConflictList.push({code:elem.code, value:false});
|
||||
// that.$set('checkConflictMap', elem.code, );
|
||||
// that.checkConflictMap[elem.code] = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -149,7 +149,12 @@ export const menuOperate = {
|
||||
signalTotalCancle:{ // 信号机总取消
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_TOTAL_CANCLE
|
||||
},
|
||||
signalConflictRoute:{ // 冲突进路办理
|
||||
operation: OperationEvent.Signal.signalConflictRoute.menu.operation,
|
||||
cmdType:CMD.Signal.CMD_SIGNAL_CONFLICT_ROUTE_SET_CONFIRM
|
||||
}
|
||||
// Signal_Conflict_Route_Set_Confirm
|
||||
},
|
||||
Switch:{
|
||||
lock:{
|
||||
|
186
src/jmapNew/theme/xian_01/menus/dialog/conflictRoute.vue
Normal file
186
src/jmapNew/theme/xian_01/menus/dialog/conflictRoute.vue
Normal file
@ -0,0 +1,186 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="conflictRoute"
|
||||
:class="systemName+' route-hand-control'"
|
||||
title="冲突进路办理确认"
|
||||
:visible.sync="show"
|
||||
width="435px"
|
||||
:before-close="closeDialog"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div>
|
||||
<div>
|
||||
<div class="conflictRoute">
|
||||
<span class="conflictRouteTitle">冲突进路:</span>
|
||||
<span class="conflictRouteName">{{ routeName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="conflictDescription">冲突描述:</div>
|
||||
<div class="context">
|
||||
{{ message }}
|
||||
</div>
|
||||
<div class="conflictTips">距离对话框关闭还有:{{ minutes }}分{{ seconds }}秒,请确认是否办理冲突进路。</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="7" :offset="3">
|
||||
<el-button
|
||||
style="width: 115px;"
|
||||
:loading="loading"
|
||||
@click="selectConflict"
|
||||
>选排冲突进路</el-button>
|
||||
</el-col>
|
||||
<!-- :id="domIdConfirm" -->
|
||||
<!-- :disabled="commitDisabled" -->
|
||||
<!-- :id="domIdCancel" -->
|
||||
<el-col :span="7" :offset="3">
|
||||
<el-button style="width: 115px;" :loading="loading" @click="routeRunplan">按计划执行</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<notice-info ref="noticeInfo" pop-class="xian-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
export default {
|
||||
name:'ConflictRoute',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
props:{
|
||||
systemName:{
|
||||
type:String,
|
||||
required:true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
message:'',
|
||||
routeCode:'',
|
||||
routeName:'',
|
||||
allMinutes:10 * 60,
|
||||
minutes:10,
|
||||
seconds:0,
|
||||
inter:null,
|
||||
loading:false
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
doShow({route, description}) {
|
||||
if (route) {
|
||||
this.routeCode = route.code;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](route.stationCode);
|
||||
if (station) {
|
||||
this.routeName = station.name + ' ' + route.name;
|
||||
} else {
|
||||
this.routeName = route.name;
|
||||
}
|
||||
}
|
||||
this.message = description;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.inter = setInterval(()=>{
|
||||
if (this.allMinutes <= 0) {
|
||||
clearInterval(this.inter);
|
||||
this.routeRunplan();
|
||||
}
|
||||
this.allMinutes--;
|
||||
this.minutes = (this.allMinutes - this.allMinutes % 60) / 60;
|
||||
this.seconds = this.allMinutes % 60;
|
||||
}, 1000);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
closeDialog() {
|
||||
const that = this;
|
||||
clearInterval(this.inter);
|
||||
commitOperate(menuOperate.Signal.signalConflictRoute, {routeCode:this.routeCode, way:1}, 3).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
that.doClose();
|
||||
}
|
||||
}).catch(error=>{
|
||||
this.dialogShow = false;
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
|
||||
selectConflict() {
|
||||
this.commit(2);
|
||||
},
|
||||
routeRunplan() {
|
||||
this.commit(1);
|
||||
},
|
||||
commit(way) {
|
||||
this.loading = true;
|
||||
// int way, 处理方式:1-按计划执行,2-执行冲突进路
|
||||
commitOperate(menuOperate.Signal.signalConflictRoute, {routeCode:this.routeCode, way:way}, 3).then(({valid, operate})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
// this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
}).catch(error=>{
|
||||
this.loading = false;
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.conflictRoute .context {
|
||||
margin:5px 13px 13px 13px;
|
||||
padding-bottom: 10px !important;
|
||||
border: 1px solid lightgray;
|
||||
line-height: 138%;
|
||||
font-size: 15px;
|
||||
height:115px;
|
||||
}
|
||||
.conflictDescription{
|
||||
margin-left:13px;
|
||||
font-size: 15px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.conflictRoute{
|
||||
padding-left: 13px;
|
||||
font-size: 15px;
|
||||
width: 100%;
|
||||
padding-right: 13px;
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
align-content: center;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.conflictRouteName{
|
||||
font-size: 15px;
|
||||
height: 23px;
|
||||
border: 2px inset #E2E2E2;
|
||||
padding-left: 5px;
|
||||
flex-grow: 1;
|
||||
}
|
||||
.conflictRouteTitle{
|
||||
|
||||
}
|
||||
.conflictTips{
|
||||
margin-left: 13px;
|
||||
}
|
||||
</style>
|
@ -9,6 +9,7 @@
|
||||
<route-hand-control ref="routeHandControl" system-name="xian-01__systerm" />
|
||||
<route-detail ref="routeDetail" system-name="xian-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="xian-01__systerm" />
|
||||
<conflict-route ref="conflictRoute" system-name="xian-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -27,6 +28,7 @@ import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import ConflictRoute from './dialog/conflictRoute';
|
||||
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
@ -39,6 +41,7 @@ export default {
|
||||
RouteHandControl,
|
||||
RouteDetail,
|
||||
NoticeInfo,
|
||||
ConflictRoute,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
@ -239,6 +242,21 @@ export default {
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
'$store.state.socket.simulationAlarmInfo': function(val) {
|
||||
(val || []).forEach(item => {
|
||||
if (!item.confirmed) {
|
||||
if (item.level === '0') {
|
||||
if (item.type == 'Conflict_Route_Set') {
|
||||
const route = this.routeList.find(each=>{ return each.code == item.deviceCode; });
|
||||
this.$refs.conflictRoute.doShow({route:route, description:item.description});
|
||||
// doShow();
|
||||
// "":"Route205",
|
||||
// "description":"计划车(111046(322)触发的进路[X2112-X2102]与计划(311045)从节点(务庄站(22)_G2202)到节点(香湖湾站(21)_G2102)的计划冲突,无法选排"
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -291,6 +309,9 @@ export default {
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, { signalCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeSelection.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
// const route = this.routeList.find(each=>{ return each.code == 'Route205'; });
|
||||
// this.$refs.conflictRoute.doShow({route:route, description:'计划车(111046(322)触发的进路[X2112-X2102]与计划(311045)从节点(务庄站(22)_G2202)到节点(香湖湾站(21)_G2102)的计划冲突,无法选排'});
|
||||
// this.$refs.conflictRoute.doShow({deviceCode:'Route205', });
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -126,7 +126,9 @@ export default {
|
||||
/** 信号机总取消 */
|
||||
CMD_SIGNAL_TOTAL_CANCLE:{value:'Signal_Total_Cancel', label: '信号机总取消'},
|
||||
/** 设置保护 */
|
||||
CMD_SIGNAL_SET_OVERLAP : {value: 'Signal_Set_Overlap', label: '设置保护'}
|
||||
CMD_SIGNAL_SET_OVERLAP : {value: 'Signal_Set_Overlap', label: '设置保护'},
|
||||
/** 冲突进路办理 */
|
||||
CMD_SIGNAL_CONFLICT_ROUTE_SET_CONFIRM:{value: 'Signal_Conflict_Route_Set_Confirm', label: '冲突进路办理'}
|
||||
},
|
||||
|
||||
// 物理区段操作
|
||||
|
@ -109,6 +109,7 @@ class Handler {
|
||||
this.afterValid(operation, valid).then(()=>{
|
||||
rtn.valid = valid;
|
||||
if (operation.cmdType && valid) {
|
||||
debugger;
|
||||
const command = this.getCommand(operation);
|
||||
if (command) {
|
||||
CommandHandler.execute(command.id, command.get()).then(response => {
|
||||
|
@ -1703,6 +1703,13 @@ export const OperationEvent = {
|
||||
operation: '3211',
|
||||
domId: '_Tips-Signal-setOverlap-Menu{BOTTOM}'
|
||||
}
|
||||
},
|
||||
// 冲突进路办理
|
||||
signalConflictRoute:{
|
||||
menu: {
|
||||
operation: '322',
|
||||
domId: '_Tips-Signal-conflictRoute-Menu{TOP}'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user