Merge branch 'test_dispaly' of https://git.code.tencent.com/lian-cbtc/jl-client into test_dispaly

This commit is contained in:
joylink_cuiweidong 2022-12-02 14:01:37 +08:00
commit 2d9117d11d
44 changed files with 2401 additions and 1779 deletions

View File

@ -1,9 +1,8 @@
<template>
<div id="app">
<router-view />
<deomon-topic ref="deomonTopic" />
<deomon-list ref="deomonList" @enterQcode="qcodeEntry" />
<qcode ref="qcode" />
<deomon-list ref="deomonList" @enterQcode="qcodeEntry" />
<qcode ref="qcode" />
<div v-show="loading" class="AppAll">
<img v-if="project === 'login' || project === 'design'" :src="jlFavicon" class="CompanyIcon">
<img :src="loadingImg" style="width: 100%; height: 100%;">
@ -25,7 +24,6 @@
import { getToken, getUserIdKey } from '@/utils/auth';
import { getSessionStorage } from '@/utils/auth';
import { loginInfo, ProjectIcon } from '@/scripts/ProjectConfig';
import DeomonTopic from '@/views/demonstration/deomonTopic';
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
import LoadingImg from '@/assets/loading.gif';
import AppLoading from '@/assets/appLoading.png';
@ -37,7 +35,6 @@ import Qcode from '@/layout/components/Qcode.vue';
export default {
name: 'App',
components: {
DeomonTopic,
DeomonList,
Qcode
},
@ -54,11 +51,6 @@ export default {
};
},
watch: {
'$store.state.socket.simulationInvite': function (val) {
if (val.creator) {
this.subscribeMessage(val);
}
},
'$store.state.socket.beLogoutCount': async function(val) {
if (this.$store.state.socket.loggedOutMsg.token === getToken()) {
this.$store.dispatch('disconnect').then(()=>{
@ -130,14 +122,6 @@ export default {
window.document.oncontextmenu = function () {
return false;
};
},
subscribeMessage(res) {
if (this.$refs.deomonTopic && !window.location.href.includes('trainroom')) {
if (!(getSessionStorage('project').includes('design'))) {
this.$refs.deomonTopic.doShow(res);
}
this.$store.dispatch('socket/setSimulationInvite');
}
}
}
};

View File

@ -6,29 +6,15 @@ export function createSimulation(data) {
method: 'post'
});
}
/** 根据仿真group获取仿真基础信息 */
/** 根据仿真group获取仿真基础信息 废弃 */
export function getSimulationInfoByGroup(groupId) {
return request({
url: `/common/simulation/${groupId}`,
method: 'get'
});
}
/** 根据仿真group获取仿真地图数据 */
export function getMapDataByGroup(groupId) {
return request({
url: `/rtSimulation/${groupId}/mapData`,
method: 'get'
});
}
/** 仿真发送指令 */
export function sendSimulationCommand(group, memberId, type, data) {
return request({
url: `/common/simulation/${group}/member/${memberId}/operate/${type}`,
method: 'post',
data
});
}
/** 获取仿真成员列表 */
/** 获取仿真成员列表 废弃 */
export function getMemberListCommon(group, role) {
if (!role) {
@ -39,14 +25,14 @@ export function getMemberListCommon(group, role) {
method: 'get'
});
}
/** 获取仿真用户列表 */
/** 获取仿真用户列表 废弃 */
export function getUserListCommon(group) {
return request({
url: `/common/simulation/${group}/users`,
method: 'get'
});
}
/** 销毁仿真 */
/** 销毁仿真 废弃 */
export function destroySimulation(group) {
return request({
url: `/common/simulation/${group}/destroy`,
@ -60,7 +46,7 @@ export function initSimulation(group) {
method: 'put'
});
}
/** 设置故障 */
/** 设置故障 废弃 */
export function setSimulationFault(group, data) {
return request({
url: `/common/simulation/${group}/fault`,
@ -68,7 +54,7 @@ export function setSimulationFault(group, data) {
data
});
}
/** 取消故障 */
/** 取消故障 废弃 */
export function cancelSimulationFault(group, deviceId, faultType) {
return request({
url: `/common/simulation/${group}/device/${deviceId}/fault/${faultType}`,
@ -78,28 +64,28 @@ export function cancelSimulationFault(group, deviceId, faultType) {
/** 仿真运行倍速 */
export function timesSpeedPlayback(group, speed) {
return request({
url: `/common/simulation/${group}/updateSpeed/${speed}`,
url: `/simulation/${group}/updateSpeed/${speed}`,
method: 'put'
});
}
/** 仿真暂停 */
export function simulationPause(group) {
return request({
url: `/common/simulation/${group}/pause`,
url: `/simulation/${group}/pause`,
method: 'put'
});
}
/** 仿真开始 */
export function simulationStart(group) {
return request({
url: `/common/simulation/${group}/start`,
url: `/simulation/${group}/start`,
method: 'put'
});
}
/** 获取存在的仿真列表 */
export function getExistSimulationList(params) {
return request({
url: `/common/simulation/list`,
url: `/simulation/list`,
method: 'get',
params
});
@ -107,7 +93,15 @@ export function getExistSimulationList(params) {
/** 获取仿真用户信息 */
export function getSimulationUserInfo(id) {
return request({
url: `/common/simulation/${id}/users`,
url: `/simulation/${id}/users`,
method: 'get'
});
}
/** 监管仿真 */
export function getSuperviseSimulation(params) {
return request({
url: `/simulation/supervise`,
method: 'get',
params
});
}

View File

@ -556,6 +556,14 @@ export function getGroupByMapAndFunction(mapId, functionId) {
export function destroySimulationByAdmin(group) {
return request({
url: `/simulation/${group}/destroy`,
method: 'post'
method: 'delete'
});
}
/** 非仿真创建者退出仿真 */
export function exitSimulation(group) {
return request({
url: `/simulation/${group}/exit`,
method: 'put'
});
}

View File

@ -0,0 +1,380 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
<menu-button ref="menuButton" />
<menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" />
<menu-section ref="menuSection" :selected="selected" />
<menu-train ref="menuTrain" :selected="selected" />
<menu-station ref="menuStation" :selected="selected" />
<menu-limit ref="menuLimit" :selected="selected" />
<passive-alarm ref="passiveAlarm" />
<passive-contorl ref="passiveControl" pop-class="beijing-01__systerm" />
<passive-timeout ref="passiveTimeout" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import MenuSignal from './menuSignal';
import MenuButton from './menuButton';
import MenuStationStand from './menuStationStand';
import MenuSwitch from './menuSwitch';
import MenuSection from './menuSection';
import MenuTrain from './menuTrain';
import MenuStation from './menuStation';
import MenuBar from './dispatchWorkMenuBar';
import MenuLimit from './menuLimit';
import PassiveAlarm from './passiveDialog/alarm';
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
import PassiveTimeout from './passiveDialog/timeout';
export default {
name: 'DispatchWorkMenus',
components: {
MenuBar,
MenuButton,
MenuSignal,
MenuSwitch,
MenuSection,
MenuStationStand,
MenuStation,
MenuTrain,
MenuLimit,
PassiveAlarm,
PassiveContorl,
PassiveTimeout
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
computed: {
...mapGetters('config', [
'width'
]),
isShowBar() {
return this.$store.state.training.prdType && this.$store.state.training.prdType !== '07';
}
},
watch: {
isShowBar(val) {
val && this.$store.dispatch('config/updateMenuBar');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
this.$refs['menuSignal'].setRouteSignal();
});
this.$root.$on('dialogOpen', e => {
if (this.selected == e &&
this.selected &&
this.selected.instance &&
this.selected.instance.mouseEvent) {
this.selected.instance.mouseEvent.mouseover();
}
});
this.$root.$on('dialogClose', e => {
if (this.selected == e &&
this.selected &&
this.selected.instance &&
this.selected.instance.mouseEvent) {
this.selected.instance.__down = false;
this.selected.instance.mouseEvent.mouseout();
this.$jlmap.clearEvent();
}
});
},
beforeDestroy() {
this.$root.$off('dialogOpen');
this.$root.$off('dialogClose');
}
};
</script>
<style>
.menus .pop-menu {
background: #F0F0F0;
}
.menus .pop-menu span {
color: #000;
}
.menus .pop-menu .is-disabled span {
color: #B4B3B8;
}
.beijing-01__systerm {
overflow: hidden !important;
}
.beijing-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;
}
.beijing-01__systerm .el-dialog .el-dialog__header {
padding: 10px;
height: 26px;
}
.beijing-01__systerm .el-dialog .el-dialog__footer {
background: #F0F0F0;
opacity: 1;
}
.beijing-01__systerm .el-dialog .el-dialog__body {
padding: 10px;
margin: 5px;
border: 2px solid rgba(120, 121, 123, 0.5);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
background: #F0F0F0;
opacity: 1;
}
.beijing-01__systerm .el-dialog .el-dialog__title {
position: absolute;
top: 6px;
color: #000;
border-radius: 4px;
padding: 0px 2px;
height: 20px;
line-height: 20px
}
.beijing-01__systerm .el-dialog .el-dialog__title::before {
content: '';
position: absolute;
top: 0;
left: 0;
filter: blur(7px);
height: 20px;
width: -webkit-fill-available;
background: rgba(190, 190, 190, 0.8);
z-index: -1;
}
.beijing-01__systerm .el-dialog .el-dialog__headerbtn {
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid #fff;
border-radius: 4px;
top: 5px;
right: 5px;
line-height: 18px;
}
.beijing-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.beijing-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.beijing-01__systerm .el-dialog .el-button {
height: 32px;
line-height: 32px;
padding: 0px;
width: 80px;
border: 2px outset #E2E2E2;
border-radius: 0px !important;
color: #000;
background: #F0F0F0;
}
.beijing-01__systerm .el-dialog .expand {
width: 120px;
}
.beijing-01__systerm .el-dialog .el-button:focus span {
border: 1px dashed gray;
}
.beijing-01__systerm .el-dialog .el-button:active {
border: 2px inset #E2E2E2;
}
.beijing-01__systerm .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2;
}
.beijing-01__systerm .el-dialog .el-button:disabled span {
border: 0px;
}
.beijing-01__systerm .el-dialog .el-input {
border: 2px inset #E9E9E9;
}
.beijing-01__systerm .el-dialog .el-input .el-input__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.beijing-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.beijing-01__systerm .el-dialog .el-textarea {
border: 2px inset #E9E9E9;
border-radius: 0px;
}
.beijing-01__systerm .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.beijing-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.beijing-01__systerm .el-dialog .el-table--border th.gutter {
background: #EBEADB !important;
}
.beijing-01__systerm .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.beijing-01__systerm .el-dialog .el-table .cell {
line-height: unset !important;
}
.beijing-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;
}
.beijing-01__systerm .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.beijing-01__systerm .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
}
.beijing-01__systerm .el-dialog .current-row>td {
background: #3399FF !important;
color: #fff !important;
}
.beijing-01__systerm .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.beijing-01__systerm .el-dialog .el-checkbox__label {
color: #000 !important;
}
.beijing-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.beijing-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.beijing-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.beijing-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;
}
.beijing-01__systerm .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.beijing-01__systerm .el-dialog .el-radio__label {
color: #000 !important;
}
.beijing-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.beijing-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%;
}
.beijing-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.beijing-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -15px;
top: -18px;
}
.beijing-01__systerm .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
.beijing-01__systerm .el-dialog .context {
height: 100px;
border: 2px inset #E2E2E2;
overflow-y: scroll;
}
.beijing-01__systerm .el-dialog .table {
margin-top: 10px;
}
.beijing-01__systerm .el-dialog .notice {
margin-left: 62px;
line-height: 30px;
}
.beijing-01__systerm .el-dialog .button-group {
margin-top: 10px;
}
</style>

View File

@ -0,0 +1,870 @@
<template>
<div id="menuBar">
<div class="nav">
<template v-for="(item,i) in menu">
<template v-if="noShowingChildren(item.children)">
<li :id="getDomId(item)" :key="i" class="nav-li" @click="hookClick(item)">
<span class="nav-li-text">{{ item.title }}</span>
</li>
</template>
<template v-else>
<li
v-if="handleShow(item)"
:id="getDomId(item)"
:key="i"
class="nav-li"
@click.stop="selectedClassA(item, i)"
>
<span class="nav-li-text">{{ item.title }}</span>
<ul class="nav-ul" :class="{'active' :i==classA}">
<template v-for="(child,j) in item.children">
<template v-if="child.children && child.children.length > 0">
<li v-if="child.type === 'separator'" :key="j" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li
v-else
:id="getDomId(child)"
:key="j"
class="menu-li"
@click.stop="selectedClassB(child, j)"
>
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ child.title }}</span>
</span>
</div>
<ul class="menu-ul" :class="{'active' :j==classB}">
<template v-for="(grandchild,k) in child.children">
<li v-if="grandchild.type === 'separator'" :key="k" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li
v-else-if="grandchild.show"
:id="getDomId(grandchild)"
:key="k"
class="menu-li"
@click.stop="hookClick(grandchild)"
>
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ grandchild.title }}</span>
</span>
</div>
</li>
</template>
</ul>
</li>
</template>
<template v-else>
<li v-if="child.type === 'separator'" :key="j" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li
v-else-if="child.show"
:id="getDomId(child)"
:key="j"
class="menu-li"
@click.stop="hookClick(child)"
>
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ child.title }}</span>
</span>
</div>
</li>
</template>
</template>
</ul>
</li>
</template>
</template>
</div>
<station-control ref="stationControl" />
<detain-train-contorl ref="detainTrainContorl" />
<detain-train-contorl-up-down ref="detainTrainContorlUpDown" />
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
<train-add ref="trainAdd" />
<train-transtalet ref="trainTranstalet" />
<train-delete ref="trainDelete" />
<manage-user ref="manageUser" />
<help-about ref="helpAbout" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { TrainingMode } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import StationControl from './menuDialog/stationControl';
import DetainTrainContorl from './menuDialog/detainTrainContorl';
import DetainTrainContorlUpDown from './menuDialog/detainTrainContorlUpDown';
import TrainAdd from './menuDialog/trainAdd';
import TrainTranstalet from './menuDialog/trainTranstalet';
import TrainDelete from './menuDialog/trainDelete';
import ManageUser from './menuDialog/manageUser';
import HelpAbout from './menuDialog/helpAbout';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'MenuBar',
components: {
NoticeInfo,
StationControl,
DetainTrainContorl,
DetainTrainContorlUpDown,
TrainAdd,
TrainTranstalet,
TrainDelete,
ManageUser,
HelpAbout
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
classA: -1,
classB: -1,
tempClassA: -1,
tempClassB: -1,
valid: true,
menu: [
{
title: '系统',
operate: OperationEvent.Command.mBar.system,
children: [
{
title: '登录',
click: this.undeveloped
},
{
title: '注销',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '站遥控',
operate: OperationEvent.MixinCommand.remoteControl.mbar,
click: this.stationRemoteControl
},
{
title: '区域选择',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '连接主用中心',
click: this.undeveloped
},
{
title: '连接备用中心',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '退出',
click: this.undeveloped
}
]
},
{
title: '查看',
operate: OperationEvent.Command.mBar.check,
children: [
{
title: '运行图',
click: this.undeveloped
},
{
title: '报告分析',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '视图',
click: this.undeveloped,
operate: '',
children: [{
title: '报警',
click: this.undeveloped
},
{
title: '列车运行信息',
click: this.undeveloped
},
{
title: '设备状态',
click: this.undeveloped
},
{
title: '列车详细信息',
click: this.undeveloped
},
{
title: '站台详细信息',
click: this.undeveloped
}]
},
{
title: '终端站发车列表',
click: this.undeveloped
},
{
title: '详细设备状态',
click: this.undeveloped
},
{
title: '查找列车',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '显示目的地号',
click: this.undeveloped
},
{
title: '显示轨道名',
click: this.undeveloped
},
{
title: '显示道岔名',
click: this.undeveloped
},
{
title: '显示信号机名',
click: this.undeveloped
},
{
title: '显示车次窗位置',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '显示车次号',
click: this.undeveloped
},
{
title: '显示车组号',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '全屏',
click: this.undeveloped
},
{
title: '放大',
click: this.undeveloped
},
{
title: '缩小',
click: this.undeveloped
},
{
title: '恢复',
click: this.undeveloped
}
]
},
{
title: '车站定位',
operate: '',
children: [
]
},
{
title: 'ATS终端操作',
operate: '',
children: [
{
title: '当天运行车计划',
click: this.undeveloped
},
{
title: '出入库预告',
click: this.undeveloped
}
]
},
{
title: '计划车操作',
operate: '',
children: [
{
title: '添加计划车',
click: this.undeveloped
},
{
title: '平移计划车',
click: this.undeveloped
},
{
title: '删除计划车',
click: this.undeveloped
}
]
},
{
title: '批处理命令',
operate: OperationEvent.Command.mBar.detainControl,
children: [
{
title: '全线扣车',
operate: OperationEvent.StationStand.setDetainTrainAll.mbar,
click: this.setDetainTrainAll
},
{
title: '取消全线扣车',
operate: OperationEvent.StationStand.cancelDetainTrainAll.mbar,
click: this.cancelDetainTrainAll
},
{
title: '取消上行全线扣车',
operate: OperationEvent.StationStand.cancelUpDetainTrainAll.mbar,
click: this.cancelUpDetainTrainAll
},
{
title: '取消下行全线扣车',
operate: OperationEvent.StationStand.cancelDownDetainTrainAll.mbar,
click: this.cancelDownDetainTrainAll
}
]
},
{
title: '信息管理',
operate: '',
children: [
{
title: '调度日志',
click: this.undeveloped
},
{
title: '调度留言提醒',
click: this.undeveloped
},
{
title: '报警设置',
click: this.undeveloped
}
]
},
{
title: '帮助',
children: [
{
title: '关于ITS GPC 工作站',
click: this.about,
operate: OperationEvent.Command.help.about
}
]
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'started',
'steps',
'order',
'mode'
]),
...mapGetters('map', [
'stationList'
])
},
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.trainingNew.trainingSwitch': function (val) {
this.closeMenu(true);
}
},
mounted() {
this.initMenu();
},
methods: {
handleShow(item) {
if (item.hide) {
return false;
}
return true;
},
initStationList() {
const list = [];
this.stationList.forEach(station => {
if (station.visible) {
const node = {
title: station.name,
operate: station.code,
show: true,
click: this.mapLocation,
code: station.code
};
list.push(node);
}
});
return list;
},
initMenu() {
if (this.menu[3]) {
this.menu[3].children = this.initStationList();
}
this.clickEvent();
this.closeMenu(true);
},
clickEvent() {
const self = this;
window.onclick = function (e) {
if (document.getElementById('menuBar')) {
self.closeMenu(false);
}
};
},
getDomId(item) {
if (item && item.operate) {
return item.operate.domId;
}
return '';
},
noShowingChildren(children) {
if (!children || children.length <= 0) {
return true;
}
return false;
},
hasShowingChildren(children) {
if (children && children.length > 0) {
return true;
}
return false;
},
closeMenu(flag) {
if (flag || (this.mode !== TrainingMode.EDIT && this.mode !== TrainingMode.TEACH)) {
this.classA = this.tempClassA = -1;
this.classB = this.tempClassB = -1;
}
},
hookClick(item, event) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
if (item && typeof item.click == 'function') {
item.click(item.operate);
}
},
selectedClassA(item, index) {
const order = this.order || 0;
if (this.mode !== TrainingMode.TEACH) { //
this.popupMenuA(item, index);
} else if (this.steps[order] && this.steps[order].type == 'bar') { //
this.popupMenuA(item, index);
}
},
//
popupMenuA(item, index) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
this.clickEvent();
const operate = {
type: 'bar',
operation: item.operate.operation
};
this.tempClassA = index;
this.tempClassB = -1;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
popupMenuB(item, index) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
const operate = {
type: 'bar',
operation: item.operate.operation
};
this.tempClassB = index;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
//
mapLocation(code) {
if (code) {
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: code });
this.closeMenu(true);
}
},
//
stationRemoteControl(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationControl.doShow(operate);
}
});
},
// 线
setDetainTrainAll(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.detainTrainContorl.doShow(operate);
}
});
},
// 线
cancelDetainTrainAll(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.detainTrainContorl.doShow(operate);
}
});
},
//
cancelUpDetainTrainAll(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.detainTrainContorlUpDown.doShow(operate);
}
});
},
//
cancelDownDetainTrainAll(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.detainTrainContorlUpDown.doShow(operate);
}
});
},
//
addPlanTrain(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainAdd.doShow(operate);
}
});
},
//
translatPlanTrain(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainTranstalet.doShow(operate);
}
});
},
//
delPlanTrain(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDelete.doShow(operate);
}
});
},
//
userManage(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.manageUser.doShow(operate);
}
});
},
//
about(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.helpAbout.doShow(operate);
}
});
},
//
refresh() {
this.closeMenu(true);
EventBus.$emit('refresh');
},
getLoginResult(operate) {
/** 密码校验*/
if (operate.operation == OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation) {
if (operate.success) {
/** 校验成功*/
this.$refs.stationControlConvert.doShow({ operation: OperationEvent.StationControl.forcedStationControl.mbar.operation });
}
}
},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
},
doClose() {
this.$nextTick(() => {
EventBus.$emit('closeMenu');
});
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
$width: 30px;
$height: 30px;
$menuPadding: 10px;
$menuItemHeight: 30px;
$menuItemWidth: 180px;
$menuItemPadding: 5px;
#menuBar {
z-index: 36;
position: absolute;
width: inherit;
height: $height;
line-height: $height;
}
.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: 4px;
}
.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;
max-height: 550px;
overflow-y: scroll;
&::-webkit-scrollbar {
width: 4px;
}
&::-webkit-scrollbar-thumb {
border-radius: 10px;
background: #c3c3c3;
}
&::-webkit-scrollbar-track {
border-radius: 0;
background: #f0f0f0;
}
}
.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: inline-block;
border-right: 1px inset #CACACA;
width: $width;
}
.menu-li-text .label {
display: inline-block;
}
.menu-separator {
text-align: left;
background: #F0F0F0;
height: 2px;
line-height: 2px;
}
.menu-separator .status {
display: inline-block;
border-right: 1px inset #CACACA;
width: $width;
height: 100%;
background: #EFECDE;
}
.menu-separator .separator {
display: inline-block;
background: #CACACA;
margin-left: 5px;
height: 2px;
width: $menuItemWidth - $width - 30px;
}
.menu-li-block:hover {
background: #C9DEF7;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
</style>

View File

@ -1,6 +1,6 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
<!-- <menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />-->
<menu-button ref="menuButton" />
<menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" />
@ -24,7 +24,7 @@ import MenuSwitch from './menuSwitch';
import MenuSection from './menuSection';
import MenuTrain from './menuTrain';
import MenuStation from './menuStation';
import MenuBar from './menuBar';
// import MenuBar from './menuBar';
import MenuLimit from './menuLimit';
import PassiveAlarm from './passiveDialog/alarm';
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
@ -33,7 +33,7 @@ import PassiveTimeout from './passiveDialog/timeout';
export default {
name: 'Menus',
components: {
MenuBar,
// MenuBar,
MenuButton,
MenuSignal,
MenuSwitch,
@ -72,31 +72,30 @@ export default {
this.$store.dispatch('config/updateMenuBar');
this.$refs['menuSignal'].setRouteSignal();
});
this.$root.$on('dialogOpen', e => {
if (this.selected == e &&
this.$root.$on('dialogOpen', e => {
if (this.selected == e &&
this.selected &&
this.selected.instance &&
this.selected.instance.mouseEvent) {
this.selected.instance.mouseEvent.mouseover();
}
})
this.selected.instance.mouseEvent.mouseover();
}
});
this.$root.$on('dialogClose', e => {
if (this.selected == e &&
this.$root.$on('dialogClose', e => {
if (this.selected == e &&
this.selected &&
this.selected.instance &&
this.selected.instance.mouseEvent) {
this.selected.instance.__down = false;
this.selected.instance.mouseEvent.mouseout();
this.$jlmap.clearEvent();
}
})
this.selected.instance.__down = false;
this.selected.instance.mouseEvent.mouseout();
this.$jlmap.clearEvent();
}
});
},
beforeDestroy() {
this.$root.$off('dialogOpen');
this.$root.$off('dialogClose');
}
beforeDestroy() {
this.$root.$off('dialogOpen');
this.$root.$off('dialogClose');
}
};
</script>

