南京二号线菜单调整

This commit is contained in:
fan 2022-12-09 16:44:58 +08:00
parent 3f4da53695
commit 5f0816c2d6
23 changed files with 4877 additions and 462 deletions

View File

@ -432,7 +432,7 @@ class Jlmap {
const type = elem._type;
const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
oDevice.showMode = showMode;
oDevice.instance && oDevice.model && oDevice.instance.setState(oDevice.model);
oDevice.instance && oDevice.instance.model && oDevice.instance.setState(oDevice.instance.model);
});
this.$painter.$transformHandle.revisibleAll();
}

View File

@ -105,7 +105,7 @@ export default class Line2 extends Group {
this.segment && this.segment.hide();
this.viceSegment && this.viceSegment.hide();
} else {
this.setLineType(model.type);
model && this.setLineType(model.type);
}
}
recover() {

View File

@ -109,12 +109,12 @@ class Theme {
}
// 加载行调菜单组件
loadDispatchWorkMenuComponent(code) {
if (['02', '09', '10', '11', '16', '08', '03', '01', '04', '07'].includes(code)) {
if (['02', '09', '10', '11', '16', '08', '03', '01', '04', '07', '14'].includes(code)) {
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/dispatchWorkMenu`).default);
}
}
loadLocalWorkMenuComponent(code) {
if (['02', '09', '10', '11', '16', '08', '03', '01', '04', '07'].includes(code)) {
if (['02', '09', '10', '11', '16', '08', '03', '01', '04', '07', '14'].includes(code)) {
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/localWorkMenu`).default);
}
}

View File

