大铁线路调整11

This commit is contained in:
fan 2022-04-22 17:55:42 +08:00
parent 3e5ad8b05f
commit 93a3deb20c
9 changed files with 116 additions and 47 deletions

View File

@ -503,6 +503,11 @@ export const menuOperate = {
departureNotice: { departureNotice: {
operation: OperationEvent.CTCCommand.departureNotice.menu.operation, operation: OperationEvent.CTCCommand.departureNotice.menu.operation,
cmdType: CMD.CTC.CTC_DEPARTURE_NOTICE cmdType: CMD.CTC.CTC_DEPARTURE_NOTICE
},
// 自动触发
autoTrigger: {
operation: OperationEvent.CTCCommand.autoTrigger.menu.operation,
cmdType: CMD.CTC.CTC_AUTO_TRIGGER
} }
} }
@ -542,15 +547,12 @@ export function commitOperate(operate, paramList, over, fillStep = {}) {
Object.assign(step, fillStep); Object.assign(step, fillStep);
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
console.log(step, '=============');
store.dispatch('training/nextNew', step).then(({ valid }) => { store.dispatch('training/nextNew', step).then(({ valid }) => {
console.log(valid, '===11');
if (valid) { if (valid) {
store.dispatch('menuOperation/handleBreakFlag', { break: true }); store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
resolve({ valid: valid, operate: {...step} }); resolve({ valid: valid, operate: {...step} });
}).catch(error=>{ }).catch(error=>{
console.log(error, '===22');
reject(error); reject(error);
}); });
}); });

View File

