北京一问题调整
This commit is contained in:
parent
63f5bac82a
commit
c44053ec54
@ -351,7 +351,6 @@ export default {
|
|||||||
if (model && model._type == 'GuideLock') {
|
if (model && model._type == 'GuideLock') {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Station.guideLock.button.operation,
|
operation: OperationEvent.Station.guideLock.button.operation,
|
||||||
param:{
|
param:{
|
||||||
stationCode:model.stationCode
|
stationCode:model.stationCode
|
||||||
@ -367,7 +366,8 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$refs.password.doShow(operate);
|
this.$refs.password.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch((e) => {
|
||||||
|
console.log(e);
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -79,14 +79,14 @@ export default {
|
|||||||
label: '设置临时限速',
|
label: '设置临时限速',
|
||||||
handler: this.setSpeed,
|
handler: this.setSpeed,
|
||||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED,
|
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED,
|
||||||
isDisabled: (section, work) => section.speedUpLimit === -1,
|
isDisabled: (section, work) => section.speedUpLimit !== -1,
|
||||||
isShow: (section, work) => work === 'dispatchWork' && section.type !== '04'
|
isShow: (section, work) => work === 'dispatchWork' && section.type !== '04'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消临时限速',
|
label: '取消临时限速',
|
||||||
handler: this.cancelSpeed,
|
handler: this.cancelSpeed,
|
||||||
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED,
|
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED,
|
||||||
isDisabled: (section, work) => section.speedUpLimit !== -1,
|
isDisabled: (section, work) => section.speedUpLimit === -1,
|
||||||
isShow: (section, work) => work === 'dispatchWork' && section.type !== '04'
|
isShow: (section, work) => work === 'dispatchWork' && section.type !== '04'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -162,6 +162,7 @@ export default {
|
|||||||
},
|
},
|
||||||
initMenu() {
|
initMenu() {
|
||||||
// 编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
|
this.menu = [];
|
||||||
this.menuNormal.forEach(menuItem => {
|
this.menuNormal.forEach(menuItem => {
|
||||||
menuItem.disabled = !judgeStationControl(this.selected.belongStationCode, this.selected.stationCode, this.work) || (menuItem.isDisabled && menuItem.isDisabled(this.selected, this.work));
|
menuItem.disabled = !judgeStationControl(this.selected.belongStationCode, this.selected.stationCode, this.work) || (menuItem.isDisabled && menuItem.isDisabled(this.selected, this.work));
|
||||||
menuItem.show = menuItem.isShow && menuItem.isShow(this.selected, this.work);
|
menuItem.show = menuItem.isShow && menuItem.isShow(this.selected, this.work);
|
||||||
@ -288,7 +289,7 @@ export default {
|
|||||||
},
|
},
|
||||||
isTrainOccupy(selectType) {
|
isTrainOccupy(selectType) {
|
||||||
const data = this.$store.getters['map/getApproachSectionByCode'](selectType.code);
|
const data = this.$store.getters['map/getApproachSectionByCode'](selectType.code);
|
||||||
if (data && data.routeSectionList.length > 0) {
|
if (data && data.routeSectionList && data.routeSectionList.length > 0) {
|
||||||
let isTrainOccupy = false;
|
let isTrainOccupy = false;
|
||||||
data.routeSectionList.forEach(sectionCode=>{
|
data.routeSectionList.forEach(sectionCode=>{
|
||||||
const section = this.$store.getters['map/getDeviceByCode'](sectionCode);
|
const section = this.$store.getters['map/getDeviceByCode'](sectionCode);
|
||||||
|
@ -10,27 +10,13 @@
|
|||||||
<tmt-dialog ref="tmtDialog" />
|
<tmt-dialog ref="tmtDialog" />
|
||||||
<atr-dialog ref="atrDialog" />
|
<atr-dialog ref="atrDialog" />
|
||||||
<train-trunk-detail ref="trainTrunkDetail" @openTra="openTra" />
|
<train-trunk-detail ref="trainTrunkDetail" @openTra="openTra" />
|
||||||
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
|
||||||
<div class="display-draft">
|
|
||||||
<el-button-group class="button-group-box">
|
|
||||||
<template v-if="!dataError">
|
|
||||||
<el-button type="success" :disabled="isRunPlan" size="small" @click="selectBeginTime">{{ $t('display.demon.drivingByPlan') }}</el-button>
|
|
||||||
<el-button type="danger" size="small" @click="end">{{ $t('display.demon.initialize') }}</el-button>
|
|
||||||
</template>
|
|
||||||
<el-button type="primary" size="small" @click="back">{{ $t('display.demon.back') }}</el-button>
|
|
||||||
</el-button-group>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getSessionStorage } from '@/utils/auth';
|
import { getSessionStorage } from '@/utils/auth';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
|
||||||
import { getToken } from '@/utils/auth';
|
import { getToken } from '@/utils/auth';
|
||||||
import { creatSubscribe, clearSubscribe, displayTopic, getTopic } from '@/utils/stomp';
|
import { creatSubscribe, clearSubscribe, displayTopic, getTopic } from '@/utils/stomp';
|
||||||
import SetTime from '@/views/newMap/displayNew/demon/setTime';
|
|
||||||
import { clearSimulation, getSimulationInfoNew, ranAsPlan, exitRunPlan } from '@/api/simulation';
|
|
||||||
import { loadMapDataById } from '@/utils/loaddata';
|
|
||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
import { getSimulationMemberList, getAllSimulationUser } from '@/api/simulation';
|
import { getSimulationMemberList, getAllSimulationUser } from '@/api/simulation';
|
||||||
import { getMemberListCommon, getUserListCommon } from '@/api/rtSimulation';
|
import { getMemberListCommon, getUserListCommon } from '@/api/rtSimulation';
|
||||||
@ -44,13 +30,11 @@ import TtlDialog from './ttl';
|
|||||||
import TmtDialog from './tmt';
|
import TmtDialog from './tmt';
|
||||||
import AtrDialog from './atr';
|
import AtrDialog from './atr';
|
||||||
import TrainTrunkDetail from './trainTrunkDetail';
|
import TrainTrunkDetail from './trainTrunkDetail';
|
||||||
import parseStatus from '@/utils/parseStatus';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DisplayDraft',
|
name: 'DisplayDraft',
|
||||||
components: {
|
components: {
|
||||||
BaSiDi,
|
BaSiDi,
|
||||||
SetTime,
|
|
||||||
RpsDialog,
|
RpsDialog,
|
||||||
CarPack,
|
CarPack,
|
||||||
TroDialog,
|
TroDialog,
|
||||||
@ -109,24 +93,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
'$store.state.socket.permissionOver': function () {
|
|
||||||
this.$alert('用户权限已被收回', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
callback: action => {
|
|
||||||
this.back();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
'$store.state.socket.equipmentStatus': function (val) {
|
|
||||||
if (val.length) {
|
|
||||||
this.statusMessage(val);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'$store.state.socket.deviceStateMessages': function (val) {
|
|
||||||
if (val) {
|
|
||||||
this.statusMessageNew(val);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'$store.state.config.menuBarLoadedCount': function (val) { // menuBar加载完成
|
'$store.state.config.menuBarLoadedCount': function (val) { // menuBar加载完成
|
||||||
this.setPosition();
|
this.setPosition();
|
||||||
},
|
},
|
||||||
@ -165,7 +131,6 @@ export default {
|
|||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.clearSubscribe();
|
this.clearSubscribe();
|
||||||
this.clearSubscribeNew();
|
this.clearSubscribeNew();
|
||||||
clearSimulation(this.group);
|
|
||||||
this.$store.dispatch('training/reset');
|
this.$store.dispatch('training/reset');
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
@ -187,23 +152,6 @@ export default {
|
|||||||
EventBus.$emit('viewLoading', false);
|
EventBus.$emit('viewLoading', false);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 仿真错误时,被动退出时调用
|
|
||||||
async back() {
|
|
||||||
this.$router.go(-1);
|
|
||||||
},
|
|
||||||
async statusMessage(list) {
|
|
||||||
if (this.$jlmap) {
|
|
||||||
await this.$store.dispatch('training/updateMapState', list);
|
|
||||||
} else {
|
|
||||||
this.$store.commit('map/updateMapDevice', list);
|
|
||||||
}
|
|
||||||
await this.$store.dispatch('socket/setEquipmentStatus');
|
|
||||||
},
|
|
||||||
async statusMessageNew(deviceStatus) {
|
|
||||||
const list = parseStatus(deviceStatus);
|
|
||||||
await this.$store.dispatch('training/updateMapState', list);
|
|
||||||
await this.$store.dispatch('socket/setDeviceStateMessages');
|
|
||||||
},
|
|
||||||
async subscribe() {
|
async subscribe() {
|
||||||
this.clearSubscribe();
|
this.clearSubscribe();
|
||||||
const header = { group: this.$route.query.group || '', 'X-Token': getToken() };
|
const header = { group: this.$route.query.group || '', 'X-Token': getToken() };
|
||||||
@ -293,109 +241,11 @@ export default {
|
|||||||
const width = this.width;
|
const width = this.width;
|
||||||
const height = this.height;
|
const height = this.height;
|
||||||
this.$store.dispatch('config/resize', { width, height });
|
this.$store.dispatch('config/resize', { width, height });
|
||||||
// this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode });
|
|
||||||
},
|
},
|
||||||
// 初始化
|
// 初始化
|
||||||
initLoadData() {
|
initLoadData() {
|
||||||
this.group = this.$route.query.group;
|
this.group = this.$route.query.group;
|
||||||
this.$store.dispatch('training/reset');
|
this.$store.dispatch('training/reset');
|
||||||
this.loadSimulationInfo();
|
|
||||||
this.loadMapData();
|
|
||||||
},
|
|
||||||
// 新版地图根据仿真group获取仿真基础信息
|
|
||||||
async loadSimulationInfo() {
|
|
||||||
const resp = await getSimulationInfoNew(this.group);
|
|
||||||
if (resp && resp.code == 200 && resp.data) {
|
|
||||||
if (!resp.data.dataError) {
|
|
||||||
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause); // 是否暂停判断
|
|
||||||
this.$store.dispatch('training/setInitTime', resp.data.systemTime);
|
|
||||||
this.$store.dispatch('training/countTime');
|
|
||||||
this.$store.dispatch('runPlan/setRunPlanInfo', resp.data.runPlan);
|
|
||||||
this.planRunning = resp.data.planRunning;
|
|
||||||
if (resp.data.planRunning) {
|
|
||||||
this.$store.commit('training/start');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.$messageBox('此地图数据正在维护中,无法运行!');
|
|
||||||
}
|
|
||||||
this.dataError = resp.data.dataError;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
selectBeginTime() {
|
|
||||||
this.$refs.setTime.doShow();
|
|
||||||
},
|
|
||||||
// 加载地图数据
|
|
||||||
loadMapData() {
|
|
||||||
if (parseInt(this.mapId)) {
|
|
||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
|
||||||
loadMapDataById(this.mapId, 'simulation');
|
|
||||||
} else {
|
|
||||||
this.endViewLoading();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
start(model) { // 开始仿真
|
|
||||||
const data = {
|
|
||||||
time: model.initTime
|
|
||||||
};
|
|
||||||
if (this.$route.query.prdType === '04') {
|
|
||||||
data.loadNumber = model.loadNum;
|
|
||||||
}
|
|
||||||
ranAsPlan(data, this.group).then(res => {
|
|
||||||
// this.$store.dispatch('training/setInitTime', model.initTime);
|
|
||||||
this.$store.dispatch('training/setInitTime', model.timestamp);
|
|
||||||
}).catch(error => {
|
|
||||||
let message = '';
|
|
||||||
switch (error.code) {
|
|
||||||
case '5001':
|
|
||||||
message = this.$t('error.mapDataError');
|
|
||||||
break;
|
|
||||||
case '5002':
|
|
||||||
message = this.$t('error.runningChartDataError');
|
|
||||||
break;
|
|
||||||
case '5003':
|
|
||||||
message = this.$t('error.runningChartIsNotLoaded');
|
|
||||||
break;
|
|
||||||
case '5004':
|
|
||||||
message = this.$t('error.runningDataError');
|
|
||||||
break;
|
|
||||||
case '5000':
|
|
||||||
message = this.$t('error.systemError');
|
|
||||||
break;
|
|
||||||
case '4000':
|
|
||||||
message = this.$t('error.simulationDoesNotExist');
|
|
||||||
break;
|
|
||||||
case '4001':
|
|
||||||
message = this.$t('error.simulationOperationIsNotDefined');
|
|
||||||
break;
|
|
||||||
case '4002':
|
|
||||||
message = this.$t('error.simulationOperationProcessingMethodNotFound');
|
|
||||||
break;
|
|
||||||
case '4003':
|
|
||||||
message = this.$t('error.simulationOperationFailed');
|
|
||||||
break;
|
|
||||||
case '4004':
|
|
||||||
message = this.$t('error.operationConflict');
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
message = '按计划行车异常,请退出重试!';
|
|
||||||
// this.$messageBox('按计划行车异常,请退出重试!');
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
this.$messageBox(message + ',' + this.$t('error.startSimulationFailed'));
|
|
||||||
});
|
|
||||||
},
|
|
||||||
end() {
|
|
||||||
exitRunPlan(this.group).then(() => {
|
|
||||||
this.$store.dispatch('training/over').then(() => {
|
|
||||||
this.$store.dispatch('training/setMapDefaultState').then(() => {
|
|
||||||
this.$store.dispatch('map/clearJlmapTrainView');
|
|
||||||
this.$store.dispatch('map/resetActiveTrainList', false);
|
|
||||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}).catch(() => {
|
|
||||||
this.$messageBox(this.$t('display.demon.endSimulationFail'));
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
troClick() {
|
troClick() {
|
||||||
this.$refs.troDialog.doShow();
|
this.$refs.troDialog.doShow();
|
||||||
@ -409,16 +259,6 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped rel="stylesheet/scss" lang="scss">
|
|
||||||
.display-draft {
|
|
||||||
position: fixed;
|
|
||||||
right: 10px;
|
|
||||||
bottom: 15px;
|
|
||||||
.button-group-box{
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<style>
|
<style>
|
||||||
.nanjing-02__systerm .el-dialog {
|
.nanjing-02__systerm .el-dialog {
|
||||||
background: #d8d8d8;
|
background: #d8d8d8;
|
||||||
|
Loading…
Reference in New Issue
Block a user