浙大网新操作调整
This commit is contained in:
parent
72f730aaa6
commit
6e477bef89
@ -585,18 +585,16 @@ class Jlmap {
|
||||
if (elem.hasOwnProperty('applicantId')) {
|
||||
controlTransferList.push(elem);
|
||||
}
|
||||
if (!elem.applicantId) {
|
||||
const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
|
||||
const guideLock = this.mapDevice[oDevice.guideLockCode];
|
||||
const guideLockStatus = {totalGuideLock: elem.totalGuideLock};
|
||||
if (guideLock && this.hookHandle(guideLock, guideLockStatus)) {
|
||||
this.$painter.update(guideLock);
|
||||
}
|
||||
if (elem.dispose) {
|
||||
this.$painter.delete(oDevice);
|
||||
} else {
|
||||
this.$painter.update(oDevice);
|
||||
}
|
||||
const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
|
||||
const guideLock = this.mapDevice[oDevice.guideLockCode];
|
||||
const guideLockStatus = {totalGuideLock: elem.totalGuideLock};
|
||||
if (guideLock && this.hookHandle(guideLock, guideLockStatus)) {
|
||||
this.$painter.update(guideLock);
|
||||
}
|
||||
if (elem.dispose) {
|
||||
this.$painter.delete(oDevice);
|
||||
} else {
|
||||
this.$painter.update(oDevice);
|
||||
}
|
||||
store.commit('map/mapStationStateUpdate');
|
||||
} else if (elem.deviceType === 'STATION_DIRECTION') {
|
||||
|
@ -954,6 +954,7 @@ export default class Station extends Group {
|
||||
this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
this.emergencyArrowsControl && this.emergencyArrowsControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
this.stationControlCC && this.stationControlCC.setStyle({text:'EL', textFill:this.style.Station.StationControl.text.emergencyControlColor});
|
||||
this.stationControlCC && this.stationControlCC.stopAnimation(true);
|
||||
this.veryControl && this.veryControl.setColor(this.style.Station.StationControl.veryControl.defaultColor);
|
||||
this.selfDiscipline && this.selfDiscipline.setColor(this.style.Station.StationControl.selfDiscipline.defaultColor);
|
||||
this.selfDisciplineControl && this.selfDisciplineControl.setColor(this.style.Station.StationControl.selfDisciplineControl.defaultColor);
|
||||
@ -1047,7 +1048,25 @@ export default class Station extends Group {
|
||||
device && device.instance && device.instance.setCount(countNum);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.style.Station.StationControl.special && model.apply2TheControlMode) {
|
||||
this.controlTextFlash(model.apply2TheControlMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
controlTextFlash(apply2TheControlMode) {
|
||||
if (this.stationControlCC && apply2TheControlMode === 'Local' ) {
|
||||
let color;
|
||||
if (apply2TheControlMode === 'Local') {
|
||||
color = this.style.Station.StationControl.text.stationControlColor;
|
||||
this.stationControlCC && this.stationControlCC.setStyle({text:'LC', textFill:color});
|
||||
} else if (apply2TheControlMode === 'Center') {
|
||||
color = this.style.Station.StationControl.text.centerControlColor;
|
||||
this.stationControlCC && this.stationControlCC.setStyle({text:'CC', textFill:color});
|
||||
}
|
||||
this.stationControlCC.animateStyle(true)
|
||||
.when(500, {textFill: '#000'})
|
||||
.when(1000, {textFill: color})
|
||||
.when(1500, {textFill: '#000'}).start();
|
||||
}
|
||||
}
|
||||
handleGuideLock(model) {
|
||||
|
@ -388,6 +388,14 @@ export const menuOperate = {
|
||||
// 非常站控 大铁线路
|
||||
operation: OperationEvent.StationControl.requestVeryControl.menu.operation,
|
||||
cmdType:CMD.ControlConvertMenu.CMD_CM_SPECIAL_STATION_CONTROL
|
||||
},
|
||||
replyStationControl: {
|
||||
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
||||
cmdType: CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL
|
||||
},
|
||||
replyCenterControl: {
|
||||
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
||||
cmdType: CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL
|
||||
}
|
||||
},
|
||||
TrainWindow: {
|
||||
|
@ -64,10 +64,10 @@ export default {
|
||||
// 暂无功能,先disabled
|
||||
label: '授权',
|
||||
disabled: true,
|
||||
handler: this.setStationControl,
|
||||
handler: this.work === 'localWork' ? this.agreeCenterControl : this.agreeStationControl,
|
||||
isDisabled: (station, work) => {
|
||||
if (work === 'localWork') {
|
||||
return true;
|
||||
return station.controlMode !== 'Local';
|
||||
} else {
|
||||
return station.controlMode !== 'Center';
|
||||
}
|
||||
@ -469,6 +469,32 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
agreeStationControl() {
|
||||
commitOperate(menuOperate.StationControl.replyStationControl, {stationCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', {
|
||||
device: this.selected,
|
||||
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '授权控制'},
|
||||
cmdType: CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL,
|
||||
param: { replyVOList:[{ stationCode: this.selected.code, agree: true}] }
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
agreeCenterControl() {
|
||||
commitOperate(menuOperate.StationControl.replyCenterControl, {stationCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', {
|
||||
device: this.selected,
|
||||
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '授权控制'},
|
||||
cmdType: CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL,
|
||||
param: { replyVOList:[{ stationCode: this.selected.code, agree: true}] }
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
setEmergencyControl() {
|
||||
// 紧急站控
|
||||
commitOperate(menuOperate.StationControl.emergencyStationControl, {stationCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
|
@ -50,10 +50,10 @@
|
||||
<div class="left-table-cell"><span>跳停</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="center-table-cell"><span :id="domSetOrCancelJump" @contextmenu="menuEvent('stopJumping')">设置/取消 所有列车跳停本站</span></div>
|
||||
<div class="center-table-cell"><span :id="domSetOrCancelJump" :style="{color:jumpInterval ? standJumpColor :jumpStatusColor}" @contextmenu="menuEvent('stopJumping')">设置/取消 所有列车跳停本站</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="right-table-cell"><span @contextmenu="menuEvent('allTrainStopJump')">所有列车跳停本站</span></div>
|
||||
<div class="right-table-cell"><span :style="{color: jumpStatusColor}" @contextmenu="menuEvent('allTrainStopJump')">所有列车跳停本站</span></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
@ -149,9 +149,12 @@ export default {
|
||||
title: '',
|
||||
standDetainColor: '#FFF',
|
||||
detainStatusColor: '#FFF',
|
||||
standJumpColor: '#FFF',
|
||||
jumpStatusColor: '#FFF',
|
||||
bgColor: '#000',
|
||||
fontColor: '#FFF',
|
||||
detainInterval: ''
|
||||
detainInterval: '',
|
||||
jumpInterval: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -203,9 +206,7 @@ export default {
|
||||
this.initStatus(list);
|
||||
},
|
||||
'$store.state.socket.equipmentStatus': function (val) {
|
||||
if (this.selected) {
|
||||
this.detainStatusColor = this.selected.centerHoldTrain || this.selected.stationHoldTrain ? '#FF0' : '#FFF';
|
||||
}
|
||||
this.initDeviceStatus();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -222,6 +223,7 @@ export default {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
const requestList = this.$store.state.menuOperation.requestList;
|
||||
this.initDeviceStatus();
|
||||
this.initStatus(requestList || []);
|
||||
this.position = position;
|
||||
this.dialogShow = true;
|
||||
@ -233,21 +235,37 @@ export default {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
initDeviceStatus() {
|
||||
if (this.selected) {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](this.selected.code);
|
||||
this.detainStatusColor = device.centerHoldTrain || device.stationHoldTrain ? '#FF0' : '#FFF';
|
||||
this.jumpStatusColor = device.assignSkip || device.allSkip ? '#FF0' : '#FFF';
|
||||
}
|
||||
},
|
||||
initStatus(requestList) {
|
||||
this.standDetainColor = '#FFF';
|
||||
this.bgColor = '#000';
|
||||
this.fontColor = '#FFF';
|
||||
this.clearTimer();
|
||||
requestList.forEach(item => {
|
||||
if (item.device && item.device.code === this.selected.code) {
|
||||
if (item.operation.name === '设置扣车' || item.operation.name === '取消扣车') {
|
||||
this.standDetain();
|
||||
} else if (item.operation.name === '跳停本站' || item.operation.name === '取消跳停') {
|
||||
this.standJump();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
clearTimer() {
|
||||
if (this.detainInterval) {
|
||||
clearInterval(this.detainInterval);
|
||||
this.detainInterval = '';
|
||||
}
|
||||
requestList.forEach(item => {
|
||||
if (item.device && item.device.code === this.selected.code) {
|
||||
if (item.operation.code === OperationEvent.StationStand.setDetainTrain.menu.operation || item.operation.code === OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||
this.standDetain();
|
||||
}
|
||||
}
|
||||
});
|
||||
if (this.jumpInterval) {
|
||||
clearInterval(this.jumpInterval);
|
||||
this.jumpInterval = '';
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
const step = {
|
||||
@ -259,10 +277,7 @@ export default {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
if (this.detainInterval) {
|
||||
clearInterval(this.detainInterval);
|
||||
this.detainInterval = '';
|
||||
}
|
||||
this.clearTimer();
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -343,7 +358,21 @@ export default {
|
||||
} else {
|
||||
this.standDetainColor = '#000';
|
||||
}
|
||||
}, 1000);
|
||||
}, 500);
|
||||
}
|
||||
},
|
||||
standJump() {
|
||||
this.standJumpColor = '#FF0';
|
||||
this.bgColor = '#FFF';
|
||||
this.fontColor = '#000';
|
||||
if (!this.jumpInterval) {
|
||||
this.jumpInterval = setInterval(() => {
|
||||
if (this.standJumpColor !== '#FF0') {
|
||||
this.standJumpColor = '#FF0';
|
||||
} else {
|
||||
this.standJumpColor = '#000';
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
},
|
||||
setRuningMode(mode, direction) {
|
||||
|
@ -369,7 +369,7 @@ export default {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', {
|
||||
device: this.selected,
|
||||
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '跳停本站请求成功'},
|
||||
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '跳停本站'},
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP,
|
||||
param: step.param
|
||||
});
|
||||
@ -390,7 +390,7 @@ export default {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', {
|
||||
device: this.selected,
|
||||
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '取消跳停请求成功'},
|
||||
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '取消跳停'},
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP,
|
||||
param: step.param
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user