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

View File

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