仿真右侧列车列表调整
福州线操作代码调整
This commit is contained in:
parent
717e04c4c5
commit
5580a79344
@ -423,7 +423,7 @@ class Jlmap {
|
||||
} else {
|
||||
if (elem.deviceType === 'TRAIN') {
|
||||
this.isUpdateShowTrainList = true;
|
||||
store.dispatch('map/updateTrainList', elem);
|
||||
store.dispatch('map/updateActiveTrainList', elem);
|
||||
// store.dispatch('map/updateTrainState', elem);
|
||||
} else if (elem.deviceType === 'STAND') {
|
||||
store.dispatch('map/updateStationStand', elem);
|
||||
|
@ -297,23 +297,6 @@ export default {
|
||||
this.$refs.speedCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
// const step = {
|
||||
// start: true,
|
||||
// code: `${this.selected.code}`,
|
||||
// operation: OperationEvent.Section.cancelSpeed.menu.operation,
|
||||
// param: {
|
||||
// Section_Code: `${this.selected.code}`
|
||||
// }
|
||||
// };
|
||||
// this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// Handler.execute(CMD.Section.CMD_QUERY, {}).then(resp => {
|
||||
// const tempData = resp.data;
|
||||
// this.$refs.speedCmdControl.doShow(step, this.selected, tempData);
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -19,6 +19,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StationMenu',
|
||||
@ -197,107 +198,47 @@ export default {
|
||||
},
|
||||
// 全站设置联锁自动触发
|
||||
setAutoTrigger() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Station.setAutoTrigger.menu.operation,
|
||||
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER,
|
||||
param: {
|
||||
Station_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
commitOperate(menuOperate.Station.setAutoTrigger, { stationCode: this.selected.code }, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow(error.message);
|
||||
});
|
||||
},
|
||||
// 全站取消联锁自动触发
|
||||
cancelAutoTrigger() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Station.cancelAutoTrigger.menu.operation,
|
||||
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER,
|
||||
param: {
|
||||
Station_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
commitOperate(menuOperate.Station.cancelAutoTrigger, { stationCode: this.selected.code }, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow(error.message);
|
||||
});
|
||||
},
|
||||
// 上电解锁
|
||||
powerUnLock() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Station.powerUnLock.menu.operation,
|
||||
param: {
|
||||
Station_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Station.powerUnLock, { stationCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationCmdControl.doShow(step, this.selected);
|
||||
this.$refs.stationCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 执行关键操作测试
|
||||
execKeyOperationTest() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Station.execKeyOperationTest.menu.operation,
|
||||
param: {
|
||||
stationCode: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Station.execKeyOperationTest, { stationCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationCmdControl.doShow(step, this.selected);
|
||||
this.$refs.stationCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 所有进路自排关
|
||||
humanControlALL() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Station.humanControlALL.menu.operation,
|
||||
param: {
|
||||
stationCode: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Station.humanControlALL, { stationCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationHumanControlAll.doShow(step);
|
||||
this.$refs.stationHumanControlAll.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 所有进路自排开
|
||||
atsAutoControlALL() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
|
||||
param: {
|
||||
stationCode: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Station.atsAutoControlALL, { stationCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationSetRouteControlAll.doShow(step, this.selected);
|
||||
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -206,6 +206,7 @@ const map = {
|
||||
mousemove: 0, // 实训战场图移动标识
|
||||
version: '', // 地图版本,
|
||||
activeTrainListUpdate:0, // 当前按计划行车的列车列表更新标识
|
||||
activeTrainList:[], // 当前按计划行车的列车列表
|
||||
runPlanStatus:false, // 是否正处于按计划行车
|
||||
showCentralizedStationCode: '', // 现地分集中站显示(集中站code)
|
||||
showCentralizedStationNum: 0, // 现地分集中站显示判断
|
||||
@ -731,6 +732,7 @@ const map = {
|
||||
},
|
||||
resetActiveTrainList:(state) => {
|
||||
state.activeTrainListUpdate = 0;
|
||||
state.activeTrainList = [];
|
||||
},
|
||||
setDeleteCount: (state) => {
|
||||
state.deleteCount++;
|
||||
@ -830,13 +832,14 @@ const map = {
|
||||
}
|
||||
});
|
||||
},
|
||||
updateTrainList: (state, data)=>{
|
||||
const trainList = state.map.trainList;
|
||||
trainList.forEach(elem => {
|
||||
if (elem.code == data.code) {
|
||||
elem = deepAssign(elem || {}, data);
|
||||
updateActiveTrainList: (state, data)=>{
|
||||
let isExist = false;
|
||||
state.activeTrainList.forEach(elem => {
|
||||
if (elem == data.code) {
|
||||
isExist = true;
|
||||
}
|
||||
});
|
||||
if (!isExist) { state.activeTrainList.push(data.code); }
|
||||
}
|
||||
},
|
||||
|
||||
@ -911,9 +914,9 @@ const map = {
|
||||
}
|
||||
},
|
||||
|
||||
// 更新列车信息
|
||||
updateTrainList:({ commit }, train) => {
|
||||
commit('updateTrainList', train);
|
||||
// 更新激活的列车信息
|
||||
updateActiveTrainList:({ commit }, train) => {
|
||||
commit('updateActiveTrainList', train);
|
||||
},
|
||||
|
||||
setMapDataIdList: ({ state }, data) => {
|
||||
|
@ -221,6 +221,7 @@ export default {
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
this.$store.dispatch('training/setMapDefaultState').then(() => {
|
||||
this.$store.dispatch('map/setRunPlanStatus', false);
|
||||
this.$store.dispatch('map/resetActiveTrainList');
|
||||
this.$store.dispatch('map/clearJlmapTrainView');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
});
|
||||
|
@ -71,19 +71,26 @@ export default {
|
||||
watch:{
|
||||
'$store.state.map.activeTrainListUpdate': function (val) {
|
||||
if (val) {
|
||||
const trainList = this.$store.state.map.map.trainList;
|
||||
const activeTrainList = this.$store.state.map.activeTrainList;
|
||||
if (this.lineCode == '10' || this.lineCode == '11') {
|
||||
this.topTrainList = trainList.filter((train)=>{
|
||||
this.topTrainList = [];
|
||||
this.bottomTrainList = [];
|
||||
activeTrainList.forEach((trainCode)=>{
|
||||
// train.serviceNumber != '' && train.serviceNumber != undefined &&
|
||||
return !train.right && train.sectionCode;
|
||||
});
|
||||
this.bottomTrainList = trainList.filter((train)=>{
|
||||
// train.serviceNumber != '' && train.serviceNumber != undefined &&
|
||||
return train.right && train.sectionCode;
|
||||
const train = this.$store.getters['map/getDeviceByCode'](trainCode);
|
||||
if (train && !train.right && train.sectionCode) {
|
||||
this.topTrainList.push(train);
|
||||
} else if (train && train.right && train.sectionCode) {
|
||||
this.bottomTrainList.push(train);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.trainList = trainList.filter((train)=>{
|
||||
return train.serviceNumber != '' && train.serviceNumber != undefined && train.sectionCode;
|
||||
this.trainList = [];
|
||||
activeTrainList.forEach((trainCode)=>{
|
||||
const train = this.$store.getters['map/getDeviceByCode'](trainCode);
|
||||
if (train && train.sectionCode) {
|
||||
this.trainList.push(train);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
@ -91,11 +98,6 @@ export default {
|
||||
this.bottomTrainList = [];
|
||||
this.trainList = [];
|
||||
}
|
||||
},
|
||||
'$store.state.map.runPlanStatus': function (val) {
|
||||
if (!val) {
|
||||
this.$store.dispatch('map/resetActiveTrainList');
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -116,11 +118,14 @@ export default {
|
||||
this.$emit('setCenter', code);
|
||||
},
|
||||
covert(data) {
|
||||
let min = (Math.abs(data) - Math.abs(data) % 60) / 60;
|
||||
let seconds = Math.abs(data) % 60;
|
||||
const absData = Math.abs(data);
|
||||
const hours = Math.floor(absData / 3600);
|
||||
let min = Math.floor((absData % 3600) / 60);
|
||||
let seconds = (absData % 3600) % 60;
|
||||
min = min > 9 ? min : '0' + min;
|
||||
seconds = seconds > 9 ? seconds : '0' + seconds;
|
||||
return data == 0 ? '00:00' : (data > 0 ? min + ':' + seconds + 'E' : min + ':' + seconds + 'L');
|
||||
const time = hours + ':' + min + ':' + seconds;
|
||||
return data == 0 ? '00:00:00' : (data > 0 ? time + 'E' : time + 'L');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -296,6 +296,7 @@ export default {
|
||||
}).catch(() => {
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
this.isDisable = true;
|
||||
this.$store.dispatch('map/resetActiveTrainList');
|
||||
this.$messageBox(this.$t('error.endSimulationFailed'));
|
||||
});
|
||||
});
|
||||
|
@ -71,17 +71,26 @@ export default {
|
||||
watch:{
|
||||
'$store.state.map.activeTrainListUpdate': function (val) {
|
||||
if (val) {
|
||||
const trainList = this.$store.state.map.map.trainList;
|
||||
const activeTrainList = this.$store.state.map.activeTrainList;
|
||||
if (this.lineCode == '10' || this.lineCode == '11') {
|
||||
this.topTrainList = trainList.filter((train)=>{
|
||||
return train.serviceNumber != '' && train.serviceNumber != undefined && !train.right && train.sectionCode;
|
||||
});
|
||||
this.bottomTrainList = trainList.filter((train)=>{
|
||||
return train.serviceNumber != '' && train.serviceNumber != undefined && train.right && train.sectionCode;
|
||||
this.topTrainList = [];
|
||||
this.bottomTrainList = [];
|
||||
activeTrainList.forEach((trainCode)=>{
|
||||
// train.serviceNumber != '' && train.serviceNumber != undefined &&
|
||||
const train = this.$store.getters['map/getDeviceByCode'](trainCode);
|
||||
if (train && !train.right && train.sectionCode) {
|
||||
this.topTrainList.push(train);
|
||||
} else if (train && train.right && train.sectionCode) {
|
||||
this.bottomTrainList.push(train);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.trainList = trainList.filter((train)=>{
|
||||
return train.serviceNumber != '' && train.serviceNumber != undefined && train.sectionCode;
|
||||
this.trainList = [];
|
||||
activeTrainList.forEach((trainCode)=>{
|
||||
const train = this.$store.getters['map/getDeviceByCode'](trainCode);
|
||||
if (train && train.sectionCode) {
|
||||
this.trainList.push(train);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
@ -89,11 +98,6 @@ export default {
|
||||
this.bottomTrainList = [];
|
||||
this.trainList = [];
|
||||
}
|
||||
},
|
||||
'$store.state.map.runPlanStatus': function (val) {
|
||||
if (!val) {
|
||||
this.$store.dispatch('map/resetActiveTrainList');
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -114,9 +118,10 @@ export default {
|
||||
this.$emit('setCenter', code);
|
||||
},
|
||||
covert(data) {
|
||||
const hours = Math.floor(data / 3600);
|
||||
let min = Math.floor((data % 3600) / 60);
|
||||
let seconds = (data % 3600) % 60;
|
||||
const absData = Math.abs(data);
|
||||
const hours = Math.floor(absData / 3600);
|
||||
let min = Math.floor((absData % 3600) / 60);
|
||||
let seconds = (absData % 3600) % 60;
|
||||
min = min > 9 ? min : '0' + min;
|
||||
seconds = seconds > 9 ? seconds : '0' + seconds;
|
||||
const time = hours + ':' + min + ':' + seconds;
|
||||
|
Loading…
Reference in New Issue
Block a user