This commit is contained in:
joylink_cuiweidong 2021-01-15 13:35:28 +08:00
commit f21cfd2256
2 changed files with 51 additions and 74 deletions

View File

@ -526,9 +526,9 @@ class SkinCode extends defaultStyle {
lossColor: '#FFFFFF', // 道岔失去颜色
locateColor: '#fff', // 道岔定位颜色
inversionColor: '#fff', // 道岔反位颜色
monolock: true, // 名称单锁显示包围框
monolockLocationColor: '#fff', // 道岔单锁'定位'颜色
monolockInversionColor: '#fff', // 道岔单锁'反位'颜色
monolock: false, // 名称单锁显示包围框
monolockLocationColor: '#F00', // 道岔单锁'定位'颜色
monolockInversionColor: '#F00', // 道岔单锁'反位'颜色
faultFlashing: false // 故障闪烁
},
sectionAction: {

View File

@ -48,11 +48,8 @@
<el-button :id="commandId" class="fl" :class="{'disabled': canCommand || secondConfirm}" style="line-height: 18px; margin-top: 4px;" plain :disabled="canCommand || secondConfirm" @click="command">执行</el-button>
<el-button class="fr" style="line-height: 18px; margin-top: 4px;" plain @click="cancle">取消</el-button>
</div>
<div
class="el-print"
highlight-current-row
>
<div v-for="(el,i) in tempData" :key="i" style="margin-left:10px;text-align: left;line-height: 22px">
<div class="el-print">
<div v-for="(el,i) in tempData" :key="i" class="selected-row" :class="{'active' : route&&el.code===route.code}" @click="selectRouteParam(el.code)">
{{ el.name }}
</div>
</div>
@ -120,7 +117,7 @@
v-else
v-dialogDrag
class="haerbin-01__systerm __menuButton"
style="pointer-events: none"
style="pointer-events: none"
title="Dialog"
:visible.sync="dialogVisible"
:modal="false"
@ -213,9 +210,7 @@ export default {
selectedObj: null,
oldClickObj: null, //
route: null, //
atpRoute:null,
groundRoute:null,
guideRoute:null,
selectRouteList: [],
centralizedStationList: new Array(15).fill({}),
ciStationParamList: [],
atp:false,
@ -239,13 +234,15 @@ export default {
formModelTripNum: '',
formModelSectionName: '',
formModelNewTrip: '',
dialogVisible: false
dialogVisible: false,
tipList: []
};
},
computed: {
...mapGetters('map', [
'routeList',
'stationList'
'stationList',
'routeData'
]),
commandId() {
return OperationEvent.Command.commandHaerbin.confirm.domId;
@ -370,7 +367,6 @@ export default {
},
mounted() {
this.initMenus();
this.initRouteMenus();
this.handleBasicMenu();
},
methods: {
@ -421,6 +417,12 @@ export default {
}
});
},
selectRouteParam(code) {
this.route = this.routeData[code];
this.param = {
routeCode: this.route.code
};
},
handleSwicthMenu() { //
//
this.clearAllMenuShow();
@ -478,46 +480,27 @@ export default {
this.routeParamList.forEach((swicth, index) => {
this.centralizedStationList[index] = swicth;
});
this.tempData = [];
// this.tempData.push(this.route);
// this.param = {
// routeCode: this.route.code
// };
this.tempData = [...this.selectRouteList];
this.param = {
routeCode: this.route.code
};
},
//
checkSignal() {
this.route = null;
this.atpRoute = null;
this.groundRoute = null;
this.guideRoute = null;
this.atp = false;
this.ground = false;
this.guide = false;
this.selectRouteList = [];
this.routeList.forEach(item => {
if (item.startSignalCode == this.oldClickObj.code && item.endSignalCode == this.selectedObj.code) {
if (!this.atp) {
if (item.atp) {
this.atpRoute = item;
}
this.atp = item.atp;
}
if (!this.ground) {
if (item.ground) {
this.groundRoute = item;
}
this.ground = item.ground;
}
if (!this.guide) {
if (item.guide) {
this.guideRoute = item;
}
this.guide = item.guide;
}
// this.route = {};
this.initRouteMenus();
this.selectRouteList.push(item);
}
});
if (this.atpRoute || this.groundRoute || this.guideRoute) {
if (this.selectRouteList.length) {
this.route = this.selectRouteList[0];
this.handleRouteMenu();
this.deviceHighLight(this.selectedObj, true);
this.oldDevice = this.selectedObj;
@ -579,11 +562,11 @@ export default {
this.centralizedStationList[index] = basic;
});
this.tempData = [];
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
if (station) {
this.tempData.push(station);
}
this.tempData = [];
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
if (station) {
this.tempData.push(station);
}
this.param = {
stationCode: this.$store.state.map.showCentralizedStationCode,
@ -671,16 +654,16 @@ export default {
this.clearAllMenuShow();
this.paramIndex = row.next ? index : -1;
const commandList = ['ATP进路', '取消ATP', '联锁进路', '取消联锁', '引导进路', '取消引导'];
const routeList = [this.atpRoute, this.groundRoute, this.guideRoute];
const commandIndex = commandList.indexOf(row.name);
const currentIndex = Math.floor(commandIndex / 2);
// const commandList = ['ATP', 'ATP', '', '', '', ''];
// const routeList = this.selectRouteList;
// const commandIndex = commandList.indexOf(row.name);
// const currentIndex = Math.floor(commandIndex / 2);
const step = {};
if (currentIndex >= 0) {
this.route = routeList[currentIndex];
step.param = { routeCode: this.route.code };
}
//
// if (currentIndex >= 0) {
// this.route = routeList[currentIndex];
// step.param = { routeCode: this.route.code };
// }
if (this.tempData.length) {
row.show = true;
@ -711,7 +694,6 @@ export default {
step.over = true;
step.cmdType = this.cmdType;
}
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid && this.securityCommand) {
this.secondConfirm = true;
@ -978,24 +960,10 @@ export default {
{ name: '切换左向', cmdType: CMD.DirectionRod.CMD_DIRECTION_CHANGE, operate: OperationEvent.StationStand.setDetainTrain.menuButton, show: false },
{ name: '切换右向', cmdType: CMD.DirectionRod.CMD_DIRECTION_CHANGE, operate: OperationEvent.StationStand.setDetainTrain.menuButton, show: false }
];
},
initRouteMenus() {
this.routeParamList = [
{ name: '排列进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, operate: OperationEvent.Signal.arrangementRoute.menuButton, show: false },
{ name: '取消进路', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelTrainRoute.menuButton, show: false }
];
// if (this.atp) {
// this.routeParamList.push({ name: 'ATP', cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, operate: OperationEvent.Signal.arrangementRoute.menuButton, show: false });
// this.routeParamList.push({ name: 'ATP', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelTrainRoute.menuButton, show: false });
// }
// if (this.ground) {
// this.routeParamList.push({ name: '', cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, operate: OperationEvent.Signal.interlockRoute.menuButton, show: false });
// this.routeParamList.push({ name: '', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelinterlock.menuButton, show: false });
// }
// if (this.guide) {
// this.routeParamList.push({ name: '', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.guide.menuButton, show: false, securityCommand: true });
// this.routeParamList.push({ name: '', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE, operate: OperationEvent.Signal.cancelGuide.menuButton, show: false });
// }
},
handleOpen() {
this.dialogVisible = true;
@ -1029,6 +997,15 @@ export default {
margin: 15px;
border-top: 1px solid #000;
}
.selected-row {
margin-left:10px;
text-align: left;
line-height: 22px
}
.active{
background-color: #F6F6F6;
border: 1px solid #DADADA;
}
</style>
<style lang="scss">
#menuButton{
@ -1167,6 +1144,7 @@ export default {
margin: 0px 20px;
border: 1px solid #d1d1d1;
width: auto;
overflow: auto;
}
.__menuButton {
@ -1181,7 +1159,6 @@ export default {
}
}
.color-strip-container{
display: flex;
justify-content: flex-start;