JD_1A线路建立

This commit is contained in:
fan 2022-06-24 16:23:21 +08:00
parent afd3c54df2
commit 3f40d29731
7 changed files with 1495 additions and 6 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,37 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-switch ref="menuSwitch" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import MenuSignal from './menuSignal';
import MenuSwitch from './menuSwitch';
export default {
name: 'Menus',
components: {
MenuSignal,
MenuSwitch
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
computed: {
...mapGetters('config', [
'width'
])
},
mounted() {
},
methods: {
}
};
</script>

View File

@ -0,0 +1,131 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import PopMenu from '@/components/PopMenu';
// OperateMode
import { DeviceMenu } from '@/scripts/ConstDic';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
export default {
name: 'SignalMenu',
components: {
PopMenu,
NoticeInfo
},
props: {
selected: {
type: Object,
default: () => {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
{
label: '总取消',
handler: this.signalTotalCancle
// cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
},
{
label: '总人解',
handler: this.humanTrainRoute
// cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
},
{
type: 'separator'
},
{
label: '开放引导信号',
handler: this.signalRouteGuide
// cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
},
{
label: '建立引导总锁闭',
handler: this.guideTotalLock
// cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
},
{
type: 'separator'
},
{
label: '加封',
handler: this.seal
// cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
}
]
}
};
},
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.Switch) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
initMenu() {
//
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = this.menuNormal.Local;
// //
// if (this.operatemode === OperateMode.FAULT) {
// this.menu = this.menuForce;
// }
},
doShow(point) {
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
//
signalTotalCancle() {
},
//
humanTrainRoute() {
},
//
signalRouteGuide() {
},
//
guideTotalLock() {
},
//
seal() {
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
}
}
};
</script>

View File

@ -0,0 +1,170 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<switch-control ref="switchControl" pop-class="chengdou-03__systerm" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
// OperateMode
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';
export default {
name: 'SwitchMenu',
components: {
PopMenu,
SwitchControl,
NoticeInfo
},
props: {
selected: {
type: Object,
default: () => {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
{
label: '总定',
handler: this.locate,
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
},
{
label: '总反',
handler: this.reverse,
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
},
{
type: 'separator'
},
{
label: '单锁',
handler: this.lock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
},
{
label: '单解',
handler: this.unlock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
},
{
type: 'separator'
},
{
label: '封闭',
handler: this.block,
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
},
{
label: '解封',
handler: this.unblock,
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
}
],
Center: [
]
}
};
},
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:{
//
locate() {
commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
reverse() {
commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
lock() {
commitOperate(menuOperate.Switch.lock, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
unlock() {
commitOperate(menuOperate.Switch.unlock, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
block() {
commitOperate(menuOperate.Switch.block, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
unblock() {
commitOperate(menuOperate.Switch.unblock, { switchCode: this.selected.code}, 0).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) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
initMenu() {
//
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = this.menuNormal.Local;
//
// if (this.operatemode === OperateMode.FAULT) {
// if (!this.$store.state.scriptRecord.bgSet) {
// const menuHook = [{
// label: '',
// handler: this.hookLock
// }];
// this.menu = [...this.menuForce, ...menuHook];
// } else {
// this.menu = this.menuForce;
// }
// }
}
}
};
</script>

View File

@ -0,0 +1,5 @@
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
list: [
]
};

View File

@ -52,7 +52,8 @@ class Theme {
'14': 'nanjing_02', // 南京二号线
'15': 'datie_01',
'16': 'datie_02',
'17': 'datie_tky'
'17': 'datie_tky',
'18': 'datie_jd1a'
};
this._runplan = {
@ -73,7 +74,8 @@ class Theme {
'14': 'nanjing_02', // 南京二号线
'15': 'datie_01',
'16': 'datie_02',
'17': 'datie_tky'
'17': 'datie_tky',
'18': 'datie_jd1a'
};
this._localShowMode = { // 现地显示模式
@ -93,7 +95,8 @@ class Theme {
'14':'ecStation',
'15':'all',
'16':'ecStation',
'17': 'all'
'17': 'all',
'18': 'all'
};
}

View File

@ -24,7 +24,7 @@
</template>
</el-button-group>
<el-button v-if="(isAdmin || $route.query.type === 'ILW') && !dataError && !isScreen" size="small" :type="faultMode ? '' : 'primary' " @click="changeOperateMode()">{{ faultMode?' 切换到普通模式[Tab]':'切换到故障模式[Tab]' }}</el-button>
<!-- isCenter && !dataError && !isAdmin 此判断用于以后(目前 暂时不用) -->
<!-- isCenter && !dataError && !isAdmin 此判断用于以后(目前 暂时不用)786 -->
<el-button v-if="isShowDirective" size="small" :type="directiveMode ? 'primary' : ''" @click="changeDirectiveMode()">{{ directiveMode? '切换到普通模式[Tab]':'切换到指令模式[Tab]' }}</el-button>
</div>
<!-- running && -->
@ -139,10 +139,10 @@ export default {
return this.$store.state.training.started;
},
datie() {
return this.$route.query.lineCode == '16';
return this.$route.query.lineCode == '16';
},
isCtc() {
return !!this.$route.query.ctc;
return !!this.$route.query.ctc;
},
isScreen() {
return this.$store.state.training.prdType === '07';