Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
f26eea8f4b
@ -134,18 +134,9 @@ export default {
|
||||
},
|
||||
'$store.state.training.prdType': function (val) {
|
||||
if (val == '01' && this.centralizedStationList1.length) {
|
||||
this.switchShowStation(this.centralizedStationList1[0].code);
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', this.centralizedStationList1[0].code);
|
||||
} else {
|
||||
this.switchShowStation('');
|
||||
}
|
||||
},
|
||||
'$store.state.training.offsetStationCode': function(code) {
|
||||
if (code) {
|
||||
const sectionModel = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (sectionModel._type == 'Section' || sectionModel._type == 'Switch' || sectionModel._type == 'Signal') {
|
||||
const stationModel = this.$store.getters['map/getDeviceByCode'](sectionModel.stationCode);
|
||||
this.switchShowStation(stationModel.code);
|
||||
}
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', '');
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -176,20 +167,12 @@ export default {
|
||||
this.stationCode = centralizedStationList[0].code;
|
||||
}
|
||||
if (this.$store.state.training.prdType == '01') {
|
||||
this.switchShowStation(this.stationCode);
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', this.stationCode);
|
||||
}
|
||||
},
|
||||
switchShowStation(stationCode) {
|
||||
this.stationCode = stationCode;
|
||||
const nameList = Object.keys(this.$store.state.map.map);
|
||||
let list = [];
|
||||
nameList.forEach(item => {
|
||||
if (item !== 'skinVO') {
|
||||
list = [...list, ...this.$store.state.map.map[item]];
|
||||
}
|
||||
});
|
||||
this.$jlmap.updateShowStation(list, stationCode);
|
||||
this.$jlmap.setCenter(stationCode);
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', stationCode);
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
|
@ -52,51 +52,51 @@ export default {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.detainTrain'),
|
||||
handler: this.setDetainTrain,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.cancelDetainTrain'),
|
||||
handler: this.cancelDetainTrain,
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.cancelDetainTrainForce'),
|
||||
handler: this.cancelDetainTrainForce,
|
||||
cmdType:CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.jumpStop'),
|
||||
handler: this.setJumpStop,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.cancelJumpStop'),
|
||||
handler: this.cancelJumpStop,
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.setRunLevel'),
|
||||
handler: this.setRunLevel,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.setEarlyDeparture'),
|
||||
handler: this.earlyDeparture,
|
||||
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.setBackStrategy'),
|
||||
handler: this.setBackStrategy,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.getStationStandStatus'),
|
||||
handler: this.detail,
|
||||
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||
}
|
||||
// {
|
||||
// label: this.$t('menu.menuStationStand.detainTrain'),
|
||||
// handler: this.setDetainTrain,
|
||||
// cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
// },
|
||||
// {
|
||||
// label: this.$t('menu.menuStationStand.cancelDetainTrain'),
|
||||
// handler: this.cancelDetainTrain,
|
||||
// cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
// },
|
||||
// {
|
||||
// label: this.$t('menu.menuStationStand.cancelDetainTrainForce'),
|
||||
// handler: this.cancelDetainTrainForce,
|
||||
// cmdType:CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
|
||||
// },
|
||||
// {
|
||||
// label: this.$t('menu.menuStationStand.jumpStop'),
|
||||
// handler: this.setJumpStop,
|
||||
// cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
||||
// },
|
||||
// {
|
||||
// label: this.$t('menu.menuStationStand.cancelJumpStop'),
|
||||
// handler: this.cancelJumpStop,
|
||||
// cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||
// },
|
||||
// {
|
||||
// label: this.$t('menu.menuStationStand.setRunLevel'),
|
||||
// handler: this.setRunLevel,
|
||||
// cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME
|
||||
// },
|
||||
// {
|
||||
// label: this.$t('menu.menuStationStand.setEarlyDeparture'),
|
||||
// handler: this.earlyDeparture,
|
||||
// cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||
// },
|
||||
// {
|
||||
// label: this.$t('menu.menuStationStand.setBackStrategy'),
|
||||
// handler: this.setBackStrategy,
|
||||
// cmdType:CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
|
||||
// },
|
||||
// {
|
||||
// label: this.$t('menu.menuStationStand.getStationStandStatus'),
|
||||
// handler: this.detail,
|
||||
// cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||
// }
|
||||
],
|
||||
Center: [
|
||||
// {
|
||||
|
@ -92,6 +92,9 @@ export default {
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.menus{
|
||||
height:0px;
|
||||
}
|
||||
.menus .pop-menu {
|
||||
background: #F0F0F0;
|
||||
}
|
||||
|
@ -203,7 +203,8 @@ const map = {
|
||||
mousemove: 0, // 实训战场图移动标识
|
||||
version: '', // 地图版本,
|
||||
trainListUpdate:0, // 列车列表更新标识,
|
||||
runPlanStatus:false // 是否正处于按计划行车
|
||||
runPlanStatus:false, // 是否正处于按计划行车
|
||||
showCentralizedStationCode: '' // 现地分集中站显示(集中站code)
|
||||
},
|
||||
|
||||
getters: {
|
||||
@ -714,6 +715,9 @@ const map = {
|
||||
},
|
||||
setRunPlanStatus:(state, runPlanStatus) => {
|
||||
state.runPlanStatus = runPlanStatus;
|
||||
},
|
||||
setShowCentralizedStationCode: (state, stationCode) => {
|
||||
state.showCentralizedStationCode = stationCode;
|
||||
}
|
||||
},
|
||||
|
||||
@ -880,6 +884,9 @@ const map = {
|
||||
},
|
||||
setRunPlanStatus:({commit}, runPlanStatus) => {
|
||||
commit('setRunPlanStatus', runPlanStatus);
|
||||
},
|
||||
setShowCentralizedStationCode: ({commit}, stationCode) => {
|
||||
commit('setShowCentralizedStationCode', stationCode);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -148,7 +148,7 @@ export default {
|
||||
group: '',
|
||||
showStation: '',
|
||||
stationList: [],
|
||||
showSelectStation: false,
|
||||
showSelectStation: false, // 是否展示现地选择设备集中站select
|
||||
prdTypeMap: {
|
||||
'01': '01', // 现地 => 现地
|
||||
'02': '02', // 行调 => 行调
|
||||
@ -234,7 +234,7 @@ export default {
|
||||
this.$messageBox(`初始化失败实训内容失败: ${error.message}`);
|
||||
});
|
||||
}
|
||||
this.$refs.mapCanvas && this.$refs.mapCanvas.setShowStation(this.showStation);
|
||||
this.switchStationMode(this.showStation);
|
||||
},
|
||||
'$store.state.map.mousemove': function (val) {
|
||||
this.mousemove();
|
||||
@ -261,32 +261,6 @@ export default {
|
||||
'$store.state.map.map': function (val) {
|
||||
this.showSelectStation = val.skinVO.code === '06' && this.$store.state.training.prdType === '01';
|
||||
this.showSelectStation && this.setStationList(val);
|
||||
},
|
||||
'$store.state.training.offsetStationCode': function(code) {
|
||||
if (code) {
|
||||
this.setCenter(code);
|
||||
}
|
||||
if (code && this.showSelectStation) {
|
||||
const deviceModel = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (deviceModel._type == 'Section' || deviceModel._type == 'Switch' || deviceModel._type == 'Signal' || deviceModel._type == 'Switch') {
|
||||
const stationModel = this.$store.getters['map/getDeviceByCode'](deviceModel.stationCode);
|
||||
this.switchStationMode(stationModel.code, true);
|
||||
} else if (deviceModel._type === 'Station') {
|
||||
let stationModel = '';
|
||||
if (deviceModel.centralized) {
|
||||
stationModel = deviceModel;
|
||||
} else {
|
||||
this.$store.state.map.map.stationList || [].forEach(item => {
|
||||
item.chargeStationCodeList || [].forEach(it => {
|
||||
if (it === deviceModel.code) {
|
||||
stationModel = item;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
this.switchStationMode(stationModel.code, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
@ -612,9 +586,9 @@ export default {
|
||||
panel.setAttribute('style', '');
|
||||
}
|
||||
},
|
||||
switchStationMode(val, isTraining) {
|
||||
switchStationMode(val) {
|
||||
this.showStation = val;
|
||||
this.$refs.mapCanvas && this.$refs.mapCanvas.setShowStation(this.showStation, isTraining);
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', this.showStation);
|
||||
},
|
||||
setStationList(val) {
|
||||
this.stationList = [];
|
||||
|
@ -69,7 +69,8 @@ export default {
|
||||
concentrationStationList: [],
|
||||
showMode: '03',
|
||||
localStationShow: false,
|
||||
previewOrMapDraw: false
|
||||
previewOrMapDraw: false,
|
||||
trainingSetStation: false // 现地实训是否根据设备仅显示设备集中站设备
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -135,6 +136,33 @@ export default {
|
||||
},
|
||||
'$store.state.training.prdType': function (val) {
|
||||
this.changePrdType(val);
|
||||
},
|
||||
'$store.state.map.showCentralizedStationCode': function (val) {
|
||||
this.setShowStation(val);
|
||||
},
|
||||
'$store.state.training.offsetStationCode': function(code) {
|
||||
if (code && this.localStationShow && this.$store.state.training.prdType === '01') {
|
||||
const deviceModel = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (deviceModel._type == 'Section' || deviceModel._type == 'Switch' || deviceModel._type == 'Signal' || deviceModel._type == 'Switch') {
|
||||
const stationModel = this.$store.getters['map/getDeviceByCode'](deviceModel.stationCode);
|
||||
this.setShowStation(stationModel.code, true);
|
||||
} else if (deviceModel._type === 'Station') {
|
||||
let stationModel = '';
|
||||
if (deviceModel.centralized) {
|
||||
stationModel = deviceModel;
|
||||
} else {
|
||||
this.$store.state.map.map.stationList || [].forEach(item => {
|
||||
item.chargeStationCodeList || [].forEach(it => {
|
||||
if (it === deviceModel.code) {
|
||||
stationModel = item;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
this.setShowStation(stationModel.code, true);
|
||||
}
|
||||
this.setCenter(code);
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -165,9 +165,6 @@ export default {
|
||||
mapViewLoaded(loading) {
|
||||
this.$refs.jlmapVisual && this.$refs.jlmapVisual.mapViewLoaded(loading);
|
||||
},
|
||||
setShowStation(stationCode, isTraining) {
|
||||
this.$refs.jlmapVisual && this.$refs.jlmapVisual.setShowStation(stationCode, isTraining);
|
||||
},
|
||||
setCenter(code) {
|
||||
this.$refs.jlmapVisual && this.$refs.jlmapVisual.setCenter(code);
|
||||
}
|
||||
|
@ -111,9 +111,6 @@ export default {
|
||||
clearSubscribe() {
|
||||
clearSubscribe(`${displayTopic}\/${this.group}`);
|
||||
},
|
||||
setShowStation(stationCode, isTraining) {
|
||||
this.$refs.mapCommon && this.$refs.mapCommon.setShowStation(stationCode, isTraining);
|
||||
},
|
||||
setCenter(code) {
|
||||
this.$refs.mapCommon && this.$refs.mapCommon.setCenter(code);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user