Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
0c34aa9163
@ -92,6 +92,10 @@ class ESwName extends Group {
|
||||
getTextRect() {
|
||||
return this.textRect;
|
||||
}
|
||||
|
||||
getBoundingRect() {
|
||||
return this.textRect.getBoundingRect();
|
||||
}
|
||||
}
|
||||
|
||||
export default ESwName;
|
||||
|
@ -240,6 +240,16 @@ export const menuOperate = {
|
||||
// 道岔钩锁
|
||||
operation: OperationEvent.Switch.hookLock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_HOOK_LOCK
|
||||
},
|
||||
defectiveShunting:{
|
||||
// 设置分路不良
|
||||
operation: OperationEvent.Switch.defectiveShunting.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_DEFECTIVE_SHUNTING
|
||||
},
|
||||
cancelDefectiveShunting:{
|
||||
// 取消分路不良
|
||||
operation: OperationEvent.Switch.cancelDefectiveShunting.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_CANCEL_DEFECTIVE_SHUNTING
|
||||
}
|
||||
},
|
||||
StationStand:{
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<switch-control ref="switchControl" pop-class="chengdou-03__systerm" />
|
||||
<!-- <switch-control ref="switchControl" pop-class="chengdou-03__systerm" /> -->
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
@ -12,13 +12,13 @@ import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
|
||||
// import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
|
||||
|
||||
export default {
|
||||
name: 'SwitchMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
SwitchControl,
|
||||
// SwitchControl,
|
||||
NoticeInfo
|
||||
},
|
||||
props: {
|
||||
@ -69,8 +69,27 @@ export default {
|
||||
label: '解封',
|
||||
handler: this.unblock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '设置分路不良标记',
|
||||
handler: this.defectiveShunting,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_DEFECTIVE_SHUNTING
|
||||
},
|
||||
// 设置分路不良标记
|
||||
{
|
||||
label: '取消分路不良标记',
|
||||
handler: this.cancelDefectiveShunting,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_CANCEL_DEFECTIVE_SHUNTING
|
||||
},
|
||||
// 区段故障解锁
|
||||
{
|
||||
label: '区段故障解锁',
|
||||
handler: this.fault,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
||||
}
|
||||
|
||||
],
|
||||
Center: [
|
||||
]
|
||||
@ -89,53 +108,78 @@ export default {
|
||||
methods:{
|
||||
// 道岔总定
|
||||
locate() {
|
||||
commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 3).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
// 道岔总反
|
||||
reverse() {
|
||||
commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 3).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔单锁
|
||||
lock() {
|
||||
commitOperate(menuOperate.Switch.lock, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
commitOperate(menuOperate.Switch.lock, { switchCode: this.selected.code}, 3).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔解锁
|
||||
// 道岔单解
|
||||
unlock() {
|
||||
commitOperate(menuOperate.Switch.unlock, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
commitOperate(menuOperate.Switch.unlock, { switchCode: this.selected.code}, 3).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔封锁
|
||||
block() {
|
||||
commitOperate(menuOperate.Switch.block, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
commitOperate(menuOperate.Switch.block, { switchCode: this.selected.code}, 3).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔解封
|
||||
unblock() {
|
||||
commitOperate(menuOperate.Switch.unblock, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
commitOperate(menuOperate.Switch.unblock, { switchCode: this.selected.code}, 3).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔故障解锁/ 区故解
|
||||
fault() {
|
||||
commitOperate(menuOperate.Switch.fault, { switchCode: this.selected.code}, 3).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置分路不良
|
||||
defectiveShunting() {
|
||||
commitOperate(menuOperate.Switch.defectiveShunting, { switchCode: this.selected.code}, 3).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消分路不良
|
||||
cancelDefectiveShunting() {
|
||||
commitOperate(menuOperate.Switch.cancelDefectiveShunting, { switchCode: this.selected.code}, 3).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
doShow(point) {
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
|
@ -45,7 +45,11 @@ export default {
|
||||
/** 引导总锁 */
|
||||
CMD_SWITCH_MASTER_LOCK: {value:'Switch_Master_Lock', label: '设置引导总锁' },
|
||||
/** 取消引导总锁 */
|
||||
CMD_SWITCH_MASTER_UNBLOCK: {value: 'Switch_Master_Unblock', label: '取消引导总锁'}
|
||||
CMD_SWITCH_MASTER_UNBLOCK: {value: 'Switch_Master_Unblock', label: '取消引导总锁'},
|
||||
/** 道岔设置分路不良 */
|
||||
CMD_SWITCH_DEFECTIVE_SHUNTING: {value: 'Switch_Defective_Shunting', label: '道岔设置分路不良'},
|
||||
/** 道岔取消分路不良 */
|
||||
CMD_SWITCH_CANCEL_DEFECTIVE_SHUNTING: {value: 'Switch_Cancel_Defective_Shunting', label: '道岔取消分路不良'}
|
||||
},
|
||||
|
||||
// 控制模式操作
|
||||
|
@ -1162,6 +1162,20 @@ export const OperationEvent = {
|
||||
operation: '11b1',
|
||||
domId: '_Tips-Switch-ForceCancelSpeed-Menu{BOTTOM}'
|
||||
}
|
||||
},
|
||||
// 设置分路不良
|
||||
defectiveShunting:{
|
||||
menu: {
|
||||
operation: '11c',
|
||||
domId: '_Tips-Switch-DefectiveShunting-Menu{TOP}'
|
||||
}
|
||||
},
|
||||
// 取消分路不良
|
||||
cancelDefectiveShunting:{
|
||||
menu: {
|
||||
operation: '11d',
|
||||
domId: '_Tips-Switch-CancelDefectiveShunting-Menu{TOP}'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user