Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
815735b8c5
@ -85,6 +85,20 @@ export default class Line2 extends Group {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getBoundingRect() {
|
||||||
|
const rect = this.line.getBoundingRect().clone();
|
||||||
|
if (this.model.leftTerminal) {
|
||||||
|
const subheadText = this.leftTerminal.getBoundingRect().clone();
|
||||||
|
rect.union(subheadText);
|
||||||
|
return rect;
|
||||||
|
}
|
||||||
|
if (this.model.rightTerminal) {
|
||||||
|
const subheadText = this.rightTerminal.getBoundingRect().clone();
|
||||||
|
rect.union(subheadText);
|
||||||
|
}
|
||||||
|
return rect;
|
||||||
|
}
|
||||||
|
|
||||||
setLineType(type) {
|
setLineType(type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case '01': break;
|
case '01': break;
|
||||||
|
@ -119,7 +119,11 @@ export default {
|
|||||||
if (selected._type == 'Train') {
|
if (selected._type == 'Train') {
|
||||||
name = selected.serviceNumber;
|
name = selected.serviceNumber;
|
||||||
}
|
}
|
||||||
this.deviceName = deviceType[selected._type] + '-' + name;
|
if (name) {
|
||||||
|
this.deviceName = deviceType[selected._type] + '-' + name;
|
||||||
|
} else {
|
||||||
|
this.deviceName = deviceType[selected._type];
|
||||||
|
}
|
||||||
this.faultList = deviceFaultType[selected._type];
|
this.faultList = deviceFaultType[selected._type];
|
||||||
if (this.faultList && this.faultList.length) {
|
if (this.faultList && this.faultList.length) {
|
||||||
this.form.faultType = this.faultList[0].value;
|
this.form.faultType = this.faultList[0].value;
|
||||||
|
@ -302,6 +302,11 @@ export const menuOperate = {
|
|||||||
// 批量取消扣车
|
// 批量取消扣车
|
||||||
operation: OperationEvent.StationStand.cancelBulkBuckleTrain.menu.operation,
|
operation: OperationEvent.StationStand.cancelBulkBuckleTrain.menu.operation,
|
||||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_ALL
|
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_ALL
|
||||||
|
},
|
||||||
|
openPsdByHand:{
|
||||||
|
// 手动开启屏蔽门
|
||||||
|
operation: OperationEvent.StationStand.openPsdByHand.menu.operation,
|
||||||
|
cmdType:CMD.Stand.CMD_STAND_OPEN_PSD
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
StationControl:{
|
StationControl:{
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
<menu-train ref="menuTrain" :selected="selected" />
|
<menu-train ref="menuTrain" :selected="selected" />
|
||||||
<menu-station ref="menuStation" :selected="selected" />
|
<menu-station ref="menuStation" :selected="selected" />
|
||||||
<menu-limit ref="menuLimit" :selected="selected" />
|
<menu-limit ref="menuLimit" :selected="selected" />
|
||||||
|
<menu-power ref="menuPower" :selected="selected" />
|
||||||
<!--<passive-alarm ref="passiveAlarm" />-->
|
<!--<passive-alarm ref="passiveAlarm" />-->
|
||||||
<passive-contorl ref="passiveControl" pop-class="ningbo-01__systerm" />
|
<passive-contorl ref="passiveControl" pop-class="ningbo-01__systerm" />
|
||||||
<!--<passive-Timeout ref="passiveTimeout" />-->
|
<!--<passive-Timeout ref="passiveTimeout" />-->
|
||||||
@ -34,6 +35,7 @@ import MenuStation from './menuStation';
|
|||||||
import MenuBar from './menuBar';
|
import MenuBar from './menuBar';
|
||||||
import MenuLimit from './menuLimit';
|
import MenuLimit from './menuLimit';
|
||||||
import MenuStationTurnBack from './menuStationTurnBack';
|
import MenuStationTurnBack from './menuStationTurnBack';
|
||||||
|
import MenuPower from './menuPower';
|
||||||
// import PassiveAlarm from './passiveDialog/alarm';
|
// import PassiveAlarm from './passiveDialog/alarm';
|
||||||
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
|
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
|
||||||
// import PassiveTimeout from './passiveDialog/timeout';
|
// import PassiveTimeout from './passiveDialog/timeout';
|
||||||
@ -54,6 +56,7 @@ export default {
|
|||||||
MenuTrain,
|
MenuTrain,
|
||||||
MenuStationTurnBack,
|
MenuStationTurnBack,
|
||||||
MenuLimit,
|
MenuLimit,
|
||||||
|
MenuPower,
|
||||||
// PassiveAlarm,
|
// PassiveAlarm,
|
||||||
PassiveContorl
|
PassiveContorl
|
||||||
// PassiveTimeout
|
// PassiveTimeout
|
||||||
|
117
src/jmapNew/theme/race_01/menus/menuPower.vue
Normal file
117
src/jmapNew/theme/race_01/menus/menuPower.vue
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
|
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import PopMenu from '@/components/PopMenu';
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
|
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||||
|
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
export default {
|
||||||
|
name: 'SectionMenu',
|
||||||
|
components: {
|
||||||
|
PopMenu,
|
||||||
|
SetFault
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
selected: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data( ) {
|
||||||
|
return {
|
||||||
|
menu: [],
|
||||||
|
menuForce: [
|
||||||
|
{
|
||||||
|
label: '设置故障',
|
||||||
|
handler: this.setStoppage,
|
||||||
|
cmdType:CMD.Fault.CMD_SET_FAULT
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '取消故障',
|
||||||
|
handler: this.cancelStoppage,
|
||||||
|
cmdType:CMD.Fault.CMD_CANCEL_FAULT
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '触发故障管理',
|
||||||
|
handler: this.triggerFaultManagement,
|
||||||
|
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('training', [
|
||||||
|
'mode',
|
||||||
|
'operatemode'
|
||||||
|
]),
|
||||||
|
...mapGetters('menuOperation', [
|
||||||
|
'buttonOperation'
|
||||||
|
])
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Power) && !this.buttonOperation) {
|
||||||
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
|
} else {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
clickEvent() {
|
||||||
|
const self = this;
|
||||||
|
window.onclick = function (e) {
|
||||||
|
self.doClose();
|
||||||
|
};
|
||||||
|
},
|
||||||
|
initMenu() {
|
||||||
|
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
|
// 故障模式菜单列表
|
||||||
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
|
this.menu = this.menuForce;
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
doShow(point) {
|
||||||
|
this.clickEvent();
|
||||||
|
this.initMenu();
|
||||||
|
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||||
|
this.$refs.popMenu.resetShowPosition(point);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
|
this.$refs.popMenu.close();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 设置故障
|
||||||
|
setStoppage() {
|
||||||
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
|
if (valid) {
|
||||||
|
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消故障
|
||||||
|
cancelStoppage() {
|
||||||
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
|
if (valid) {
|
||||||
|
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
triggerFaultManagement() {
|
||||||
|
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -142,12 +142,17 @@ export default {
|
|||||||
{
|
{
|
||||||
label: '设置故障',
|
label: '设置故障',
|
||||||
handler: this.setStoppage,
|
handler: this.setStoppage,
|
||||||
cmdType:CMD.Stand.CMD_STAND_ADD_FAULT
|
cmdType:CMD.Fault.CMD_SET_FAULT
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消故障',
|
label: '取消故障',
|
||||||
handler: this.cancelStoppage,
|
handler: this.cancelStoppage,
|
||||||
cmdType:CMD.Stand.CMD_STAND_REMOVE_FAULT
|
cmdType:CMD.Fault.CMD_CANCEL_FAULT
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '手动开启屏蔽门',
|
||||||
|
handler: this.openPsdByHand,
|
||||||
|
cmdType: CMD.Stand.CMD_STAND_OPEN_PSD
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '触发故障管理',
|
label: '触发故障管理',
|
||||||
@ -317,6 +322,13 @@ export default {
|
|||||||
},
|
},
|
||||||
triggerFaultManagement() {
|
triggerFaultManagement() {
|
||||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||||
|
},
|
||||||
|
// 手动开启屏蔽门
|
||||||
|
openPsdByHand() {
|
||||||
|
commitOperate(menuOperate.StationStand.openPsdByHand, {standCode:this.selected.code}, 3).then(({valid, operate})=>{
|
||||||
|
}).catch(error=>{
|
||||||
|
this.$refs.noticeInfo.doShow({}, error.message);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -118,6 +118,7 @@ export const DeviceMenu = {
|
|||||||
AxleReset: '12',
|
AxleReset: '12',
|
||||||
Enabled: '13',
|
Enabled: '13',
|
||||||
StationTurnBack: '14',
|
StationTurnBack: '14',
|
||||||
|
Power:'15',
|
||||||
|
|
||||||
Map: '100',
|
Map: '100',
|
||||||
PrdCategory: '101',
|
PrdCategory: '101',
|
||||||
@ -128,7 +129,7 @@ export const DeviceMenu = {
|
|||||||
SetDriver: '106',
|
SetDriver: '106',
|
||||||
Script: '107',
|
Script: '107',
|
||||||
IscsSystem: '108',
|
IscsSystem: '108',
|
||||||
IscsInterface: '109'
|
IscsInterface: '109'
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -183,7 +183,9 @@ export default {
|
|||||||
/** 查看站台状态 */
|
/** 查看站台状态 */
|
||||||
CMD_STAND_VIEW_STATUS:{value:'Stand_View_Status', label: '查看站台状态'},
|
CMD_STAND_VIEW_STATUS:{value:'Stand_View_Status', label: '查看站台状态'},
|
||||||
/** 站台总取消 */
|
/** 站台总取消 */
|
||||||
CMD_STAND_TOTAL_CANCLE:{value:'Stand_Total_Cancle', label: '站台总取消'}
|
CMD_STAND_TOTAL_CANCLE:{value:'Stand_Total_Cancle', label: '站台总取消'},
|
||||||
|
/** 手动开启屏蔽门 */
|
||||||
|
CMD_STAND_OPEN_PSD:{value:'Stand_Open_Psd', label: '手动开启屏蔽门'}
|
||||||
},
|
},
|
||||||
|
|
||||||
Station: {
|
Station: {
|
||||||
|
@ -49,6 +49,9 @@ export const deviceFaultType = {
|
|||||||
],
|
],
|
||||||
Train: [
|
Train: [
|
||||||
{label: '通信异常', value: 'COMMUNICATION_ABNORMAL'}
|
{label: '通信异常', value: 'COMMUNICATION_ABNORMAL'}
|
||||||
|
],
|
||||||
|
Power:[
|
||||||
|
{label: '供电故障', value: 'FAULT'}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
/** 设备类型 */
|
/** 设备类型 */
|
||||||
@ -59,5 +62,6 @@ export const deviceType = {
|
|||||||
Station: '车站',
|
Station: '车站',
|
||||||
StationStand: '站台',
|
StationStand: '站台',
|
||||||
Train: '列车',
|
Train: '列车',
|
||||||
ZcControl:'ZC'
|
ZcControl:'ZC',
|
||||||
|
Power:'供电线'
|
||||||
};
|
};
|
||||||
|
@ -1766,6 +1766,13 @@ export const OperationEvent = {
|
|||||||
operation: '518',
|
operation: '518',
|
||||||
domId: '_Tips-Stand-cancelDetainTrainAuto-Menu'
|
domId: '_Tips-Stand-cancelDetainTrainAuto-Menu'
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 手动开启屏蔽门
|
||||||
|
openPsdByHand:{
|
||||||
|
menu: {
|
||||||
|
operation: '519',
|
||||||
|
domId: '_Tips-Stand-openPsdByHand-Menu'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user