Merge branch 'test_dispaly' of https://git.code.tencent.com/lian-cbtc/jl-client into test_dispaly1

This commit is contained in:
fan 2023-02-24 13:06:38 +08:00
commit 2aadaaf100
5 changed files with 65 additions and 5 deletions

View File

@ -74,6 +74,16 @@ export const menuOperate = {
// 添加备用车 (大铁线路 车次号 非车组号) // 添加备用车 (大铁线路 车次号 非车组号)
operation: OperationEvent.Section.addSpareTrain.menu.operation, operation: OperationEvent.Section.addSpareTrain.menu.operation,
cmdType: CMD.Section.CMD_TRAIN_LOAD_TRIP_NUMBER_TRAIN cmdType: CMD.Section.CMD_TRAIN_LOAD_TRIP_NUMBER_TRAIN
},
defectiveShunting:{
// 分路不良
operation: OperationEvent.Section.defectiveShunting.menu.operation,
cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING
},
cancelDefectiveShunting:{
// 取消分路不良
operation: OperationEvent.Section.cancelDefectiveShunting.menu.operation,
cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING
} }
}, },
Signal:{ Signal:{

View File

@ -33,6 +33,7 @@
</template> </template>
<script> <script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
export default { export default {
name: 'DefectivePasswordBox', name: 'DefectivePasswordBox',
components: { components: {
@ -60,13 +61,16 @@ export default {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}, },
domIdConfirm() { domIdConfirm() {
return this.dialogShow ? OperationEvent.Switch.defectiveShunting.twoConfirm.domId : ''; const domId = OperationHandler.getDomIdByOperation(this.operation);
return this.dialogShow ? domId : '';
} }
}, },
methods:{ methods:{
doShow(operate) { doShow(operate) {
this.operation = operate.operation; this.operation = operate.operation;
if (operate.operation == OperationEvent.Switch.cancelDefectiveShunting.menu.operation) { if (operate.operation == OperationEvent.Section.cancelDefectiveShunting.menu.operation) {
this.name = '取消分路不良';
} else if (operate.operation == OperationEvent.Switch.cancelDefectiveShunting.menu.operation) {
this.name = '取消分路不良'; this.name = '取消分路不良';
} else { } else {
this.name = '分路不良'; this.name = '分路不良';

View File

@ -63,7 +63,9 @@ export default {
doShow(operate, selected) { doShow(operate, selected) {
this.selected = selected; this.selected = selected;
this.operation = operate.operation; this.operation = operate.operation;
if (operate.operation == OperationEvent.Switch.cancelDefectiveShunting.menu.operation) { if (operate.operation == OperationEvent.Section.cancelDefectiveShunting.menu.operation) {
this.title = '取消分路不良';
} else if (operate.operation == OperationEvent.Switch.cancelDefectiveShunting.menu.operation) {
this.title = '取消分路不良'; this.title = '取消分路不良';
} else { } else {
this.title = '分路不良'; this.title = '分路不良';
@ -118,6 +120,10 @@ export default {
operate.cmdType = CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING; operate.cmdType = CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING;
break; break;
} }
case OperationEvent.Section.cancelDefectiveShunting.menu.operation: {
operate.cmdType = CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING;
break;
}
case OperationEvent.Switch.cancelDefectiveShunting.menu.operation: { case OperationEvent.Switch.cancelDefectiveShunting.menu.operation: {
operate.cmdType = CMD.Section.CMD_SECTION_CANCEL_DEFECTIVE_SHUNTING; operate.cmdType = CMD.Section.CMD_SECTION_CANCEL_DEFECTIVE_SHUNTING;
break; break;

View File

@ -6,6 +6,7 @@
<set-fault ref="setFault" pop-class="datie-02__systerm" /> <set-fault ref="setFault" pop-class="datie-02__systerm" />
<add-spare-train ref="addSpareTrain" /> <add-spare-train ref="addSpareTrain" />
<draw-select ref="drawSelect" /> <draw-select ref="drawSelect" />
<fork-directive ref="forkDirective" />
</div> </div>
</template> </template>
@ -20,6 +21,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
import AddSpareTrain from './dialog/addSpareTrain'; import AddSpareTrain from './dialog/addSpareTrain';
import DrawSelect from './dialog/drawSelect'; import DrawSelect from './dialog/drawSelect';
import ForkDirective from './dialog/forkDirective';
export default { export default {
name: 'SectionMenu', name: 'SectionMenu',
@ -29,7 +31,8 @@ export default {
TrainAddPlan, TrainAddPlan,
SetFault, SetFault,
AddSpareTrain, AddSpareTrain,
DrawSelect DrawSelect,
ForkDirective
}, },
props: { props: {
selected: { selected: {
@ -50,11 +53,25 @@ export default {
menu: [], menu: [],
menuNormal: [ menuNormal: [
{ {
label: ' 增加车次', label: '增加车次',
handler: this.addSpare, handler: this.addSpare,
cmdType: CMD.Section.CMD_TRAIN_LOAD_TRIP_NUMBER_TRAIN, cmdType: CMD.Section.CMD_TRAIN_LOAD_TRIP_NUMBER_TRAIN,
isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork', isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork',
isShow: (section, work) => ['01', '02', '03'].includes(section.type) isShow: (section, work) => ['01', '02', '03'].includes(section.type)
},
{
label: '分路不良',
handler: this.forkDirective,
cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING,
isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork',
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work === 'ctcWork'
},
{
label: '空闲',
handler: this.cancleForkDirective,
cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING,
isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork',
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work === 'ctcWork'
} }
], ],
menuForce: [ menuForce: [
@ -138,6 +155,22 @@ export default {
} }
}); });
}, },
//
forkDirective() {
commitOperate(menuOperate.Section.defectiveShunting, {sectionCode:this.selected.code, shuntingTypeList: ['SECTION_SHUNTING']}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.forkDirective.doShow(operate, this.selected);
}
});
},
//
cancleForkDirective() {
commitOperate(menuOperate.Section.cancelDefectiveShunting, {sectionCode:this.selected.code, shuntingTypeList: []}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.forkDirective.doShow(operate, this.selected);
}
});
},
// //
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{

View File

@ -2482,6 +2482,13 @@ export const OperationEvent = {
// operation: '428', // operation: '428',
// domId: '_Tips-Section-Defective-Shunting-MenuButton' // domId: '_Tips-Section-Defective-Shunting-MenuButton'
// }, // },
},
// 取消分路不良 大铁线路
cancelDefectiveShunting:{
menu: {
operation: '429',
domId: '_Tips-Section-CancelDefectiveShunting-Menu{TOP}'
}
} }
}, },