View File

@ -0,0 +1,372 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-bar ref="menuBar" :selected="selected" />
<menu-button ref="menuButton" />
<menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" />
<menu-section ref="menuSection" :selected="selected" />
<menu-train ref="menuTrain" :selected="selected" />
<menu-station ref="menuStation" :selected="selected" />
<menu-limit ref="menuLimit" :selected="selected" />
<passive-alarm ref="passiveAlarm" />
<passive-contorl ref="passiveControl" pop-class="beijing-01__systerm" />
<passive-timeout ref="passiveTimeout" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import MenuSignal from './menuSignal';
import MenuButton from './menuButton';
import MenuStationStand from './menuStationStand';
import MenuSwitch from './menuSwitch';
import MenuSection from './menuSection';
import MenuTrain from './menuTrain';
import MenuStation from './menuStation';
import MenuBar from './localWorkMenuBar';
import MenuLimit from './menuLimit';
import PassiveAlarm from './passiveDialog/alarm';
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
import PassiveTimeout from './passiveDialog/timeout';
export default {
name: 'LocalWorkMenus',
components: {
MenuBar,
MenuButton,
MenuSignal,
MenuSwitch,
MenuSection,
MenuStationStand,
MenuStation,
MenuTrain,
MenuLimit,
PassiveAlarm,
PassiveContorl,
PassiveTimeout
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
computed: {
...mapGetters('config', [
'width'
])
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
this.$refs['menuSignal'].setRouteSignal();
});
this.$root.$on('dialogOpen', e => {
if (this.selected == e &&
this.selected &&
this.selected.instance &&
this.selected.instance.mouseEvent) {
this.selected.instance.mouseEvent.mouseover();
}
});
this.$root.$on('dialogClose', e => {
if (this.selected == e &&
this.selected &&
this.selected.instance &&
this.selected.instance.mouseEvent) {
this.selected.instance.__down = false;
this.selected.instance.mouseEvent.mouseout();
this.$jlmap.clearEvent();
}
});
},
beforeDestroy() {
this.$root.$off('dialogOpen');
this.$root.$off('dialogClose');
}
};
</script>
<style>
.menus .pop-menu {
background: #F0F0F0;
}
.menus .pop-menu span {
color: #000;
}
.menus .pop-menu .is-disabled span {
color: #B4B3B8;
}
.beijing-01__systerm {
overflow: hidden !important;
}
.beijing-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;
}
.beijing-01__systerm .el-dialog .el-dialog__header {
padding: 10px;
height: 26px;
}
.beijing-01__systerm .el-dialog .el-dialog__footer {
background: #F0F0F0;
opacity: 1;
}
.beijing-01__systerm .el-dialog .el-dialog__body {
padding: 10px;
margin: 5px;
border: 2px solid rgba(120, 121, 123, 0.5);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
background: #F0F0F0;
opacity: 1;
}
.beijing-01__systerm .el-dialog .el-dialog__title {
position: absolute;
top: 6px;
color: #000;
border-radius: 4px;
padding: 0px 2px;
height: 20px;
line-height: 20px
}
.beijing-01__systerm .el-dialog .el-dialog__title::before {
content: '';
position: absolute;
top: 0;
left: 0;
filter: blur(7px);
height: 20px;
width: -webkit-fill-available;
background: rgba(190, 190, 190, 0.8);
z-index: -1;
}
.beijing-01__systerm .el-dialog .el-dialog__headerbtn {
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid #fff;
border-radius: 4px;
top: 5px;
right: 5px;
line-height: 18px;
}
.beijing-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.beijing-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.beijing-01__systerm .el-dialog .el-button {
height: 32px;
line-height: 32px;
padding: 0px;
width: 80px;
border: 2px outset #E2E2E2;
border-radius: 0px !important;
color: #000;
background: #F0F0F0;
}
.beijing-01__systerm .el-dialog .expand {
width: 120px;
}
.beijing-01__systerm .el-dialog .el-button:focus span {
border: 1px dashed gray;
}
.beijing-01__systerm .el-dialog .el-button:active {
border: 2px inset #E2E2E2;
}
.beijing-01__systerm .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2;
}
.beijing-01__systerm .el-dialog .el-button:disabled span {
border: 0px;
}
.beijing-01__systerm .el-dialog .el-input {
border: 2px inset #E9E9E9;
}
.beijing-01__systerm .el-dialog .el-input .el-input__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.beijing-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.beijing-01__systerm .el-dialog .el-textarea {
border: 2px inset #E9E9E9;
border-radius: 0px;
}
.beijing-01__systerm .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.beijing-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.beijing-01__systerm .el-dialog .el-table--border th.gutter {
background: #EBEADB !important;
}
.beijing-01__systerm .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.beijing-01__systerm .el-dialog .el-table .cell {
line-height: unset !important;
}
.beijing-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;
}
.beijing-01__systerm .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.beijing-01__systerm .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
}
.beijing-01__systerm .el-dialog .current-row>td {
background: #3399FF !important;
color: #fff !important;
}
.beijing-01__systerm .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.beijing-01__systerm .el-dialog .el-checkbox__label {
color: #000 !important;
}
.beijing-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.beijing-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.beijing-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.beijing-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;
}
.beijing-01__systerm .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.beijing-01__systerm .el-dialog .el-radio__label {
color: #000 !important;
}
.beijing-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.beijing-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%;
}
.beijing-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.beijing-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -15px;
top: -18px;
}
.beijing-01__systerm .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
.beijing-01__systerm .el-dialog .context {
height: 100px;
border: 2px inset #E2E2E2;
overflow-y: scroll;
}
.beijing-01__systerm .el-dialog .table {
margin-top: 10px;
}
.beijing-01__systerm .el-dialog .notice {
margin-left: 62px;
line-height: 30px;
}
.beijing-01__systerm .el-dialog .button-group {
margin-top: 10px;
}
</style>

