Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
commit
9ab295ade1
@ -2,7 +2,12 @@
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-cancel ref="menuCancel" />
|
||||
<menu-bar v-if="$store.state.training.prdType === '01'" ref="menuBar" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
<menu-train ref="menuTrain" :selected="selected" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||
<menu-section ref="menuSection" :selected="selected" />
|
||||
<menu-station ref="menuStation" :selected="selected" />
|
||||
<menu-button v-if="isShowButton" ref="menuButton" :selected="selected" />
|
||||
<passive-alarm ref="passiveAlarm" />
|
||||
<passive-contorl ref="passiveControl" />
|
||||
@ -16,6 +21,11 @@ import MenuCancel from './menuCancel';
|
||||
import MenuTrain from './menuTrain';
|
||||
import MenuBar from './menuBar';
|
||||
import MenuButton from './menuButton';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuSwitch from './menuSwitch';
|
||||
import MenuSection from './menuSection';
|
||||
import MenuStation from './menuStation';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from './passiveDialog/control';
|
||||
import PassiveTimeout from './passiveDialog/timeout';
|
||||
@ -26,8 +36,13 @@ export default {
|
||||
MenuBar,
|
||||
MenuButton,
|
||||
MenuCancel,
|
||||
MenuTrain,
|
||||
PassiveAlarm,
|
||||
MenuTrain,
|
||||
MenuSignal,
|
||||
MenuSwitch,
|
||||
MenuSection,
|
||||
MenuStation,
|
||||
MenuStationStand,
|
||||
PassiveAlarm,
|
||||
PassiveContorl,
|
||||
PassiveTimeout
|
||||
},
|
||||
|
142
src/jmapNew/theme/haerbin_01/menus/menuSection.vue
Normal file
142
src/jmapNew/theme/haerbin_01/menus/menuSection.vue
Normal file
@ -0,0 +1,142 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="haerbin-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
<train-add-plan ref="trainAddPlan" pop-class="haerbin-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="haerbin-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import TrainAddPlan from '@/jmapNew/theme/components/menus/dialog/trainAddPlan';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
NoticeInfo,
|
||||
TrainAddPlan,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
],
|
||||
Center: [
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// const isDev = process.env.NODE_ENV === 'development';
|
||||
// if (isDev) {
|
||||
// this.menuNormal.Center.push({
|
||||
// label: '新建计划车',
|
||||
// handler: this.addPlanTrain,
|
||||
// cmdType: CMD.Section.CMD_Train_Init_Plan
|
||||
// });
|
||||
// }
|
||||
},
|
||||
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();
|
||||
}
|
||||
},
|
||||
// // 新建计划车(开发专用)
|
||||
// addPlanTrain() {
|
||||
// commitOperate(menuOperate.Train.createPlanTrain, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
// if (valid) {
|
||||
// this.$refs.trainAddPlan.doShow(operate);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// 设置故障
|
||||
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);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
122
src/jmapNew/theme/haerbin_01/menus/menuSignal.vue
Normal file
122
src/jmapNew/theme/haerbin_01/menus/menuSignal.vue
Normal file
@ -0,0 +1,122 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" pop-class="haerbin-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="haerbin-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
systemName:'xian-01__systerm',
|
||||
menuNormal: {
|
||||
Local: [
|
||||
],
|
||||
Center: [
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
]),
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !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 = [];
|
||||
// 故障模式菜单列表
|
||||
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);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
124
src/jmapNew/theme/haerbin_01/menus/menuStation.vue
Normal file
124
src/jmapNew/theme/haerbin_01/menus/menuStation.vue
Normal file
@ -0,0 +1,124 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="haerbin-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="haerbin-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StationMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
SetFault,
|
||||
NoticeInfo
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
],
|
||||
Center: [
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置ZC故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Station.CMD_STATION_ADD_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消ZC故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Station.CMD_STATION_REMOVE_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !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) {
|
||||
if (this.selected.ciStation) {
|
||||
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.zcCode }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
122
src/jmapNew/theme/haerbin_01/menus/menuStationStand.vue
Normal file
122
src/jmapNew/theme/haerbin_01/menus/menuStationStand.vue
Normal file
@ -0,0 +1,122 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="haerbin-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="haerbin-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StationStandMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
],
|
||||
Center: [
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.setFault'),
|
||||
handler: this.setStoppage,
|
||||
cmdType:CMD.Stand.CMD_STAND_ADD_FAULT
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.cancelFault'),
|
||||
handler: this.cancelStoppage,
|
||||
cmdType:CMD.Stand.CMD_STAND_REMOVE_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !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);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
121
src/jmapNew/theme/haerbin_01/menus/menuSwitch.vue
Normal file
121
src/jmapNew/theme/haerbin_01/menus/menuSwitch.vue
Normal file
@ -0,0 +1,121 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="haerbin-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="haerbin-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SwitchMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
],
|
||||
Center: [
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !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);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -2,11 +2,11 @@
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
<train-control ref="trainControl" />
|
||||
<train-delete ref="trainDelete" />
|
||||
<train-move ref="trainMove" />
|
||||
<train-switch ref="trainSwitch" />
|
||||
<train-edit-number ref="trainEditNumber" />
|
||||
<!-- <train-control ref="trainControl" /> -->
|
||||
<!-- <train-delete ref="trainDelete" /> -->
|
||||
<!-- <train-move ref="trainMove" /> -->
|
||||
<!-- <train-switch ref="trainSwitch" /> -->
|
||||
<!-- <train-edit-number ref="trainEditNumber" /> -->
|
||||
<set-fault ref="setFault" pop-class="haerbin-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
@ -19,11 +19,11 @@ import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import TrainControl from './dialog/trainControl';
|
||||
import TrainDelete from './dialog/trainDelete';
|
||||
import TrainMove from './dialog/trainMove';
|
||||
import TrainSwitch from './dialog/trainSwitch';
|
||||
import TrainEditNumber from './dialog/trainEditNumber';
|
||||
// import TrainControl from './dialog/trainControl';
|
||||
// import TrainDelete from './dialog/trainDelete';
|
||||
// import TrainMove from './dialog/trainMove';
|
||||
// import TrainSwitch from './dialog/trainSwitch';
|
||||
// import TrainEditNumber from './dialog/trainEditNumber';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
@ -32,11 +32,11 @@ export default {
|
||||
components: {
|
||||
PopMenu,
|
||||
NoticeInfo,
|
||||
TrainControl,
|
||||
TrainDelete,
|
||||
TrainMove,
|
||||
TrainSwitch,
|
||||
TrainEditNumber,
|
||||
// TrainControl,
|
||||
// TrainDelete,
|
||||
// TrainMove,
|
||||
// TrainSwitch,
|
||||
// TrainEditNumber,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
@ -52,18 +52,8 @@ export default {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
// {
|
||||
// label: '新建计划列车',
|
||||
// handler: this.createPlanTrain,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// }
|
||||
],
|
||||
Center: [
|
||||
// {
|
||||
// label: '新建计划列车',
|
||||
// handler: this.createPlanTrain,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// }
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
@ -121,7 +111,6 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu, ...this.menuForce, ...this.menuSpeed];
|
||||
@ -130,10 +119,7 @@ export default {
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = [...this.menuForce];
|
||||
// ...this.menuSpeed
|
||||
}
|
||||
|
||||
// this.menu = MenuContextHandler.covert(this.menu);
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
@ -146,7 +132,6 @@ export default {
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
// this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
@ -169,7 +154,6 @@ export default {
|
||||
limitSpeed() {
|
||||
const step = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.Train.limitSpeed.menu.operation,
|
||||
cmdType: CMD.Train.CMD_LIMIT_SPEED,
|
||||
param: {
|
||||
@ -187,10 +171,6 @@ export default {
|
||||
});
|
||||
},
|
||||
nextStation() {
|
||||
// commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
|
||||
// }).catch((error) => {
|
||||
// this.$refs.noticeInfo.doShow(error.message);
|
||||
// });
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Drive_Ahead',
|
||||
@ -203,10 +183,6 @@ export default {
|
||||
});
|
||||
},
|
||||
routeBlockRun() {
|
||||
// commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
|
||||
// }).catch((error) => {
|
||||
// this.$refs.noticeInfo.doShow(error.message);
|
||||
// });
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Drive_Ahead',
|
||||
@ -217,109 +193,109 @@ export default {
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(error.message);
|
||||
});
|
||||
},
|
||||
// 添加列车识别号
|
||||
addTrainId() {
|
||||
const step = {
|
||||
start: true,
|
||||
}
|
||||
// // 添加列车识别号
|
||||
// addTrainId() {
|
||||
// const step = {
|
||||
// start: true,
|
||||
|
||||
operation: OperationEvent.Train.addTrainId.menu.operation,
|
||||
param: {
|
||||
code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainControl.doShow(step, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除列车识别号
|
||||
delTrainId() {
|
||||
const step = {
|
||||
start: true,
|
||||
// operation: OperationEvent.Train.addTrainId.menu.operation,
|
||||
// param: {
|
||||
// code: this.selected.code
|
||||
// }
|
||||
// };
|
||||
// this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.trainControl.doShow(step, this.selected);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// // 删除列车识别号
|
||||
// delTrainId() {
|
||||
// const step = {
|
||||
// start: true,
|
||||
|
||||
operation: OperationEvent.Train.delTrainId.menu.operation,
|
||||
param: {
|
||||
code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainDelete.doShow(step, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 修改列车识别号
|
||||
editTrainId() {
|
||||
const step = {
|
||||
start: true,
|
||||
// operation: OperationEvent.Train.delTrainId.menu.operation,
|
||||
// param: {
|
||||
// code: this.selected.code
|
||||
// }
|
||||
// };
|
||||
// this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.trainDelete.doShow(step, this.selected);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// // 修改列车识别号
|
||||
// editTrainId() {
|
||||
// const step = {
|
||||
// start: true,
|
||||
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
param: {
|
||||
code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainControl.doShow(step, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 修改车组号
|
||||
editTrainNo() {
|
||||
const step = {
|
||||
start: true,
|
||||
// operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
// param: {
|
||||
// code: this.selected.code
|
||||
// }
|
||||
// };
|
||||
// this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.trainControl.doShow(step, this.selected);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// // 修改车组号
|
||||
// editTrainNo() {
|
||||
// const step = {
|
||||
// start: true,
|
||||
|
||||
operation: OperationEvent.Train.editTrainNo.menu.operation,
|
||||
param: {
|
||||
code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainEditNumber.doShow(step, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 移动列车识别号
|
||||
moveTrainId() {
|
||||
const step = {
|
||||
start: true,
|
||||
// operation: OperationEvent.Train.editTrainNo.menu.operation,
|
||||
// param: {
|
||||
// code: this.selected.code
|
||||
// }
|
||||
// };
|
||||
// this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.trainEditNumber.doShow(step, this.selected);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// // 移动列车识别号
|
||||
// moveTrainId() {
|
||||
// const step = {
|
||||
// start: true,
|
||||
|
||||
operation: OperationEvent.Train.moveTrainId.menu.operation,
|
||||
param: {
|
||||
code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainMove.doShow(step, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 交换列车识别号
|
||||
switchTrainId() {
|
||||
const step = {
|
||||
start: true,
|
||||
// operation: OperationEvent.Train.moveTrainId.menu.operation,
|
||||
// param: {
|
||||
// code: this.selected.code
|
||||
// }
|
||||
// };
|
||||
// this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.trainMove.doShow(step, this.selected);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// // 交换列车识别号
|
||||
// switchTrainId() {
|
||||
// const step = {
|
||||
// start: true,
|
||||
|
||||
operation: OperationEvent.Train.switchTrainId.menu.operation,
|
||||
param: {
|
||||
code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainSwitch.doShow(step, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
// operation: OperationEvent.Train.switchTrainId.menu.operation,
|
||||
// param: {
|
||||
// code: this.selected.code
|
||||
// }
|
||||
// };
|
||||
// this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.trainSwitch.doShow(step, this.selected);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user