@ -799,7 +799,15 @@ export default {
});
},
setSpeedLimitValue(val) {
this.speedLimitValue = val;
const operate = {
operation: OperationEvent.Section.setSpeed.choose.operation,
param: { speedLimitValue: val }
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.speedLimitValue = val;
}
});
},
changeShowMode(flag) {
if (this.work === 'localWork') {

View File

@ -0,0 +1,439 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-train ref="menuTrain" :selected="selected" />
<menu-station-stand ref="menuStationStand" :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 ref="menuButton" :selected="selected" />
<passive-alarm ref="passiveAlarm" />
<passive-control ref="passiveControl" pop-class="haerbin-01__systerm" />
<passive-timeout ref="passiveTimeout" />
<pop-menu ref="popMenu" :menu="menu" />
<set-fault ref="setFault" pop-class="nanjing-02__systerm" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import PopMenu from '@/components/PopMenu';
import MenuTrain from './menuTrain';
import MenuButton from './dispatchWorkMenuButton';
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 PassiveControl from '@/jmapNew/theme/components/menus/passiveDialog/control';
import PassiveTimeout from './passiveDialog/timeout';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'Menus',
components: {
MenuButton,
MenuTrain,
MenuSignal,
MenuSwitch,
MenuSection,
MenuStation,
MenuStationStand,
PassiveAlarm,
PassiveControl,
PassiveTimeout,
PopMenu,
SetFault
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
loginActive: false,
inputStr: '',
menu: [
{
label: '设置故障',
handler: this.setStoppage,
cmdType: CMD.Fault.CMD_SET_FAULT
},
{
label: '取消故障',
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: 'ATP重启',
handler: this.atpRestart,
cmdType: CMD.Fault.CMD_SET_FAULT
}
]
};
},
computed: {
...mapGetters('config', [
'width'
]),
...mapGetters('menuOperation', [
'buttonOperation'
]),
...mapGetters('training', [
'operatemode'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel) && !this.buttonOperation && this.operatemode === OperateMode.FAULT) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
doShow(point) {
this.clickEvent();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
//
setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: 'Server' }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, { _type: 'Server' });
}
});
},
//
cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: 'Server' }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, { _type: 'Server' });
}
});
},
atpRestart() {
const step = {
over: true,
operation: menuOperate.Server.atpRestart.operation,
cmdType: menuOperate.Server.atpRestart.cmdType
};
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
}).catch((error) => {
this.doClose();
this.$messageBox(error.message || 'ATP重启失败');
});
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
}
}
};
</script>
<style>
.menus .pop-menu {
background: #F0F0F0;
}
.menus .pop-menu span {
color: #000;
}
.menus .pop-menu .is-disabled span {
color: #B4B3B8;
}
.haerbin-01__systerm {
overflow: hidden !important;
}
.haerbin-01__systerm .el-dialog {
background: rgba(100, 100, 100, 0.3);
border: 2px solid rgb(144, 144, 144, 0.8);
border-radius: 6px;
color: #000;
font-size: 14px;
}
.haerbin-01__systerm .el-dialog .el-dialog__header {
padding: 5px;
height: 26px;
}
.haerbin-01__systerm .el-dialog .el-dialog__footer {
background: #F0F0F0;
opacity: 1;
}
.haerbin-01__systerm .el-dialog .el-dialog__body {
padding-top: 10px;
padding-bottom: 10px;
padding-left: 5px;
padding-right: 5px;
margin: 0px 5px 5px;
border: 2px solid rgba(120, 121, 123, 0.5);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
background: #F0F0F0;
opacity: 1;
}
.haerbin-01__systerm .el-dialog .el-dialog__title {
position: absolute;
top: 4px;
color: #000;
border-radius: 4px;
padding: 0px 2px;
height: 20px;
line-height: 20px
}
.haerbin-01__systerm .el-dialog .el-dialog__title::before {
content: '';
position: absolute;
top: 0;
left: 0;
-webkit-filter: blur(10px);
filter: blur(10px);
height: 20px;
width: -webkit-fill-available;
background: rgba(128, 128, 128, 0.8);
z-index: -1;
}
.haerbin-01__systerm .el-dialog .el-dialog__headerbtn {
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid #fff;
border-radius: 4px;
top: 4px;
right: 5px;
line-height: 16px;
}
.haerbin-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.haerbin-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.haerbin-01__systerm .el-dialog .el-button {
padding: 0px;
width: 80px;
border: 2px outset #E2E2E2;
border-radius: 0px !important;
color: #000;
background: #F0F0F0;
}
.haerbin-01__systerm .el-dialog .el-button:focus span {
border: 1px dashed gray;
}
.haerbin-01__systerm .el-dialog .el-button:active {
border: 2px inset #E2E2E2;
}
.haerbin-01__systerm .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2;
}
.haerbin-01__systerm .el-dialog .el-button:disabled span {
border: 0px;
}
.haerbin-01__systerm .el-dialog .el-input {
border: 2px inset #E9E9E9;
}
.haerbin-01__systerm .el-dialog .el-input .el-input__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.haerbin-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.haerbin-01__systerm .el-dialog .el-textarea {
border: 2px inset #E9E9E9;
border-radius: 0px;
}
.haerbin-01__systerm .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.haerbin-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.haerbin-01__systerm .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.haerbin-01__systerm .el-dialog .el-table .cell {
line-height: unset !important;
}
.haerbin-01__systerm .el-dialog .el-table th.is-leaf {
background: #F0F0F0 !important;
border-right: 1px solid #BDBDBD !important;
border-bottom: 1px solid #BDBDBD !important;
color: #000 !important;
height: 20px !important;
padding: 0px;
}
.haerbin-01__systerm .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.haerbin-01__systerm .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
}
.haerbin-01__systerm .el-dialog .current-row>td {
background: #3399FF !important;
color: #fff !important;
}
.haerbin-01__systerm .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.haerbin-01__systerm .el-dialog .el-checkbox__label {
color: #000 !important;
}
.haerbin-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.haerbin-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.haerbin-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.haerbin-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
position: absolute;
-webkit-box-sizing: content-box;
box-sizing: content-box;
content: "";
border: 1px solid #000;
border-left: 0;
border-top: 0;
height: 7px;
left: 4px;
top: 1px;
}
.haerbin-01__systerm .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.haerbin-01__systerm .el-dialog .el-radio__label {
color: #000 !important;
}
.haerbin-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.haerbin-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
width: 4px;
height: 4px;
border-radius: 100%;
background-color: #000 !important;
position: absolute;
left: 50%;
top: 50%;
}
.haerbin-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.haerbin-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.haerbin-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -15px;
top: -18px;
}
.haerbin-01__systerm .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
.haerbin-01__systerm .el-dialog .context {
height: 100px;
border: 2px inset #E2E2E2;
overflow-y: scroll;
}
.haerbin-01__systerm .el-dialog .table {
margin-top: 10px;
}
.haerbin-01__systerm .el-dialog .notice {
margin-left: 62px;
line-height: 30px;
}
.haerbin-01__systerm .el-dialog .button-group {
margin-top: 10px;
}
.haerbin-01__systerm .el-button {
height: 20px;
line-height: 20px;
padding: 0px;
width: 80px;
border: 1px solid #1F313F;
font-size: 12px;
border-radius: 1px !important;
color: #000;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,457 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-bar ref="menuBar" :selected="selected" :login-active="loginActive" :is-ignore-login="isIgnoreLogin" @login="login" />
<menu-train ref="menuTrain" :selected="selected" />
<menu-station-stand ref="menuStationStand" :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 ref="menuButton" :selected="selected" :login-active="loginActive" :is-ignore-login="isIgnoreLogin" :input-str="inputStr" />
<passive-alarm ref="passiveAlarm" />
<passive-contorl ref="passiveControl" pop-class="haerbin-01__systerm" />
<passive-timeout ref="passiveTimeout" />
<pop-menu ref="popMenu" :menu="menu" />
<set-fault ref="setFault" pop-class="nanjing-02__systerm" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import PopMenu from '@/components/PopMenu';
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 '@/jmapNew/theme/components/menus/passiveDialog/control';
import PassiveTimeout from './passiveDialog/timeout';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'Menus',
components: {
MenuBar,
MenuButton,
MenuTrain,
MenuSignal,
MenuSwitch,
MenuSection,
MenuStation,
MenuStationStand,
PassiveAlarm,
PassiveContorl,
PassiveTimeout,
PopMenu,
SetFault
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
loginActive: false,
inputStr: '',
menu: [
{
label: '设置故障',
handler: this.setStoppage,
cmdType: CMD.Fault.CMD_SET_FAULT
},
{
label: '取消故障',
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: 'ATP重启',
handler: this.atpRestart,
cmdType: CMD.Fault.CMD_SET_FAULT
}
]
};
},
computed: {
...mapGetters('config', [
'width'
]),
...mapGetters('menuOperation', [
'buttonOperation'
]),
...mapGetters('training', [
'operatemode'
]),
isIgnoreLogin() {
return /display\/[teach|exam|manage|joint|script]/.test(this.$route.path);
}
},
watch: {
isShowBar(val) {
val && this.$store.dispatch('config/updateMenuBar');
},
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel) && !this.buttonOperation && this.operatemode === OperateMode.FAULT) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
});
},
methods: {
login(inputStr) {
this.loginActive = !!inputStr;
this.inputStr = inputStr;
},
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
doShow(point) {
this.clickEvent();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
//
setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: 'Server' }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, { _type: 'Server' });
}
});
},
//
cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: 'Server' }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, { _type: 'Server' });
}
});
},
atpRestart() {
const step = {
over: true,
operation: menuOperate.Server.atpRestart.operation,
cmdType: menuOperate.Server.atpRestart.cmdType
};
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
}).catch((error) => {
this.doClose();
this.$messageBox(error.message || 'ATP重启失败');
});
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
}
}
};
</script>
<style>
.menus .pop-menu {
background: #F0F0F0;
}
.menus .pop-menu span {
color: #000;
}
.menus .pop-menu .is-disabled span {
color: #B4B3B8;
}
.haerbin-01__systerm {
overflow: hidden !important;
}
.haerbin-01__systerm .el-dialog {
background: rgba(100, 100, 100, 0.3);
border: 2px solid rgb(144, 144, 144, 0.8);
border-radius: 6px;
color: #000;
font-size: 14px;
}
.haerbin-01__systerm .el-dialog .el-dialog__header {
padding: 5px;
height: 26px;
}
.haerbin-01__systerm .el-dialog .el-dialog__footer {
background: #F0F0F0;
opacity: 1;
}
.haerbin-01__systerm .el-dialog .el-dialog__body {
padding-top: 10px;
padding-bottom: 10px;
padding-left: 5px;
padding-right: 5px;
margin: 0px 5px 5px;
border: 2px solid rgba(120, 121, 123, 0.5);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
background: #F0F0F0;
opacity: 1;
}
.haerbin-01__systerm .el-dialog .el-dialog__title {
position: absolute;
top: 4px;
color: #000;
border-radius: 4px;
padding: 0px 2px;
height: 20px;
line-height: 20px
}
.haerbin-01__systerm .el-dialog .el-dialog__title::before {
content: '';
position: absolute;
top: 0;
left: 0;
-webkit-filter: blur(10px);
filter: blur(10px);
height: 20px;
width: -webkit-fill-available;
background: rgba(128, 128, 128, 0.8);
z-index: -1;
}
.haerbin-01__systerm .el-dialog .el-dialog__headerbtn {
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid #fff;
border-radius: 4px;
top: 4px;
right: 5px;
line-height: 16px;
}
.haerbin-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.haerbin-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.haerbin-01__systerm .el-dialog .el-button {
padding: 0px;
width: 80px;
border: 2px outset #E2E2E2;
border-radius: 0px !important;
color: #000;
background: #F0F0F0;
}
.haerbin-01__systerm .el-dialog .el-button:focus span {
border: 1px dashed gray;
}
.haerbin-01__systerm .el-dialog .el-button:active {
border: 2px inset #E2E2E2;
}
.haerbin-01__systerm .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2;
}
.haerbin-01__systerm .el-dialog .el-button:disabled span {
border: 0px;
}
.haerbin-01__systerm .el-dialog .el-input {
border: 2px inset #E9E9E9;
}
.haerbin-01__systerm .el-dialog .el-input .el-input__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.haerbin-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.haerbin-01__systerm .el-dialog .el-textarea {
border: 2px inset #E9E9E9;
border-radius: 0px;
}
.haerbin-01__systerm .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.haerbin-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.haerbin-01__systerm .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.haerbin-01__systerm .el-dialog .el-table .cell {
line-height: unset !important;
}
.haerbin-01__systerm .el-dialog .el-table th.is-leaf {
background: #F0F0F0 !important;
border-right: 1px solid #BDBDBD !important;
border-bottom: 1px solid #BDBDBD !important;
color: #000 !important;
height: 20px !important;
padding: 0px;
}
.haerbin-01__systerm .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.haerbin-01__systerm .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
}
.haerbin-01__systerm .el-dialog .current-row>td {
background: #3399FF !important;
color: #fff !important;
}
.haerbin-01__systerm .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.haerbin-01__systerm .el-dialog .el-checkbox__label {
color: #000 !important;
}
.haerbin-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.haerbin-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.haerbin-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.haerbin-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
position: absolute;
-webkit-box-sizing: content-box;
box-sizing: content-box;
content: "";
border: 1px solid #000;
border-left: 0;
border-top: 0;
height: 7px;
left: 4px;
top: 1px;
}
.haerbin-01__systerm .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.haerbin-01__systerm .el-dialog .el-radio__label {
color: #000 !important;
}
.haerbin-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.haerbin-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
width: 4px;
height: 4px;
border-radius: 100%;
background-color: #000 !important;
position: absolute;
left: 50%;
top: 50%;
}
.haerbin-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.haerbin-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.haerbin-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -15px;
top: -18px;
}
.haerbin-01__systerm .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
.haerbin-01__systerm .el-dialog .context {
height: 100px;
border: 2px inset #E2E2E2;
overflow-y: scroll;
}
.haerbin-01__systerm .el-dialog .table {
margin-top: 10px;
}
.haerbin-01__systerm .el-dialog .notice {
margin-left: 62px;
line-height: 30px;
}
.haerbin-01__systerm .el-dialog .button-group {
margin-top: 10px;
}
.haerbin-01__systerm .el-button {
height: 20px;
line-height: 20px;
padding: 0px;
width: 80px;
border: 1px solid #1F313F;
font-size: 12px;
border-radius: 1px !important;
color: #000;
}
</style>