View File

@ -111,8 +111,6 @@ import ManageUser from './menuDialog/manageUser';
import HelpAbout from './menuDialog/helpAbout';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { EventBus } from '@/scripts/event-bus';
import { State2SimulationMap } from '@/scripts/cmdPlugin/Config';
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
export default {
name: 'MenuBar',
@ -664,14 +662,8 @@ export default {
this.classB = this.tempClassB;
}
},
'$store.state.training.operatemode': function (mode) {
this.initMenu();
},
'$store.state.training.started': function (val) {
'$store.state.trainingNew.trainingSwitch': function (val) {
this.closeMenu(true);
},
'$store.state.training.prdType': function () {
this.initMenu();
}
},
mounted() {
@ -701,9 +693,7 @@ export default {
});
return list;
},
initMenu(menu) {
const type = State2SimulationMap[this.$store.state.training.prdType];
// this.menu = MenuContextHandler.menuBarConvert(this.menuNormal[type], this.$store.state.training.operatemode);
initMenu() {
if (this.menu[3]) {
this.menu[3].children = this.initStationList();
}

View File

@ -193,7 +193,7 @@ export default {
return OperationEvent.Station;
},
isShowBtn() {
return this.$store.state.training.prdType == '09';
return this.$store.state.training.roles === 'DEPOT_DISPATCHER' || this.$store.state.training.roles === 'SIGNAL_BUILDING';
}
},
watch: {

View File

@ -61,54 +61,105 @@ export default {
label: '故障解锁',
handler: this.fault,
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK,
isDisabled: (section, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== section.stationCode;
} else {
return false;
}
},
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
},
{
label: this.$t('menu.menuSection.sectionResection'),
handler: this.split,
cmdType: CMD.Section.CMD_SECTION_CUT_OFF,
isDisabled: section => section.cutOff === 1,
isDisabled: (section, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== section.stationCode || section.cutOff === 1;
} else {
return section.cutOff === 1;
}
},
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
},
{
label: this.$t('menu.menuSection.sectionActive'),
handler: this.active,
cmdType: CMD.Section.CMD_SECTION_ACTIVE,
isDisabled: section => section.cutOff !== 1,
isDisabled: (section, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== section.stationCode || section.cutOff !== 1;
} else {
return section.cutOff !== 1;
}
},
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
},
{
label: '计轴预复位',
handler: this.axlePreReset,
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET,
isDisabled: (section, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== section.stationCode;
} else {
return false;
}
},
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
},
{
label: this.$t('menu.menuSection.sectionBlockade'),
handler: this.lock,
cmdType: CMD.Section.CMD_SECTION_BLOCK,
isDisabled: section => section.blockade === 1,
// isDisabled: section => section.blockade === 1,
isDisabled: (section, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== section.stationCode || section.blockade === 1;
} else {
return section.blockade === 1;
}
},
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
},
{
label: this.$t('menu.menuSection.sectionUnblock'),
handler: this.unlock,
cmdType: CMD.Section.CMD_SECTION_UNBLOCK,
isDisabled: section => section.blockade !== 1,
isDisabled: (section, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== section.stationCode || section.blockade !== 1;
} else {
return section.blockade !== 1;
}
},
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
},
{
label: '设置限速',
handler: this.setSpeed,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED,
isDisabled: section => section.speedUpLimit !== -1,
isDisabled: (section, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== section.stationCode || section.speedUpLimit !== -1;
} else {
return section.speedUpLimit !== -1;
}
},
isShow: (section, work) => section.type === '02'
},
{
label: '取消限速',
handler: this.cancelSpeed,
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED,
isDisabled: section => section.speedUpLimit === -1,
isDisabled: (section, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== section.stationCode || section.speedUpLimit === -1;
} else {
return section.speedUpLimit === -1;
}
},
isShow: (section, work) => section.type === '02'
}
],
@ -173,7 +224,7 @@ export default {
initMenu() {
this.menu = [];
this.menuNormal.forEach(menuItem => {
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected) : false;
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
this.menu.push(menuItem);
});

View File

@ -64,39 +64,80 @@ export default {
{
label: this.$t('menu.menuSignal.routeSelect'),
handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
isDisabled: (signal, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== signal.stationCode;
} else {
return false;
}
}
},
{
label: this.$t('menu.menuSignal.routeCancel'),
handler: this.cancelTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE,
isDisabled: (signal, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== signal.stationCode;
} else {
return false;
}
}
},
{
label: this.$t('menu.menuSignal.signalBlock'),
handler: this.lock,
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK,
isDisabled: signal => signal.blockade === 1
isDisabled: (signal, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.blockade === 1;
} else {
return signal.blockade === 1;
}
}
},
{
label: this.$t('menu.menuSignal.signalDeblock'),
handler: this.unlock,
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK,
isDisabled: signal => signal.blockade !== 1
isDisabled: (signal, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.blockade !== 1;
} else {
return signal.blockade !== 1;
}
}
},
{
label: this.$t('menu.menuSignal.signalReopen'),
handler: this.reopenSignal,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL,
isDisabled: (signal, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== signal.stationCode;
} else {
return false;
}
}
},
{
label: this.$t('menu.menuSignal.signalOff'),
handler: this.signalClose,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL,
isDisabled: (signal, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== signal.stationCode;
} else {
return false;
}
}
},
{
label: '进路引导',
handler: this.guide,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
isDisabled: (signal, work) => this.$store.state.training.roleDeviceCode !== signal.stationCode,
isShow: (signal, work) => work === 'localWork'
},
{
@ -109,28 +150,28 @@ export default {
label: this.$t('menu.menuSignal.setInterlockAutoRoute'),
handler: this.setAutoInterlock,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO,
isDisabled: signal => signal.fleetMode === 1,
isDisabled: (signal, work) => this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.fleetMode === 1,
isShow: (signal, work) => work === 'localWork'
},
{
label: this.$t('menu.menuSignal.cancelInterlockAutoRoute'),
handler: this.cancelAutoInterlock,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO,
isDisabled: signal => signal.fleetMode === 0,
isDisabled: (signal, work) => this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.fleetMode === 0,
isShow: (signal, work) => work === 'localWork'
},
{
label: this.$t('menu.menuSignal.setInterlockAutoTrigger'),
handler: this.setAutoTrigger,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER,
isDisabled: signal => signal.ciControl === 1,
isDisabled: (signal, work) => this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.ciControl === 1,
isShow: (signal, work) => work === 'localWork'
},
{
label: this.$t('menu.menuSignal.cancelInterlockAutoTrigger'),
handler: this.cancelAutoTrigger,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER,
isDisabled: signal => signal.ciControl !== 1,
isDisabled: (signal, work) => this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.ciControl !== 1,
isShow: (signal, work) => work === 'localWork'
},
{
@ -148,6 +189,13 @@ export default {
{
label: '查询进路控制模式',
handler: this.detail,
isDisabled: (signal, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== signal.stationCode;
} else {
return false;
}
},
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
}
],
@ -261,7 +309,7 @@ export default {
initMenu() {
this.menu = [];
this.menuNormal.forEach(menuItem => {
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected) : false;
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
this.menu.push(menuItem);
});

View File

@ -53,12 +53,28 @@ export default {
label: this.$t('menu.menuStation.fullSiteSetInterlockAutoTrigger'),
handler: this.setAutoTrigger,
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER,
isDisabled: (station, work) => {
if (this.$store.state.training.roleDeviceCode === station.code) {
return false;
} else {
const myStation = this.$store.getters['map/getDeviceByCode'](this.$store.state.training.roleDeviceCode);
return !(myStation && myStation.centralized && myStation.chargeStationCodeList.includes(station.code));
}
},
isShow: (station, work) => work === 'localWork'
},
{
label: this.$t('menu.menuStation.fullSiteCancelInterlockAutoTrigger'),
handler: this.cancelAutoTrigger,
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER,
isDisabled: (station, work) => {
if (this.$store.state.training.roleDeviceCode === station.code) {
return false;
} else {
const myStation = this.$store.getters['map/getDeviceByCode'](this.$store.state.training.roleDeviceCode);
return !(myStation && myStation.centralized && myStation.chargeStationCodeList.includes(station.code));
}
},
isShow: (station, work) => work === 'localWork'
},
{
@ -80,37 +96,6 @@ export default {
isShow: (station, work) => work === 'dispatchWork'
}
],
menuNormal1: {
Local: [
{
label: this.$t('menu.menuStation.fullSiteSetInterlockAutoTrigger'),
handler: this.setAutoTrigger,
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER
},
{
label: this.$t('menu.menuStation.fullSiteCancelInterlockAutoTrigger'),
handler: this.cancelAutoTrigger,
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER
}
],
Center: [
{
label: '全站进路交人工控',
handler: this.humanControlALL,
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING
},
{
label: '全站进路ATS自排',
handler: this.atsAutoControlALL,
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
},
{
label: this.$t('menu.menuStation.execKeyOperationTest'),
handler: this.execKeyOperationTest,
cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST
}
]
},
menuForce: [
{
label: this.$t('menu.menuStation.setStoppage'),
@ -157,8 +142,8 @@ export default {
initMenu() {
this.menu = [];
this.menuNormal.forEach(menuItem => {
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected) : false;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false;
this.menu.push(menuItem);
});

View File

@ -66,64 +66,83 @@ export default {
handler: this.setDetainTrain,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
isDisabled: stand => stand.centerHoldTrain === 1,
isShow: (station, work) => work === 'dispatchWork'
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: this.$t('menu.menuStationStand.cancelDetainTrain'),
handler: this.cancelDetainTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
isDisabled: stand => stand.centerHoldTrain !== 1,
isShow: (station, work) => work === 'dispatchWork'
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: this.$t('menu.menuStationStand.setDetainTrain'),
handler: this.setDetainTrain,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
isDisabled: stand => stand.stationHoldTrain === 1,
isShow: (station, work) => work === 'localWork'
isDisabled: (stand, work) => this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || stand.stationHoldTrain === 1,
isShow: (stand, work) => work === 'localWork'
},
{
label: this.$t('menu.menuStationStand.cancelDetainTrain'),
handler: this.cancelDetainTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
isDisabled: stand => stand.stationHoldTrain !== 1,
isShow: (station, work) => work === 'localWork'
isDisabled: (stand, work) => this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || stand.stationHoldTrain !== 1,
isShow: (stand, work) => work === 'localWork'
},
{
label: this.$t('menu.menuStationStand.cancelDetainTrainForce'),
handler: this.cancelDetainTrainForce,
cmdType:CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
cmdType:CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN,
isDisabled: (stand, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode;
} else {
return false;
}
}
},
{
label: this.$t('menu.menuStationStand.jumpStop'),
handler: this.setJumpStop,
cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP,
isDisabled: stand => stand.allSkip === 1
isDisabled: (stand, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || stand.allSkip === 1;
} else {
return false;
}
}
},
{
label: this.$t('menu.menuStationStand.cancelJumpStop'),
handler: this.cancelJumpStop,
cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP,
isDisabled: stand => stand.allSkip !== 1 && stand.assignSkip !== 1
isDisabled: (stand, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || (stand.allSkip !== 1 && stand.assignSkip !== 1);
} else {
return false;
}
}
},
{
label: this.$t('menu.menuStationStand.setStopTime'),
handler: this.setStopTime,
cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME,
isShow: (station, work) => work === 'dispatchWork'
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: this.$t('menu.menuStationStand.setRunLevel'),
handler: this.setRunLevel,
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME,
isShow: (station, work) => work === 'dispatchWork'
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: this.$t('menu.menuStationStand.setEarlyDeparture'),
handler: this.earlyDeparture,
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART,
isDisabled: stand => stand.trainParking !== 1,
isShow: (station, work) => work === 'dispatchWork'
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: this.$t('menu.menuStationStand.setBackStrategy'),
@ -134,7 +153,14 @@ export default {
{
label: this.$t('menu.menuStationStand.getStationStandStatus'),
handler: this.detail,
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS,
isDisabled: (stand, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode;
} else {
return false;
}
}
}
],
menuForce: [
@ -189,7 +215,7 @@ export default {
//
this.menu = [];
this.menuNormal.forEach(menuItem => {
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected) : false;
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
this.menu.push(menuItem);
});

View File

@ -57,60 +57,133 @@ export default {
label: '道岔单锁',
handler: this.lock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK,
isDisabled: switchDevice => switchDevice.singleLock === 1
isDisabled: (switchDevice, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.singleLock === 1;
} else {
return false;
}
}
},
{
label: '道岔单解',
handler: this.unlock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK,
isDisabled: switchDevice => switchDevice.singleLock !== 1
isDisabled: (switchDevice, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.singleLock !== 1;
} else {
return false;
}
}
},
{
label: '道岔封锁',
handler: this.block,
cmdType: CMD.Switch.CMD_SWITCH_BLOCK,
isDisabled: switchDevice => switchDevice.blockade === 1
isDisabled: (switchDevice, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.blockade === 1;
} else {
return false;
}
}
},
{
label: '道岔解封',
handler: this.unblock,
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK,
isDisabled: switchDevice => switchDevice.blockade !== 1
isDisabled: (switchDevice, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.blockade !== 1;
} else {
return false;
}
}
},
{
label: '道岔转动',
handler: this.switchTurnout,
cmdType: CMD.Switch.CMD_SWITCH_TURN
cmdType: CMD.Switch.CMD_SWITCH_TURN,
isDisabled: (switchDevice, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode;
} else {
return false;
}
}
},
{
label: '故障解锁',
handler: this.fault,
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK,
isDisabled: (switchDevice, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode;
} else {
return false;
}
}
},
{
label: '计轴预复位',
handler: this.axlePreReset,
cmdType: CMD.Switch.CMD_SWITCH_AXLE_PRE_RESET
cmdType: CMD.Switch.CMD_SWITCH_AXLE_PRE_RESET,
isDisabled: (switchDevice, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode;
} else {
return false;
}
}
},
{
label: this.$t('menu.menuSwitch.sectionResection'),
handler: this.split,
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF,
isDisabled: (switchDevice, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode;
} else {
return false;
}
}
},
{
label: this.$t('menu.menuSwitch.sectionActive'),
handler: this.active,
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE,
isDisabled: (switchDevice, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode;
} else {
return false;
}
}
},
{
label: '设置限速',
handler: this.setSpeed,
cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED,
isDisabled: (switchDevice, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode;
} else {
return false;
}
}
},
{
label: '取消限速',
handler: this.cancelSpeed,
cmdType: CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
cmdType: CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED,
isDisabled: (switchDevice, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode;
} else {
return false;
}
}
}
],
menuForce: [
@ -154,7 +227,7 @@ export default {
//
this.menu = [];
this.menuNormal.forEach(menuItem => {
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected) : false;
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
this.menu.push(menuItem);
});

View File

@ -377,3 +377,7 @@ export const UserOperationType = {
CHOOSEVALUE: '选择',
FILLVALUE: '填写'
};
export const SimulationUserType = {
TEACHER: 'TEACHER',
STUDENT: 'STUDENT'
};

View File

@ -62,6 +62,7 @@ class Handler {
this.clear();
resolve({ valid, response });
}).catch(error => {
this.clear();
reject(error);
});
}

