南京二连续扣车参数调整&&南京二troDetail禁止拖动&&增加南京二行调故障按钮

This commit is contained in:
fan 2021-11-25 10:41:43 +08:00
parent 064c7c74f6
commit d39a551142
4 changed files with 42 additions and 5 deletions

View File

@ -291,6 +291,7 @@ import BanIcon from '@/assets/ban-heb.png';
import { queryRunPlanList } from '@/api/runplan';
import { simulationLoadRunPlan } from '@/api/simulation';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import * as _ from 'lodash';
export default {
components: {
@ -1273,8 +1274,19 @@ export default {
row.cmdType = CMD.Stand.CMD_STAND_SET_JUMP_STOP;
this.stationCommand(row);
},
getSortStandList(right) {
const list = this.stationStandList.filter(el => el.right == right);
list.sort((stand1, stand2) => {
const station1 = this.$store.getters['map/getDeviceByCode'](stand1.stationCode);
const station2 = this.$store.getters['map/getDeviceByCode'](stand2.stationCode);
return station1.sn - station2.sn;
});
return list;
},
stationAllJumpTrain() {
const list = this.stationStandList.filter(el => el.right == this.selectedObj.right);
// const list = this.stationStandList.filter(el => el.right == this.selectedObj.right);
const meFn = _.memoize(this.getSortStandList);
const list = meFn((this.selectedObj.right));
const index = list.findIndex(el => el.code == this.selectedObj.code);
let lists = list.slice(index);
if (this.selectedObj.right) {

View File

@ -483,13 +483,13 @@ export default {
minDuration: 8,
operateType: 'Stand_Early_Depart',
skinCode: '14',
trainingName: '提前发车({8}{9})',
trainingName: '车站发车({8}{9})',
trainingRemark: '设置提前发车功能',
trainingType: 'Section',
productTypes: ['02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该区段' },
{ deviceType: '03', orderNum: 2, operateCode: '425', tip: '鼠标左键点击【提前发车】按钮' },
{ deviceType: '03', orderNum: 2, operateCode: '425', tip: '鼠标左键点击【车站发车】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '008', tip: '鼠标左键点击【执行】按钮'}
]
},

View File

@ -279,6 +279,7 @@
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { MouseEvent } from '@/scripts/ConstDic';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
export default {
@ -337,7 +338,7 @@ export default {
if (device && device.code && device._type === 'Section') {
// this.deviceSelect(device);
this.nowSectionCode = device.code;
} else if (device && device.code && device._type === 'Train') {
} else if (device && device.code && device._type === 'Train' && em._event === MouseEvent.Left) {
this.doShow(device);
}
}

View File

@ -9,6 +9,7 @@
>
<div style="text-align: center;">
<map-system-draft ref="mapCanvas" />
<el-button size="small" class="fault-button" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式[Tab]':'切换到故障模式[Tab]' }}</el-button>
<div class="button-box" style="">
<div class="arrow-button" :style="{backgroundImage: 'url(' + buttonLeft + ')' }" @click="changeStation(-1)" />
<div class="arrow-button" :style="{backgroundImage: 'url(' + buttonDbup + ')' }" @click="goTroDialog" />
@ -23,7 +24,9 @@ import MapSystemDraft from '@/views/newMap/mapsystemNew/common/index';
import ButtonDbupIcon from '@/assets/baSiDi/dbup.png';
import ButtonRightIcon from '@/assets/baSiDi/right.png';
import ButtonLeftIcon from '@/assets/baSiDi/left.png';
import { OperateMode } from '@/scripts/ConstDic';
import Vue from 'vue';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'TRO',
@ -52,7 +55,8 @@ export default {
buttonDbup: ButtonDbupIcon,
buttonRight: ButtonRightIcon,
buttonLeft: ButtonLeftIcon,
selfJmap: null
selfJmap: null,
faultMode: false
};
},
computed: {
@ -86,6 +90,11 @@ export default {
this.$store.dispatch('config/resize', { width:this.width, height: this.height });
}
},
mounted() {
EventBus.$on('CheckFaultModeEvent', () => {
this.changeOperateMode();
});
},
beforeDestroy() {
if (this.selfJmap && !this.selfJmap._disposeFlag) {
this.destroy();
@ -99,6 +108,8 @@ export default {
this.deviceCode = deviceCode;
this.$nextTick(function() {
this.$refs.mapCanvas.setMap(this.$store.state.map.map);
this.$jlmap.off('pan');
this.faultMode = this.$store.state.training.operatemode === OperateMode.FAULT;
const mapDevice = this.$store.state.map.mapDevice;
const list = [];
for (const key in mapDevice) {
@ -109,6 +120,14 @@ export default {
!this.isRunPlan && this.$jlmap.clearTrainView();
});
},
changeOperateMode() {
this.faultMode = !this.faultMode;
let mode = OperateMode.NORMAL;
if (this.faultMode) {
mode = OperateMode.FAULT;
}
this.$store.dispatch('training/changeOperateMode', { mode: mode });
},
doClose() {
this.loading = false;
this.dialogShow = false;
@ -185,4 +204,9 @@ export default {
justify-content: space-between;
justify-items: center;
}
.fault-button{
position: absolute;
top: 32px;
right: 32px;
}
</style>