大铁项目 添加 非常站控 指令

允许自律 状态代码调整
This commit is contained in:
joylink_cuiweidong 2022-05-17 16:32:39 +08:00
parent 8b2bb77c12
commit 4da6ce092d
7 changed files with 80 additions and 4 deletions

View File

@ -437,7 +437,9 @@ class SkinCode extends defaultStyle {
selfDiscipline: { selfDiscipline: {
show: true, show: true,
offset: { x: 0, y: 0 }, offset: { x: 0, y: 0 },
text: '允许自律' text: '允许自律',
defaultColor: '#7F7F7F',
lightColor: '#ff0',
}, },
selfDisciplineControl: { selfDisciplineControl: {
show: true, show: true,

View File

@ -675,6 +675,7 @@ export default class Station extends Group {
this.emergencyArrowsControl && this.emergencyArrowsControl.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.setStyle({text:'EL', textFill:this.style.Station.StationControl.text.emergencyControlColor});
this.veryControl && this.veryControl.setColor(this.style.Station.StationControl.veryControl.defaultColor); 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); this.selfDisciplineControl && this.selfDisciplineControl.setColor(this.style.Station.StationControl.selfDisciplineControl.defaultColor);
this.veryControlButton && this.veryControlButton.setStyle({ fill: this.style.Station.StationControl.veryControlButton.defaultColor }); this.veryControlButton && this.veryControlButton.setStyle({ fill: this.style.Station.StationControl.veryControlButton.defaultColor });
if (this.style.Station.stationText.isSpecialType) { if (this.style.Station.stationText.isSpecialType) {
@ -705,6 +706,7 @@ export default class Station extends Group {
model.controller && this.handleComplexControl(model.controller); model.controller && this.handleComplexControl(model.controller);
model.emergencyController != undefined && this.handleEmergencyChange(model.emergencyController); model.emergencyController != undefined && this.handleEmergencyChange(model.emergencyController);
model.controlApplicant && this.handleControlApplicant(model); model.controlApplicant && this.handleControlApplicant(model);
model.allowAutonomy && this.handleAllowAutonomy();
if (this.style.Station.syncCentralizeStation && (model.controlMode || model.controller || model.emergencyController != undefined) && model.centralized) { if (this.style.Station.syncCentralizeStation && (model.controlMode || model.controller || model.emergencyController != undefined) && model.centralized) {
model.chargeStationCodeList.forEach(item => { model.chargeStationCodeList.forEach(item => {
const device = store.getters['map/getDeviceByCode'](item); const device = store.getters['map/getDeviceByCode'](item);
@ -736,6 +738,10 @@ export default class Station extends Group {
this.controlPreReset && this.controlPreReset.setColor('#f00'); this.controlPreReset && this.controlPreReset.setColor('#f00');
} }
handleAllowAutonomy() {
this.selfDiscipline && this.selfDiscipline.setColor(this.style.Station.StationControl.selfDiscipline.lightColor);
}
handleControlApplicant(model) { handleControlApplicant(model) {
if (this.style.Station.stationText.isSpecialType) { if (this.style.Station.stationText.isSpecialType) {
const memberData = store.state.training.memberData; const memberData = store.state.training.memberData;

View File

@ -353,6 +353,11 @@ export const menuOperate = {
// 设置折返策略 // 设置折返策略
operation: OperationEvent.Station.setBackStrategy.menu.operation, operation: OperationEvent.Station.setBackStrategy.menu.operation,
cmdType: CMD.Station.CMD_STATION_SET_TURN_BACK_STRATEGY cmdType: CMD.Station.CMD_STATION_SET_TURN_BACK_STRATEGY
},
requestVeryControl:{
// 非常站控 大铁线路
operation: OperationEvent.StationControl.requestVeryControl.menu.operation,
cmdType:CMD.ControlConvertMenu.CMD_CM_SPECIAL_STATION_CONTROL
} }
}, },
TrainWindow: { TrainWindow: {
@ -499,7 +504,7 @@ export const menuOperate = {
} }
}, },
CTC: { CTC: {
//接预 // 接预
receivingNotice: { receivingNotice: {
operation: OperationEvent.CTCCommand.receivingNotice.menu.operation, operation: OperationEvent.CTCCommand.receivingNotice.menu.operation,
cmdType: CMD.CTC.CTC_RECEIVING_NOTICE cmdType: CMD.CTC.CTC_RECEIVING_NOTICE

View File

@ -15,7 +15,7 @@
<el-col :span="11" :offset="1">上下行</el-col> <el-col :span="11" :offset="1">上下行</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-input v-model="addModel.tripNumber" size="mini" @blur="handleTripNumber" /> <el-input v-model="addModel.tripNumber" size="mini" @blur="handleTripNumber" />
<div class="tripNumberTips">{{ messageTip1 }}</div> <div class="tripNumberTips">{{ messageTip1 }}</div>
</el-col> </el-col>

View File

@ -4,6 +4,7 @@
<draw-select ref="drawSelect" /> <draw-select ref="drawSelect" />
<set-fault ref="setFault" pop-class="chengdou-03__systerm" /> <set-fault ref="setFault" pop-class="chengdou-03__systerm" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" /> <notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
<password-box ref="password" @checkOver="passWordCommit" @checkCancel="clearOperate" />
</div> </div>
</template> </template>
@ -17,6 +18,9 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault'; import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
// import Handler from '@/scripts/cmdPlugin/Handler';
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
export default { export default {
name: 'StationMenu', name: 'StationMenu',
@ -24,6 +28,7 @@ export default {
PopMenu, PopMenu,
SetFault, SetFault,
NoticeInfo, NoticeInfo,
PasswordBox,
DrawSelect DrawSelect
}, },
mixins: [ mixins: [
@ -92,6 +97,13 @@ export default {
} else { } else {
this.doClose(); this.doClose();
} }
},
'$store.state.menuOperation.selectedCount': function (val) {
const selected = this.$store.state.menuOperation.selected;
const subtype = this.$store.state.menuOperation.subType;
if (subtype == 'veryControlButton' && selected._type == 'Station') {
this.veryControlClick(selected);
}
} }
}, },
methods: { methods: {
@ -156,6 +168,45 @@ export default {
handlerOpenPdf(elem) { handlerOpenPdf(elem) {
const url = `https://joylink.club/oss/projects/wjls/${this.selected.jp}/${elem.file}`; const url = `https://joylink.club/oss/projects/wjls/${this.selected.jp}/${elem.file}`;
window.open(url, '_blank'); window.open(url, '_blank');
},
//
veryControlClick(selected) {
// stationCodepressDown10
const pressDown = selected.controlMode == 'Interlock' ? 0 : 1;
commitOperate(menuOperate.StationControl.requestVeryControl, { stationCode: selected.code, pressDown:pressDown }, 0).then(({valid, operate}) => {
if (valid) {
operate.nextCmdType = CMD.ControlConvertMenu.CMD_CM_SPECIAL_STATION_CONTROL;
operate['operateNext'] = OperationEvent.Command.close.password.operation;
this.$refs.password.doShow(operate);
}
}).catch(error=>{
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
clearOperate() { //
// Handler.clear(); //
// this.$store.dispatch('menuOperation/setButtonOperation', null);
},
//
passWordCommit(data) {
let operate = {};
if (data.nextCmdType) {
operate = {
over: true,
operation: data.operation,
cmdType: data.nextCmdType,
param: data.param
};
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
} }
} }
}; };

View File

@ -66,7 +66,8 @@ export default {
/** 回复中控请求(同意/拒绝) */ /** 回复中控请求(同意/拒绝) */
CMD_CM_REPLY_CENTER_CONTROL: {value:'CM_Reply_Center_Control', label: '回复中控请求'}, CMD_CM_REPLY_CENTER_CONTROL: {value:'CM_Reply_Center_Control', label: '回复中控请求'},
CMD_CM_RECEIVE_CONTROL: {value:'CM_Receive_Control', label: '接收控制'}, CMD_CM_RECEIVE_CONTROL: {value:'CM_Receive_Control', label: '接收控制'},
CMD_CM_SURRENDER_CONTROL: {value:'CM_Surrender_Control', label: '交出控制'} CMD_CM_SURRENDER_CONTROL: {value:'CM_Surrender_Control', label: '交出控制'},
CMD_CM_SPECIAL_STATION_CONTROL:{value:'CM_Special_Station_Control', label: '非常站控'}
}, },
// 司机操作 // 司机操作

View File

@ -1293,6 +1293,17 @@ export const OperationEvent = {
operation: '2054', operation: '2054',
domId: '_Tips-Control-Response-Refuse' domId: '_Tips-Control-Response-Refuse'
} }
},
// 非常站控 大铁线路
requestVeryControl:{
menu: {
operation: '206',
domId: '_Tips-Request-Very-Control-Menu'
},
menuButton: {
operation: '2061',
domId: '_Tips-Request-Very-Control-Menu-Button{BOTTOM}'
}
} }
}, },