View File

@ -62,7 +62,6 @@ const socket = {
userOutRoom: {}, // 用户退出房间消息
userInSimulation: {}, // 用户进入仿真消息
userBackRoom: {}, // 用户从仿真返回房间消息
simulationInvite: {}, // 用户扫码信息
roomIsSubscribe:false, // 房间是否订阅
assistantIsSubscribe:false, // 综合演练仿真聊天是否订阅
@ -163,9 +162,6 @@ const socket = {
state.msgHead = state.msgQueue[0];
}
},
setSimulationInvite: (state, simulationInvite) => {
state.simulationInvite = simulationInvite;
},
setRoomSubscribe:(state, roomIsSubscribe)=>{
state.roomIsSubscribe = roomIsSubscribe;
},
@ -424,10 +420,6 @@ const socket = {
setSimulationReset: ({ commit }) => {
commit('setSimulationReset', 0);
},
setSimulationInvite: ({ commit }, data) => {
commit('setSimulationInvite', data || {});
},
setMessage: ({ state }, data) => {
if (!state.message[data.key]) {
state.message[data.key] = [];

View File

@ -3,6 +3,7 @@ import { TrainingMode } from '@/scripts/ConstDic';
import deviceType from '../../jmapNew/constant/deviceType';
import LangStorage from '@/utils/lang';
import { deepAssign } from '@/utils/index';
import store from '@/store/index';
/**
* 实训状态数据
@ -47,7 +48,9 @@ const training = {
trainingStart: false, // 实训开始状态
notifySelected: null, // 场景弹窗内容
runPathList:[], // 运行线 (宁波三号线)
domConfig: {} // 线路功能前端配置项
domConfig: {}, // 线路功能前端配置项
simulationUserType: '', // 仿真用户角色
simulationCreator: false
},
getters: {
@ -211,6 +214,14 @@ const training = {
}
},
setSimulationUserList: (state, simulationUserList) => {
state.simulationUserType = '';
state.simulationCreator = false;
simulationUserList.forEach(item => {
if (item.userId == store.state.user.id ) {
state.simulationUserType = item.userType;
state.simulationCreator = item.creator;
}
});
state.simulationUserList = simulationUserList;
},
updateMemberTrust:(state, {deviceCode, trust}) => {
@ -244,7 +255,7 @@ const training = {
user.online = item.online;
user.memberId = item.memberId;
user.role = item.role;
user.type = item.type;
user.memberType = item.memberType;
user.deviceCode = item.deviceCode;
memberIndex = index;
}

View File

@ -14,7 +14,8 @@ const training = {
scoringRules: [], // 当前实训评分规则
operateOrder: 0, // 操作order
operateErrMsg: '',
scoreList: [] // 实训得分
scoreList: [], // 实训得分
draftStepList: null // 显示的步骤列表
},
getters: {
teachMode: (state) => {
@ -85,6 +86,9 @@ const training = {
},
pushScoreList: (state, scoring) => {
state.scoreList.push(scoring);
},
editDraftStepList: (state, draftStepList) => {
state.draftStepList = draftStepList;
}
},
actions: {
@ -145,6 +149,9 @@ const training = {
},
pushScoreList: ({ commit }, scoring) => {
commit('pushScoreList', scoring);
},
editDraftStepList: ({ commit }, draftStepList) => {
commit('editDraftStepList', draftStepList);
}
}
};

View File

@ -62,6 +62,9 @@ export function getTopic(type, group, param) {
case 'YJDDZH':
topic = `/topic/yjddzh/trainPosition`;
break;
case 'RUNFACT':
topic = `/user/queue/simulation/${group}/runFact`;
break;
}
return topic;

View File

@ -73,9 +73,6 @@ function handle(data) {
case 'Simulation_ApplyHandle': // 请求处理消息(旧版可能在用,新版地图不用这个)
store.dispatch('socket/handlePushMsgQueue', msg);
break;
case 'Simulation_Invite': // 综合演练-仿真邀请消息
store.dispatch('socket/setSimulationInvite', msg);
break;
case 'Be_Logged_Out': // 重复登录被登出
store.dispatch('socket/setLoggedOutMsg', msg);
break;

View File

@ -1,70 +0,0 @@
<template>
<el-dialog
v-dialogDrag
:title="$t('global.synthesisTrainingTitle')"
:visible.sync="dialogShow"
width="600px"
class="inviteRoom"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="inviteJoinRoom">{{ roomName }}{{ $t('global.inviteJoinRoom') }}</div>
<span slot="footer" class="dialog-footer">
<el-button v-loading="loading" type="primary" @click="handleJoin">{{ $t('global.confirm') }}</el-button>
<el-button @click="dialogShow = false">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { launchFullscreen } from '@/utils/screen';
// 仿
export default {
name: 'DeomonList',
data() {
return {
dialogShow: false,
group: '',
roomName: '',
mapId: '',
lineCode: '',
loading: false
};
},
methods: {
doShow(data) {
this.roomName = data.creator.nickname;
this.group = data.group;
this.mapId = data.mapId || data.map.id;
this.lineCode = (data.map || {}).lineCode;
this.dialogShow = true;
this.loading = false;
},
doClose() {
this.dialogShow = false;
},
async handleJoin() {
try {
this.loading = true;
launchFullscreen();
const query = { lineCode: this.lineCode, mapId: this.mapId, group: this.group};
this.$router.push({path: `/display/joint`, query: query});
this.dialogShow = false;
} catch (e) {
this.$messageBox(this.$t('tip.enterTrainingRoomFailed'));
console.error(e);
} finally {
this.loading = false;
this.dialogShow = false;
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.inviteRoom .inviteJoinRoom{height: 80px;line-height: 80px;font-size: 16px;padding-left: 10px;}
.inviteRoom .el-dialog__body {padding: 0px 30px;}
</style>

View File

@ -18,7 +18,7 @@ import { getSessionStorage } from '@/utils/auth';
import { mapGetters } from 'vuex';
import TerminalsPicture from './terminals/index';
import SimulationMenu from './simulationMenu/simulationMenu';
import { clearSimulation, getSimulationInfoNew} from '@/api/simulation';
import { getSimulationInfoNew, destroySimulationByAdmin, exitSimulation } from '@/api/simulation';
import { loadMapDataById, loadRunPlanData } from '@/utils/loaddata';
import { getByGroupStationList } from '@/api/jmap/map';
import { EventBus } from '@/scripts/event-bus';
@ -99,7 +99,11 @@ export default {
this.$store.dispatch('trainingNew/clearStepOverCount');
this.$store.dispatch('trainingNew/trainingEnd');
this.$store.dispatch('trainingNew/changeTeachMode', '');
clearSimulation(this.group);
if (this.$store.state.training.simulationCreator) {
destroySimulationByAdmin(this.group);
} else {
exitSimulation(this.group);
}
},
methods:{
//
@ -141,9 +145,6 @@ export default {
this.$nextTick(() => {
EventBus.$emit('viewLoading', false);
});
},
// 仿退
async back() {
}
}
};

View File

@ -4,6 +4,7 @@
:title="title"
:visible.sync="dialogVisible"
width="500px"
append-to-body
:before-close="handleClose"
center
:close-on-click-modal="false"
@ -100,7 +101,7 @@ export default {
}
},
methods: {
initData(row) {
initData() {
this.filterStationList = [];
this.stationList.forEach(item => {
if (!item.depot) {
@ -108,8 +109,8 @@ export default {
}
});
},
doShow(row) {
this.initData(row);
doShow() {
this.initData();
this.dialogVisible = true;
},
doSave() {

View File

@ -16,8 +16,8 @@
@node-contextmenu="handleShowContextMenu"
>
<span slot-scope="{ node, data }">
<span v-if="node.data.online" style="color: green;">{{ data.nickName + (data.admin? '管理':'') + (data.referee? '裁判员':'') + (data.deviceVO? ` -- (${data.deviceVO.code})`:'') }}</span>
<span v-else style="color: #ccc;">{{ data.nickName + (data.admin? '【管理员】':'') + (data.referee? '【裁判员】':'') + (data.deviceVO? ` -- (${data.deviceVO.code})`:'') }}</span>
<span v-if="node.data.online" style="color: green;">{{ data.nickName + (data.userType === 'TEACHER'? '':'') + (data.referee? '裁判员':'') + (data.deviceVO? ` -- (${data.deviceVO.code})`:'') }}</span>
<span v-else style="color: #ccc;">{{ data.nickName + (data.userType === 'TEACHER'? '【教员】':'') + (data.referee? '【裁判员】':'') + (data.deviceVO? ` -- (${data.deviceVO.code})`:'') }}</span>
</span>
</el-tree>
</el-scrollbar>
@ -29,6 +29,7 @@
<script>
import { DeviceMenu } from '@/scripts/ConstDic';
import ContentMenu from './content-menu';
import { SimulationUserType } from '@/scripts/ConstDic';
export default {
components: {
@ -42,12 +43,6 @@ export default {
members: {
type: Array,
required: true
},
isAdmin: {
type: Boolean,
default() {
return false;
}
}
},
data() {
@ -97,7 +92,7 @@ export default {
x: e.clientX,
y: e.clientY
};
if (this.isAdmin) {
if (this.$store.state.training.simulationUserType === SimulationUserType.TEACHER) {
this.clickUserId = `${obj.userId || ''}`;
this.menuDisabled = !!obj.deviceVO;
this.$store.dispatch('menuOperation/setPopMenu', { position, menu: DeviceMenu.JointRoom });

View File

@ -43,13 +43,13 @@
class="room__container--members"
:room="room"
:members="simulationUserList"
:is-admin="isAdmin"
style="height: 100%"
@message="messageInfo"
/>
</div>
<div class="room__footer" />
</div>
<add-member ref="addMember" :station-list="stationList" />
</el-drawer>
</template>
@ -57,18 +57,12 @@
import eMembers from './e-members';
import { EventBus } from '@/scripts/event-bus';
import { assignUsersPlayRoles } from '@/api/jointSimulation';
import AddMember from './addMember';
export default {
name: 'MembersManage',
components: {
eMembers
},
props: {
isAdmin: {
type: Boolean,
default() {
return false;
}
}
eMembers,
AddMember
},
data() {
return {
@ -166,7 +160,6 @@ export default {
return this.$store.state.user.nickname;
},
roles() {
console.log(this.$store.state.training.userRole, '-----------------');
return this.$store.state.training.roles;
}
},
@ -404,7 +397,7 @@ export default {
});
},
addMember() {
this.$emit('addSimulationMember');
this.$refs.addMember.doShow();
},
filterNode(value, data) {
let flag = false;
@ -427,6 +420,8 @@ export default {
this.$store.dispatch('training/setUserRole', userRole);
this.$store.dispatch('training/setRoles', userRole);
this.$store.dispatch('training/updateMemberAndUser', { simulationUserList: [item], userId: this.userId });
} else {
this.$store.dispatch('training/updateMemberAndUser', { simulationUserList: [item], userId: this.userId });
}
});
}

View File

@ -5,9 +5,18 @@
<span style="margin-left: 10px;font-size: 14px;">{{ dateString }}</span>
</div>
<div style="display: flex;">
<el-button class="controlButton" type="info" style="background: #000;" :loading="pauseLoading" circle :class="simulationPaused?'el-icon-video-play':'el-icon-video-pause'" @click="startOrPause" />
<el-button
class="controlButton"
type="info"
style="background: #000;"
:disabled="isDisabled"
:loading="pauseLoading"
circle
:class="simulationPaused?'el-icon-video-play':'el-icon-video-pause'"
@click="startOrPause"
/>
<div>
<div class="simulationMenu" @click="showMenuSpeedList">{{ `x${speed}` }}</div>
<div class="simulationMenu" :style="{cursor: isDisabled ? 'not-allowed':'pointer'}" @click="showMenuSpeedList">{{ `x${speed}` }}</div>
<div v-show="isShowSpeedMenuList" class="simulationMenuList" style="right: 85px;">
<div v-for="(each, index) in speedList" :key="index">
<div class="eachSimulationMenu" :class="{'active' :speed === each.value}" @click="speedChange(each.value)">{{ each.label }}</div>
@ -15,7 +24,7 @@
</div>
</div>
<div>
<div class="simulationMenu" style="width: 70px;" :style="{background: nowMode === '正常操作' ? '#0fb20b' :'#efc007'}" @click="changeOperateMode">{{ nowMode }}</div>
<div class="simulationMenu" style="width: 70px;" :style="{background: nowMode === '正常操作' ? '#0fb20b' :'#efc007',cursor: isDisabled ? 'not-allowed':'pointer'}" @click="changeOperateMode">{{ nowMode }}</div>
</div>
</div>
</div>
@ -25,6 +34,7 @@ import { simulationPause, simulationStart, timesSpeedPlayback } from '@/api/rtSi
import { OperateMode } from '@/scripts/ConstDic';
import { getSessionStorage } from '@/utils/auth';
import { timestampFormat } from '@/utils/date';
import { SimulationUserType } from '@/scripts/ConstDic';
export default {
name:'SimulationControl',
data() {
@ -76,6 +86,9 @@ export default {
} else {
return '正常操作';
}
},
isDisabled() {
return this.$store.state.training.simulationUserType !== SimulationUserType.TEACHER;
}
},
watch: {
@ -96,21 +109,25 @@ export default {
this.dateString = timestampFormat('YYYYMMDD', date);
},
changeOperateMode() {
let val = '';
if (this.nowMode === '正常操作') {
val = OperateMode.FAULT;
} else {
val = OperateMode.NORMAL;
if (this.$store.state.training.simulationUserType === SimulationUserType.TEACHER) {
let val = '';
if (this.nowMode === '正常操作') {
val = OperateMode.FAULT;
} else {
val = OperateMode.NORMAL;
}
this.$store.dispatch('training/changeOperateMode', { mode: val });
}
this.$store.dispatch('training/changeOperateMode', { mode: val });
},
showMenuModeList() {
event.stopPropagation();
this.isShowModeMenuList = !this.isShowModeMenuList;
},
showMenuSpeedList(event) {
event.stopPropagation();
this.isShowSpeedMenuList = !this.isShowSpeedMenuList;
if (this.$store.state.training.simulationUserType === SimulationUserType.TEACHER) {
event.stopPropagation();
this.isShowSpeedMenuList = !this.isShowSpeedMenuList;
}
},
startOrPause() {
this.pauseLoading = true;

File diff suppressed because it is too large Load Diff

View File

@ -16,13 +16,10 @@
<select-exam ref="selectExam" @examStart="examStart" />
<exam-panel ref="examPanel" />
<device-manage ref="deviceManage" />
<diagram-load ref="diagramLoad" :group="group" />
<diagram-preview ref="diagramPreview" />
<qr-code ref="qrCode" />
</div>
</template>
<script>
import { clearSimulation, ranAsPlan } from '@/api/simulation';
import { getSimulationQrcode } from '@/api/jointSimulation';
import { initSimulation } from '@/api/rtSimulation';
import ContectUs from './contectUs';
@ -35,8 +32,8 @@ import ExamPanel from '../exam/examPanel';
import getErrorTip from '@/scripts/errorTip';
import DeviceManage from './deviceManage';
import QrCode from '@/components/QrCode';
import DiagramLoad from './diagramLoad';
import DiagramPreview from './diagramPreview';
import { SimulationUserType } from '@/scripts/ConstDic';
import { destroySimulationByAdmin, ranAsPlan} from '@/api/simulation';
export default {
name: 'SimulationMenu',
@ -49,9 +46,7 @@ export default {
Jl3dDevice,
MemberManage,
DeviceManage,
QrCode,
DiagramPreview,
DiagramLoad
QrCode
},
data() {
return {
@ -62,16 +57,14 @@ export default {
deviceShow: true,
allMenuList: [
{ label: '设备视图', name: 'jlmap3dmodel', click: this.jlmap3dmodel, isDisabled: () => { return false; }, isShow: () => { return true; } },
{ label: '设备管理', name: 'deviceManage', click: this.deviceManage, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasDeviceManage; } },
{ label: '设备管理', name: 'deviceManage', click: this.deviceManage, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasDeviceManage && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
{ label: '联系方式', name: 'contectUs', click: this.contectUs, isDisabled: () => { return false; }, isShow: () => { return true; } },
{ label: '生成二维码', name: 'generateQrCode', click: this.generateQrCode, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.isJoint; } },
{ label: '切换客流数据', name: 'changeFlowData', click: this.changeFlowData, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasLpf; } },
{ label: '运行图加载', name: 'diagramLoad', click: this.diagramLoad, isDisabled: () => { return false; }, isShow: ()=>{ return this.$route.query.simType === 'METRO'; } },
{ label: '运行图预览', name: 'diagramPreview', click: this.diagramPreview, isDisabled: () => { return false; }, isShow: ()=>{ return this.$route.query.simType === 'METRO'; } },
{ label: '成员管理', name: 'memberManage', click: this.memberManage, isDisabled: () => { return false; }, isShow: () => { return !this.$store.state.training.domConfig.hasMemberManage; } },
{ label: '考试', name: 'exam', click: this.goExam, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasExam; } },
{ label: '按计划行车', name: 'drivingPlan', click: this.drivingPlan, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; }, isShow: () => { return true; } },
{ label: '初始化', name: 'initialize', click: this.initializeSim, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; }, isShow: () => { return true; } },
{ label: '生成二维码', name: 'generateQrCode', click: this.generateQrCode, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.isJoint && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
{ label: '切换客流数据', name: 'changeFlowData', click: this.changeFlowData, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasLpf && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
{ label: '成员管理', name: 'memberManage', click: this.memberManage, isDisabled: () => { return false; }, isShow: () => { return !this.$store.state.training.domConfig.hasMemberManage && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
{ label: '考试', name: 'exam', click: this.goExam, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasExam && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
{ label: '按计划行车', name: 'drivingPlan', click: this.drivingPlan, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; }, isShow: () => { return this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
{ label: '初始化', name: 'initialize', click: this.initializeSim, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; }, isShow: () => { return this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
{ label: '退出', name: 'quit', click: this.exitSim, isDisabled: () => { return false; }, isShow: () => { return true; } }
]
};
@ -90,25 +83,28 @@ export default {
return this.$route.query.mapId;
}
},
watch: {
'$store.state.training.simulationUserType': function (val) {
this.handleMenuShow();
},
'$store.state.socket.simulationOver':function(val) {
this.back();
},
'$store.state.socket.simulationRoleList':function(val) {
(val || []).forEach(item => {
if (item.body.messageType === 'KICK_OUT' && item.body.userId == this.$store.state.user.id) {
this.back();
}
});
}
},
mounted() {
window.addEventListener('click', this.close, false);
},
beforeDestroy() {
window.removeEventListener('click', this.close);
this.$store.dispatch('socket/clearTrainingOverCount');
this.$store.dispatch('trainingNew/clearStepOverCount');
this.$store.dispatch('trainingNew/trainingEnd');
this.$store.dispatch('trainingNew/changeTeachMode', '');
},
methods: {
diagramLoad() {
this.hideMenuList();
this.$refs.diagramLoad.doShow();
},
diagramPreview() {
this.hideMenuList();
this.$refs.diagramPreview.doShow();
},
generateQrCode() {
this.hideMenuList();
getSimulationQrcode(this.$route.query.group).then(resp => {
@ -178,17 +174,20 @@ export default {
cancelButtonText: '取 消',
type: 'warning'
}).then(() => {
if (this.projectDevice && this.$route.query.type === 'IM') {
clearSimulation(this.group).then(() => {
this.logout();
});
} else if (this.projectDevice) {
this.logout();
} else {
this.$router.go(-1);
}
this.back();
});
},
back() {
if (this.projectDevice && this.$store.state.training.simulationCreator) {
destroySimulationByAdmin(this.group).then(() => {
this.logout();
});
} else if (this.projectDevice) {
this.logout();
} else {
this.$router.go(-1);
}
},
initializeSim() {
initSimulation(this.group).then(() => {
this.$store.dispatch('training/setMapDefaultState').then(() => {
@ -218,10 +217,12 @@ export default {
this.$refs.contectUs.doShow();
},
goExam() {
this.hideMenuList();
this.$refs.selectExam.doShow();
},
//
memberManage() {
this.hideMenuList();
this.$refs.memberManage.doShow();
},
changeFlowData() {

View File

@ -31,7 +31,7 @@ export default {
}
},
watch: {
'$store.state.map.initJlmapLoadedCount': function (val) {
'$store.state.map.initJlmapLoadedCount': function () {
this.handleBigScreenData();
},
mapDevice() {

View File

@ -1,6 +1,6 @@
<template>
<div v-show="show" class="run-plan-dialog" :style="{width: width + 'px',height:height + 'px'}">
<plan-schedule ref="planSchedule" :group="group" @back="doClose" />
<div class="run-plan-dialog" :style="{width: width + 'px',height:height + 'px'}">
<plan-schedule ref="planSchedule" :group="group" />
</div>
</template>
@ -22,8 +22,7 @@ export default {
},
data() {
return {
menus: null,
show: false
menus: null
};
},
computed: {
@ -53,19 +52,18 @@ export default {
beforeDestroy() {
this.$store.dispatch('runPlan/setPlanData', []);
},
methods: {
doShow() {
this.show = true;
mounted() {
this.$nextTick(() => {
this.$refs.planSchedule.setPosition();
},
doClose() {
this.show = false;
}
this.$refs.planSchedule.loadChartPage();
});
},
methods: {
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
@import "src/styles/mixin";
.run-plan-dialog {
-webkit-user-select: none;

View File

@ -1,37 +1,23 @@
<template>
<el-dialog
v-dialogLoading="dialogLoading"
:title="title"
:width="maxWidth + 'px'"
top="0"
:style="{left:$store.state.app.width> 1920? '50%': '0'}"
:visible.sync="dialogShow"
:before-close="doClose"
:close-on-click-modal="false"
:modal="false"
>
<div id="PlanSchedule" :style="{top: top+'px', height: height+'px'}">
<div class="left">
<div :id="runPlanId" />
</div>
<div class="right">
<data-table
ref="serviceTable1"
:height="height/2"
:config="serviceNumberConfig"
:style="{top: top-height/2+'px'}"
@touch="scheduleTouch"
/>
<data-table
ref="tripTable1"
:height="height/2"
:config="tripNumberConfig"
:style="{top: top-height/2+'px'}"
@touch="trainNumTouch"
/>
</div>
<div id="PlanSchedule" :style="{height: height+'px'}">
<div class="left">
<div :id="runPlanId" />
</div>
</el-dialog>
<div class="right">
<data-table
ref="serviceTable1"
:height="height/2 - 20"
:config="serviceNumberConfig"
@touch="scheduleTouch"
/>
<data-table
ref="tripTable1"
:height="height/2 - 20"
:config="tripNumberConfig"
@touch="trainNumTouch"
/>
</div>
</div>
</template>
<script>
@ -41,7 +27,7 @@ import DataTable from '@/views/planSchedule/menusPlan/components/dataTable';
import echarts from 'echarts';
import {toTimeStamp, formatDuring} from '@/utils/date';
import { deepAssign } from '@/utils/index';
import { EventBus } from '@/scripts/event-bus';
import { clearSubscribe, getTopic} from '@/utils/stomp';
let myChart = null;
export default {
name: 'DiagramPreview',
@ -50,11 +36,9 @@ export default {
},
data() {
return {
top: 0,
height: 0,
inter:null,
runPlanId: 'run-plan-view',
// myChart: null,
PlanParser: {},
serviceNumberConfig: {
data: [],
@ -90,8 +74,6 @@ export default {
kmRangeMap: {},
absoluteTime: 2 * 3600,
indexKmRangeMap: {},
dialogLoading: false,
dialogShow: false,
seriesMap: {},
staticSeries: [],
runSeries: [],
@ -108,9 +90,6 @@ export default {
},
maxHeight() {
return this.$store.state.app.height > 1080 ? 1080 : this.$store.state.app.height;
},
title() {
return this.$t('display.runPlan.previewRunDiagram');
}
},
watch: {
@ -124,9 +103,7 @@ export default {
try {
await this.loadChartPage();
this.selectSeries = []; this.runSeries = []; this.runPlanData = {};
if (this.dialogShow) {
await this.loadInitData();
}
await this.loadInitData();
} catch (e) {
console.error(e);
} finally {
@ -135,9 +112,7 @@ export default {
},
'$store.state.socket.simulationReset': function (val) {
this.selectSeries = []; this.runSeries = []; this.runPlanData = {};
if (this.dialogShow) {
this.loadInitData();
}
this.loadInitData();
},
'$store.state.runPlan.planSizeCount': function () {
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
@ -148,36 +123,19 @@ export default {
}
}
},
mounted() {
async mounted() {
this.staticSeries = []; this.selectSeries = []; this.runSeries = []; this.runPlanData = {};
this.PlanParser = this.$theme.loadPlanParser(this.$route.query.lineCode);
// this.loadChartPage();
EventBus.$on('clearRunSeries', () => {
this.runSeries = [];
});
await this.setPosition();
await this.loadChartPage();
await this.loadInitData();
},
beforeDestroy() {
this.$store.dispatch('runPlan/setSelected', null);
clearSubscribe(getTopic('LPF', this.group));
this.destroy();
},
methods: {
doShow() {
try {
this.dialogLoading = true;
this.dialogShow = true;
this.setPosition();
this.loadInitData();
this.inter && clearInterval(this.inter);
} catch (e) {
console.error(e);
} finally {
this.dialogLoading = false;
}
},
async doClose() {
this.dialogShow = false;
this.inter && clearInterval(this.inter);
},
serviceNumberChange(row) {
if (row) {
this.$store.dispatch('runPlan/setSelected', { serviceNumber: row.serviceNumber, tripNumber: null });
@ -206,19 +164,12 @@ export default {
},
async setPosition() {
this.$nextTick(() => {
const top = 54;
const width = this.maxWidth * 0.85;
let height = this.maxHeight;
height = height - top;
const height = this.maxHeight;
this.$store.dispatch('runPlan/resize', { width, height });
if (this.top != top) {
this.top = top;
}
if (this.height != height) {
this.height = height - top;
this.height = height;
}
});
},
@ -455,7 +406,7 @@ export default {
this.destroy();
let startValue = 3600 + this.PlanParser.getTranslation();
const offsetTime = 3600;
const initTime = toTimeStamp(formatDuring(this.$store.state.training.initTime));
const initTime = toTimeStamp(formatDuring(this.$store.state.socket.simulationTimeSync));
startValue = initTime - this.PlanParser.getTranslation();
option.dataZoom[0].startValue = option.dataZoom[1].startValue = startValue - offsetTime;
option.dataZoom[0].endValue = option.dataZoom[1].endValue = startValue + offsetTime;
@ -613,7 +564,7 @@ export default {
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
@import "src/styles/mixin";
#PlanSchedule {
z-index: 5;

View File

@ -22,6 +22,8 @@
<emergency-dispatch-work v-else-if="picture === 'emergency'" ref="emergencyDispatchWork" />
<register-book v-else-if="picture === 'registerBook'" ref="registerBook" />
<train-ticket v-else-if="picture === 'trainTicket'" ref="trainTicket" />
<diagram-load v-else-if="picture === 'diagramLoad'" ref="diagramLoad" :group="group" />
<diagram-preview v-else-if="picture === 'diagramPreview'" ref="diagramPreview" />
<terminal-menu
v-if="menuShow"
ref="terminalMenu"
@ -59,6 +61,8 @@ import ScheduleWork from './schedulWork';
import EmergencyDispatchWork from './emergencyDispatchWork';
import RegisterBook from './registerBook';
import TrainTicket from './trainTicket/index';
import DiagramLoad from './diagramLoad';
import DiagramPreview from './diagramPreview';
export default {
name: 'Index',
@ -84,7 +88,9 @@ export default {
ScheduleWork,
EmergencyDispatchWork,
RegisterBook,
TrainTicket
TrainTicket,
DiagramLoad,
DiagramPreview
},
data() {
return {
@ -191,6 +197,9 @@ export default {
case 'YJDDZH':
creatSubscribe(getTopic(type, this.group), header, defaultCallback);
break;
case 'RUNFACT':
creatSubscribe(getTopic(type, this.group), header, defaultCallback);
break;
}
},
clearSubscribe() {
@ -198,6 +207,7 @@ export default {
clearSubscribe(getTopic('ATS_STATUS', this.group));
clearSubscribe(getTopic('STATE', this.group));
clearSubscribe(getTopic('CTC', this.group));
clearSubscribe(getTopic('LPF', this.group));
},
loadingChange() {
this.loading = true;
@ -215,6 +225,8 @@ export default {
this.$nextTick(() => { this.subscribe('LPF'); });
} else if (val === 'emergency') {
this.$nextTick(() => { this.subscribe('YJDDZH'); });
} else if (val === 'diagramPreview') {
this.$nextTick(() => { this.subscribe('RUNFACT'); });
}
this.$nextTick(() => { this.loading = false; });
},

View File

@ -85,6 +85,18 @@ export default {
}
],
'METRO': [
{
name: '运行图加载',
code: 'diagramLoad',
roleList: ['DISPATCHER'],
click: this.changePictureShow
},
{
name: '运行图预览',
code: 'diagramPreview',
roleList: ['DISPATCHER', 'STATION_SUPERVISOR', 'DRIVER'],
click: this.changePictureShow
},
{
name: '派班工作站',
code: 'scheduleWork',
@ -192,7 +204,7 @@ export default {
},
'$store.state.socket.simulationWorkParam': function (val) {
if (val) {
this.itemMap = val.itemMap;
this.itemMap = val.itemMap || {};
this.initTerminalList();
}
}

View File

@ -159,20 +159,12 @@ export default {
}
},
watch: {
'$store.state.training.memberList': function (val) {
'$store.state.training.roles': function(val) {
this.getRoleList();
},
'$store.state.training.memberList': function(val) {
if (val && val.length) {
const memberData = this.$store.state.training.memberData;
let activeTrainList = [];
if (this.$store.state.training.started) {
activeTrainList = this.$store.state.map.activeTrainList;
}
// 仿
const result = covertMemberData(activeTrainList, Object.values(memberData));
let list = [];
result.deviceListData.forEach(item => {
list = list.concat(item);
});
this.roleList = list;
this.getRoleList();
}
},
editData() {
@ -198,6 +190,20 @@ export default {
}
},
methods: {
getRoleList() {
const memberData = this.$store.state.training.memberData;
let activeTrainList = [];
if (this.$store.state.training.started) {
activeTrainList = this.$store.state.map.activeTrainList;
}
// 仿
const result = covertMemberData(activeTrainList, Object.values(memberData));
let list = [];
result.deviceListData.forEach(item => {
list = list.concat(item);
});
this.roleList = list;
},
updateDetails(data) {
this.editData = data;
this.getStepList(data);
@ -256,6 +262,7 @@ export default {
},
backDesignPane(data) {
this.showMode = 'designPane';
this.$store.dispatch('trainingNew/editDraftStepList', null);
},
handleDelete(index, row) {
console.log('删除', index, row);
@ -277,6 +284,15 @@ export default {
return;
}
this.$store.dispatch('trainingNew/setTrainingDetail', null);
const list = [];
this.tableData.forEach((item, ind) => {
const obj = {
...item,
isActive: ind === index
};
list.push(obj);
});
this.$store.dispatch('trainingNew/editDraftStepList', list);
const member = this.$store.state.training.memberData[row.memberId];
if (!member.userId) {
assignUsersPlayRoles([{ userId: this.$store.state.user.id, memberId: member.id}], this.$route.query.group).then(resp => {

View File

@ -75,6 +75,9 @@ export default {
}
}
},
beforeDestroy() {
this.$store.dispatch('trainingNew/editDraftStepList', null);
},
methods: {
initData(data) {
this.editMode = true;

View File

@ -143,7 +143,7 @@ export default {
if (this.demoMode === ScriptMode.TEST) {
const scoringRules = this.$store.state.trainingNew.scoringRules;
const scoringRule = scoringRules.find(rule => rule.memberId == this.$store.state.training.myMemberId);
this.$refs.testResult.doShow(scoreList, this.$store.state.trainingNew.stepList, scoringRule.details);
this.$refs.testResult.doShow(scoreList, this.$store.state.trainingNew.stepList, scoringRule ? scoringRule.details : []);
}
endTraining(this.group, scoreList).then((resp) => {
this.$store.dispatch('trainingNew/trainingEnd');

View File

@ -4,25 +4,12 @@
:visible.sync="dialogVisible"
width="30%"
append-to-body
show-summary
:before-close="handleClose"
>
<el-table :data="scoringRuleList" border style="width: 100%">
<el-table-column prop="elementId" label="步骤">
<template slot-scope="scope">
<span>
{{ handleStepInfo(scope.row.elementId) }}
</span>
</template>
</el-table-column>
<el-table-column prop="score" label="总分" width="100" />
<el-table-column label="得分" width="100">
<template slot-scope="scope">
<span>
{{ handleTotalScore(scope.row.elementId) }}
</span>
</template>
</el-table-column>
<el-table :data="tableData" border show-summary style="width: 100%">
<el-table-column prop="desc" label="步骤" />
<el-table-column prop="totalScore" label="总分" width="100" />
<el-table-column prop="score" label="得分" width="100" />
</el-table>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="dialogVisible = false"> </el-button>
@ -38,7 +25,8 @@ export default {
dialogVisible: false,
scoreList: [],
stepList: [],
scoringRuleList: []
scoringRuleList: [],
tableData: []
};
},
methods: {
@ -49,15 +37,21 @@ export default {
this.scoreList = scoreList;
this.stepList = stepList;
this.scoringRuleList = scoringRuleList;
this.tableData = [];
this.scoringRuleList.forEach(item => {
const desc = this.handleStepInfo(item.elementId);
const score = this.handleScore(item.elementId);
this.tableData.push({ desc: desc, score: score, totalScore: item.score });
});
this.dialogVisible = true;
},
handleStepInfo(stepId) {
const stepInfo = this.stepList.find(step => stepId == step.id);
return stepInfo ? stepInfo.description : '';
},
handleTotalScore(stepId) {
const rule = this.scoringRuleList.find(item => stepId == item.elementId);
return rule ? rule.score : '';
handleScore(stepId) {
const rule = this.scoreList.find(item => stepId == item.elementId);
return rule ? rule.score : 0;
}
}
};

View File

@ -238,7 +238,7 @@ export default {
if (this.demoMode === ScriptMode.TEST) {
const scoringRules = this.$store.state.trainingNew.scoringRules;
const scoringRule = scoringRules.find(rule => rule.memberId == this.$store.state.training.myMemberId);
this.$refs.testResult.doShow(scoreList, this.$store.state.trainingNew.stepList, scoringRule.details);
this.$refs.testResult.doShow(scoreList, this.$store.state.trainingNew.stepList, scoringRule ? scoringRule.details : []);
}
endTraining(this.group, scoreList).then((resp) => {
this.$store.dispatch('trainingNew/trainingEnd');

View File

@ -3,7 +3,7 @@
<div v-if="min" :id="sideButtonDom.domId" @click="clickBtn">
<el-button circle style="color: #0C161A;" icon="el-icon-mic" />
</div>
<div v-if="!min" class="chat-box-main">
<div v-show="!min" class="chat-box-main">
<div class="chat-box-header">
<div style="margin-right: 10px;cursor: pointer;">
<i class="el-icon-minus" style="color: #000;" @click="minimize" />
@ -48,13 +48,13 @@ import teleRing from '@/assets/teleRing.mp3';
import ChatSetting from './chatSetting';
import ChatContent from './chatContent';
import RecordRTC from 'recordrtc';
import {sendChatAudioBase64, overSimulationConversition, getAllConversition, acceptConversitionInvite} from '@/api/chat';
import {sendChatAudioBase64, overSimulationConversition, getAllConversition, acceptConversitionInvite, sendChatText} from '@/api/chat';
import { getSessionStorage } from '@/utils/auth';
import { getSimulationMemberList} from '@/api/simulation';
import { getUserListCommon } from '@/api/rtSimulation';
import { getSimulationMemberList, getAllSimulationUser } from '@/api/simulation';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import {UserOperationType} from '../../../../scripts/ConstDic';
import { timestampFormat } from '@/utils/date';
export default {
name: 'NewChatBox',
components:{
@ -133,16 +133,16 @@ export default {
connect() {
return (this.conversitionStateMap[this.myMemberId] || {connect:false}).connect;
},
privateMemberList() {
return (this.conversitionStateMap[this.myMemberId] || {privateMemberList: []}).privateMemberList;
},
privateMessageList() {
if (this.conversitionStateMap[this.myMemberId] && this.conversitionStateMap[this.myMemberId].connect) {
return (this.conversitionStateMap[this.myMemberId] || {privateMessageList: []}).privateMessageList;
} else {
return [];
}
},
// privateMemberList() {
// return (this.conversitionStateMap[this.myMemberId] || {privateMemberList: []}).privateMemberList;
// },
// privateMessageList() {
// if (this.conversitionStateMap[this.myMemberId] && this.conversitionStateMap[this.myMemberId].connect) {
// return (this.conversitionStateMap[this.myMemberId] || {privateMessageList: []}).privateMessageList;
// } else {
// return [];
// }
// },
sendTextId() {
return OperationEvent.Conversation.Chat.menu.domId;
},
@ -154,12 +154,12 @@ export default {
}
},
watch:{
connect(val) {
if (val) {
this.conversitionMemberList = this.privateMemberList;
this.messageList = [...this.privateMessageList];
}
},
// connect(val) {
// if (val) {
// this.conversitionMemberList = this.privateMemberList;
// this.messageList = [...this.privateMessageList];
// }
// },
// userRole(val) {
// if (val == 'AUDIENCE') {
// this.goCommonConversation();
@ -183,7 +183,7 @@ export default {
}).catch(() => {
this.$messageBox('获取仿真成员列表失败!');
});
getUserListCommon(this.$route.query.group).then(res => {
getAllSimulationUser(this.$route.query.group).then(res => {
this.$store.dispatch('training/setSimulationUserList', res.data);
}).catch(() => {
this.$messageBox('获取所有仿真用户失败!');
@ -200,33 +200,33 @@ export default {
// }
// });
// },
'$store.state.socket.createConversation':function(val) {
val.memberList.forEach(member => {
// if (val.creatorId == member.memberId) {
this.$set(this.conversitionStateMap, member.memberId, {conversitionId: val.id, privateMemberList: val.memberList, privateMessageList: [], connect:member.connect});
// }
});
},
'$store.state.socket.inviteSimulationConversation':function(val) {
this.treeData.forEach(item => {
if (item.children) {
const memberList = Object.values(item.children);
memberList.forEach(data =>{
data.disabled = true;
});
if (item.children[val.creatorId]) {
item.children[val.creatorId].isInviting = true;
// const offsetTop = document.getElementById('proper_content_box' + val.creatorId).parentNode.offsetTop;
// document.querySelector('.chat-box-content').scrollTop = (offsetTop - 40) > 0 ? (offsetTop - 80) : 0;
if (!document.querySelector('#voiceName').classList.contains('flash')) {
document.querySelector('#voiceName').classList.add('flash');
document.querySelector('#teleRing').play();
}
}
// '$store.state.socket.createConversation':function(val) {
// val.memberList.forEach(member => {
// // if (val.creatorId == member.memberId) {
// this.$set(this.conversitionStateMap, member.memberId, {conversitionId: val.id, privateMemberList: val.memberList, privateMessageList: [], connect:member.connect});
// // }
// });
// },
// '$store.state.socket.inviteSimulationConversation':function(val) {
// this.treeData.forEach(item => {
// if (item.children) {
// const memberList = Object.values(item.children);
// memberList.forEach(data =>{
// data.disabled = true;
// });
// if (item.children[val.creatorId]) {
// item.children[val.creatorId].isInviting = true;
// // const offsetTop = document.getElementById('proper_content_box' + val.creatorId).parentNode.offsetTop;
// // document.querySelector('.chat-box-content').scrollTop = (offsetTop - 40) > 0 ? (offsetTop - 80) : 0;
// if (!document.querySelector('#voiceName').classList.contains('flash')) {
// document.querySelector('#voiceName').classList.add('flash');
// document.querySelector('#teleRing').play();
// }
// }
}
});
},
// }
// });
// },
'$store.state.map.activeTrainListChange': function (val) { //
this.activeTrains = [];
const activeTrainList = this.$store.state.map.activeTrainList;
@ -255,36 +255,37 @@ export default {
});
this.myMemberId = this.simulationUsers[this.userId].memberId;
}
this.getStepConversition();
},
deep: true
},
'$store.state.socket.exitConversation': function (val) {
for (const memberId in this.conversitionStateMap) {
if (memberId == val.memberId) {
this.conversitionStateMap[memberId].connect = false;
this.conversitionStateMap[memberId].conversitionId = '';
this.conversitionStateMap[memberId].privateMemberList = [];
this.conversitionStateMap[memberId].privateMessageList = [];
} else if ( this.conversitionStateMap[memberId].conversitionId == val.id ) {
const mList = [];
this.conversitionStateMap[memberId].privateMemberList.forEach(member => {
if (member.memberId != val.memberId) {
mList.push(member);
}
});
this.conversitionStateMap[memberId].privateMemberList = mList;
}
}
// 退
this.treeData.forEach(item => {
if (item.children && item.children[val.memberId]) {
const member = item.children[val.memberId];
member.active = false;
member.isConnect = false;
member.disabled = false;
}
});
},
// '$store.state.socket.exitConversation': function (val) {
// for (const memberId in this.conversitionStateMap) {
// if (memberId == val.memberId) {
// this.conversitionStateMap[memberId].connect = false;
// this.conversitionStateMap[memberId].conversitionId = '';
// this.conversitionStateMap[memberId].privateMemberList = [];
// this.conversitionStateMap[memberId].privateMessageList = [];
// } else if ( this.conversitionStateMap[memberId].conversitionId == val.id ) {
// const mList = [];
// this.conversitionStateMap[memberId].privateMemberList.forEach(member => {
// if (member.memberId != val.memberId) {
// mList.push(member);
// }
// });
// this.conversitionStateMap[memberId].privateMemberList = mList;
// }
// }
// // 退
// this.treeData.forEach(item => {
// if (item.children && item.children[val.memberId]) {
// const member = item.children[val.memberId];
// member.active = false;
// member.isConnect = false;
// member.disabled = false;
// }
// });
// },
'$store.state.training.memberList': function (val) {
if (val && val.length) {
this.memberData = this.$store.state.training.memberData;
@ -523,87 +524,87 @@ export default {
}
document.querySelector('#teleRing').pause();
},
'$store.state.socket.acceptConversionInvite':function(val) {
this.conversitionStateMap[val.memberId].connect = true;
this.conversitionStateMap[val.memberId].conversitionId = val.id;
if (this.conversitionId == val.id) {
this.treeData.forEach(data => {
if (data.children && val.memberId != this.myMemberId) {
const member = data.children[val.memberId];
if (member) {
member.isConnect = true;
member.active ? member.loading = false : member.active = true;
}
}
});
}
if (this.myMemberId == val.memberId) {
this.connectSuccess = true;
document.querySelector('#voiceName').classList.remove('flash');
document.querySelector('#teleRing').pause();
this.treeData.forEach(data => {
if (data.children) {
const member = data.children[val.creatorId];
if (member) {
member.active = true;
member.isConnect = true;
member.isInviting = false;
}
}
});
}
},
// '$store.state.socket.acceptConversionInvite':function(val) {
// this.conversitionStateMap[val.memberId].connect = true;
// this.conversitionStateMap[val.memberId].conversitionId = val.id;
// if (this.conversitionId == val.id) {
// this.treeData.forEach(data => {
// if (data.children && val.memberId != this.myMemberId) {
// const member = data.children[val.memberId];
// if (member) {
// member.isConnect = true;
// member.active ? member.loading = false : member.active = true;
// }
// }
// });
// }
// if (this.myMemberId == val.memberId) {
// this.connectSuccess = true;
// document.querySelector('#voiceName').classList.remove('flash');
// document.querySelector('#teleRing').pause();
// this.treeData.forEach(data => {
// if (data.children) {
// const member = data.children[val.creatorId];
// if (member) {
// member.active = true;
// member.isConnect = true;
// member.isInviting = false;
// }
// }
// });
// }
// },
'$store.state.scriptRecord.audioPlay':function(val) {
this.audioPlay = val;
},
'$store.state.scriptRecord.updateRoleId':function(val) {
if (this.conversitionStateMap[val]) {
this.treeData.forEach(item => {
if (item.children) {
const memberList = Object.values(item.children);
memberList.forEach(data =>{
const member = this.conversitionStateMap[val];
// && privateMem.connect;
const memberInfo = member.privateMemberList.find(privateMem=>{ return privateMem.memberId == data.id; });
// member.connect
if (member && data.id != val && memberInfo) {
data.isConnect = true;
data.active = true;
this.connectSuccess = true;
} else {
data.active = false;
data.isConnect = false;
this.connectSuccess = false;
}
data.loading = false;
data.disabled = false;
data.isInviting = false;
});
}
});
if (!this.connect) {
this.memberIdList = [];
this.memberObject = '';
}
} else {
this.memberIdList = [];
this.memberObject = '';
this.connectSuccess = false;
this.treeData.forEach(item => {
if (item.children) {
const memberList = Object.values(item.children);
memberList.forEach(data =>{
data.active = false;
data.isConnect = false;
data.loading = false;
data.disabled = false;
data.isInviting = false;
});
}
});
}
}
// '$store.state.scriptRecord.updateRoleId':function(val) {
// if (this.conversitionStateMap[val]) {
// this.treeData.forEach(item => {
// if (item.children) {
// const memberList = Object.values(item.children);
// memberList.forEach(data =>{
// const member = this.conversitionStateMap[val];
// // && privateMem.connect;
// const memberInfo = member.privateMemberList.find(privateMem=>{ return privateMem.memberId == data.id; });
// // member.connect
// if (member && data.id != val && memberInfo) {
// data.isConnect = true;
// data.active = true;
// this.connectSuccess = true;
// } else {
// data.active = false;
// data.isConnect = false;
// this.connectSuccess = false;
// }
// data.loading = false;
// data.disabled = false;
// data.isInviting = false;
// });
// }
// });
// if (!this.connect) {
// this.memberIdList = [];
// this.memberObject = '';
// }
// } else {
// this.memberIdList = [];
// this.memberObject = '';
// this.connectSuccess = false;
// this.treeData.forEach(item => {
// if (item.children) {
// const memberList = Object.values(item.children);
// memberList.forEach(data =>{
// data.active = false;
// data.isConnect = false;
// data.loading = false;
// data.disabled = false;
// data.isInviting = false;
// });
// }
// });
// }
// }
},
beforeDestroy() {
this.$store.dispatch('scriptRecord/updateAudioPlay', false);
@ -776,14 +777,16 @@ export default {
});
},
sendText() {
// sendChatText(this.group, {content: this.textContent}).then(resp => {
// this.textContent = '';
// }).catch((error) => {
// this.$message.error('' + error.message);
// });
commitOperate(menuOperate.Conversation.Chat, {content: this.textContent}, 3).then(({valid})=>{
if (valid) {
this.textContent = '';
} else {
sendChatText(this.group, {content: this.textContent}).then(resp => {
this.textContent = '';
if (this.$store.state.trainingNew.teachMode != 'TEST_MODE') {
this.$message.warning('发送会话文字不一致,请重新发送!' );
}
});
}
}).catch((error) => {
this.$message.error('发送会话文字失败:' + error.message);
@ -873,27 +876,52 @@ export default {
}
messages.push(message);
});
const tempMessageList = [];
!conversation.over && conversation.messageList.forEach(message => {
message.src = `${message.audioPath}`;
tempMessageList.push(message);
});
!conversation.over && conversation.memberList.forEach(member => {
const param = {
conversitionId: conversation.id,
privateMemberList: conversation.memberList,
privateMessageList: tempMessageList
};
this.$set(this.conversitionStateMap, member.memberId, param);
});
// const tempMessageList = [];
// !conversation.over && conversation.messageList.forEach(message => {
// message.src = `${message.audioPath}`;
// tempMessageList.push(message);
// });
// !conversation.over && conversation.memberList.forEach(member => {
// const param = {
// conversitionId: conversation.id,
// privateMemberList: conversation.memberList,
// privateMessageList: tempMessageList
// };
// this.$set(this.conversitionStateMap, member.memberId, param);
// });
});
this.getUserRole();
}
this.commonMessageList = messages.sort(this.sortByMessageTime);
this.messageList = [...this.commonMessageList];
this.getUserRole();
this.getStepConversition();
this.initCommonMemberList();
});
},
// --
getStepConversition() {
const list = [];
const data = this.$store.state.trainingNew.draftStepList;
const simulationTime = this.$store.state.socket.simulationTimeSync;
if (data && !this.$store.state.trainingNew.trainingSwitch) {
for (let index = 0; index < data.length; index++) {
if (data[index].isActive) {
break;
}
data[index].operations.forEach(it => {
if (it.operationType == 'Conversation_Chat_Text') {
list.push({
content: it.params.content,
id: list.length,
memberId: data[index].memberId,
time: timestampFormat('YYYY-MM-DD HH:mm:ss', simulationTime - (data.length - index) * 2000),
type: 'Text'
});
}
});
}
this.messageList = list;
}
},
//
initCommonMemberList() {
const temDispatcherList = [];
@ -967,11 +995,11 @@ export default {
},
changeMessageList(data) {
this.commonMessageList.push(data.message);
if (this.conversitionStateMap[data.message.memberId]) {
(this.conversitionStateMap[data.message.memberId].privateMemberList || []).forEach(member => {
this.conversitionStateMap[member.memberId] && this.conversitionStateMap[member.memberId].privateMessageList.push(data.message);
});
}
// if (this.conversitionStateMap[data.message.memberId]) {
// (this.conversitionStateMap[data.message.memberId].privateMemberList || []).forEach(member => {
// this.conversitionStateMap[member.memberId] && this.conversitionStateMap[member.memberId].privateMessageList.push(data.message);
// });
// }
// if (this.commonConversation) {
// this.messageList.push(data.message);
// } else if (!this.commonConversation && this.conversitionId === data.id && this.conversitionStateMap[this.myMemberId] && this.conversitionStateMap[this.myMemberId].connect) {
@ -988,8 +1016,8 @@ export default {
cancelCommonConversation() {
this.commonConversation && this.$refs.chatContent && this.$refs.chatContent.conversationChange();
this.commonConversation = false;
this.conversitionMemberList = this.privateMemberList;
this.messageList = [...this.privateMessageList];
this.conversitionMemberList = this.commonMemberList;
this.messageList = [...this.commonMessageList];
this.$nextTick(() => {
// this.$refs.tree && this.$refs.tree.filter(this.queryMember);
this.filterNode();

View File

@ -60,6 +60,9 @@ export default {
this.$refs.schedule.setPosition();
});
},
loadChartPage() {
this.$refs.schedule.loadChartPage();
},
dispatchDialog(dialogObj) {
this.$nextTick(() => {
if (this.$refs[dialogObj.name]) {

View File

@ -3,7 +3,7 @@
<img class="logo" :src="logoImg">
<span> {{ mapName }} &ensp;</span>
<span v-if="runPlanName">({{ runPlanName }})</span>
<span class="system-close el-icon-close" @click="back" />
<!-- <span class="system-close el-icon-close" @click="back" />-->
</div>
</template>
@ -35,9 +35,9 @@ export default {
}
},
methods: {
back() {
this.$emit('back');
}
// back() {
// this.$emit('back');
// }
}
};
</script>
@ -58,7 +58,7 @@ export default {
background: -moz-linear-gradient(#0055E8, #0099F8);
background: linear-gradient(#0055E8, #0099F8);
color: white;
font: bold;
font-weight: bold;
font-size: 16px;
.logo {

View File

@ -6,7 +6,7 @@
</template>
<script>
import ViewMember from './viewMember';
import { getExistSimulationList } from '@/api/rtSimulation';
import { getExistSimulationList, getSuperviseSimulation } from '@/api/rtSimulation';
import { destroySimulationByAdmin } from '@/api/simulation';
export default {
name: 'SimulationManage',
@ -38,7 +38,7 @@ export default {
},
simulationTypeList: [{label: '仿真', value: 'SIMULATION'}, {label: '课程', value: 'LESSON'}, {label: '考试', value: 'EXAM'}, {label: '剧本编制', value: 'SCRIPT_MAKING'}],
queryList: {
query: getExistSimulationList,
query: this.queryFunction,
selectCheckShow: false,
paginationHiden: true,
indexShow: true,
@ -95,6 +95,13 @@ export default {
};
},
methods: {
queryFunction(params) {
if (this.$route.path.includes('regulationSimulation')) {
return getSuperviseSimulation(params);
} else {
return getExistSimulationList(params);
}
},
viewMember(index, row) {
this.$refs.viewMember.doShow(row.id);
},

View File

@ -249,7 +249,6 @@ export default {
if (system.paramVO && system.paramVO.domConfig && system.paramVO.domConfig.singleClient) {
query.singleClient = system.paramVO.domConfig.singleClient;
}
console.log(query, '**********');
if (this.loadingProjectList.includes(this.project)) {
this.$store.dispatch('app/transitionAnimations');
}
@ -270,14 +269,18 @@ export default {
this.loading = true;
jointSimulationByPermission(this.ruleForm.inputGroup).then(resp => {
this.loading = false;
}).catch(error => {
const query = {
lineCode: resp.data.map.lineCode,
group: resp.data.group,
mapId: resp.data.map.id,
simType: resp.data.paramVO.type,
project: this.project
};
this.$router.push({ path: `/display/demon`, query: query });
}).catch(() => {
this.loading = false;
const errorMessage = this.isShow ? this.$t('tip.failedToAddNewRoom') : this.$t('error.scanningError');
if (error.code == 10002) {
this.$messageBox(`${errorMessage}:房间已经存在,请从快速入口进入`);
} else {
this.$messageBox(`${errorMessage}:请稍后再试`);
}
this.$messageBox(`${errorMessage}:请稍后再试`);
});
}
});