@ -2,7 +2,7 @@
<el-dialog v-dialogDrag top="12vh" class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="1100px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false"> <el-dialog v-dialogDrag top="12vh" class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="1100px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row> <el-row>
<el-col :span="2">列车车次</el-col> <el-col :span="2">列车车次</el-col>
<el-col :span="21"><span>{{ selected.tripNumber }}</span></el-col> <el-col :span="21"><span style="font-size: 18px;color: #f00;">{{ selected.tripNumber }}</span></el-col>
</el-row> </el-row>
<el-row style="margin-top: 10px;"> <el-row style="margin-top: 10px;">
<el-col :span="2">进路描述</el-col> <el-col :span="2">进路描述</el-col>
@ -244,7 +244,6 @@ export default {
this.$refs.map.updateMapDevice([...containSectionList, ...containSwitchList]); this.$refs.map.updateMapDevice([...containSectionList, ...containSwitchList]);
this.beforeSectionList = containSectionList; this.beforeSectionList = containSectionList;
this.beforeSwitchList = containSwitchList; this.beforeSwitchList = containSwitchList;
console.log(this.beforeSectionList, this.beforeSwitchList, '======');
// //
const operate = { const operate = {
@ -267,14 +266,10 @@ export default {
this.loading = true; this.loading = true;
const type = this.route.lock ? menuOperate.Signal.cancelTrainRoute :menuOperate.Signal.arrangementRoute; const type = this.route.lock ? menuOperate.Signal.cancelTrainRoute :menuOperate.Signal.arrangementRoute;
const param = this.route.lock ? { signalCode: this.route.startSignalCode } : { routeCode:this.route.code }; const param = this.route.lock ? { signalCode: this.route.startSignalCode } : { routeCode:this.route.code };
console.log(this.route.startSignalCode, '-----------', type, param);
commitOperate(type, param, 3).then(({valid, operate})=>{ commitOperate(type, param, 3).then(({valid, operate})=>{
this.loading = false; this.loading = false;
if (valid) { if (valid) {
// const signal = this.$store.getters['map/getDeviceByCode'](this.row.startSignalCode);
// operate.message = `<br/>${signal.name}<br/>${this.row.name}`;
this.doClose(); this.doClose();
this.$refs.confirmTip.doShow(operate);
} }
}).catch((e) => { }).catch((e) => {
console.error(e); console.error(e);

View File

@ -51,14 +51,14 @@ export default {
menu: [], menu: [],
menuNormal: { menuNormal: {
Local: [ Local: [
{ // {
label: '图纸调用', // label: '',
handler: this.drawingCall // handler: this.drawingCall
}, // },
{ // {
label: '基础设备培训', // label: '',
handler: this.baDeTrCall // handler: this.baDeTrCall
} // }
], ],
Center: [ Center: [
// { // {

View File

@ -57,14 +57,14 @@ export default {
menu: [], menu: [],
menuNormal: { menuNormal: {
Local: [ Local: [
{ // {
label: '图纸调用', // label: '',
handler: this.drawingCall // handler: this.drawingCall
}, // },
{ // {
label: '基础设备培训', // label: '',
handler: this.baDeTrCall // handler: this.baDeTrCall
} // }
// { // {
// label: '', // label: '',
// handler: this.arrangementRoute, // handler: this.arrangementRoute,

View File

@ -42,14 +42,14 @@ export default {
menu: [], menu: [],
menuNormal: { menuNormal: {
Local: [ Local: [
{ // {
label: '图纸调用', // label: '',
handler: this.drawingCall // handler: this.drawingCall
}, // },
{ // {
label: '基础设备培训', // label: '',
handler: this.baDeTrCall // handler: this.baDeTrCall
} // }
], ],
Center: [ Center: [
] ]

View File

@ -51,14 +51,14 @@ export default {
menu: [], menu: [],
menuNormal: { menuNormal: {
Local: [ Local: [
{ // {
label: '图纸调用', // label: '',
handler: this.drawingCall // handler: this.drawingCall
}, // },
{ // {
label: '基础设备培训', // label: '',
handler: this.baDeTrCall // handler: this.baDeTrCall
} // }
], ],
Center: [ Center: [
// { // {

View File

@ -370,6 +370,7 @@ export default {
CTC: { CTC: {
CTC_RECEIVING_NOTICE: {value: 'CTC_RECEIVING_NOTICE', label: '接预'}, CTC_RECEIVING_NOTICE: {value: 'CTC_RECEIVING_NOTICE', label: '接预'},
CTC_DEPARTURE_NOTICE: {value: 'CTC_DEPARTURE_NOTICE', label: '发预'}, CTC_DEPARTURE_NOTICE: {value: 'CTC_DEPARTURE_NOTICE', label: '发预'},
CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION:{value:'ASSIST_PRESS_DOWN_TURN_DIRECTION', label:'改方'} CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION:{value:'ASSIST_PRESS_DOWN_TURN_DIRECTION', label:'改方'},
CTC_AUTO_TRIGGER: {value: 'CTC_AUTO_TRIGGER', label: '自动触发'}
} }
}; };

View File

@ -3555,7 +3555,13 @@ export const OperationEvent = {
operation:'1102', operation:'1102',
domId: '_Tips-CTC-AssistPressDownTurnDirection-Menu{TOP}' domId: '_Tips-CTC-AssistPressDownTurnDirection-Menu{TOP}'
} }
} },
autoTrigger: {
menu: {
operation: '1103',
domId: '_Tips-CTC-AutoTrigger-Menu{TOP}'
}
}
} }
}; };

View File

@ -19,7 +19,7 @@
</div> </div>
</div> </div>
<div :key="item.id" v-for="item in infoList" style="display: flex; justify-content: space-between;border-top: 1px solid #fff;padding: 3px;height: 36px;align-items: center;"> <div :key="item.id" v-for="item in infoList" style="display: flex; justify-content: space-between;border-top: 1px solid #fff;padding: 3px;height: 36px;align-items: center;">
<div>{{item.trackName}}</div> <div style="padding: 5px 20px;border-radius: 5px;border-width: 2px;border-style: solid;" :style="{borderColor: item.arrive ? '#f00': '#DFE3E6' }">{{item.trackName}}</div>
<div>{{item.tripNumber}}</div> <div>{{item.tripNumber}}</div>
<div style="background: #FFCBEC;border: 1px solid #315FD1;border-radius: 3px;font-size: 10px;">{{ item.trainType?'客':'' }}</div> <div style="background: #FFCBEC;border: 1px solid #315FD1;border-radius: 3px;font-size: 10px;">{{ item.trainType?'客':'' }}</div>
<div>{{item.trainDistanceInfo}}</div> <div>{{item.trainDistanceInfo}}</div>
@ -38,6 +38,7 @@
<div <div
class="button-box-sec" class="button-box-sec"
:style="{ background: handleBackground(item.receivingRouteLock, item.receivingRouteCode) }" :style="{ background: handleBackground(item.receivingRouteLock, item.receivingRouteCode) }"
@contextmenu="popMenuShow(item, 'rec' ,$event)"
@click="doShowRoute(item, 'rec')"> @click="doShowRoute(item, 'rec')">
{{ '接路' + (item.receivingRouteLock ? '':getRouteName(item.receivingRouteCode)) }} {{ '接路' + (item.receivingRouteLock ? '':getRouteName(item.receivingRouteCode)) }}
</div> </div>
@ -51,12 +52,13 @@
<div>{{ item.planArriveTime }}</div> <div>{{ item.planArriveTime }}</div>
<div>{{ item.planDepartureTime }}</div> <div>{{ item.planDepartureTime }}</div>
</div> </div>
<div>起点-->终点</div> <div></div><!--起点--终点-->
<div style="display: flex;"> <div style="display: flex;">
<div :style="{ background: item.departureNotice ? '#29CA42': '#ccc' }" class="button-box-fir" @click="doShowRecDep(item,'dep')">发预</div> <div :style="{ background: item.departureNotice ? '#29CA42': '#ccc' }" class="button-box-fir" @click="doShowRecDep(item,'dep')">发预</div>
<div <div
class="button-box-sec" class="button-box-sec"
:style="{ background: handleBackground(item.departureRouteLock, item.departureRouteCode) }" :style="{ background: handleBackground(item.departureRouteLock, item.departureRouteCode) }"
@contextmenu="popMenuShow(item, 'dep' ,$event)"
@click="doShowRoute(item, 'dep')"> @click="doShowRoute(item, 'dep')">
{{ '发路' + (item.departureRouteLock ? '':getRouteName(item.departureRouteCode)) }} {{ '发路' + (item.departureRouteLock ? '':getRouteName(item.departureRouteCode)) }}
</div> </div>
@ -128,7 +130,11 @@
<el-table-column property="date" label="注意确认"/> <el-table-column property="date" label="注意确认"/>
<el-table-column property="tripNumber" label="车次"/> <el-table-column property="tripNumber" label="车次"/>
<el-table-column property="trackName" label="股道"/> <el-table-column property="trackName" label="股道"/>
<el-table-column property="touchSelf" label="自触"/> <el-table-column property="autoTrigger" label="自触">
<template slot-scope="scope">
<div style="width: 100%;height: 22px;" @contextmenu="popMenuShow(scope.row, '' ,$event)">{{ scope.row.autoTrigger? '√':'' }}</div>
</template>
</el-table-column>
<el-table-column property="type" label="类型"/> <el-table-column property="type" label="类型"/>
<el-table-column property="status" label="状态"/> <el-table-column property="status" label="状态"/>
<el-table-column property="startTime" label="开始时间"/> <el-table-column property="startTime" label="开始时间"/>
@ -196,6 +202,7 @@
</div> </div>
<rec-dep ref="recDep" /> <rec-dep ref="recDep" />
<route-selection ref="routeSelection" /> <route-selection ref="routeSelection" />
<pop-menu ref="popMenu" :menu="menu" style="background: #DFE3E6;"/>
</el-dialog> </el-dialog>
</template> </template>
@ -210,15 +217,21 @@
import CameraPic from '@/assets/datie/camera.png'; import CameraPic from '@/assets/datie/camera.png';
import RecDep from '@/jmapNew/theme/datie_02/menus/dialog/recDep' import RecDep from '@/jmapNew/theme/datie_02/menus/dialog/recDep'
import RouteSelection from '@/jmapNew/theme/datie_02/menus/dialog/routeSelection1'; import RouteSelection from '@/jmapNew/theme/datie_02/menus/dialog/routeSelection1';
import PopMenu from '@/components/PopMenu';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default { export default {
name: 'lineBoard', name: 'lineBoard',
components: { components: {
RecDep, RecDep,
RouteSelection RouteSelection,
PopMenu
}, },
data() { data() {
return { return {
menu: [{label: '设置自触', handler: this.setTrigger, disabled: false},{label: '取消自触', handler: this.cancelTrigger, disabled: false}],
dialogVisible: false, dialogVisible: false,
triggerParam: {},
selectCode: '', selectCode: '',
selectCode1: '', selectCode1: '',
readOnly: '', readOnly: '',
@ -312,6 +325,55 @@
}, },
doShowRoute(row, type) { doShowRoute(row, type) {
this.$refs.routeSelection.doShow(row, type, this.selectCode); this.$refs.routeSelection.doShow(row, type, this.selectCode);
},
popMenuShow(item,type, e){
console.log(e,item, '====');
if (type === 'rec') {
this.menu[0].disabled = item.receivingRouteAutoTrigger;
this.menu[1].disabled = !item.receivingRouteAutoTrigger;
this.triggerParam = { stationCode: this.selectCode, tripNumber: item.tripNumber, routeCode: item.receivingRouteCode }
} else if (type === 'dep') {
this.menu[0].disabled = item.departureRouteAutoTrigger;
this.menu[1].disabled = !item.departureRouteAutoTrigger;
this.triggerParam = { stationCode: this.selectCode, tripNumber: item.tripNumber, routeCode: item.departureRouteCode }
} else {
this.menu[0].disabled = item.autoTrigger;
this.menu[1].disabled = !item.autoTrigger;
this.triggerParam = { stationCode: this.selectCode1, tripNumber: item.tripNumber, routeCode: item.routeCode }
}
this.$refs.popMenu.resetShowPosition({x: e.x, y:e.y});
},
setTrigger() {
const param = { ...this.triggerParam, trigger: true };
commitOperate(menuOperate.CTC.autoTrigger, param, 3).then(({valid, operate})=>{
this.loading = false;
this.triggerParam = {};
if (valid) {
this.doClose();
this.$message.success('设置自动触发成功!')
}
}).catch((e) => {
console.error(e);
this.loading = false;
this.doClose();
this.triggerParam = {};
this.$refs.noticeInfo.doShow();
});
},
cancelTrigger() {
const param = { ...this.triggerParam, trigger: false };
console.log(menuOperate.CTC.autoTrigger, 'trigger');
commitOperate(menuOperate.CTC.autoTrigger, param, 3).then(({valid, operate})=>{
this.triggerParam = {};
if (valid) {
this.$message.success('取消自动触发成功!')
}
}).catch((e) => {
console.error(e);
this.triggerParam = {};
this.$message.error('取消自动触发失败!')
});
} }
} }
}; };
@ -370,4 +432,7 @@
padding: 5px; padding: 5px;
cursor: pointer; cursor: pointer;
} }
.pop-background {
background: #DFE3E6;
}
</style> </style>