View File

@ -0,0 +1,670 @@
<template>
<div id="menuBar" style="height: 90px;">
<div class="haerbin-01__systerm nav">
<el-row>
<el-col :span="2">
<div class="nav-border login">
<el-row>
<el-button style="width: 100px;line-height: 19px;" plain @click="login">{{ loginText }}</el-button>
</el-row>
<el-row>
<span v-if="isLogin">{{ inputStr }}</span>
<input v-if="!isLogin" v-model="inputStr" :type="modelType" style="width: 100px;height:20px;" :disabled="this.loginText == '登录'" @keyup.enter="validateData">
</el-row>
</div>
</el-col>
<el-col :span="6" class="nav-border">
<el-row>
<template v-for="(item, index) in centralizedStationList1">
<el-col :key="index" :span="colsNum">
<el-button v-if="stationCode === item.code" class="fake-button-active" @click="interceptLogin(switchShowStation)(item.code)">{{ item.name }}</el-button>
<el-button v-else :class="isLogin? 'fake-button':'fake-button-disabled'" @click="interceptLogin(switchShowStation)(item.code)">{{ item.name }}</el-button>
</el-col>
</template>
</el-row>
<el-row>
<template v-for="(item, index) in centralizedStationList2">
<el-col :key="index" :span="colsNum">
<el-button v-if="stationCode === item.code" class="fake-button-active" @click="interceptLogin(switchShowStation)(item.code)">{{ item.name }}</el-button>
<el-button v-else :class="isLogin? 'fake-button':'fake-button-disabled'" @click="interceptLogin(switchShowStation)(item.code)">{{ item.name }}</el-button>
</el-col>
</template>
</el-row>
</el-col>
<el-col :span="10">
<div class="nav-border">
<el-row>
<el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelA || isNoConfirmLevelA?'#F00':'#DDD' }" plain :class="{'headerBox' :isNoConfirmLevelA, 'fake-button-disabled': !isLogin}" @click="interceptLogin(showLowAlarm)('A')">A级警报</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelB || isNoConfirmLevelB?'#F00':'#DDD' }" plain :class="{'headerBox' :isNoConfirmLevelB, 'fake-button-disabled': !isLogin}" @click="interceptLogin(showLowAlarm)('B')">B级警报</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelC?'#F00':'#DDD' }" :class="{'fake-button-disabled': !isLogin}" plain>C级警报</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" plain :class="{'fake-button-disabled': !isLogin}" @click="interceptLogin(undeveloped)()">记录</el-button></el-col>
</el-row>
<el-row>
<el-col :span="6"><el-button style="width: 80px;" plain :class="{'fake-button-disabled': !isLogin}" @click="interceptLogin(controlAudio)(false)">声音</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" plain :class="{'fake-button-disabled': !isLogin}" @click="interceptLogin(undeveloped)()">双屏</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" plain :class="{'fake-button-disabled': !isLogin}" @click="interceptLogin(undeveloped)()">TGI</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" plain :class="{'fake-button-disabled': !isLogin}" @click="interceptLogin(undeveloped)()">管理</el-button></el-col>
</el-row>
</div>
</el-col>
<el-col :span="3">
<div class="nav-border">
<el-row>&nbsp;</el-row>
<el-row>
<el-col :span="24"><div>{{ '版本:' + version }}</div></el-col>
</el-row>
</div>
</el-col>
<el-col :span="3">
<div class="nav-border">
<el-row>&nbsp;</el-row>
<el-row>&nbsp;</el-row>
</div>
</el-col>
</el-row>
</div>
<alarm-table-low ref="alarmTableLow" />
<alarm-table-hmi ref="alarmTableHmi" />
<train-control ref="trainControl" :offset="10" />
<log-detail ref="logDetail" />
<audio id="buzzer" controls loop="loop" style="width: 0;height: 0">
<source :src="buzzerAudio" type="audio/mpeg">
</audio>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { EventBus } from '@/scripts/event-bus';
import voiceOpen from '@/assets/voiceOpen.png';
import voiceClose from '@/assets/voiceClose.png';
import BuzzerAudio from '@/assets/buzzer.mp3';
import AlarmTableHmi from './menuDialog/alarmTableHmi';
import AlarmTableLow from './menuDialog/alarmTableLow';
import TrainControl from './dialog/trainControl';
import LogDetail from './menuDialog/logDetail';
export default {
name: 'MenuBar',
components: {
AlarmTableLow,
AlarmTableHmi,
TrainControl,
LogDetail
},
props: {
selected: {
type: Object,
default() {
return null;
}
},
loginActive: {
type: Boolean,
default: false
},
isIgnoreLogin: {
type: Boolean,
default: false
}
},
data() {
return {
loginText:'登录',
modelType:'text',
inputStr: '',
station: {},
keydownTimes:0,
classA: -1,
classB: -1,
tempClassA: -1,
tempClassB: -1,
valid: true,
stationCode: '',
centralizedStationList1: [],
centralizedStationList2: [],
colsNum: 0,
version: '',
centralizedMap: {},
tipContent: [],
sound: false,
buzzerAudio: BuzzerAudio,
noConfirmMapA: {},
noConfirmMapB: {},
confirmNoRecoverMapA: {},
confirmNoRecoverMapB: {},
confirmNoRecoverMapC: {},
noConfirmMapAString: '{}',
noConfirmMapBString: '{}',
confirmNoRecoverMapAString: '{}',
confirmNoRecoverMapBString: '{}',
confirmNoRecoverMapCString: '{}'
};
},
computed: {
...mapGetters('training', [
'mode',
'started',
'steps',
'order'
]),
...mapGetters('map', [
'stationList',
'trainList'
]),
userId() {
return this.$store.state.user ? this.$store.state.user.id : '';
},
voiceIcon() {
return this.sound ? voiceOpen : voiceClose;
},
isNoConfirmLevelA() {
return this.noConfirmMapAString !== '{}';
},
isNoConfirmLevelB() {
return this.noConfirmMapBString !== '{}';
},
isNoRecoverLevelA() {
return this.confirmNoRecoverMapAString !== '{}';
},
isNoRecoverLevelB() {
return this.confirmNoRecoverMapBString !== '{}';
},
isNoRecoverLevelC() {
return this.confirmNoRecoverMapCString !== '{}';
},
isLogin() {
return this.isIgnoreLogin || this.loginActive;
}
},
watch: {
tempClassA() {
this.classA = this.$store.state.menuOperation.break ? -1 : this.tempClassA;
},
tempClassB() {
this.classB = this.$store.state.menuOperation.break ? -1 : this.tempClassB;
},
'$store.state.menuOperation.break': function (val) {
if (val) {
this.classA = this.classB = -1;
} else {
this.classA = this.tempClassA;
this.classB = this.tempClassB;
}
},
'$store.state.training.centerStationCode': function(code) {
if (code) {
this.stationCode = code;
}
},
'$store.state.socket.simulationRoleList':function(list) {
if (list && list.length) {
this.checkRoleChange(list);
}
},
'$store.state.socket.simulationAlarmInfo': function(val) {
(val || []).forEach(item => {
if (!item.confirmed) {
this.tipContent.push(item);
this.handleAlarm(item);
if (this.tipContent.length > 3) {
this.tipContent.shift();
}
if (item.level === 'A') {
this.noConfirmMapA[item.code] = item;
this.noConfirmMapAString = JSON.stringify(this.noConfirmMapA);
} else if (item.level === 'B') {
this.noConfirmMapB[item.code] = item;
this.noConfirmMapBString = JSON.stringify(this.noConfirmMapB);
}
} else if (!item.recovered) {
if (item.level === 'A') {
delete this.noConfirmMapA[item.code];
this.confirmNoRecoverMapA[item.code] = item;
this.noConfirmMapAString = JSON.stringify(this.noConfirmMapA);
this.confirmNoRecoverMapAString = JSON.stringify(this.confirmNoRecoverMapA);
} else if (item.level === 'B') {
delete this.noConfirmMapB[item.code];
this.confirmNoRecoverMapB[item.code] = item;
this.noConfirmMapBString = JSON.stringify(this.noConfirmMapB);
this.confirmNoRecoverMapBString = JSON.stringify(this.confirmNoRecoverMapB);
} else if (item.level === 'C') {
this.confirmNoRecoverMapC[item.code] = item;
this.confirmNoRecoverMapCString = JSON.stringify(this.confirmNoRecoverMapC);
}
} else {
if (item.level === 'A') {
delete this.noConfirmMapA[item.code];
delete this.confirmNoRecoverMapA[item.code];
this.noConfirmMapAString = JSON.stringify(this.noConfirmMapA);
this.confirmNoRecoverMapAString = JSON.stringify(this.confirmNoRecoverMapA);
} else if (item.level === 'B') {
delete this.noConfirmMapB[item.code];
delete this.confirmNoRecoverMapB[item.code];
this.noConfirmMapBString = JSON.stringify(this.noConfirmMapB);
this.confirmNoRecoverMapBString = JSON.stringify(this.confirmNoRecoverMapB);
} else if (item.level === 'C') {
delete this.confirmNoRecoverMapC[item.code];
this.confirmNoRecoverMapCString = JSON.stringify(this.confirmNoRecoverMapC);
}
}
});
}
},
mounted() {
this.version = this.$store.state.map.version;
this.initMenu();
/* 由于修改角色现行是先取消人员仿真角色后赋予故menuBar会在仿真角色取消时销毁在赋予特定角色是挂载故此处处理 */
if (this.$store.state.socket.simulationRoleList && this.$store.state.socket.simulationRoleList.length) {
this.checkRoleChange(this.$store.state.socket.simulationRoleList);
}
},
methods: {
interceptLogin(cb) {
return (args) => {
if (this.isLogin) {
cb(args);
}
};
},
handleAlarm(val) {
if (val.level === 'A' || val.level === 'B') {
this.controlAudio(true);
}
},
initMenu() {
//
const centralizedStationList = [];
this.centralizedStationList1 = [];
this.centralizedStationList2 = [];
this.stationList.forEach(item => {
if (item.centralized) {
centralizedStationList.push(item);
this.centralizedMap[item.code] = item.code;
item.chargeStationCodeList && item.chargeStationCodeList.length && item.chargeStationCodeList.forEach(ele => {
this.centralizedMap[ele] = item.code;
});
}
});
centralizedStationList.forEach((item, index) => {
if (index < centralizedStationList.length / 2) {
this.centralizedStationList1.push(item);
} else {
this.centralizedStationList2.push(item);
}
});
this.colsNum = 24 / this.centralizedStationList1.length;
if (centralizedStationList.length) {
if (this.$store.state.map.showCentralizedStationCode) {
this.stationCode = this.$store.state.map.showCentralizedStationCode;
} else {
this.stationCode = centralizedStationList[0].code;
}
}
},
switchShowStation(stationCode) {
this.stationCode = stationCode;
this.$store.dispatch('map/setShowCentralizedStationNum');
this.$store.dispatch('map/setShowCentralizedStationCode', stationCode);
},
undeveloped() {
this.doClose();
this.$alert(this.$t('menu.menuBar.implemented'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
callback: action => {
}
});
},
showLogDetail() {
this.$refs.logDetail.doShow();
},
login() {
const mapText = {
'注销': '登录',
'登录': '名称'
};
this.loginText = mapText[this.loginText] || this.loginText;
this.inputStr = '';
this.$emit('login', '');
},
validateData() {
if (this.keydownTimes === 0) {
const station = this.stationList.filter(el => el.centralized).find(el => el.depot ? false : el.jp == this.inputStr );
if (station) {
this.loginText = '密码';
this.modelType = 'password';
this.inputStr = '';
this.$emit('login', '');
this.keydownTimes++;
this.station = station;
} else {
EventBus.$emit('sendMsg', {message: '登录名称错误!'});
}
} else if (this.keydownTimes === 1) {
if (this.inputStr == '1') {
this.loginText = '注销';
this.keydownTimes = 0;
this.modelType = 'text';
this.inputStr = this.station.jp;
this.$emit('login', this.inputStr);
EventBus.$emit('switchStationMode', this.station.code);
EventBus.$emit('sendMsg', {message: `${this.inputStr} 登录成功!`});
} else {
EventBus.$emit('sendMsg', {message: '密码错误!'});
}
}
},
doClose() {
this.$nextTick(() => {
EventBus.$emit('closeMenu');
});
},
checkRoleChange(list) {
list.forEach(item => {
if (item.messageType === 'PLAY_CHANGE' && item.userId == this.userId && item.type === 'STATION_SUPERVISOR') {
this.switchShowStation(this.centralizedMap[item.deviceCode]);
}
});
},
showHimAlarm(level) {
this.$refs.alarmTableHmi.doShow(level);
},
showLowAlarm(level) {
this.$refs.alarmTableLow.doShow(level);
},
trainControlShow() {
this.$refs.trainControl.doShow();
},
rpsClick() {
this.$refs.rpsDialog.doShow();
},
troClick() {
this.$refs.troDialog.doShow();
},
traClick() {
this.$refs.traDialog.doShow();
},
goTroDetail(deviceCode) {
this.$refs.troDetailDialog.doShow(deviceCode);
},
controlAudio(val) {
const audio = document.getElementById('buzzer');
this.sound = val;
if (audio !== null) {
if (val) {
audio.play();
} else if (val === false) {
audio.pause();
}
}
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
$width: 30px;
$height: 90px;
$menuPadding: 10px;
$menuItemHeight: 30px;
$menuItemWidth: 190px;
$menuItemPadding: 5px;
#menuBar {
z-index: 37;
position: absolute;
width: inherit;
}
.login {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.nav-border {
font-size: 12px;
color: #000;
text-align: center;
line-height: 45px;
border-top: 2px solid #7E8076;
border-left: 2px solid #6A6B64;
border-right: 2px solid #FBFBFA;
border-bottom: 2px solid #FBFBFA;
}
.nav {
display: block;
cursor: pointer;
color: #0000;
background: -webkit-linear-gradient(#FDFDFE, #DEE3F3);
background: -o-linear-gradient(#FDFDFE, #DEE3F3);
background: -moz-linear-gradient(#FDFDFE, #DEE3F3);
background: linear-gradient(#FDFDFE, #DEE3F3);
border: 1px solid #B6BCCC !important;
border-bottom: 2px solid #B6BCCC !important;
list-style: none;
}
.nav-li {
position: relative;
display: inline-block;
padding-left: $menuPadding;
padding-right: $menuPadding;
}
.nav-li:active {
background: #C9D0E1;
border-radius: 1px;
}
.nav-li-text {
font-size: 13px;
color: #000;
text-align: center;
text-decoration: none;
}
.nav-ul {
display: none;
position: absolute;
list-style: none;
border: 1px solid gray !important;
line-height: $menuItemHeight;
width: $menuItemWidth;
padding: 0px;
margin: 0px;
}
.menu-ul {
display: none;
list-style: none;
background: #F0F0F0;
line-height: $menuItemHeight;
width: $menuItemWidth;
bottom: $menuItemHeight;
}
.active {
position: absolute;
display: block !important;
}
.menu-ul-text {
font-size: 14px;
color: #000;
letter-spacing: 0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li {
text-align: left;
background: #F0F0F0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li-block {
display: flex;
letter-spacing: 0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li-text {
font-size: 14px;
color: #000;
}
.menu-li-text .status {
display: block;
float: left;
border-right: 1px inset #CACACA;
width: $width;
}
.menu-li-text .label {
display: block;
float: left;
}
.menu-li-block:hover {
background: #C9DEF7;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.fake-button{
height: 20px;
line-height: 20px;
padding: 0px;
width: 80px;
border: 1px solid #1F313F;
font-size: 12px;
border-radius: 1px !important;
color: #000;
background: #DDD;
margin: 5px auto;
}
.fake-button-disabled {
height: 20px;
line-height: 20px;
padding: 0px;
width: 80px;
border: 1px solid #1F313F !important;
font-size: 12px;
border-radius: 1px !important;
color: #8f8f8f !important;
background: #DDD im !important;
margin: 5px auto;
cursor: not-allowed;
&:hover {
color: #8f8f8f !important;
background: #DDD im !important;
}
&:disabled {
color: #8f8f8f !important;
background: #DDD im !important;
}
}
.fake-button-active{
height: 20px;
line-height: 20px;
padding: 0px;
width: 80px;
border: 1px solid #1F313F;
font-size: 12px;
&.el-button {
border-radius: 1px !important;
background: #ECF5FF !important;
color: #70B6FF !important;
}
margin: 5px auto;
}
.loginClass{
width: 100px;
height: 20px;
text-align: center;
border: 1px solid rgb(204, 204, 204);
line-height: 20px;
margin: 5px auto;
border-radius: 1px;
background: #DDD;
cursor: not-allowed;
}
.div-simulate-button{
height: 20px;
line-height: 20px;
display: inline-block;
font-size: 14px;
color: #303030;
border: 1px solid #44556D;
background: #DDD;
text-align: center;
border-radius: 1px;
width: 80px;
}
.tip-content-box{
height: 30px;
width: 100%;
line-height: 30px;
background: #001528;
color: #C20F29;
font-size: 14px;
display: flex;
justify-content: space-around;
}
.button-row{
height: 20px;
line-height: 20px;
display: flex;
justify-content:space-between;
}
@keyframes fade {
from {
opacity: 1.0;
}
50% {
opacity: 0.4;
}
to {
opacity: 1.0;
}
}
@-webkit-keyframes fade {
from {
opacity: 1.0;
}
50% {
opacity: 0.4;
}
to {
opacity: 1.0;
}
}
.headerBox {
background: #f00;
animation: fade 600ms infinite;
-webkit-animation: fade 600ms infinite;
}
.nav-border .el-button {
background: #DDDDDD;
border: 1px solid #000 !important;
cursor: pointer;
&.disabled {
cursor: not-allowed;
border: 1px solid #D0CEC5 !important;
/*background: #DDDDDD !important;*/
color: #a0a0a0!important;
}
&:hover, &.active{
background: #eeeeee;
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -13,7 +13,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
export default {
@ -34,12 +33,6 @@ export default {
data() {
return {
menu: [],
menuNormal: {
Local: [
],
Center: [
]
},
menuForce: [
{
label: '设置故障',
@ -101,11 +94,7 @@ export default {
},
initMenu() {
//
if (this.selected.type != '04') {
// this.menu = MenuContextHandler.covert(this.menuNormal);
} else {
this.menu = [];
}
this.menu = [];
//
if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') {
this.menu = this.menuForce;

View File

@ -31,12 +31,6 @@ export default {
return {
menu: [],
systemName:'xian-01__systerm',
menuNormal: {
Local: [
],
Center: [
]
},
menuForce: [
{
label: '设置故障',

View File

@ -12,7 +12,6 @@ import { OperateMode } from '@/scripts/ConstDic';
import { DeviceMenu } from '@/scripts/ConstDic';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
@ -32,12 +31,6 @@ export default {
data() {
return {
menu: [],
menuNormal: {
Local: [
],
Center: [
]
},
menuForce: [
{
label: '设置ZC故障',
@ -99,8 +92,7 @@ export default {
},
initMenu() {
//
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = [];
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce];

View File

@ -2,7 +2,6 @@
<div>
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="haerbin-01__systerm" />
<set-fault ref="setFault" pop-class="nanjing-02__systerm" />
<psl ref="psl" pop-class="xian-01__systerm" />
</div>
</template>
@ -10,18 +9,15 @@
import PopMenu from '@/components/PopMenu';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
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';
import Psl from '@/jmapNew/theme/components/menus/dialog/psl';
export default {
name: 'StationStandMenu',
components: {
PopMenu,
SetFault,
Psl
SetFault
},
props: {
selected: {
@ -34,12 +30,6 @@ export default {
data() {
return {
menu: [],
menuNormal: {
Local: [
],
Center: [
]
},
menuForce: [
{
label: this.$t('menu.menuStationStand.setFault'),
@ -86,17 +76,10 @@ export default {
},
initMenu() {
//
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = [];
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce];
if (this.$store.state.training.prdType === '01') {
this.menu.push({
label: 'PSL',
handler: this.openPsl
});
}
}
},
doShow(point) {
@ -129,10 +112,6 @@ export default {
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
// PSL
openPsl() {
this.$refs.psl.doShow(this.selected);
}
}
};

View File

@ -11,7 +11,6 @@ import PopMenu from '@/components/PopMenu';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import SwitchHookLock from '@/jmapNew/theme/components/menus/dialog/switchHookLock';
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';
@ -86,7 +85,7 @@ export default {
},
initMenu() {
//
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = [];
//
if (this.operatemode === OperateMode.FAULT) {
if (!this.$store.state.scriptRecord.bgSet) {

View File

@ -2,11 +2,6 @@
<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" /> -->
<speed-limit ref="speedLimit" pop-class="haerbin-01__systerm" />
<set-fault ref="setFault" pop-class="nanjing-02__systerm" />
</div>
@ -20,12 +15,6 @@ 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 MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
@ -35,11 +24,6 @@ export default {
PopMenu,
NoticeInfo,
SpeedLimit,
// TrainControl,
// TrainDelete,
// TrainMove,
// TrainSwitch,
// TrainEditNumber,
SetFault
},
props: {
@ -53,12 +37,6 @@ export default {
data() {
return {
menu: [],
menuNormal: {
Local: [
],
Center: [
]
},
menuForce: [
{
label: '设置故障',
@ -170,7 +148,7 @@ export default {
},
initMenu() {
//
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = [];
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce, ...this.menuSpeed];
}
@ -332,108 +310,6 @@ export default {
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
// //
// addTrainId() {
// const step = {
// start: true,
// operation: OperationEvent.Train.addTrainId.menu.operation,
// param: {
// code: this.selected.code
// }
// };
// this.$store.dispatch('trainingNew/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('trainingNew/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('trainingNew/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('trainingNew/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('trainingNew/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('trainingNew/next', step).then(({ valid }) => {
// if (valid) {
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.trainSwitch.doShow(step, this.selected);
// }
// });
// }
}
};
</script>

View File

@ -245,7 +245,6 @@ export default {
},
//
handleViewLoaded() {
console.log('handleViewLoaded');
this.$store.dispatch('map/mapViewLoaded');
this.mapViewLoaded(false);
},

View File

@ -167,11 +167,8 @@ export default {
}
},
watch: {
'$store.state.training.initTime': function (initTime) {
this.initDate(initTime);
},
'$store.state.socket.simulationTimeSync': function (time) { // 仿
this.$store.dispatch('training/setInitTime', time);
this.initDate(time);
},
'$store.state.socket.simulationAlarmInfo': function(val) {
(val || []).forEach(item => {
@ -224,7 +221,7 @@ export default {
},
methods: {
undeveloped() {
this.doClose();
// this.doClose();
this.$alert(this.$t('menu.menuBar.implemented'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
callback: action => {
@ -261,9 +258,9 @@ export default {
this.$emit('back');
},
initDate(date) {
this.time = timestampFormat('HH:mm:ss', date)
this.dateString = timestampFormat('YYYY.MM.DD', date)
},
this.time = timestampFormat('HH:mm:ss', date);
this.dateString = timestampFormat('YYYY.MM.DD', date);
}
}
};
</script>

View File

@ -1,10 +1,10 @@
<template>
<div class="main" :style="{width: '100%',height:'100%',position:'absolute',overflow:'hidden'}" style="background: #000;">
<ba-si-di ref="baSiDi" @handleDialogShow="handleDialogShow" />
<rps-dialog ref="rpsDialog" :is-run-plan="isRunPlan" :train-list="trainList" />
<tro-dialog ref="troDialog" :is-run-plan="isRunPlan" :train-list="trainList" :station-list="stationList" />
<rps-dialog ref="rpsDialog" />
<tro-dialog ref="troDialog" />
<car-pack ref="carPack" />
<tro-detail ref="troDetail" :is-run-plan="isRunPlan" :train-list="trainList" :station-list="stationList" @goTroDialog="troClick" />
<tro-detail ref="troDetail" @goTroDialog="troClick" />
<tra-dialog ref="traDialog" @openTrainTrunkDetail="openTrainTrunkDetail" />
<ttl-dialog ref="ttlDialog" />
<tmt-dialog ref="tmtDialog" />
@ -14,8 +14,7 @@
</template>
<script>
import { mapGetters } from 'vuex';
import { getToken } from '@/utils/auth';
import { creatSubscribe, clearSubscribe, displayTopic, getTopic } from '@/utils/stomp';
import { clearSubscribe, displayTopic } from '@/utils/stomp';
import { EventBus } from '@/scripts/event-bus';
import BaSiDi from './baSiDi';
import RpsDialog from './rps';
@ -78,14 +77,6 @@ export default {
}
},
watch:{
'$store.state.app.windowSizeCount': function() { //
this.setWindowSize();
},
'$store.state.map.mapViewLoadedCount': function (val) { //
if (this.planRunning) {
this.$store.dispatch('training/simulationStart');
}
},
'$store.state.menuOperation.selectedCount':function(em) {
const device = this.$store.state.menuOperation.selected;
if (device && device._type === 'Station' && this.$store.state.menuOperation.subType === 'troButton') {
@ -96,14 +87,9 @@ export default {
},
beforeDestroy() {
this.clearSubscribe();
this.clearSubscribeNew();
this.$store.dispatch('training/reset');
},
async mounted() {
const _that = this;
window.onbeforeunload = () => { _that.clearSubscribe(); _that.clearSubscribeNew(); };
this.setWindowSize();
this.$store.dispatch('app/animationsClose');
this.$refs.troDialog.doClose();
},
methods:{
@ -116,37 +102,12 @@ export default {
EventBus.$emit('viewLoading', false);
});
},
async subscribe() {
this.clearSubscribe();
const header = { group: this.$route.query.group || '', 'X-Token': getToken() };
creatSubscribe(`${displayTopic}\/${this.$route.query.group}`, header);
await this.$store.dispatch('training/setHasSubscribed');
},
async subscribeNew() {
this.clearSubscribeNew();
const header = { 'X-Token': getToken() };
creatSubscribe(getTopic('ATS', this.$route.query.group), header);
creatSubscribe(getTopic('SYSTIME', this.$route.query.group), header);
creatSubscribe(getTopic('STATE', this.$route.query.group), header);
await this.$store.dispatch('training/setHasSubscribed');
},
clearSubscribeNew() {
clearSubscribe(getTopic('ATS', this.$route.query.group));
clearSubscribe(getTopic('SYSTIME', this.$route.query.group));
clearSubscribe(getTopic('STATE', this.$route.query.group));
},
clearSubscribe() {
clearSubscribe(`${displayTopic}\/${this.groupModel}`);
},
openTra() {
this.$refs.traDialog.doShow();
},
//
setWindowSize() {
const width = this.width;
const height = this.height;
this.$store.dispatch('config/resize', { width, height });
},
troClick() {
this.$refs.troDialog.doShow();
},
@ -178,7 +139,7 @@ export default {
top: 4px;
color: #000;
border-radius: 4px;
padding: 0px 2px;
padding: 0 2px;
height: 20px;
line-height: 24px;
font-size: 15px;
@ -209,10 +170,10 @@ export default {
height: 26px;
line-height: 24px;
font-size: 13px;
padding: 0px;
padding: 0;
width: 80px;
border: 1px solid #8B958A;
border-radius: 0px !important;
border-radius: 0 !important;
color: #000;
background: #E6E6E6;
}

View File

@ -7,34 +7,21 @@
:before-close="doClose"
:z-index="2003"
>
<map-system-draft ref="mapCanvas" :no-menu="true" />
<station-diagram v-if="dialogShow" ref="stationDiagram" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import MapSystemDraft from '@/views/newMap/mapsystemNew/common/index';
import Vue from 'vue';
import StationDiagram from '../../stationDiagram/index';
export default {
name: 'RPS',
components: {
MapSystemDraft
},
props: {
trainList: {
type: Array,
required: true
},
isRunPlan: {
type: Boolean,
required: true
}
StationDiagram
},
data() {
return {
dialogShow: false,
mapData: null,
selfJmap: null
};
},
@ -45,80 +32,54 @@ export default {
title() {
return '背投系统';
},
mapData() {
return this.$store.state.map.map;
},
mapDevice() {
return this.$store.state.map.mapDevice;
},
group() {
return this.$route.query.group;
},
width() {
return this.$store.state.app.width - 5;
},
height() {
return this.$store.state.app.height - 50;
},
...mapGetters('map', [
'bigScreenConfig'
])
},
watch: {
'$store.state.map.mapViewLoadedCount': function (val) { //
if (this.dialogShow) {
this.handleUpdateScreen();
this.$refs.mapCanvas && this.$refs.mapCanvas.mapViewLoaded(false);
}
},
'$store.state.app.windowSizeCount': function() { //
this.$store.dispatch('config/resize', { width:this.width, height: this.height });
}
},
beforeDestroy() {
if (this.selfJmap && this.selfJmap._disposeFlag) {
this.destroy();
watch: {
'$store.state.map.initJlmapLoadedCount': function (val) {
if (this.dialogShow) {
this.handleBigScreenData();
}
}
},
methods: {
doShow() {
this.dialogShow = true;
if (this.selfJmap) { Vue.prototype.$jlmap = this.selfJmap; }
this.$store.dispatch('config/resize', { width:this.width, height: this.height });
this.$nextTick(function() {
this.$refs.mapCanvas.setMap(this.$store.state.map.map);
const mapDevice = this.$store.state.map.mapDevice;
const list = [];
for (const key in mapDevice) {
list.push(mapDevice[key]);
}
this.$jlmap.updateShowMode(list, '02');
this.$store.dispatch('training/updateMapState', list);
!this.isRunPlan && this.$jlmap.clearTrainView();
});
},
destroy() {
this.selfJmap.dispose();
},
handleUpdateScreen() {
this.maskOpen = false;
if (this.bigScreenConfig.bigScreenSplitConfig && this.bigScreenConfig.bigScreenSplitConfig.length) {
const offsetList = this.bigScreenConfig.offsetList;
const width = this.bigScreenConfig.width;
const height = this.bigScreenConfig.height;
const size = {
width: (this.$store.state.app.width - 2) * width,
height: this.$store.state.app.height * height,
list: this.bigScreenConfig.bigScreenSplitConfig.map(ele => ele.position),
offsetList: offsetList
};
this.$jlmap.setUpdateScreen(size);
const mapDevice = this.$store.state.map.mapDevice;
const list = [];
for (const key in mapDevice) {
list.push(mapDevice[key]);
handleBigScreenData() {
const logicData = {routeData:this.$store.state.map.routeData, autoReentryData: this.$store.state.map.autoReentryData};
const repaint = this.$store.state.map.initJlmapLoadedCount === 1;
this.$jlmap.setMap(this.mapData, this.mapDevice, logicData, repaint);
if (this.mapData && this.mapData.pictureList) {
const picture = this.$store.state.map.map.pictureList.find(picture => picture.type === 'bigScreen');
if (picture) {
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
const deviceList = [];
const mapDevice = this.$store.state.map.mapDevice;
for (const deviceCode in mapDevice) {
deviceList.push(deviceCode);
}
this.$jlmap.updatePicture(deviceList);
this.$jlmap.updateTransform(picture.scaling, picture.origin);
}
this.$jlmap.updateShowMode(list, '02');
} else {
this.maskOpen = true;
// this.$messageBox('线, ');
}
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.selfJmap = Vue.prototype.$jlmap;
}
}
};

View File

@ -7,51 +7,31 @@
:before-close="doClose"
:z-index="2003"
>
<div>
<map-system-draft ref="mapCanvas" :no-menu="true" @back="back" />
</div>
<station-diagram v-if="dialogShow" ref="stationDiagram" />
</el-dialog>
</template>
<script>
import MapSystemDraft from '@/views/newMap/mapsystemNew/common/index';
import { mapGetters } from 'vuex';
import ButtonDbupIcon from '@/assets/baSiDi/dbup.png';
import ButtonRightIcon from '@/assets/baSiDi/right.png';
import ButtonLeftIcon from '@/assets/baSiDi/left.png';
import Vue from 'vue';
import StationDiagram from '../../stationDiagram/index';
export default {
name: 'TRO',
components: {
MapSystemDraft
},
props: {
stationList: {
type: Array,
required: true
},
trainList: {
type: Array,
required: true
},
isRunPlan: {
type: Boolean,
required: true
}
StationDiagram
},
data() {
return {
dialogShow: false,
mapData: null,
deviceCode: '',
selfJmap: null,
buttonDbup: ButtonDbupIcon,
buttonRight: ButtonRightIcon,
buttonLeft: ButtonLeftIcon
deviceCode: ''
};
},
computed: {
...mapGetters('map', [
'sectionList',
'signalList',
'trainWindowList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
@ -61,81 +41,66 @@ export default {
width() {
return this.$store.state.app.width - 5;
},
mapData() {
return this.$store.state.map.map;
},
mapDevice() {
return this.$store.state.map.mapDevice;
},
height() {
return this.$store.state.app.height - 50;
},
...mapGetters('map', [
'bigScreenConfig'
])
},
watch: {
'$store.state.map.mapViewLoadedCount': function (val) { //
if (this.dialogShow) {
this.showTroMode();
this.$refs.mapCanvas && this.$refs.mapCanvas.mapViewLoaded(false);
}
},
'$store.state.app.windowSizeCount': function() { //
this.$store.dispatch('config/resize', { width:this.width, height: this.height });
}
},
beforeDestroy() {
if (this.selfJmap && this.selfJmap._disposeFlag) {
this.destroy();
watch: {
'$store.state.map.initJlmapLoadedCount': function (val) {
if (this.dialogShow) {
this.handleDispatchWorkData();
}
}
},
methods: {
doShow() {
this.dialogShow = true;
if (this.selfJmap) { Vue.prototype.$jlmap = this.selfJmap; }
this.$store.dispatch('config/resize', { width:this.width, height: this.height });
this.$nextTick(function() {
this.$refs.mapCanvas.setMap(this.$store.state.map.map);
const mapDevice = this.$store.state.map.mapDevice;
const list = [];
for (const key in mapDevice) {
list.push(mapDevice[key]);
},
handleDispatchWorkData() {
const logicData = {routeData:this.$store.state.map.routeData, autoReentryData: this.$store.state.map.autoReentryData};
const repaint = this.$store.state.map.initJlmapLoadedCount === 1;
this.$jlmap.setMap(this.mapData, this.mapDevice, logicData, repaint);
if (this.mapData && this.mapData.pictureList) {
const picture = this.mapData.pictureList.find(picture => picture.type === 'dispatchWork');
if (picture) {
this.handlerPictureShow(picture);
} else {
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
const list = [];
for (const key in this.mapDevice) {
list.push(this.mapDevice[key]);
}
this.$jlmap.updateShowStation(list);
}
this.$jlmap.updateShowMode(list, '05');
this.$store.dispatch('training/updateMapState', list);
!this.isRunPlan && this.$jlmap.clearTrainView();
});
} else {
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
const list = [];
for (const key in this.mapDevice) {
list.push(this.mapDevice[key]);
}
this.$jlmap.updateShowStation(list);
}
this.updateJlmapMode('05');
},
destroy() {
this.selfJmap.dispose();
},
showTroMode() {
const mapDevice = this.$store.state.map.mapDevice;
updateJlmapMode(mode) {
const list = [];
const mapDevice = this.$store.state.map.mapDevice;
for (const key in mapDevice) {
list.push(mapDevice[key]);
}
this.handleUpdateScreen();
this.$jlmap.updateShowMode(list, '05'); //
this.$jlmap && this.$jlmap.updateShowMode(list, mode);
},
handleUpdateScreen() {
this.maskOpen = false;
if (this.bigScreenConfig.bigScreenSplitConfig && this.bigScreenConfig.bigScreenSplitConfig.length) {
const offsetList = this.bigScreenConfig.offsetList;
const width = this.bigScreenConfig.width;
const height = this.bigScreenConfig.height;
const size = {
width: (this.$store.state.app.width - 2) * width,
height: this.$store.state.app.height * height,
list: this.bigScreenConfig.bigScreenSplitConfig.map(ele => ele.position),
offsetList: offsetList
};
this.$jlmap.setUpdateScreen(size);
} else {
this.maskOpen = true;
}
},
back() {},
doClose() {
this.loading = false;
this.updateJlmapMode('02');
this.dialogShow = false;
this.$jlmap && this.$jlmap.clearTrainView();
this.selfJmap = Vue.prototype.$jlmap;
}
}
};

View File

@ -8,8 +8,8 @@
:z-index="2000"
>
<div style="text-align: center;">
<map-system-draft ref="mapCanvas" />
<el-button size="small" class="fault-button" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式':'切换到故障模式' }}</el-button>
<component :is="menus" :selected="selected" />
<station-diagram v-if="dialogShow" ref="stationDiagram" @setSelected="setSelected" />
<div class="button-box" style="">
<div class="arrow-button" :style="{backgroundImage: 'url(' + buttonLeft + ')' }" @click="changeStation(-1)" />
<div class="arrow-button" :style="{backgroundImage: 'url(' + buttonDbup + ')' }" @click="goTroDialog" />
@ -20,51 +20,47 @@
</template>
<script>
import MapSystemDraft from '@/views/newMap/mapsystemNew/common/index';
import StationDiagram from '../../stationDiagram/index';
import ButtonDbupIcon from '@/assets/baSiDi/dbup.png';
import ButtonRightIcon from '@/assets/baSiDi/right.png';
import ButtonLeftIcon from '@/assets/baSiDi/left.png';
import { OperateMode } from '@/scripts/ConstDic';
import Vue from 'vue';
import {mapGetters} from 'vuex';
export default {
name: 'TRO',
components: {
MapSystemDraft
},
props: {
stationList: {
type: Array,
required: true
},
trainList: {
type: Array,
required: true
},
isRunPlan: {
type: Boolean,
required: true
}
StationDiagram
},
data() {
return {
dialogShow: false,
mapData: null,
deviceCode: '',
menus: null,
selected: null,
buttonDbup: ButtonDbupIcon,
buttonRight: ButtonRightIcon,
buttonLeft: ButtonLeftIcon,
selfJmap: null,
faultMode: false
buttonLeft: ButtonLeftIcon
};
},
computed: {
...mapGetters('map', [
'sectionList',
'signalList',
'trainWindowList',
'stationList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '轨道详览';
},
mapData() {
return this.$store.state.map.map;
},
mapDevice() {
return this.$store.state.map.mapDevice;
},
width() {
return this.$store.state.app.width - 10;
},
@ -73,66 +69,59 @@ export default {
}
},
watch: {
'$store.state.map.mapViewLoadedCount': function (val) { //
if (this.dialogShow) {
const list = [];
const mapDevice = this.$store.state.map.mapDevice;
for (const key in mapDevice) {
list.push(mapDevice[key]);
}
Vue.prototype.$jlmap.updateShowMode(list, '02');
this.$refs.mapCanvas && this.$refs.mapCanvas.setCenter(this.deviceCode);
this.$refs.mapCanvas && this.$refs.mapCanvas.mapViewLoaded(false);
'$store.state.map.mapDataLoadedCount': function () {
const lineCode = this.$jlmap.lineCode;
if (lineCode && this.dialogShow) {
this.menus = this.$theme.loadDispatchWorkMenuComponent(lineCode);
}
},
'$store.state.app.windowSizeCount': function() { //
this.$store.dispatch('config/resize', { width:this.width, height: this.height });
}
},
beforeDestroy() {
if (this.selfJmap && !this.selfJmap._disposeFlag) {
this.destroy();
'$store.state.map.initJlmapLoadedCount': function (val) {
if (this.dialogShow) {
this.handleDispatchWorkData();
this.$jlmap && this.$jlmap.setCenterOffset(this.deviceCode, { x: 200, y:0 });
}
}
},
methods: {
doShow(deviceCode) {
this.dialogShow = true;
if (this.selfJmap) { Vue.prototype.$jlmap = this.selfJmap; }
this.$store.dispatch('config/resize', { width:this.width, height: this.height });
this.deviceCode = deviceCode;
this.$nextTick(function() {
this.$refs.mapCanvas.setMap(this.$store.state.map.map);
this.$jlmap.off('pan');
this.faultMode = this.$store.state.training.operatemode === OperateMode.FAULT;
const mapDevice = this.$store.state.map.mapDevice;
const list = [];
for (const key in mapDevice) {
list.push(mapDevice[key]);
}
this.$jlmap.updateShowMode(list, '02');
this.$store.dispatch('training/updateMapState', list);
!this.isRunPlan && this.$jlmap.clearTrainView();
});
},
changeOperateMode() {
this.faultMode = !this.faultMode;
let mode = OperateMode.NORMAL;
if (this.faultMode) {
mode = OperateMode.FAULT;
setSelected(val) {
this.selected = val;
},
handleDispatchWorkData() {
const logicData = {routeData:this.$store.state.map.routeData, autoReentryData: this.$store.state.map.autoReentryData};
const repaint = this.$store.state.map.initJlmapLoadedCount === 1;
this.$jlmap.setMap(this.mapData, this.mapDevice, logicData, repaint);
if (this.mapData && this.mapData.pictureList) {
const picture = this.mapData.pictureList.find(picture => picture.type === 'dispatchWork');
if (picture) {
this.handlerPictureShow(picture);
} else {
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
const list = [];
for (const key in this.mapDevice) {
list.push(this.mapDevice[key]);
}
this.$jlmap.updateShowStation(list);
}
} else {
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
const list = [];
for (const key in this.mapDevice) {
list.push(this.mapDevice[key]);
}
this.$jlmap.updateShowStation(list);
}
this.$store.dispatch('training/changeOperateMode', { mode: mode });
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.selfJmap = Vue.prototype.$jlmap;
},
destroy() {
this.selfJmap.dispose();
},
goTroDialog() {
this.doClose();
this.$emit('goTroDialog');
this.$nextTick(() => { this.$emit('goTroDialog'); });
},
changeStation(value) {
this.deviceCode = this.deviceCode || this.stationList[0].code;

View File

@ -222,7 +222,10 @@ export default {
},
pictureChange(val) {
this.picture = val;
this.$store.dispatch('map/setPicture', val);
if (this.picture === 'dispatchWork' && this.lineCode === '14') {
this.picture = 'basidi';
}
this.$store.dispatch('map/setPicture', this.picture);
if (val === 'ibp') {
this.$nextTick(() => { this.$refs.ibpPlate.show(this.roleDeviceCode, ''); });
} else if (val === 'drivingPlan') {

View File

@ -12,7 +12,7 @@ export default {
picture: {
type: String,
default() {
return 'localWork';
return '';
}
}
},
@ -195,12 +195,14 @@ export default {
},
watch: {
'$store.state.training.roles': function (val) {
console.log('watch', val);
this.initTerminalList();
const trainingDetail = this.$store.state.trainingNew.trainingDetail;
if (this.isFirst && this.$route.query.client) {
this.isFirst = false;
} else {
if (trainingDetail && trainingDetail.client) {
console.log(trainingDetail.client, '-----------ee-');
this.changePictureShow(trainingDetail.client);
} else {
this.initPictureShow();
@ -228,14 +230,18 @@ export default {
});
},
noEvent(code) {
console.log(code, 'noEvent');
this.$emit('pictureChange', code);
},
initPictureShow() {
console.log(this.roles, '-----------');
const localWorkRoleList = ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER', 'STATION_PASSENGER', 'STATION_SWITCH_MAN',
'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER', 'TRAIN_MASTER', 'DEPOT_DISPATCHER'];
if (localWorkRoleList.includes(this.roles)) {
console.log('00000000000000');
this.changePictureShow('localWork');
} else if (this.roles === 'DISPATCHER') {
console.log('00000001111');
this.changePictureShow('dispatchWork');
} else if (this.roles === 'MAINTAINER') {
//
@ -245,6 +251,7 @@ export default {
}
},
changePictureShow(code) {
console.log(code, '111111');
this.$emit('loadingChange');
setTimeout(() => {
this.$emit('pictureChange', code);