CTC客户端的分路不良 代码调整

This commit is contained in:
joylink_cuiweidong 2023-02-07 18:18:50 +08:00
parent c81190b284
commit f579d37e79
3 changed files with 47 additions and 26 deletions

View File

@ -78,7 +78,7 @@
<center><b></b><b></b></center> <center><b></b><b></b></center>
</span> </span>
</button> </button>
<button :id="Section.defectiveShunting.button.domId" class="button_box" @click="buttonDown(Section.defectiveShunting.button.operation, ['Section'])"> <button :id="Section.defectiveShunting.button.domId" class="button_box" @click="buttonDown(Section.defectiveShunting.button.operation, ['Section','Switch'])">
<span :style="{color: operation === Section.defectiveShunting.button.operation ? '#ccc':'black'}"> <span :style="{color: operation === Section.defectiveShunting.button.operation ? '#ccc':'black'}">
<center><b></b><b></b></center> <center><b></b><b></b></center>
<center><b></b><b></b></center> <center><b></b><b></b></center>
@ -113,7 +113,6 @@
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<train-route ref="trainRoute" @routeCommit="routeCommit" @routeCancel="clearOperate" /> <train-route ref="trainRoute" @routeCommit="routeCommit" @routeCancel="clearOperate" />
<shunt-route ref="shuntRoute" @routeCommit="routeCommit" @routeCancel="clearOperate" /> <shunt-route ref="shuntRoute" @routeCommit="routeCommit" @routeCancel="clearOperate" />
<defective-shunting ref="defectiveShunting" @clearOperate="clearOperate" />
</div> </div>
</template> </template>
@ -131,12 +130,10 @@ import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'
import { MouseEvent, DeviceMenu } from '@/scripts/ConstDic'; import { MouseEvent, DeviceMenu } from '@/scripts/ConstDic';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
import {UserOperationType} from '../../../../scripts/ConstDic'; import {UserOperationType} from '../../../../scripts/ConstDic';
import DefectiveShunting from './dialog/defectiveShunting.vue';
export default { export default {
name: 'MapButtonMenu', name: 'MapButtonMenu',
components: { components: {
// CenterConfig, // CenterConfig,
DefectiveShunting,
PasswordBox, PasswordBox,
NoticeInfo, NoticeInfo,
PopMenu, PopMenu,
@ -809,18 +806,38 @@ export default {
// //
handelDefectiveShunting(model) { handelDefectiveShunting(model) {
// CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING; // CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING;
const operate = { if (model._type == 'Section') {
operation: this.Section.defectiveShunting.button.operation, const operate = {
code: model.code, over: true,
userOperationType: UserOperationType.LEFTCLICK cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING,
}; operation: OperationEvent.Section.defectiveShunting.menu.operation,
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { userOperationType: UserOperationType.LEFTCLICK,
if (valid) { param:{
const {switchSection, code, shuntingTypeList} = model; sectionCode: model.code,
this.$refs.defectiveShunting.doShow({switchSection, code, shuntingTypeList}); shuntingTypeList:['SECTION_SHUNTING']
} }
}); };
// this.clearOperate(); this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
// if (valid) {
// }
});
} else if (model._type == 'Switch') {
const operate = {
over: true,
cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING,
operation: OperationEvent.Section.defectiveShunting.menu.operation,
userOperationType: UserOperationType.LEFTCLICK,
param:{
sectionCode: model.sectionACode,
shuntingTypeList:['SWITCH_FRONT_SHUNTING']
}
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
// if (valid) {
// }
});
}
this.clearOperate();
}, },
assistOperateOrChange(model) { assistOperateOrChange(model) {
// mode.type== // mode.type==

View File

@ -321,12 +321,11 @@ export default {
beforeForkDirective() { beforeForkDirective() {
const operate = { const operate = {
over: true, over: true,
cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING, cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING_FRONT,
operation: OperationEvent.Section.defectiveShunting.menu.operation, operation: OperationEvent.Section.defectiveShunting.menu.operation,
userOperationType: UserOperationType.RIGHTCLICK, userOperationType: UserOperationType.RIGHTCLICK,
param:{ param:{
sectionCode:this.selected.sectionACode, sectionCode:this.selected.sectionACode
shuntingTypeList:['SWITCH_FRONT_SHUNTING']
} }
}; };
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
@ -338,12 +337,11 @@ export default {
locateForkDirective() { locateForkDirective() {
const operate = { const operate = {
over: true, over: true,
cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING, cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING_FIXED,
operation: OperationEvent.Section.defectiveShunting.menu.operation, operation: OperationEvent.Section.defectiveShunting.menu.operation,
userOperationType: UserOperationType.RIGHTCLICK, userOperationType: UserOperationType.RIGHTCLICK,
param:{ param:{
sectionCode:this.selected.sectionACode, sectionCode:this.selected.sectionACode
shuntingTypeList:['FIXED_POSITION_SHUNTING']
} }
}; };
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
@ -355,12 +353,11 @@ export default {
reverseForkDirective() { reverseForkDirective() {
const operate = { const operate = {
over: true, over: true,
cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING, cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING_REVERSE,
operation: OperationEvent.Section.defectiveShunting.menu.operation, operation: OperationEvent.Section.defectiveShunting.menu.operation,
userOperationType: UserOperationType.RIGHTCLICK, userOperationType: UserOperationType.RIGHTCLICK,
param:{ param:{
sectionCode:this.selected.sectionACode, sectionCode:this.selected.sectionACode
shuntingTypeList:['REVERSE_POSITION_SHUNTING']
} }
}; };
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {

View File

@ -201,7 +201,14 @@ export default {
/** 增加备用车 大铁线路使用*/ /** 增加备用车 大铁线路使用*/
CMD_TRAIN_LOAD_TRIP_NUMBER_TRAIN: {value: 'Train_Load_Trip_Number_Train', label: '增加备用车'}, CMD_TRAIN_LOAD_TRIP_NUMBER_TRAIN: {value: 'Train_Load_Trip_Number_Train', label: '增加备用车'},
/** 分路不良 大铁线路使用*/ /** 分路不良 大铁线路使用*/
CMD_SECTION_DEFECTIVE_SHUNTING: {value: 'Section_Defective_Shunting', label: '分路不良'} CMD_SECTION_DEFECTIVE_SHUNTING: {value: 'Section_Defective_Shunting', label: '分路不良'},
/** 岔前分路不良 大铁线路使用*/
CMD_SECTION_DEFECTIVE_SHUNTING_FRONT: {value: 'Section_Defective_Shunting_Front', label: '岔前分路不良'},
/** 定位分路不良 大铁线路使用*/
CMD_SECTION_DEFECTIVE_SHUNTING_FIXED: {value: 'Section_Defective_Shunting_Fixed', label: '岔前分路不良'},
/** 反位分路不良 大铁线路使用*/
CMD_SECTION_DEFECTIVE_SHUNTING_REVERSE:{value: 'Section_Defective_Shunting_Reverse', label: '岔前分路不良'}
}, },
// 站台 // 站台