调整国赛故障模式操作
This commit is contained in:
parent
31b45c3c9d
commit
2df4c56a10
@ -151,10 +151,11 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
|
||||
if (this.selected.type != '04') {
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
}
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
|
@ -132,10 +132,11 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
|
||||
if (this.selected.type != '04') {
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
}
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
|
@ -129,10 +129,11 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
|
||||
if (this.selected.type != '04') {
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
}
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
|
@ -159,7 +159,7 @@ export default {
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount':function(em) {
|
||||
const device = this.$store.state.menuOperation.selected;
|
||||
if (device.code && this.judge && this.field) {
|
||||
if (device && device.code && this.judge && this.field) {
|
||||
if (device._type == 'Section' || device._type == 'Train') {
|
||||
this.deviceSelect(device);
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ export default {
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount':function(em) {
|
||||
const device = this.$store.state.menuOperation.selected;
|
||||
if (device.code && this.field) {
|
||||
if (device && device.code && this.field) {
|
||||
if (device._type == 'Train') {
|
||||
this.deviceSelect(device);
|
||||
}
|
||||
|
@ -164,9 +164,11 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
if (this.selected.type != '04') {
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
}
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
|
@ -199,10 +199,11 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
|
||||
if (this.selected.type != '04') {
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
}
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
|
@ -107,10 +107,11 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
|
||||
if (this.selected.type != '04') {
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
}
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
|
@ -169,9 +169,11 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
if (this.selected.type != '04') {
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
}
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
|
@ -151,9 +151,11 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
if (this.selected.type != '04') {
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
}
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
|
@ -129,6 +129,18 @@ export default {
|
||||
handler: this.loadSpare,
|
||||
cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN
|
||||
}
|
||||
],
|
||||
faultList: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
@ -169,11 +181,16 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
if (this.selected.type != '04') {
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
}
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (this.operatemode == OperateMode.FAULT && this.selected.type != '04') {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
if (this.operatemode == OperateMode.FAULT && this.selected.type == '04') {
|
||||
this.menu = this.faultList;
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
|
@ -177,11 +177,11 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
|
||||
if (this.selected.type != '04') {
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
}
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
|
@ -182,9 +182,11 @@ export default {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Center;
|
||||
if (this.selected.type != '04') {
|
||||
this.menu = this.menuNormal.Center;
|
||||
}
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
|
@ -38,8 +38,8 @@ export const deviceFaultType = {
|
||||
Switch: [
|
||||
{label: '失表', value: 'SPLIT'},
|
||||
{label: '定位失表', value: 'NORMAL_SPLIT'},
|
||||
{label: '反位失表', value: 'REVERSE_SPLIT'},
|
||||
{label: '道岔区段计轴故障', value: 'AXLE_FAULT'}
|
||||
{label: '反位失表', value: 'REVERSE_SPLIT'}
|
||||
// {label: '道岔区段计轴故障', value: 'AXLE_FAULT'}
|
||||
],
|
||||
StationStand: [
|
||||
{label: '屏蔽门无法关闭', value: 'PSD_CANNOT_BE_CLOSED'},
|
||||
|
@ -188,7 +188,7 @@ export default {
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount':function(em) {
|
||||
const device = this.$store.state.menuOperation.selected;
|
||||
if (device.code) {
|
||||
if (device && device.code) {
|
||||
this.deviceSelect(device);
|
||||
}
|
||||
}
|
||||
@ -232,8 +232,8 @@ export default {
|
||||
return name;
|
||||
},
|
||||
formatTriggerStatus(condition) {
|
||||
if (!condition.triggerDeviceType) {
|
||||
return '';
|
||||
if (!condition.triggerDeviceType) {
|
||||
return '';
|
||||
}
|
||||
const faultStatus = FaultStatusEnum[condition.triggerDeviceType];
|
||||
return faultStatus[condition.triggerDeviceStatus];
|
||||
@ -248,7 +248,7 @@ export default {
|
||||
handleDelete(row) {
|
||||
cancelFailureModeNew(row.id, this.$route.query.group).then(resp => {
|
||||
this.getSimulationFaultRules();
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$message.error('取消故障失败!');
|
||||
});
|
||||
},
|
||||
|
@ -1,5 +1,4 @@
|
||||
<template>
|
||||
<!-- {} -->
|
||||
<div>
|
||||
<div v-if="isAllShow" class="display_top_draft" :style="allStyle">
|
||||
<div class="btn_hover" @click="menuClick">菜单</div>
|
||||
|
@ -1,15 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<demon-chat ref="chatbox" :group="group" :user-role="userRole" :offset="offset" />
|
||||
<div class="display-card" :style="{top: offset+'px'}">
|
||||
<el-row>
|
||||
<span v-if="countTime" class="display-score">{{ $t('display.demon.trialTime') }} {{ countTime }}</span>
|
||||
</el-row>
|
||||
</div>
|
||||
<demon-menu
|
||||
ref="demonMenu"
|
||||
:is-all-show="!dataError"
|
||||
:jl3dmodel-show="isShow3dmodel && !isShowScheduling"
|
||||
:jl3dmodel-show="false"
|
||||
:jl3dname-show="!isShowScheduling&&!isDrive"
|
||||
:cctv-show="!isShowScheduling"
|
||||
:schedule-load-show="isShowScheduling && !runing"
|
||||
@ -92,14 +87,14 @@ import TheoryExamSelect from './theoryExamSelect';
|
||||
import TheoryExam from './theoryExam';
|
||||
// import TheoryQuiz from './quiz';
|
||||
// import ThroryResult from './result';
|
||||
import { getGoodsTryUse } from '@/api/management/goods';
|
||||
// import { getGoodsTryUse } from '@/api/management/goods';
|
||||
import { ranAsPlan, exitRunPlan, clearSimulation, getSimulationInfoNew } from '@/api/simulation';
|
||||
import { PermissionType } from '@/scripts/ConstDic';
|
||||
import { getCountTime } from '@/utils/index';
|
||||
// import { PermissionType } from '@/scripts/ConstDic';
|
||||
// import { getCountTime } from '@/utils/index';
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import { ScriptMode, TrainingMode } from '@/scripts/ConstDic';
|
||||
import SelectRole from '@/views/newMap/displayNew/scriptDisplay/component/selectRole';
|
||||
import { setGoodsTryUse } from '@/api/management/goods';
|
||||
// import { setGoodsTryUse } from '@/api/management/goods';
|
||||
|
||||
import {competitionPracticalSceneStart, competitionPracticalSceneExit, competitionPracticalSceneFinish, getEmptyOperationalStatistics} from '@/api/competition';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
@ -149,34 +144,34 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tryTime: 0, // 进入页面多少秒
|
||||
timeNow: 0, // 进入页面 相对时间
|
||||
time: null, // 定时器
|
||||
countTime: 0, // 显示 倒计时
|
||||
remainingTime: 0,
|
||||
userRole:'AUDIENCE',
|
||||
goodsId: this.$route.query.goodsId,
|
||||
try: this.$route.query.try, // 是否是试用权限
|
||||
training: {
|
||||
id: '',
|
||||
name: '',
|
||||
remarks: ''
|
||||
},
|
||||
isScriptLoad:false,
|
||||
isScriptRun:false,
|
||||
// tryTime: 0, // 进入页面多少秒
|
||||
// timeNow: 0, // 进入页面 相对时间
|
||||
// time: null, // 定时器
|
||||
// countTime: 0, // 显示 倒计时
|
||||
// remainingTime: 0,
|
||||
userRole: 'AUDIENCE',
|
||||
// goodsId: this.$route.query.goodsId,
|
||||
// try: this.$route.query.try, // 是否是试用权限
|
||||
// training: {
|
||||
// id: '',
|
||||
// name: '',
|
||||
// remarks: ''
|
||||
// },
|
||||
isScriptLoad: false,
|
||||
isScriptRun: false,
|
||||
scriptMode: ScriptMode.TEACH,
|
||||
mapLocation:{},
|
||||
playerList:[],
|
||||
currentPlayList:[],
|
||||
mapLocation: {},
|
||||
playerList: [],
|
||||
currentPlayList: [],
|
||||
// formatUsedTime:'',
|
||||
formatScore:0,
|
||||
jl3dpassflow:this.$t('display.demon.passengerflow'),
|
||||
jl3dname: this.$t('display.demon.threeDimensionalView'),
|
||||
jl3dstation: this.$t('display.demon.threeDimensionalStation'),
|
||||
jl3dmodel: this.$t('display.demon.deviceView'),
|
||||
isShow3dmodel :false,
|
||||
// formatScore: 0,
|
||||
// jl3dpassflow: this.$t('display.demon.passengerflow'),
|
||||
// jl3dname: this.$t('display.demon.threeDimensionalView'),
|
||||
// jl3dstation: this.$t('display.demon.threeDimensionalStation'),
|
||||
// jl3dmodel: this.$t('display.demon.deviceView'),
|
||||
// isShow3dmodel: false,
|
||||
isGoback: false,
|
||||
runing:false,
|
||||
runing: false,
|
||||
prdTypeMap: {
|
||||
'01': '01', // 现地 => 现地
|
||||
'02': '02', // 行调 => 行调
|
||||
@ -262,10 +257,10 @@ export default {
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.time) {
|
||||
this.setTryTime();
|
||||
clearTimeout(this.time);
|
||||
}
|
||||
// if (this.time) {
|
||||
// this.setTryTime();
|
||||
// clearTimeout(this.time);
|
||||
// }
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause', false);
|
||||
this.$store.dispatch('map/resetActiveTrainList', true);
|
||||
},
|
||||
@ -292,28 +287,28 @@ export default {
|
||||
const ss = prefixIntrger(initTime.getSeconds(), 2);
|
||||
return `${hh}:${mm}:${ss}`;
|
||||
},
|
||||
loadInitData() {
|
||||
const data = {
|
||||
mapId: this.$route.query.mapId,
|
||||
prdType: this.$route.query.prdType,
|
||||
permissionType: PermissionType.SIMULATION
|
||||
};
|
||||
getGoodsTryUse(data).then(res => {
|
||||
this.remainingTime = res.data.tryTime;
|
||||
this.timeNow = Date.parse(new Date()) / 1000 + this.remainingTime;
|
||||
if (this.try) {
|
||||
this.time = setInterval(() => {
|
||||
this.tryTime += 1;
|
||||
this.countTime = getCountTime(this.timeNow);
|
||||
if (this.countTime == -1) {
|
||||
this.back();
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('display.demon.getTimeFail'));
|
||||
});
|
||||
},
|
||||
// loadInitData() {
|
||||
// const data = {
|
||||
// mapId: this.$route.query.mapId,
|
||||
// prdType: this.$route.query.prdType,
|
||||
// permissionType: PermissionType.SIMULATION
|
||||
// };
|
||||
// getGoodsTryUse(data).then(res => {
|
||||
// this.remainingTime = res.data.tryTime;
|
||||
// this.timeNow = Date.parse(new Date()) / 1000 + this.remainingTime;
|
||||
// if (this.try) {
|
||||
// this.time = setInterval(() => {
|
||||
// this.tryTime += 1;
|
||||
// this.countTime = getCountTime(this.timeNow);
|
||||
// if (this.countTime == -1) {
|
||||
// this.back();
|
||||
// }
|
||||
// }, 1000);
|
||||
// }
|
||||
// }).catch(() => {
|
||||
// this.$messageBox(this.$t('display.demon.getTimeFail'));
|
||||
// });
|
||||
// },
|
||||
selectBeginTime() {
|
||||
this.$refs.setTime.doShow();
|
||||
},
|
||||
@ -595,15 +590,15 @@ export default {
|
||||
this.$message.error('结束仿真失败!');
|
||||
});
|
||||
},
|
||||
setTryTime() {
|
||||
if (this.try) {
|
||||
const data = { time: this.tryTime, goodsId: this.goodsId };
|
||||
if (data.goodsId) {
|
||||
setGoodsTryUse(data);
|
||||
}
|
||||
// setTryTime() {
|
||||
// if (this.try) {
|
||||
// const data = { time: this.tryTime, goodsId: this.goodsId };
|
||||
// if (data.goodsId) {
|
||||
// setGoodsTryUse(data);
|
||||
// }
|
||||
|
||||
}
|
||||
},
|
||||
// }
|
||||
// },
|
||||
fieldPractice() {
|
||||
this.$refs.sceneList.doShow();
|
||||
},
|
||||
@ -630,18 +625,6 @@ export default {
|
||||
position: absolute;
|
||||
left: 5px;
|
||||
}
|
||||
.display-card {
|
||||
z-index: 9;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
top: 17px;
|
||||
left: 160px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.display-card .el-row {
|
||||
line-height: 32px !important;
|
||||
}
|
||||
|
||||
.display-score {
|
||||
background-color: black;
|
||||
|
@ -83,9 +83,9 @@ export default {
|
||||
if (device._type == 'Section' && device.type == '03') { // 过滤道岔相关区段变成道岔model
|
||||
device = this.$store.getters['map/getDeviceByCode'](device.switch.code);
|
||||
}
|
||||
if (device._type == 'Section' && device.type == '04') {
|
||||
device = null;
|
||||
}
|
||||
// if (device._type == 'Section' && device.type == '04') {
|
||||
// device = null;
|
||||
// }
|
||||
return device;
|
||||
},
|
||||
clickEvent(em) {
|
||||
@ -180,12 +180,14 @@ export default {
|
||||
},
|
||||
checkShouldPop(device) {
|
||||
const lineCode = this.$store.getters['map/lineCode'];
|
||||
if (device._type === 'Signal') {
|
||||
return device._viewVal === '3';
|
||||
} else if (device._type === 'StationControl' && lineCode == '01') { // 中控模式显示范围
|
||||
return device._viewVal === '1';
|
||||
} else {
|
||||
return true;
|
||||
if (device) {
|
||||
if (device._type === 'Signal') {
|
||||
return device._viewVal === '3';
|
||||
} else if (device._type === 'StationControl' && lineCode == '01') { // 中控模式显示范围
|
||||
return device._viewVal === '1';
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
},
|
||||
mapViewLoaded(loading) {
|
||||
|
@ -136,7 +136,7 @@ export default {
|
||||
watch: {
|
||||
'$store.state.menuOperation.selectedCount':function(em) {
|
||||
const device = this.$store.state.menuOperation.selected;
|
||||
if (device.code) {
|
||||
if (device && device.code) {
|
||||
this.deviceSelect(device);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user