Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
f8d3ffa91d
BIN
src/assets/stop_route.png
Normal file
BIN
src/assets/stop_route.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 173 B |
@ -83,7 +83,7 @@ class SkinCode extends defaultStyle {
|
||||
spareColor: '#C0C0C0', // 区段空闲颜色
|
||||
communicationOccupiedColor: '#FE0000', // 区段通信车占用颜色 // 调整 未确定
|
||||
unCommunicationOccupiedColor: '#EF72A7', // 区段非通讯车占用颜色
|
||||
routeLockColor: '#00ff00', // 区段进路锁定颜色
|
||||
routeLockColor: '#C0C0C0', // 区段进路锁定颜色
|
||||
faultLockColor: '#81007F', // 区段故障锁定颜色
|
||||
undefinedColor: '#0071C1', // 区段未定义颜色
|
||||
protectionLockedColor: '#FFFFFF', // 保护区段锁闭
|
||||
@ -92,9 +92,9 @@ class SkinCode extends defaultStyle {
|
||||
atsExcisionColor: '#A0522D', // 区段ats切除颜色
|
||||
invalidColor: '#AC8F40', // 计轴故障颜色
|
||||
timeReleaseColor: '#3F3F3F', // 区段延时释放颜色
|
||||
protectiveLockColor: '#03C85C', // 区段保护锁闭 延续保护
|
||||
protectiveLockColor: '#C0C0C0', // 区段保护锁闭 延续保护
|
||||
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
|
||||
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
|
||||
logicalColor: '#C0C0C0', // 逻辑区段颜色 (未用)
|
||||
logicalTextColor: 'white', // 逻辑区段名称颜色 (未用)
|
||||
speedLimitColor: '#008081' // 临时限速颜色
|
||||
},
|
||||
@ -106,6 +106,27 @@ class SkinCode extends defaultStyle {
|
||||
width: 2,
|
||||
defaultColor: '#03FFF8'
|
||||
},
|
||||
routeArrow: {
|
||||
radius: 5,
|
||||
lineWidth: 3,
|
||||
arrowLineWidth: 1,
|
||||
defaultArrowStroke: '#0F0',
|
||||
defaultArrowFill: '#0F0',
|
||||
defaultLineStroke: '#0F0',
|
||||
autoArrowStroke: '#000',
|
||||
manualArrowStroke: '#000',
|
||||
manualArrowFill: '#0201F2',
|
||||
atmArrowStroke: '#0201F2',
|
||||
atmArrowFill: '#0201F2',
|
||||
atmLineStroke: '#0201F2',
|
||||
mauArrowStroke: '#FFFF00',
|
||||
mauArrowFill: '#FFFF00',
|
||||
mauLineStroke: '#FFFF00',
|
||||
cancelMauArrowStroke: '#000',
|
||||
cancelMauArrowFill: '#000',
|
||||
cancelMauLineStroke: '#000'
|
||||
},
|
||||
stopRouteImg: {},
|
||||
axle: {}, // 计轴
|
||||
speedLimit: { // 限速元素
|
||||
width: 1, // 限速线的宽度
|
||||
|
@ -12,7 +12,8 @@ deviceState[deviceType.Section] = {
|
||||
cutOff: 0, // 是否切除
|
||||
invalid: 0, // 是否失效
|
||||
speedUpLimit: 0, // 最高限速
|
||||
fault: 0 /** 非故障*/
|
||||
fault: 0, /** 非故障*/
|
||||
lockRight: 0 // 区段进路锁闭方向
|
||||
};
|
||||
// 进路后端状态
|
||||
// boolean cbtcMode;是否CBTC模式
|
||||
|
@ -1,7 +1,8 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
// import Line from 'zrender/src/graphic/shape/Line';
|
||||
import Polyline from 'zrender/src/graphic/shape/Polyline';
|
||||
import Isogon from 'zrender/src/graphic/shape/Isogon';
|
||||
import BezierCurve from 'zrender/src/graphic/shape/BezierCurve';
|
||||
import JTriangle from '../../utils/JTriangle';
|
||||
|
||||
/** 创建区段线集合*/
|
||||
export default class ELines extends Group {
|
||||
@ -110,6 +111,101 @@ export default class ELines extends Group {
|
||||
this.add(this.bottomWithSection);
|
||||
this.bottomWithSection.hide();
|
||||
}
|
||||
|
||||
if (model.style.Section.routeArrow && !model.isCurve) {
|
||||
const cPointLeft = {x: 0, y:0};
|
||||
const cPointRight = {x: 0, y:0};
|
||||
const pointsLeft = [];
|
||||
const pointsRight = [];
|
||||
const length = this.model.points.length;
|
||||
const triangleLeft = new JTriangle(this.model.points[0], this.model.points[1]);
|
||||
cPointLeft.x = this.model.points[0].x + triangleLeft.getCos(model.style.Section.routeArrow.radius);
|
||||
cPointLeft.y = this.model.points[0].y + triangleLeft.getSin(model.style.Section.routeArrow.radius);
|
||||
for (let i = 0; i < length; i++) {
|
||||
if (i === 0) {
|
||||
pointsLeft.push([cPointLeft.x, cPointLeft.y]);
|
||||
} else {
|
||||
pointsLeft.push([model.points[i].x, model.points[i].y]);
|
||||
}
|
||||
}
|
||||
|
||||
const triangleRight = new JTriangle(this.model.points[length - 2], this.model.points[length - 1 ]);
|
||||
cPointRight.x = this.model.points[length - 1].x - triangleRight.getCos(model.style.Section.routeArrow.radius);
|
||||
cPointRight.y = this.model.points[length - 1].y - triangleRight.getSin(model.style.Section.routeArrow.radius);
|
||||
for (let i = 0; i < length; i++) {
|
||||
if (i === length - 1) {
|
||||
pointsRight.push([cPointRight.x, cPointRight.y]);
|
||||
} else {
|
||||
pointsRight.push([model.points[i].x, model.points[i].y]);
|
||||
}
|
||||
}
|
||||
this.routeArrowLeft = new Isogon({
|
||||
zlevel: this.zlevel,
|
||||
origin: [cPointLeft.x, cPointLeft.y],
|
||||
rotation: Math.PI / 2 - triangleLeft.getRotation(),
|
||||
z: this.z + 9,
|
||||
shape: {
|
||||
x: cPointLeft.x,
|
||||
y: cPointLeft.y,
|
||||
r: model.style.Section.routeArrow.radius,
|
||||
n: 3
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.style.Section.routeArrow.arrowLineWidth,
|
||||
stroke: model.style.Section.routeArrow.defaultArrowStroke,
|
||||
fill: model.style.Section.routeArrow.defaultArrowFill
|
||||
}
|
||||
});
|
||||
this.routeArrowRight = new Isogon({
|
||||
zlevel: this.zlevel,
|
||||
origin: [cPointLeft.x, cPointLeft.y],
|
||||
rotation: -Math.PI / 2 - triangleRight.getRotation(),
|
||||
z: this.z + 9,
|
||||
shape: {
|
||||
x: cPointRight.x,
|
||||
y: cPointRight.y,
|
||||
r: model.style.Section.routeArrow.radius,
|
||||
n: 3
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.style.Section.routeArrow.arrowLineWidth,
|
||||
stroke: model.style.Section.routeArrow.defaultArrowStroke,
|
||||
fill: model.style.Section.routeArrow.defaultArrowFill
|
||||
}
|
||||
});
|
||||
this.routeLineLeft = new Polyline({
|
||||
zlevel: this.zlevel,
|
||||
progressive: model.progressive,
|
||||
z: this.z,
|
||||
shape: {
|
||||
points: pointsLeft
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.style.Section.routeArrow.lineWidth,
|
||||
stroke: model.style.Section.routeArrow.defaultLineStroke
|
||||
}
|
||||
});
|
||||
this.routeLineRight = new Polyline({
|
||||
zlevel: this.zlevel,
|
||||
progressive: model.progressive,
|
||||
z: this.z,
|
||||
shape: {
|
||||
points: pointsRight
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.style.Section.routeArrow.lineWidth,
|
||||
stroke: model.style.Section.routeArrow.defaultLineStroke
|
||||
}
|
||||
});
|
||||
this.add(this.routeArrowLeft);
|
||||
this.add(this.routeLineLeft);
|
||||
this.add(this.routeArrowRight);
|
||||
this.add(this.routeLineRight);
|
||||
this.routeArrowLeft.hide();
|
||||
this.routeLineLeft.hide();
|
||||
this.routeArrowRight.hide();
|
||||
this.routeLineRight.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -179,7 +275,86 @@ export default class ELines extends Group {
|
||||
this.lineBorder && this.lineBorder.show();
|
||||
}
|
||||
}
|
||||
|
||||
setRouteLock(lockRight) {
|
||||
if (lockRight) {
|
||||
this.routeArrowRight && this.routeArrowRight.show();
|
||||
this.routeLineRight && this.routeLineRight.show();
|
||||
} else {
|
||||
this.routeLineLeft && this.routeArrowLeft.show();
|
||||
this.routeLineLeft && this.routeLineLeft.show();
|
||||
}
|
||||
}
|
||||
setAutoRoute(lockRight) {
|
||||
if (lockRight) {
|
||||
this.routeArrowRight && this.routeArrowRight.show();
|
||||
this.routeLineRight && this.routeLineRight.show();
|
||||
this.routeArrowRight && this.routeArrowRight.setStyle({stroke: this.model.style.Section.routeArrow.autoArrowStroke});
|
||||
} else {
|
||||
this.routeLineLeft && this.routeLineLeft.show();
|
||||
this.routeArrowLeft && this.routeArrowLeft.show();
|
||||
this.routeArrowRight && this.routeArrowRight.setStyle({stroke: this.model.style.Section.routeArrow.autoArrowStroke});
|
||||
}
|
||||
}
|
||||
setManualRoute(lockRight) {
|
||||
if (lockRight) {
|
||||
this.routeArrowRight && this.routeArrowRight.show();
|
||||
this.routeLineRight && this.routeLineRight.show();
|
||||
this.routeArrowRight && this.routeArrowRight.setStyle({stroke: this.model.style.Section.routeArrow.manualArrowStroke, fill: this.model.style.Section.routeArrow.manualArrowFill});
|
||||
} else {
|
||||
this.routeLineLeft && this.routeLineLeft.show();
|
||||
this.routeArrowLeft && this.routeArrowLeft.show();
|
||||
this.routeArrowRight && this.routeArrowRight.setStyle({stroke: this.model.style.Section.routeArrow.manualArrowStroke, fill: this.model.style.Section.routeArrow.manualArrowFill});
|
||||
}
|
||||
}
|
||||
setAtmRoute(lockRight) {
|
||||
if (lockRight) {
|
||||
this.routeArrowRight && this.routeArrowRight.show();
|
||||
this.routeLineRight && this.routeLineRight.show();
|
||||
this.routeArrowRight && this.routeArrowRight.setStyle({stroke: this.model.style.Section.routeArrow.atmArrowStroke, fill: this.model.style.Section.routeArrow.atmArrowFill});
|
||||
this.routeLineRight && this.routeLineRight.setStyle({stroke: this.model.style.Section.routeArrow.atmLineStroke});
|
||||
} else {
|
||||
this.routeLineLeft && this.routeLineLeft.show();
|
||||
this.routeArrowLeft && this.routeArrowLeft.show();
|
||||
this.routeArrowRight && this.routeArrowRight.setStyle({stroke: this.model.style.Section.routeArrow.atmArrowStroke, fill: this.model.style.Section.routeArrow.atmArrowFill});
|
||||
this.routeLineRight && this.routeLineRight.setStyle({stroke: this.model.style.Section.routeArrow.atmLineStroke});
|
||||
}
|
||||
}
|
||||
setMauRoute(lockRight) {
|
||||
if (lockRight) {
|
||||
this.routeArrowRight && this.routeArrowRight.show();
|
||||
this.routeLineRight && this.routeLineRight.show();
|
||||
this.routeArrowRight && this.routeArrowRight.setStyle({stroke: this.model.style.Section.routeArrow.mauArrowStroke, fill: this.model.style.Section.routeArrow.mauArrowFill});
|
||||
this.routeLineRight && this.routeLineRight.setStyle({stroke: this.model.style.Section.routeArrow.mauLineStroke});
|
||||
} else {
|
||||
this.routeLineLeft && this.routeLineLeft.show();
|
||||
this.routeArrowLeft && this.routeArrowLeft.show();
|
||||
this.routeArrowRight && this.routeArrowRight.setStyle({stroke: this.model.style.Section.routeArrow.mauArrowStroke, fill: this.model.style.Section.routeArrow.mauArrowFill});
|
||||
this.routeLineRight && this.routeLineRight.setStyle({stroke: this.model.style.Section.routeArrow.mauLineStroke});
|
||||
}
|
||||
}
|
||||
setCancelMauRoute(lockRight) {
|
||||
if (lockRight) {
|
||||
this.routeArrowRight && this.routeArrowRight.show();
|
||||
this.routeLineRight && this.routeLineRight.show();
|
||||
this.routeArrowRight && this.routeArrowRight.setStyle({stroke: this.model.style.Section.routeArrow.cancelMauArrowStroke, fill: this.model.style.Section.routeArrow.cancelMauArrowFill});
|
||||
this.routeLineRight && this.routeLineRight.setStyle({stroke: this.model.style.Section.routeArrow.cancelMauLineStroke});
|
||||
} else {
|
||||
this.routeLineLeft && this.routeLineLeft.show();
|
||||
this.routeArrowLeft && this.routeArrowLeft.show();
|
||||
this.routeArrowRight && this.routeArrowRight.setStyle({stroke: this.model.style.Section.routeArrow.cancelMauArrowStroke, fill: this.model.style.Section.routeArrow.cancelMauArrowFill});
|
||||
this.routeLineRight && this.routeLineRight.setStyle({stroke: this.model.style.Section.routeArrow.cancelMauLineStroke});
|
||||
}
|
||||
}
|
||||
recoverRoute() {
|
||||
this.routeArrowLeft && this.routeArrowLeft.hide();
|
||||
this.routeLineLeft && this.routeLineLeft.hide();
|
||||
this.routeArrowRight && this.routeArrowRight.hide();
|
||||
this.routeLineRight && this.routeLineRight.hide();
|
||||
this.routeArrowLeft && this.routeArrowLeft.setStyle({ stroke: this.model.style.Section.routeArrow.defaultArrowStroke, fill: this.model.style.Section.routeArrow.defaultArrowFill });
|
||||
this.routeArrowRight && this.routeArrowRight.setStyle({ stroke: this.model.style.Section.routeArrow.defaultArrowStroke, fill: this.model.style.Section.routeArrow.defaultArrowFill });
|
||||
this.routeLineLeft && this.routeLineLeft.setStyle({ fill: this.model.style.Section.routeArrow.defaultLineStroke });
|
||||
this.routeArrowRight && this.routeArrowRight.setStyle({ fill: this.model.style.Section.routeArrow.defaultLineStroke });
|
||||
}
|
||||
getBoundingRect() {
|
||||
return this.section.getBoundingRect().clone();
|
||||
}
|
||||
|
52
src/jmapNew/shape/Section/EStopRouteImg.js
Normal file
52
src/jmapNew/shape/Section/EStopRouteImg.js
Normal file
@ -0,0 +1,52 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import Stop_Route from '@/assets/stop_route.png';
|
||||
import Pattern from 'zrender/src/graphic/Pattern';
|
||||
import JTriangle from '../../utils/JTriangle';
|
||||
|
||||
export default class EStopRouteImg extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = model.z;
|
||||
this.stopRouteImgList = [];
|
||||
this.create();
|
||||
}
|
||||
create() {
|
||||
const image = new Image(5, 8);
|
||||
image.src = Stop_Route;
|
||||
|
||||
image.decode()
|
||||
.then(() => {
|
||||
const pattern = new Pattern(image, 'repeat');
|
||||
for (let i = 1; i < this.model.points.length; i++) {
|
||||
const triangle = new JTriangle(this.model.points[i - 1], this.model.points[i]);
|
||||
this.stopRouteImgList.push(new Rect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
origin: [this.model.points[i - 1].x, this.model.points[i - 1].y],
|
||||
rotation: -triangle.getRotation(),
|
||||
shape: {
|
||||
x: this.model.points[i - 1].x,
|
||||
y: this.model.points[i - 1].y - this.model.style.Section.line.width / 2,
|
||||
width: triangle.getLength(),
|
||||
height: this.model.style.Section.line.width
|
||||
},
|
||||
style: {
|
||||
fill: pattern
|
||||
}
|
||||
}));
|
||||
}
|
||||
this.stopRouteImgList.forEach(item => {
|
||||
this.add(item);
|
||||
item.hide();
|
||||
});
|
||||
});
|
||||
}
|
||||
setModel(dx, dy) {
|
||||
}
|
||||
setCursor(mouseStyle) {
|
||||
this.imageBg.attr('cursor', mouseStyle);
|
||||
}
|
||||
}
|
@ -11,6 +11,7 @@ import { EBackArrow, EBackArrowTriangle } from './EBackArrow'; // 折返进路
|
||||
import ELimitName from './ELimitName'; // 成都三号线 限速名称
|
||||
import JTriangle from '../../utils/JTriangle';
|
||||
import { drawSectionStyle } from '../../config/defaultStyle';
|
||||
import EStopRouteImg from './EStopRouteImg';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import Vue from 'vue';
|
||||
|
||||
@ -318,6 +319,15 @@ export default class Section extends Group {
|
||||
this.add(this.lineBorder);
|
||||
this.lineBorder.setStyle({ lineWidth: 0 });
|
||||
}
|
||||
if (this.style.Section.stopRouteImg && model.type !== '04') {
|
||||
this.stopRouteImg = new EStopRouteImg({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
points: model.points,
|
||||
style:style
|
||||
});
|
||||
this.add(this.stopRouteImg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -565,6 +575,7 @@ export default class Section extends Group {
|
||||
fill: this.style.Section.line.spareColor
|
||||
});
|
||||
}
|
||||
this.section && this.section.recoverRoute();
|
||||
}
|
||||
|
||||
/** 未定义状态 00*/
|
||||
|
@ -3,6 +3,7 @@ class Theme {
|
||||
this._code = '02';
|
||||
this._mapMenu = {
|
||||
'01': 'chengdu_01',
|
||||
// '01': 'ningbo_03',
|
||||
'02': 'fuzhou_01',
|
||||
'03': 'beijing_01',
|
||||
'04': 'chengdu_03',
|
||||
|
@ -95,6 +95,8 @@
|
||||
<train-delete ref="trainDelete" />
|
||||
<manage-user ref="manageUser" />
|
||||
<help-about ref="helpAbout" />
|
||||
<arrange-route ref="arrangeRoute" />
|
||||
<train-distribution ref="trainDistribution" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -108,10 +110,12 @@ import TrainTranstalet from './menuDialog/trainTranstalet';
|
||||
import TrainDelete from './menuDialog/trainDelete';
|
||||
import ManageUser from './menuDialog/manageUser';
|
||||
import HelpAbout from './menuDialog/helpAbout';
|
||||
import ArrangeRoute from './menuDialog/arrangeRoute';
|
||||
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';
|
||||
import TrainDistribution from './menuDialog/trainDistribution';
|
||||
|
||||
export default {
|
||||
name: 'MenuBar',
|
||||
@ -124,7 +128,9 @@ export default {
|
||||
TrainTranstalet,
|
||||
TrainDelete,
|
||||
ManageUser,
|
||||
HelpAbout
|
||||
HelpAbout,
|
||||
ArrangeRoute,
|
||||
TrainDistribution
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -155,11 +161,11 @@ export default {
|
||||
children: [
|
||||
{
|
||||
title: '排列进路',
|
||||
click: this.undeveloped
|
||||
click: this.handleArrangeRoute
|
||||
},
|
||||
{
|
||||
title: '分配',
|
||||
click: this.undeveloped
|
||||
click: this.handleTrainDistribution
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
@ -569,11 +575,11 @@ export default {
|
||||
children: [
|
||||
{
|
||||
title: '排列进路',
|
||||
click: this.undeveloped
|
||||
click: this.handleArrangeRoute
|
||||
},
|
||||
{
|
||||
title: '分配',
|
||||
click: this.undeveloped
|
||||
click: this.handleTrainDistribution
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
@ -1307,6 +1313,14 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
EventBus.$emit('closeMenu');
|
||||
});
|
||||
},
|
||||
handleArrangeRoute() {
|
||||
this.$refs.arrangeRoute.doShow();
|
||||
this.doClose();
|
||||
},
|
||||
handleTrainDistribution() {
|
||||
this.$refs.trainDistribution.doShow();
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -1371,7 +1385,6 @@ export default {
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
max-height: 550px;
|
||||
overflow-y: scroll;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 4px;
|
||||
@ -1391,11 +1404,14 @@ export default {
|
||||
|
||||
.menu-ul {
|
||||
display: none;
|
||||
position: relative;
|
||||
left: 180px;
|
||||
transform: translateY(-30px);
|
||||
list-style: none;
|
||||
padding-left: 0 !important;
|
||||
background: #F0F0F0;
|
||||
line-height: $menuItemHeight;
|
||||
width: $menuItemWidth;
|
||||
bottom: $menuItemHeight;
|
||||
}
|
||||
|
||||
.active {
|
||||
|
202
src/jmapNew/theme/ningbo_03/menus/menuDialog/arrangeRoute.vue
Normal file
202
src/jmapNew/theme/ningbo_03/menus/menuDialog/arrangeRoute.vue
Normal file
@ -0,0 +1,202 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="1000px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-table :data="tableData" height="397px" style="margin-top: 57px">
|
||||
<el-table-column prop="groupNumber" label="列车" />
|
||||
<el-table-column prop="groupNumber" label="班次" />
|
||||
<el-table-column prop="groupNumber" label="运行线" />
|
||||
<el-table-column prop="groupNumber" label="模式" />
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="13" :offset="1">
|
||||
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
|
||||
<el-tab-pane label="站台" name="first">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<div style="width: 220px;border: 2px solid #696969; border-bottom: 0;color: #000;padding-left: 5px;">站台</div>
|
||||
<div style="width: 220px;height: 350px;overflow: scroll; border: 2px solid #696969;">
|
||||
<template v-for="(stationStand, index) in stationStandList">
|
||||
<li :key="index" class="menu-li" :style="{background: selectStandCode === stationStand.code? '#BFCDDB': '#FFF'}" @click="selectStand(stationStand)">{{ stationStand.name }}</li>
|
||||
</template>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" :offset="1">
|
||||
<el-table :data="tempData" height="340px">
|
||||
<el-table-column prop="groupNumber" label="路径" />
|
||||
<el-table-column prop="groupNumber" label="运行方向" />
|
||||
</el-table>
|
||||
<el-checkbox v-model="displayCopyPath">显示复制路径</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="信号机" name="second">信号机</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">确定(O)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button>应用(A)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button>帮助(H)</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'RouteSelection',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tempData: [],
|
||||
tableData: [{}],
|
||||
activeName: 'first',
|
||||
beforeSectionList: [],
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
row: null,
|
||||
operation: '',
|
||||
display: true,
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
selectStandCode: '',
|
||||
displayCopyPath: false,
|
||||
tableStyle: {
|
||||
'border-bottom': 'none'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '列车排进路';
|
||||
},
|
||||
commitDisabled() {
|
||||
let disabled = true;
|
||||
if (this.row) {
|
||||
disabled = !this.row.canSetting;
|
||||
}
|
||||
return disabled;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show && !this.commitDisabled) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
expandPath() {
|
||||
console.log('展开进路预览');
|
||||
},
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.restoreBeforeDevices();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
restoreBeforeDevices() {
|
||||
// 恢复之前选中设备
|
||||
if (this.beforeSectionList && this.beforeSectionList.length) {
|
||||
this.beforeSectionList.forEach(elem => {
|
||||
elem.cutOff = false;
|
||||
});
|
||||
}
|
||||
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
|
||||
this.beforeSectionList = [];
|
||||
},
|
||||
commit() {
|
||||
if (this.row && this.row.canSetting) {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:this.row.code}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
},
|
||||
handleClick() {
|
||||
|
||||
},
|
||||
selectStand(stationStand) {
|
||||
this.selectStandCode = stationStand.code;
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.menu-li {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: left;
|
||||
list-style:none;
|
||||
padding-left: 5px;
|
||||
border-right: 2px solid #696969;
|
||||
color: #000;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,194 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="1000px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-table :data="tableData" height="397px" style="margin-top: 57px">
|
||||
<el-table-column prop="groupNumber" label="列车" />
|
||||
<el-table-column prop="groupNumber" label="班次" />
|
||||
<el-table-column prop="groupNumber" label="运行线" />
|
||||
<el-table-column prop="length" label="长度" />
|
||||
<el-table-column prop="mode" label="模式" />
|
||||
<el-table-column prop="status" label="状态" />
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="13" :offset="1">
|
||||
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
|
||||
<el-tab-pane label="运行线" name="first">
|
||||
<div style="width: 100%;border: 2px solid #696969; border-bottom: 0;color: #000;padding-left: 5px;">站台</div>
|
||||
<div style="width: 100%;height: 350px;overflow: scroll; border: 2px solid #696969;">
|
||||
<template v-for="(stationStand, index) in stationStandList">
|
||||
<li :key="index" class="menu-li" :style="{background: selectStandCode === stationStand.code? '#BFCDDB': '#FFF'}" @click="selectStand(stationStand)">{{ stationStand.name }}</li>
|
||||
</template>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="往返" name="second">往返</el-tab-pane>
|
||||
<el-tab-pane label="班次" name="third">班次</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">确定(O)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button>应用(A)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button>帮助(H)</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'RouteSelection',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tempData: [],
|
||||
tableData: [{}],
|
||||
activeName: 'first',
|
||||
beforeSectionList: [],
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
row: null,
|
||||
operation: '',
|
||||
display: true,
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
selectStandCode: '',
|
||||
displayCopyPath: false,
|
||||
tableStyle: {
|
||||
'border-bottom': 'none'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '列车分配';
|
||||
},
|
||||
commitDisabled() {
|
||||
let disabled = true;
|
||||
if (this.row) {
|
||||
disabled = !this.row.canSetting;
|
||||
}
|
||||
return disabled;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show && !this.commitDisabled) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
expandPath() {
|
||||
console.log('展开进路预览');
|
||||
},
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.restoreBeforeDevices();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
restoreBeforeDevices() {
|
||||
// 恢复之前选中设备
|
||||
if (this.beforeSectionList && this.beforeSectionList.length) {
|
||||
this.beforeSectionList.forEach(elem => {
|
||||
elem.cutOff = false;
|
||||
});
|
||||
}
|
||||
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
|
||||
this.beforeSectionList = [];
|
||||
},
|
||||
commit() {
|
||||
if (this.row && this.row.canSetting) {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:this.row.code}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
},
|
||||
handleClick() {
|
||||
|
||||
},
|
||||
selectStand(stationStand) {
|
||||
this.selectStandCode = stationStand.code;
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.menu-li {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: left;
|
||||
list-style:none;
|
||||
padding-left: 5px;
|
||||
border-right: 2px solid #696969;
|
||||
color: #000;
|
||||
}
|
||||
</style>
|
@ -52,6 +52,9 @@ JTriangle.prototype = {
|
||||
getSinRate () {
|
||||
return Math.sqrt(this.abspowy / this.abspowz);
|
||||
},
|
||||
getLength() {
|
||||
return Math.sqrt(this.abspowz);
|
||||
},
|
||||
getTanRate () {
|
||||
var diff_x = this.end.x - this.beg.x;
|
||||
var diff_y = this.end.y - this.beg.y;
|
||||
|
@ -303,7 +303,7 @@ export const ProjectCode = {
|
||||
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls']; // 底部栏仅展示公司信息不展示备案号
|
||||
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb']; // 实训设计平台通过项目code获取地图列表的项目
|
||||
export const CaseHideProjectList = ['heb', 'designheb']; // 案例展示隐藏的项目
|
||||
export const VersionBaseNoShow = ['heb', 'designheb']; // 登录页右下角版本开发基于不展示
|
||||
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls']; // 登录页右下角版本开发基于不展示
|
||||
export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls']; // 登录页右下角主体不展示
|
||||
export const GenerateRouteProjectList = ['jsxt', 'refereeJsxt'];// 需要在公共路由中生成登录页面的项目
|
||||
export const ProjectLoginStyleList = ['jsxt', 'refereeJsxt', 'gzb', 'designgzb', 'xty', 'designxty', 'xadt', 'designxadt', 'tky', 'designtky', 'jyd', 'designjyd', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls']; // 登录页样式
|
||||
|
@ -39,7 +39,9 @@ const training = {
|
||||
centerStationCode:'', // 当前居中的集中站code
|
||||
memberList: [], // 综合仿真成员列表
|
||||
memberData: {}, // 综合仿真成员列表
|
||||
simulationUserList: [] // 综合仿真用户列表
|
||||
simulationUserList: [], // 综合仿真用户列表
|
||||
addMemberInScript:{}, // 剧本录制新增角色
|
||||
orignalUserRoleId:'' // 设置旧的角色的id
|
||||
},
|
||||
|
||||
getters: {
|
||||
@ -253,7 +255,8 @@ const training = {
|
||||
|
||||
addMemberListInScript:(state, newMember) => {
|
||||
if (!state.memberData[newMember.id]) {
|
||||
state.memberData[newMember.id] = newMember;
|
||||
// state.memberData[newMember.id] = newMember;
|
||||
state.addMemberInScript = newMember;
|
||||
}
|
||||
},
|
||||
|
||||
@ -292,6 +295,9 @@ const training = {
|
||||
},
|
||||
setRoleDeviceCode :(state, roleDeviceCode) => {
|
||||
state.roleDeviceCode = roleDeviceCode;
|
||||
},
|
||||
setOrignalUserRoleId:(state, orignalUserRoleId) => {
|
||||
state.orignalUserRoleId = orignalUserRoleId;
|
||||
}
|
||||
},
|
||||
|
||||
@ -594,8 +600,8 @@ const training = {
|
||||
/**
|
||||
* 开始教学模式
|
||||
*/
|
||||
teachModeStart: ({ dispatch }) => {
|
||||
const payLoad = { start: true, mode: TrainingMode.TEACH };
|
||||
teachModeStart: ({ dispatch }, mode) => {
|
||||
const payLoad = { start: true, mode: mode };
|
||||
dispatch('startTraining', payLoad);
|
||||
},
|
||||
|
||||
@ -716,6 +722,10 @@ const training = {
|
||||
/** 添加新成员(剧本录制)*/
|
||||
addMemberListInScript:({ commit }, data) => {
|
||||
commit('addMemberListInScript', data);
|
||||
},
|
||||
/** 剧本仿真 设置旧的角色的id */
|
||||
setOrignalUserRoleId:({ commit }, data) => {
|
||||
commit('setOrignalUserRoleId', data);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -36,8 +36,9 @@
|
||||
:key="item.id"
|
||||
:label="(roleConfig[item.type]?roleConfig[item.type]: '')+(item.name?item.name: '')"
|
||||
:value="item.id"
|
||||
:disabled="checkDisabled(item.type)"
|
||||
:disabled="item.disabled"
|
||||
/>
|
||||
<!-- checkDisabled(item.type) -->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -170,6 +171,15 @@ export default {
|
||||
const name = each.name == undefined ? '' : '-' + each.name;
|
||||
const deviceName = each.deviceName == undefined ? '' : '-' + each.deviceName;
|
||||
each.name = each.type + deviceName + name;
|
||||
each.disabled = false;
|
||||
const prdType = this.$store.state.training.prdType;
|
||||
if ( prdType == '01') {
|
||||
if (each.type !== '行值' && each.type !== 'no') { each.disabled = true; }
|
||||
} else if (prdType == '02') {
|
||||
if (each.type !== '行调' && each.type !== 'no') { each.disabled = true; }
|
||||
} else if (prdType == '04') {
|
||||
if (each.type !== '司机' && each.type !== 'no') { each.disabled = true; }
|
||||
}
|
||||
});
|
||||
return lastData;
|
||||
},
|
||||
@ -242,24 +252,19 @@ export default {
|
||||
this.roleShow = false;
|
||||
},
|
||||
|
||||
checkDisabled(role) {
|
||||
if (!this.$route.fullPath.includes('design/displayNew/demon')) {
|
||||
const prdType = this.$route.query.prdType;
|
||||
return this.judgeDisabled(prdType, role);
|
||||
} else {
|
||||
const prdType = this.$store.state.training.prdType;
|
||||
return this.judgeDisabled(prdType, role);
|
||||
}
|
||||
},
|
||||
judgeDisabled(prdType, role) {
|
||||
if ( prdType == '01') {
|
||||
return role !== '行值' && role !== 'no';
|
||||
} else if (prdType == '02') {
|
||||
return role !== '行调' && role !== 'no';
|
||||
} else if (prdType == '04') {
|
||||
return role !== '司机' && role !== 'no';
|
||||
}
|
||||
},
|
||||
// checkDisabled(role) {
|
||||
// const prdType = this.$store.state.training.prdType;
|
||||
// return this.judgeDisabled(prdType, role);
|
||||
// },
|
||||
// judgeDisabled(prdType, role) {
|
||||
// if ( prdType == '01') {
|
||||
// return role !== '行值' && role !== 'no';
|
||||
// } else if (prdType == '02') {
|
||||
// return role !== '行调' && role !== 'no';
|
||||
// } else if (prdType == '04') {
|
||||
// return role !== '司机' && role !== 'no';
|
||||
// }
|
||||
// },
|
||||
|
||||
handleName(item) {
|
||||
return this.roleConfig[item.type] ? this.roleConfig[item.type] : '' + (item.name ? item.name : '');
|
||||
|
@ -1,4 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<chat-box
|
||||
ref="chatbox"
|
||||
:group="group"
|
||||
@ -12,9 +13,12 @@
|
||||
:is-quit-show="isQuitShow"
|
||||
@resetCoversition="resetCoversition"
|
||||
/>
|
||||
<script-tip ref="scriptTip" :offset="offset" :member-data="memberData" @allowCreatCoversition="allowCreatCoversition" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import ChatBox from '../chatView/chatBox.vue';
|
||||
import ScriptTip from '@/views/newMap/displayNew/scriptDisplay/component/scriptTip';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import Cookies from 'js-cookie';
|
||||
import { getSimulationMemberList} from '@/api/simulation';
|
||||
@ -22,7 +26,8 @@ import {getAllConversition} from '@/api/chat';
|
||||
export default {
|
||||
name:'DemonChat',
|
||||
components:{
|
||||
ChatBox
|
||||
ChatBox,
|
||||
ScriptTip
|
||||
},
|
||||
props: {
|
||||
group: {
|
||||
@ -32,6 +37,10 @@ export default {
|
||||
userRole: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
offset: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -39,7 +48,7 @@ export default {
|
||||
isHasCoversition:false,
|
||||
conversitionId:'',
|
||||
currentMemberList:[],
|
||||
memberData:{},
|
||||
memberData:[],
|
||||
chatContentList:[],
|
||||
activeTrainList:[],
|
||||
isStartRecord:false,
|
||||
@ -89,13 +98,17 @@ export default {
|
||||
member.disabled = false;
|
||||
} else {
|
||||
member.disabled = true;
|
||||
member.userName = this.$store.state.user.nickname;
|
||||
this.$store.dispatch('training/setOrignalUserRoleId', member.id);
|
||||
}
|
||||
const userName = member.userName ? '-' + member.userName : '';
|
||||
const name = member.name == undefined ? '' : '-' + member.name;
|
||||
if (member.deviceCode) {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
|
||||
if (device) {
|
||||
if (device._type == 'Train') {
|
||||
member.label = member.type + device.groupNumber + name;
|
||||
member.deviceName = device.groupNumber;
|
||||
member.label = member.type + device.groupNumber + name + userName;
|
||||
lastMemberList.push(member);
|
||||
if (this.activeTrainList.length > 0) {
|
||||
if (this.activeTrainList.includes(member.deviceCode)) {
|
||||
@ -105,18 +118,21 @@ export default {
|
||||
this.driverList.push(member);
|
||||
}
|
||||
} else {
|
||||
member.label = member.type + device.name + name;
|
||||
member.deviceName = device.name;
|
||||
member.label = member.type + device.name + name + userName;
|
||||
lastMemberList.push(member);
|
||||
if (device._type == 'Station') {
|
||||
stationSupervisorList.push(member);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
member.label = member.type + member.deviceCode + name;
|
||||
member.deviceName = member.deviceCode;
|
||||
member.label = member.type + member.deviceCode + name + userName;
|
||||
lastMemberList.push(member);
|
||||
}
|
||||
} else {
|
||||
member.label = member.type + name;
|
||||
member.label = member.type + name + userName;
|
||||
member.deviceName = '';
|
||||
if (member.type == '行调') {
|
||||
dispatcherList.push(member);
|
||||
} else if (member.type == '通号') {
|
||||
@ -176,7 +192,8 @@ export default {
|
||||
memberList.push(member);
|
||||
} else {
|
||||
const member = this.memberData.find(member=>{ return member.id == id; });
|
||||
member.connect = false;
|
||||
// member.connect = false;
|
||||
member.connect = true;
|
||||
member && memberList.push(member);
|
||||
}
|
||||
});
|
||||
@ -256,6 +273,7 @@ export default {
|
||||
// 剧本执行完成消息
|
||||
'$store.state.socket.scriptFinish':function(val, old) {
|
||||
this.$message('剧本执行完成');
|
||||
this.$refs.scriptTip.resetScriptTip();
|
||||
},
|
||||
// 退出会话消息
|
||||
'$store.state.socket.overConversition': function (val) {
|
||||
@ -276,7 +294,15 @@ export default {
|
||||
member.connect = true;
|
||||
member.online = true;
|
||||
this.inviteUser = member;
|
||||
this.$refs.chatbox.inviteMember();
|
||||
|
||||
this.currentMemberList.push(member);
|
||||
const member = this.memberData.find(member=>{ return member.id == val.memberId; });
|
||||
member.connect = true;
|
||||
this.currentMemberList.push(member);
|
||||
this.isStartRecord = true;
|
||||
|
||||
// this.$refs.chatbox.inviteMember();
|
||||
this.$message.success(this.inviteUserName + '与你开启会话');
|
||||
}
|
||||
}
|
||||
|
||||
@ -300,7 +326,24 @@ export default {
|
||||
},
|
||||
clearAllData() {
|
||||
this.resetCoversition();
|
||||
this.createCoversition = false;
|
||||
this.createCoversition = true;
|
||||
this.$refs.scriptTip.resetScriptTip();
|
||||
},
|
||||
setMembers(roleId) {
|
||||
this.memberData.map(member=>{
|
||||
if (member.id == roleId) {
|
||||
member.userId = this.$store.state.user.id;
|
||||
member.userName = this.$store.state.user.nickname;
|
||||
member.disabled = true;
|
||||
} else {
|
||||
member.userId = '';
|
||||
member.userName = '';
|
||||
member.disabled = false;
|
||||
}
|
||||
const userName = member.userName ? '-' + member.userName : '';
|
||||
const name = member.name == undefined ? '' : '-' + member.name;
|
||||
member.label = member.type + member.deviceName + name + userName;
|
||||
});
|
||||
},
|
||||
resetCoversition() {
|
||||
this.conversitionId = '';
|
||||
@ -311,6 +354,12 @@ export default {
|
||||
this.inviteUserName = '';
|
||||
this.inviteUser = {};
|
||||
this.isQuitShow = false;
|
||||
},
|
||||
allowCreatCoversition() {
|
||||
this.createCoversition = true;
|
||||
},
|
||||
resetScriptTip() {
|
||||
this.$refs.scriptTip.resetScriptTip();
|
||||
}
|
||||
// isAudienceInitData() {
|
||||
// getAllConversition(this.group).then(resp => {
|
||||
|
227
src/views/newMap/displayNew/demonMenu.vue
Normal file
227
src/views/newMap/displayNew/demonMenu.vue
Normal file
@ -0,0 +1,227 @@
|
||||
<template>
|
||||
<!-- {} -->
|
||||
<div>
|
||||
<div v-if="isAllShow" class="display_top_draft" :style="allStyle">
|
||||
<div class="btn_hover" @click="menuClick">菜单</div>
|
||||
<el-button-group ref="button_group_box" class="button_group_box" :style="`margin-left:-${btnWidth}px`">
|
||||
<!-- 地图错误判断 -->
|
||||
<!-- 设备视图 -->
|
||||
<el-button v-if="jl3dmodelShow" size="small" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button>
|
||||
<!-- 三维视图 -->
|
||||
<el-button v-if="jl3dnameShow" size="small" @click="jumpjlmap3d">{{ jl3dname }}</el-button>
|
||||
<!-- cctv视图 -->
|
||||
<el-button v-if="cctvShow" size="small" @click="jumpjl3dpassflow">{{ jl3dpassflow }}</el-button>
|
||||
|
||||
<!-- 故障设备视图 -->
|
||||
<el-button v-if="jlmap3dFaultShow" size="small" @click="jumpjlmap3dFault">故障设备</el-button>
|
||||
<!-- 司机视角 -->
|
||||
<el-button v-if="driverShow" size="small" type="jumpjlmap3d" @click="jumpjlmap3dDriver">{{ $t('joinTraining.driverPerspective') }}</el-button>
|
||||
<!-- 排班计划 -->
|
||||
<el-button v-if="scheduleLoadShow" type="primary" size="small" @click="jumpScheduling">派班计划加载</el-button>
|
||||
<el-button v-if="schedulePreviewShow" type="primary" size="small" @click="schedulingView">派班计划预览</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<Jl3d-Device
|
||||
v-if="deviceShow"
|
||||
ref="Jl3dDevice"
|
||||
:panel-show="deviceShow"
|
||||
@closedevice3dview="jumpjlmap3dmodel"
|
||||
/>
|
||||
<Jl3d-Drive v-show="drivingShow" ref="Jl3dDrive" :panel-show="drivingShow" @showdriving="showdriving" />
|
||||
<scheduling v-if="scheduleLoadShow" ref="scheduling" :group="group" />
|
||||
<scheduling-view v-if="schedulePreviewShow" ref="schedulingView" :group="group" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Jl3dDevice from '@/views/jlmap3d/device/jl3ddevice';
|
||||
import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import Scheduling from '@/views/newMap/displayNew/demon/scheduling';
|
||||
import SchedulingView from '@/views/newMap/displayNew/demon/schedulingView';
|
||||
export default {
|
||||
name:'DemonMenu',
|
||||
components:{
|
||||
Jl3dDevice,
|
||||
Jl3dDrive,
|
||||
Scheduling,
|
||||
SchedulingView
|
||||
},
|
||||
props:{
|
||||
isAllShow:{
|
||||
type:Boolean,
|
||||
require:true
|
||||
},
|
||||
jl3dmodelShow:{
|
||||
type:Boolean,
|
||||
require:true
|
||||
},
|
||||
jl3dnameShow:{
|
||||
type:Boolean,
|
||||
require:true
|
||||
},
|
||||
cctvShow:{
|
||||
type:Boolean,
|
||||
require:true
|
||||
},
|
||||
scheduleLoadShow:{
|
||||
type:Boolean,
|
||||
require:true
|
||||
},
|
||||
driverShow:{
|
||||
type:Boolean,
|
||||
require:true
|
||||
},
|
||||
schedulePreviewShow:{
|
||||
type:Boolean,
|
||||
require:true
|
||||
},
|
||||
jlmap3dFaultShow:{
|
||||
type:Boolean,
|
||||
require:true
|
||||
},
|
||||
allStyle:{
|
||||
type:String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
hoverBtn: false,
|
||||
btnWidth: 0,
|
||||
group:'',
|
||||
mapId:'',
|
||||
deviceShow: false,
|
||||
drivingShow: false,
|
||||
jl3dpassflow:this.$t('display.demon.passengerflow'),
|
||||
jl3dname: this.$t('display.demon.threeDimensionalView'),
|
||||
jl3dmodel: this.$t('display.demon.deviceView')
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
isDrive() {
|
||||
return this.$route.query.prdType == '04';
|
||||
},
|
||||
project() {
|
||||
return getSessionStorage('project');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.group = this.$route.query.group;
|
||||
this.mapId = this.$route.query.mapId;
|
||||
},
|
||||
methods:{
|
||||
menuClick() {
|
||||
this.hoverBtn = !this.hoverBtn;
|
||||
if (this.hoverBtn) {
|
||||
// this.$refs.button_group_box.$el.clientWidth ||
|
||||
this.btnWidth = 500; // 默认宽度
|
||||
} else {
|
||||
// button_group_box
|
||||
this.btnWidth = 0;
|
||||
}
|
||||
},
|
||||
jumpjlmap3dmodel() {
|
||||
if (this.deviceShow == false) {
|
||||
this.deviceShow = true;
|
||||
} else {
|
||||
this.deviceShow = false;
|
||||
}
|
||||
},
|
||||
showdriving() {
|
||||
this.drivingShow = false;
|
||||
},
|
||||
jumpjlmap3d() {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/sandbox',
|
||||
query:{
|
||||
mapid:this.mapId,
|
||||
group:this.group,
|
||||
token:getToken(),
|
||||
project: this.project,
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
},
|
||||
jumpjl3dpassflow() {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/passengerflow',
|
||||
query:{
|
||||
mapid:this.mapId,
|
||||
group:this.group,
|
||||
project: this.project,
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
},
|
||||
jumpjlmap3dFault() {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/maintainer',
|
||||
query:{
|
||||
mapid:this.mapId,
|
||||
group:this.group,
|
||||
token:getToken(),
|
||||
project: this.project,
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
this.openWindow = window.open(routeData.href);
|
||||
|
||||
},
|
||||
jumpjlmap3dDriver() {
|
||||
this.drivingShow = true;
|
||||
this.$refs.Jl3dDrive.show(this.mapId, this.group);
|
||||
},
|
||||
jumpScheduling() {
|
||||
this.$refs.scheduling.doShow();
|
||||
},
|
||||
schedulingView() {
|
||||
this.$refs.schedulingView.doShow();
|
||||
},
|
||||
hideScheduling(running) {
|
||||
if (running) {
|
||||
this.$refs.scheduling && this.$refs.scheduling.doClose();
|
||||
} else {
|
||||
this.$refs.schedulingView && this.$refs.schedulingView.doClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.display_top_draft{
|
||||
position: absolute;
|
||||
left: 5px;
|
||||
top: 15px;
|
||||
height: 32px;
|
||||
overflow: hidden;
|
||||
padding-left: 44px;
|
||||
z-index: 35;
|
||||
.btn_hover{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 2;
|
||||
color: #4e4d4d;
|
||||
font-size: 14px;
|
||||
background: #fff;
|
||||
padding: 8px;
|
||||
border-radius: 5px;
|
||||
display: table;
|
||||
cursor: pointer;
|
||||
float: left;
|
||||
height: 32px;
|
||||
}
|
||||
.button_group_box{
|
||||
float: left;
|
||||
transition: all 0.5s;
|
||||
overflow: hidden;
|
||||
margin-left: -700px;
|
||||
// transform: translateX(0px);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,66 +1,16 @@
|
||||
<template>
|
||||
<div class="main" :style="{width: canvasWidth+'px'}">
|
||||
<template v-show="panelShow" :panelShow="panelShow">
|
||||
<div class="main" :style="{width: canvasWidth+'px',height:'100%',position:'absolute',overflow:'hidden'}">
|
||||
<template>
|
||||
<!-- v-show="panelShow" :panelShow="panelShow" -->
|
||||
<transition name="el-zoom-in-bottom">
|
||||
<map-system-draft ref="mapCanvas" @back="back" />
|
||||
</transition>
|
||||
<status-icon v-if="$route.query.lineCode == '11' || $route.query.lineCode == '10'" ref="statusIcon" />
|
||||
<menu-demon
|
||||
v-if="isDemon"
|
||||
ref="menuDemon"
|
||||
:offset="offset"
|
||||
:offset-bottom="offsetBottom"
|
||||
:data-error="dataError"
|
||||
:script-id="scriptId"
|
||||
:show-station="showStation"
|
||||
:text-status-height="textStatusHeight"
|
||||
@hidepanel="hidepanel"
|
||||
@passflow="passflow"
|
||||
@quitQuest="quitQuest"
|
||||
@jl3dstation="jl3dstation"
|
||||
@devicemodel="devicemodel"
|
||||
@showScheduling="showScheduling"
|
||||
@schedulingView="schedulingView"
|
||||
@hideScheduling="hideScheduling"
|
||||
@switchStationMode="switchStationMode"
|
||||
/>
|
||||
<menu-lesson
|
||||
v-if="isLesson"
|
||||
ref="lessonMenu"
|
||||
:offset="offset"
|
||||
:data-error="dataError"
|
||||
:offset-bottom="offsetBottom"
|
||||
:tip-bottom="tipBottom"
|
||||
:show-station="showStation"
|
||||
:station-list="stationListMode"
|
||||
:show-select-station="showSelectStation"
|
||||
@switchStationMode="switchStationMode"
|
||||
/>
|
||||
<menu-exam
|
||||
v-if="isExam"
|
||||
ref="menuExam"
|
||||
:offset="offset"
|
||||
:data-error="dataError"
|
||||
:offset-bottom="offsetBottom"
|
||||
:show-station="showStation"
|
||||
:station-list="stationListMode"
|
||||
:show-select-station="showSelectStation"
|
||||
@switchStationMode="switchStationMode"
|
||||
/>
|
||||
|
||||
<menu-schema
|
||||
v-if="isDemon || isScript"
|
||||
ref="menuSchema"
|
||||
:offset="offset"
|
||||
:data-error="dataError"
|
||||
:offset-bottom="offsetBottom"
|
||||
:show-station="showStation"
|
||||
:station-list="stationListMode"
|
||||
:show-select-station="showSelectStation"
|
||||
@switchMode="switchMode"
|
||||
@selectQuest="selectQuest"
|
||||
@switchStationMode="switchStationMode"
|
||||
/>
|
||||
<menu-demon v-if="isDemon" ref="menuDemon" :offset="offset" :offset-bottom="offsetBottom" :data-error="dataError" :text-status-height="textStatusHeight" />
|
||||
<!-- ok -->
|
||||
<menu-lesson v-if="isLesson" ref="lessonMenu" :offset="offset" :data-error="dataError" :offset-bottom="offsetBottom" :tip-bottom="tipBottom" />
|
||||
<!-- ok -->
|
||||
<menu-exam v-if="isExam" ref="menuExam" :offset="offset" :data-error="dataError" :offset-bottom="offsetBottom" />
|
||||
|
||||
<menu-script
|
||||
v-if="isScript"
|
||||
@ -70,7 +20,6 @@
|
||||
:project="project"
|
||||
:text-status-height="textStatusHeight"
|
||||
:data-error="dataError"
|
||||
@script3ddriveshow="script3ddriveshow"
|
||||
/>
|
||||
|
||||
<menu-practice
|
||||
@ -78,114 +27,66 @@
|
||||
ref="menuPractice"
|
||||
:offset="offset"
|
||||
:offset-bottom="offsetBottom"
|
||||
:show-station="showStation"
|
||||
:station-list="stationListMode"
|
||||
:show-select-station="showSelectStation"
|
||||
:data-error="dataError"
|
||||
@switchMode="switchMode"
|
||||
@switchStationMode="switchStationMode"
|
||||
/>
|
||||
|
||||
<menu-train-list v-if="isDemon" @setCenter="setCenter" />
|
||||
|
||||
<menu-system-time ref="menuSystemTime" :offset="offset" :group="group" />
|
||||
<!-- @showScheduling="showScheduling"
|
||||
@schedulingView="schedulingView"
|
||||
@hideScheduling="hideScheduling" -->
|
||||
<!-- @devicemodel="devicemodel" -->
|
||||
<!-- @jl3dstation="jl3dstation" -->
|
||||
<!-- @quitQuest="quitQuest" -->
|
||||
<!-- @passflow="passflow" -->
|
||||
<!-- @hidepanel="hidepanel" -->
|
||||
<!-- :is-script-run="isScriptRun" -->
|
||||
</template>
|
||||
<Jl3d-Device
|
||||
v-if="deviceShow"
|
||||
ref="Jl3dDevice"
|
||||
:panel-show="deviceShow"
|
||||
@closedevice3dview="devicemodel"
|
||||
/>
|
||||
|
||||
<!-- <Jl3d-Simulation v-show="simulationShow" ref="Jl3dSimulation" :panel-show="simulationShow" @showpanel="showpanel" /> -->
|
||||
<Jl3d-Drive v-show="drivingShow" ref="Jl3dDrive" :panel-show="drivingShow" @showdriving="showdriving" />
|
||||
|
||||
<scheduling v-if="isShowScheduling" ref="scheduling" :group="group" />
|
||||
<scheduling-view v-if="isShowScheduling" ref="schedulingView" :group="group" />
|
||||
<menu-train-list v-if="isDemon" @setCenter="setCenter" />
|
||||
<menu-system-time ref="menuSystemTime" :offset="offset" :group="group" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import MapSystemDraft from '@/views/newMap/mapsystemNew/index';
|
||||
import MenuDemon from '@/views/newMap/displayNew/menuDemon';
|
||||
import StatusIcon from '@/views/components/StatusIcon/statusIcon';
|
||||
import MenuDemon from '@/views/newMap/displayNew/menuDemon';
|
||||
import MenuExam from '@/views/newMap/displayNew/menuExam';
|
||||
import MenuLesson from '@/views/newMap/displayNew/menuLesson';
|
||||
import MenuSchema from '@/views/newMap/displayNew/menuSchema';
|
||||
import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
|
||||
import MenuTrainList from '@/views/newMap/displayNew/menuTrainList';
|
||||
import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
|
||||
import MenuScript from '@/views/newMap/displayNew/menuScript';
|
||||
import MenuPractice from '@/views/newMap/displayNew/menuPractice';
|
||||
// 三维
|
||||
// import Jl3dSimulation from '@/views/jlmap3d/simulation/jl3dsimulation';
|
||||
import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
|
||||
import Jl3dDevice from '@/views/jlmap3d/device/jl3ddevice';
|
||||
import Scheduling from './demon/scheduling';
|
||||
import SchedulingView from './demon/schedulingView';
|
||||
import { clearSimulation, getSimulationInfoNew, getSimulationMemberList } from '@/api/simulation';
|
||||
import { getTrainingDetailNew } from '@/api/jmap/training';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { clearSimulation, getSimulationInfoNew } from '@/api/simulation';
|
||||
import { loadNewMapDataByGroup } from '@/utils/loaddata';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
export default {
|
||||
name: 'DisplayDraft',
|
||||
components: {
|
||||
MapSystemDraft,
|
||||
MenuDemon,
|
||||
StatusIcon,
|
||||
MenuSystemTime,
|
||||
MenuDemon,
|
||||
MenuExam,
|
||||
MenuLesson,
|
||||
MenuSchema,
|
||||
MenuSystemTime,
|
||||
MenuTrainList,
|
||||
MenuScript,
|
||||
MenuPractice,
|
||||
// Jl3dSimulation,
|
||||
Jl3dDrive,
|
||||
Jl3dDevice,
|
||||
Scheduling,
|
||||
SchedulingView
|
||||
MenuScript
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
panelShow: true,
|
||||
drivingShow: false,
|
||||
deviceShow: false,
|
||||
// simulationShow: false,
|
||||
offset: 15,
|
||||
offsetBottom: 15,
|
||||
tipBottom: 0,
|
||||
scriptId: 0,
|
||||
dataError: false,
|
||||
group:'',
|
||||
showStation: '',
|
||||
stationListMode: [],
|
||||
showSelectStation: false, // 是否展示现地选择设备集中站select
|
||||
prdTypeMap: {
|
||||
'01': '01', // 现地 => 现地
|
||||
'02': '02', // 行调 => 行调
|
||||
'04': '02', // 司机 => 行调
|
||||
'05': '' // 派班 => null
|
||||
},
|
||||
textStatusHeight: 0,
|
||||
planRunning:false,
|
||||
textStatusHeight: 0
|
||||
dataError: false,
|
||||
group:''
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
...mapGetters([
|
||||
'canvasWidth'
|
||||
]),
|
||||
...mapGetters('map', [
|
||||
'map',
|
||||
'stationList'
|
||||
]),
|
||||
// ...mapGetters('training', [
|
||||
// 'offsetStationCode'
|
||||
// ]),
|
||||
mode() {
|
||||
return this.$route.params.mode;
|
||||
},
|
||||
@ -201,54 +102,23 @@ export default {
|
||||
isScript() {
|
||||
return this.mode === 'script';
|
||||
},
|
||||
isPractice() {
|
||||
return this.mode === 'practice';
|
||||
},
|
||||
mapId() {
|
||||
return this.$route.query.mapId;
|
||||
},
|
||||
width() {
|
||||
return this.$store.state.app.width;
|
||||
},
|
||||
height() {
|
||||
return this.$store.state.app.height;
|
||||
},
|
||||
mapId() {
|
||||
return this.$route.query.mapId;
|
||||
},
|
||||
prdType() {
|
||||
return this.$route.query.prdType;
|
||||
},
|
||||
project() {
|
||||
return getSessionStorage('project');
|
||||
},
|
||||
isShowScheduling() {
|
||||
return this.$route.query.prdType == '05';
|
||||
},
|
||||
isPractice() {
|
||||
return this.mode === 'practice';
|
||||
},
|
||||
isDrive() {
|
||||
return this.prdType == '04';
|
||||
},
|
||||
trainingId() {
|
||||
return this.$route.query.trainingId;
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'$store.state.config.menuBarLoadedCount': function (val) { // menuBar加载完成
|
||||
this.setPosition();
|
||||
},
|
||||
'$store.state.training.prdType': function (val) { // 根据权限类型计算高度
|
||||
this.setPosition();
|
||||
this.setMode();
|
||||
},
|
||||
'$store.state.app.windowSizeCount': function() {
|
||||
this.setWindowSize();
|
||||
this.setPosition();
|
||||
},
|
||||
$route() {
|
||||
this.initLoadData();
|
||||
},
|
||||
'$store.state.training.centerStationCode': function(code) {
|
||||
if (code) {
|
||||
this.showStation = code;
|
||||
}
|
||||
},
|
||||
'$store.state.socket.permissionOver': function () {
|
||||
this.$alert('用户权限已被收回', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
@ -257,47 +127,49 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
'stationList': function () {
|
||||
!this.isExam && !this.isLesson && this.setStationList();
|
||||
'$store.state.config.menuBarLoadedCount': function (val) { // menuBar加载完成
|
||||
this.setPosition();
|
||||
},
|
||||
'$store.state.app.windowSizeCount': function() { // 窗口缩放
|
||||
this.setWindowSize();
|
||||
this.setPosition();
|
||||
},
|
||||
'$store.state.training.prdType': function (val) { // 根据权限类型计算高度
|
||||
this.setPosition();
|
||||
},
|
||||
'$store.state.map.mapViewLoadedCount': function (val) { // 地图视图加载完成标识 开始加载默认状态
|
||||
if (this.planRunning) {
|
||||
this.$store.dispatch('training/simulationStart');
|
||||
}
|
||||
this.isExam && this.$store.state.exam.deviceCode && this.setCenter(this.$store.state.exam.deviceCode);
|
||||
!this.isExam && !this.isLesson && this.switchStationMode(this.showStation);
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
this.group = this.$route.query.group;
|
||||
this.setWindowSize();
|
||||
await this.initLoadData();
|
||||
this.setMode();
|
||||
$route() {
|
||||
this.initLoadData();
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.quit(this.group);
|
||||
this.$store.dispatch('training/reset');
|
||||
this.$store.dispatch('map/mapClear');
|
||||
},
|
||||
async mounted() {
|
||||
this.group = this.$route.query.group;
|
||||
this.setWindowSize();
|
||||
this.initLoadData();
|
||||
},
|
||||
methods:{
|
||||
// 加载地图数据
|
||||
async initLoadData() {
|
||||
this.$store.dispatch('training/reset');
|
||||
try {
|
||||
await this.loadSimulationInfo();
|
||||
if (this.isDemon) {
|
||||
await this.initLoadDemonData();
|
||||
} else if (this.isScript) {
|
||||
await this.initLoadScriptData();
|
||||
} else if (this.isPractice) {
|
||||
await this.initPracticeData();
|
||||
} else {
|
||||
await this.initLoadLessonOrExamData();
|
||||
}
|
||||
} catch (error) {
|
||||
this.$messageBox(`初始化失败: ${error.message}`);
|
||||
this.endViewLoading();
|
||||
// 结束加载状态
|
||||
endViewLoading(isSuccess) {
|
||||
if (!isSuccess) {
|
||||
this.$store.dispatch('map/mapClear');
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
EventBus.$emit('viewLoading', false);
|
||||
});
|
||||
},
|
||||
// 销毁仿真
|
||||
quit(group) {
|
||||
clearSimulation(group);
|
||||
this.$store.dispatch('training/over');
|
||||
},
|
||||
// 仿真错误时,被动退出时调用
|
||||
async back() {
|
||||
@ -311,219 +183,10 @@ export default {
|
||||
await this.$refs.menuScript.back();
|
||||
}
|
||||
},
|
||||
// 销毁仿真
|
||||
quit(group) {
|
||||
clearSimulation(group);
|
||||
this.$store.dispatch('training/over');
|
||||
setCenter(code) {
|
||||
this.$jlmap.setCenter(code);
|
||||
},
|
||||
// 缩放设置
|
||||
setWindowSize() {
|
||||
const width = this.width;
|
||||
const height = this.height;
|
||||
this.$store.dispatch('config/resize', { width, height });
|
||||
// this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode });
|
||||
},
|
||||
// 任务录制系统
|
||||
async initLoadScriptData() {
|
||||
this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
this.switchMode('01');
|
||||
|
||||
if (this.mapId) {
|
||||
await this.loadNewMapDataByGroup(this.group);
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
},
|
||||
script3ddriveshow() {
|
||||
this.panelShow = false;
|
||||
this.drivingShow = true;
|
||||
this.$refs.Jl3dDrive.show(this.mapId, this.group);
|
||||
},
|
||||
// 课程和考试系统
|
||||
async initLoadLessonOrExamData() {
|
||||
this.$store.dispatch('training/end', null);
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
|
||||
if (parseInt(this.trainingId)) {
|
||||
// 设置地图数据
|
||||
// 设置实训数据
|
||||
const resp = await getTrainingDetailNew(this.trainingId);
|
||||
this.$store.dispatch('exam/setCenter', resp.data.locateDeviceCode);
|
||||
if (resp && resp.code == 200) {
|
||||
const detail = resp.data;
|
||||
await this.$store.dispatch('training/setPrdType', this.prdTypeMap[detail.prdType]);
|
||||
await this.loadNewMapDataByGroup(this.group);
|
||||
} else {
|
||||
this.$messageBox(`获取实训步骤数据失败`);
|
||||
this.endViewLoading();
|
||||
}
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
},
|
||||
// 加载实操地图数据
|
||||
async initPracticeData() {
|
||||
this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
this.switchMode('01');
|
||||
|
||||
if (parseInt(this.mapId)) {
|
||||
await this.loadNewMapDataByGroup(this.group);
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
},
|
||||
// 新版地图根据仿真group获取仿真基础信息
|
||||
async loadSimulationInfo() {
|
||||
getSimulationMemberList(this.$route.query.group).then(resp => { // 单人仿真获取人员列表
|
||||
this.$store.dispatch('training/setMemberList', {memberList:resp.data, userId: this.$store.state.user.id});
|
||||
}).catch(() => {
|
||||
this.$messageBox('获取仿真成员列表失败!');
|
||||
});
|
||||
const resp = await getSimulationInfoNew(this.group);
|
||||
if (resp && resp.code == 200 && resp.data && !resp.data.dataError) {
|
||||
this.dataError = false;
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause); // 是否暂停判断
|
||||
this.scriptId = Number(resp.data.scriptId) || 0;
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
|
||||
this.$store.dispatch('training/countTime');
|
||||
this.planRunning = resp.data.planRunning;
|
||||
if (!this.planRunning) {
|
||||
this.$store.dispatch('training/over');
|
||||
}
|
||||
if (this.isDemon) {
|
||||
this.$refs.menuDemon.initPlannedDriving(this.planRunning); // 是否正在按计划行车
|
||||
} else if (this.isScript) {
|
||||
// this.$refs.menuScript.initPlannedDriving(resp.data.planRunning);
|
||||
}
|
||||
} else if (resp && resp.code == 200 && resp.data && resp.data.dataError) {
|
||||
this.dataError = true;
|
||||
this.$messageBox('此地图数据正在维护中,无法运行!');
|
||||
}
|
||||
},
|
||||
// 结束加载状态
|
||||
endViewLoading(isSuccess) {
|
||||
if (!isSuccess) {
|
||||
this.$store.dispatch('map/mapClear');
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
EventBus.$emit('viewLoading', false);
|
||||
});
|
||||
},
|
||||
switchMode(prdType) {
|
||||
this.$store.dispatch('training/setPrdType', prdType); // 改变prdType
|
||||
},
|
||||
setMode() {
|
||||
if (this.map) {
|
||||
this.showSelectStation = this.map.skinVO.code === '06' && this.$store.state.training.prdType === '01';
|
||||
}
|
||||
},
|
||||
// 选择脚本
|
||||
selectQuest(row) {
|
||||
this.scriptId = parseInt(row.id);
|
||||
if (this.isDemon) {
|
||||
this.$refs.menuDemon.initLoadPage();
|
||||
}
|
||||
if (this.isScript) {
|
||||
this.$refs.menuScript.initLoadPage();
|
||||
}
|
||||
},
|
||||
// 仿真系统
|
||||
async initLoadDemonData() {
|
||||
this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
this.$store.dispatch('training/setPrdType', this.prdTypeMap[this.prdType]);
|
||||
if (parseInt(this.mapId)) {
|
||||
await this.loadNewMapDataByGroup(this.group);
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
},
|
||||
// 通过group加载地图数据
|
||||
async loadNewMapDataByGroup(group) {
|
||||
try {
|
||||
await loadNewMapDataByGroup(group);
|
||||
await this.$store.dispatch('training/setMapDefaultState');
|
||||
} catch (error) {
|
||||
this.$messageBox(`获取地图数据失败: ${error.message}`);
|
||||
this.endViewLoading();
|
||||
}
|
||||
},
|
||||
// 退出脚本
|
||||
async quitQuest() {
|
||||
this.scriptId = 0;
|
||||
},
|
||||
hidepanel() {
|
||||
if (this.isDrive) {
|
||||
this.panelShow = false;
|
||||
this.drivingShow = true;
|
||||
this.$refs.Jl3dDrive.show(this.mapId, this.group);
|
||||
} else {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/sandbox',
|
||||
query:{
|
||||
mapid:this.mapId,
|
||||
group:this.group,
|
||||
token:getToken(),
|
||||
project: this.project,
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
}
|
||||
},
|
||||
passflow() {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/passengerflow',
|
||||
query:{
|
||||
mapid:this.mapId,
|
||||
group:this.group,
|
||||
project: this.project,
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
},
|
||||
devicemodel() {
|
||||
if (this.deviceShow == false) {
|
||||
this.deviceShow = true;
|
||||
} else {
|
||||
this.deviceShow = false;
|
||||
}
|
||||
},
|
||||
jl3dstation() {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/jl3dstation',
|
||||
query:{
|
||||
mapid:this.mapId,
|
||||
project: this.project,
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
},
|
||||
showScheduling() {
|
||||
this.$refs.scheduling.doShow();
|
||||
},
|
||||
schedulingView() {
|
||||
this.$refs.schedulingView.doShow();
|
||||
},
|
||||
hideScheduling(running) {
|
||||
if (running) {
|
||||
this.$refs.scheduling && this.$refs.scheduling.doClose();
|
||||
} else {
|
||||
this.$refs.schedulingView && this.$refs.schedulingView.doClose();
|
||||
}
|
||||
},
|
||||
showdriving() {
|
||||
this.panelShow = true;
|
||||
this.drivingShow = false;
|
||||
},
|
||||
// showpanel() {
|
||||
// this.panelShow = true;
|
||||
// this.simulationShow = false;
|
||||
// }
|
||||
// 设置 各个按钮的定位
|
||||
setPosition() {
|
||||
this.$nextTick(() => {
|
||||
this.offset = 10;
|
||||
@ -552,57 +215,60 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
setCenter(code) {
|
||||
this.$jlmap.setCenter(code);
|
||||
// 缩放设置
|
||||
setWindowSize() {
|
||||
const width = this.width;
|
||||
const height = this.height;
|
||||
this.$store.dispatch('config/resize', { width, height });
|
||||
// this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode });
|
||||
},
|
||||
switchStationMode(val) {
|
||||
if (this.stationListMode.length > 0) {
|
||||
if (val == null) {
|
||||
this.showStation = this.stationListMode[0].value;
|
||||
} else {
|
||||
this.showStation = val;
|
||||
// 初始化
|
||||
initLoadData() {
|
||||
this.$store.dispatch('training/reset');
|
||||
this.loadSimulationInfo();
|
||||
this.loadMapData();
|
||||
},
|
||||
// 新版地图根据仿真group获取仿真基础信息
|
||||
async loadSimulationInfo() {
|
||||
const resp = await getSimulationInfoNew(this.group);
|
||||
if (resp && resp.code == 200 && resp.data && !resp.data.dataError) {
|
||||
this.dataError = false;
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause); // 是否暂停判断
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
|
||||
this.$store.dispatch('training/countTime');
|
||||
this.planRunning = resp.data.planRunning;
|
||||
if (!this.planRunning) {
|
||||
this.$store.dispatch('training/over');
|
||||
}
|
||||
const nameList = Object.keys(this.$store.state.map.map);
|
||||
let list = [];
|
||||
nameList.forEach(item => {
|
||||
if (this.$store.state.map.map[item] && this.$store.state.map.map[item].constructor === Array) {
|
||||
if (item === 'trainList') {
|
||||
this.$store.state.map.map[item].forEach(elem => {
|
||||
elem && list.push(elem);
|
||||
});
|
||||
} else {
|
||||
list = [...list, ...this.$store.state.map.map[item]];
|
||||
if (this.isDemon) {
|
||||
this.$refs.menuDemon.initPlannedDriving(this.planRunning); // 是否正在按计划行车
|
||||
} else if (this.isScript) {
|
||||
// this.$refs.menuScript.initPlannedDriving(resp.data.planRunning);
|
||||
}
|
||||
}
|
||||
});
|
||||
this.$jlmap.updateShowStation(list, this.showStation);
|
||||
this.setCenter(this.showStation);
|
||||
// this.$store.dispatch('map/setShowCentralizedStationCode', this.showStation);
|
||||
// this.$store.dispatch('map/setShowCentralizedStationNum');
|
||||
} else if (resp && resp.code == 200 && resp.data && resp.data.dataError) {
|
||||
this.dataError = true;
|
||||
this.$messageBox('此地图数据正在维护中,无法运行!');
|
||||
}
|
||||
},
|
||||
setStationList() {
|
||||
this.stationListMode = [];
|
||||
(this.stationList || []).forEach(item => {
|
||||
if (item.centralized) {
|
||||
this.stationListMode.push({value: item.code, name: item.name});
|
||||
// 加载地图数据
|
||||
loadMapData() {
|
||||
if (parseInt(this.mapId)) {
|
||||
this.loadNewMapDataByGroup(this.group);
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
});
|
||||
if (this.stationListMode.length && this.showSelectStation) {
|
||||
this.showStation = this.stationListMode[0].value;
|
||||
},
|
||||
// 通过group加载地图数据
|
||||
async loadNewMapDataByGroup(group) {
|
||||
try {
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
await loadNewMapDataByGroup(group);
|
||||
await this.$store.dispatch('training/setMapDefaultState');
|
||||
} catch (error) {
|
||||
this.$messageBox(`获取地图数据失败: ${error.message}`);
|
||||
this.endViewLoading();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss" rel="stylesheep/scss">
|
||||
.main {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,32 +1,30 @@
|
||||
<template>
|
||||
<div>
|
||||
<demon-chat ref="chatbox" :group="group" :user-role="userRole" />
|
||||
<demon-chat ref="chatbox" :group="group" :user-role="userRole" :offset="offset" />
|
||||
<div class="display-card" :style="{top: offset+'px'}">
|
||||
<el-row>
|
||||
<span v-if="countTime" class="display-score">{{ $t('display.demon.trialTime') }} {{ countTime }}</span>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-if="!dataError" class="display_top_draft" :style="{top: offset+textStatusHeight+'px'}">
|
||||
<div class="btn_hover" @click="menuClick">菜单</div>
|
||||
<el-button-group ref="button_group_box" class="button_group_box" :style="`margin-left:-${btnWidth}px`">
|
||||
<!-- 地图错误判断 -->
|
||||
<!-- 设备视图 -->
|
||||
<el-button v-if="isShow3dmodel && !isShowScheduling" size="small" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button>
|
||||
<!-- 三维视图 -->
|
||||
<el-button v-if="!isShowScheduling" size="small" @click="jumpjlmap3d">{{ jl3dname }}</el-button>
|
||||
<!-- cctv视图 -->
|
||||
<el-button v-if="!isShowScheduling" size="small" @click="jumpjl3dpassflow">{{ jl3dpassflow }}</el-button>
|
||||
<!-- 排班计划 -->
|
||||
<el-button v-if="isShowScheduling && !runing" type="primary" size="small" @click="jumpScheduling">派班计划加载</el-button>
|
||||
<el-button v-if="isShowScheduling && runing" type="primary" size="small" @click="schedulingView">派班计划预览</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<demon-menu
|
||||
ref="demonMenu"
|
||||
:is-all-show="!dataError"
|
||||
:jl3dmodel-show="isShow3dmodel && !isShowScheduling"
|
||||
:jl3dname-show="!isShowScheduling&&!isDrive"
|
||||
:cctv-show="!isShowScheduling"
|
||||
:schedule-load-show="isShowScheduling && !runing"
|
||||
:schedule-preview-show="isShowScheduling && runing"
|
||||
:jlmap3d-fault-show="false"
|
||||
:driver-show="isDrive"
|
||||
:all-style="'top:'+(offset+textStatusHeight)+'px'"
|
||||
/>
|
||||
|
||||
<div class="display-draft" :class="{'haerbin_btn_box': $route.query.lineCode == '07'}" :style="{bottom: offsetBottom + 'px'}">
|
||||
<el-button-group class="button-group-box">
|
||||
<el-button type="primary" size="small" @click="back">{{ projectDevice?'退出':$t('display.demon.back') }}</el-button>
|
||||
<template v-if="!dataError">
|
||||
<template v-if="isShowQuest">
|
||||
<el-button v-if="!isDesignPlatform" type="danger" size="small" @click="handleQuitQuest">退出剧本</el-button>
|
||||
<template v-if="isScriptRun">
|
||||
<el-button type="danger" size="small" @click="handleQuitQuest">退出剧本</el-button>
|
||||
</template>
|
||||
<template v-else-if="!projectDevice">
|
||||
<el-button type="danger" size="small" @click="end">{{ $t('display.demon.initialize') }}</el-button>
|
||||
@ -35,6 +33,21 @@
|
||||
</template>
|
||||
</el-button-group>
|
||||
</div>
|
||||
|
||||
<menu-schema
|
||||
ref="menuSchema"
|
||||
:offset="offset"
|
||||
:data-error="dataError"
|
||||
:offset-bottom="offsetBottom"
|
||||
@selectQuest="selectQuest"
|
||||
/>
|
||||
|
||||
<!-- :station-list="stationListMode"
|
||||
:show-select-station="showSelectStation"
|
||||
@selectQuest="selectQuest"
|
||||
@switchStationMode="switchStationMode"
|
||||
@switchMode="switchMode" -->
|
||||
|
||||
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
||||
</div>
|
||||
|
||||
@ -43,20 +56,27 @@
|
||||
<!-- 单人仿真 -->
|
||||
<script>
|
||||
import SetTime from './demon/setTime';
|
||||
import DemonMenu from './demonMenu';
|
||||
import DemonChat from './demonChat';
|
||||
import { Notification } from 'element-ui';
|
||||
import MenuSchema from '@/views/newMap/displayNew/menuSchema';
|
||||
import { getGoodsTryUse } from '@/api/management/goods';
|
||||
import { ranAsPlan, exitRunPlan, clearSimulation, getSimulationInfoNew } from '@/api/simulation';
|
||||
import { PermissionType } from '@/scripts/ConstDic';
|
||||
import { getCountTime } from '@/utils/index';
|
||||
import { TrainingMode } from '@/scripts/ConstDic';
|
||||
import { quitScriptNew } from '@/api/simulation';
|
||||
import { setGoodsTryUse } from '@/api/management/goods';
|
||||
import {loadScriptNew } from '@/api/simulation';
|
||||
import Vue from 'vue';
|
||||
|
||||
export default {
|
||||
name: 'MenuDemon',
|
||||
components: {
|
||||
SetTime,
|
||||
DemonChat
|
||||
DemonChat,
|
||||
MenuSchema,
|
||||
DemonMenu
|
||||
},
|
||||
props: {
|
||||
offset: {
|
||||
@ -67,18 +87,6 @@ export default {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
scriptId: {
|
||||
type: Number,
|
||||
default() {
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
showStation: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
dataError: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
@ -100,6 +108,7 @@ export default {
|
||||
time: null, // 定时器
|
||||
countTime: 0, // 显示 倒计时
|
||||
remainingTime: 0,
|
||||
userRole:'AUDIENCE',
|
||||
goodsId: this.$route.query.goodsId,
|
||||
try: this.$route.query.try, // 是否是试用权限
|
||||
training: {
|
||||
@ -107,43 +116,32 @@ export default {
|
||||
name: '',
|
||||
remarks: ''
|
||||
},
|
||||
isScriptRun:false,
|
||||
jl3dpassflow:this.$t('display.demon.passengerflow'),
|
||||
jl3dname: this.$t('display.demon.threeDimensionalView'),
|
||||
jl3dstation: this.$t('display.demon.threeDimensionalStation'),
|
||||
jl3dmodel: this.$t('display.demon.deviceView'),
|
||||
isShow3dmodel :false,
|
||||
isGoback: false,
|
||||
hoverBtn: false,
|
||||
btnWidth: 0,
|
||||
runing:false
|
||||
runing:false,
|
||||
prdTypeMap: {
|
||||
'01': '01', // 现地 => 现地
|
||||
'02': '02', // 行调 => 行调
|
||||
'04': '02', // 司机 => 行调
|
||||
'05': '' // 派班 => null
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isShowQuest() {
|
||||
return this.scriptId;
|
||||
},
|
||||
isShowScheduling() {
|
||||
return this.$route.query.prdType == '05';
|
||||
},
|
||||
isDesignPlatform() {
|
||||
return this.$route.fullPath.includes('design/display/demon');
|
||||
isDrive() {
|
||||
return this.$route.query.prdType == '04';
|
||||
},
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
userRole() {
|
||||
if (this.$route.query.prdType == '02') {
|
||||
return 'DISPATCHER';
|
||||
} else if (this.$route.query.prdType == '01') {
|
||||
return 'STATION_SUPERVISOR';
|
||||
} else if (this.$route.query.prdType == '04') {
|
||||
return 'DRIVER';
|
||||
} else if (this.$route.query.prdType == '05') {
|
||||
return 'DEPOT_DISPATCHER';
|
||||
} else {
|
||||
return 'AUDIENCE';
|
||||
}
|
||||
},
|
||||
projectDevice() {
|
||||
return this.$route.query.projectDevice;
|
||||
}
|
||||
@ -174,6 +172,20 @@ export default {
|
||||
this.setRuning(false);
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$store.dispatch('training/setPrdType', this.$route.query.prdType);
|
||||
if (this.$store.state.training.prdType == '02') {
|
||||
this.userRole = 'DISPATCHER';
|
||||
} else if (this.$store.state.training.prdType == '01') {
|
||||
this.userRole = 'STATION_SUPERVISOR';
|
||||
} else if (this.$store.state.training.prdType == '04') {
|
||||
this.userRole = 'DRIVER';
|
||||
} else if (this.$store.state.training.prdType == '05') {
|
||||
this.userRole = 'DEPOT_DISPATCHER';
|
||||
} else {
|
||||
this.userRole = 'AUDIENCE';
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.time) {
|
||||
this.setTryTime();
|
||||
@ -183,8 +195,10 @@ export default {
|
||||
this.$store.dispatch('map/resetActiveTrainList', true);
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
||||
this.$store.dispatch('training/setPrdType', this.prdTypeMap[this.$route.query.prdType]);
|
||||
this.$nextTick(() => {
|
||||
this.menuClick();
|
||||
this.$refs.demonMenu.menuClick();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
@ -193,7 +207,6 @@ export default {
|
||||
if (this.try != '0') {
|
||||
this.loadInitData();
|
||||
}
|
||||
this.change3dname();
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
@ -238,9 +251,6 @@ export default {
|
||||
this.$store.dispatch('training/simulationStart').then(() => {
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
|
||||
this.$store.dispatch('map/setShowCentralizedStationNum');
|
||||
if (this.$route.query.lineCode == '06') {
|
||||
this.$emit('switchStationMode', this.showStation); // 宁波线 过滤列车显示
|
||||
}
|
||||
});
|
||||
}).catch(error => {
|
||||
this.isDisable = false;
|
||||
@ -271,7 +281,7 @@ export default {
|
||||
},
|
||||
setRuning(run) {
|
||||
this.runing = run;
|
||||
this.$emit('hideScheduling', run);
|
||||
this.$refs.demonMenu.hideScheduling(run);
|
||||
},
|
||||
end() {
|
||||
this.isDisable = false;
|
||||
@ -302,8 +312,71 @@ export default {
|
||||
this.$messageBox(this.$t('display.demon.exitTaskFail'));
|
||||
});
|
||||
},
|
||||
// 选择脚本
|
||||
async selectQuest({row, id, mapLocation, roleName}) {
|
||||
try {
|
||||
let userRole = 'AUDIENCE';
|
||||
if (id) {
|
||||
this.$store.dispatch('training/setPrdType', this.$route.query.prdType);
|
||||
if (this.$route.query.prdType) {
|
||||
if (this.$route.query.prdType == '02') {
|
||||
userRole = 'DISPATCHER';
|
||||
} else if (this.$route.query.prdType == '01') {
|
||||
userRole = 'STATION_SUPERVISOR';
|
||||
} else if (this.$route.query.prdType == '04') {
|
||||
userRole = 'DRIVER';
|
||||
} else if (this.$route.query.prdType == '05') {
|
||||
userRole = 'DEPOT_DISPATCHER';
|
||||
} else {
|
||||
userRole = 'AUDIENCE';
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('training/setRoles', userRole);
|
||||
} else {
|
||||
this.$store.dispatch('training/setRoles', 'AUDIENCE');
|
||||
this.$store.dispatch('training/setPrdType', '');
|
||||
}
|
||||
this.userRole = userRole;
|
||||
this.$store.dispatch('scriptRecord/updateBgSet', true);
|
||||
this.$refs.chatbox.setMembers(id);
|
||||
const res = await loadScriptNew(row.id, id, this.group);
|
||||
if (res && res.code == 200) {
|
||||
if (mapLocation) {
|
||||
const newMapLocation = {'offsetX': mapLocation.x, 'offsetY': mapLocation.y, 'scaleRate': mapLocation.scale};
|
||||
Vue.prototype.$jlmap.setOptions(newMapLocation);
|
||||
}
|
||||
this.isScriptRun = true;
|
||||
// this.initLoadPage();
|
||||
}
|
||||
} catch (error) {
|
||||
this.$messageBox(error.message);
|
||||
}
|
||||
// if (this.isScript) {
|
||||
// this.$refs.menuScript.initLoadPage();
|
||||
// }
|
||||
},
|
||||
quitQuest() {
|
||||
this.$emit('quitQuest');
|
||||
this.isScriptRun = false;
|
||||
let userRole = '';
|
||||
if (this.$route.query.prdType) {
|
||||
if (this.$route.query.prdType == '02') {
|
||||
userRole = 'DISPATCHER';
|
||||
} else if (this.$route.query.prdType == '01') {
|
||||
userRole = 'STATION_SUPERVISOR';
|
||||
} else if (this.$route.query.prdType == '04') {
|
||||
userRole = 'DRIVER';
|
||||
} else if (this.$route.query.prdType == '05') {
|
||||
userRole = 'DEPOT_DISPATCHER';
|
||||
} else {
|
||||
userRole = 'AUDIENCE';
|
||||
}
|
||||
}
|
||||
this.userRole = userRole;
|
||||
this.$refs.chatbox.setMembers(this.$store.state.training.orignalUserRoleId);
|
||||
this.$refs.chatbox.clearAllData();
|
||||
console.log(this.userRole, '11111111');
|
||||
this.$store.dispatch('training/setPrdType', this.$route.query.prdType);
|
||||
this.$store.dispatch('training/setRoles', userRole);
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause', false);
|
||||
},
|
||||
clearAllData() {
|
||||
@ -327,24 +400,6 @@ export default {
|
||||
}
|
||||
|
||||
},
|
||||
jumpjl3dpassflow() {
|
||||
this.$emit('passflow');
|
||||
},
|
||||
// jumpjl3dstation() {
|
||||
// this.$emit('jl3dstation');
|
||||
// },
|
||||
jumpjlmap3d() {
|
||||
this.$emit('hidepanel');
|
||||
},
|
||||
jumpjlmap3dmodel() {
|
||||
this.$emit('devicemodel');
|
||||
},
|
||||
jumpScheduling() {
|
||||
this.$emit('showScheduling');
|
||||
},
|
||||
schedulingView() {
|
||||
this.$emit('schedulingView');
|
||||
},
|
||||
setTryTime() {
|
||||
if (this.try) {
|
||||
const data = { time: this.tryTime, goodsId: this.goodsId };
|
||||
@ -353,24 +408,6 @@ export default {
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
change3dname() {
|
||||
if (this.$route.query.prdType == '04') {
|
||||
this.jl3dname = this.$t('display.demon.driverPerspective'); // 司机视角
|
||||
} else {
|
||||
this.jl3dname = this.$t('display.demon.threeDimensionalView'); // 三维视图
|
||||
this.isShow3dmodel = true;
|
||||
}
|
||||
},
|
||||
menuClick() {
|
||||
this.hoverBtn = !this.hoverBtn;
|
||||
if (this.hoverBtn) {
|
||||
// this.$refs.button_group_box.$el.clientWidth ||
|
||||
this.btnWidth = 500; // 默认宽度
|
||||
} else {
|
||||
// button_group_box
|
||||
this.btnWidth = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -436,35 +473,4 @@ export default {
|
||||
}
|
||||
|
||||
}
|
||||
.display_top_draft{
|
||||
position: absolute;
|
||||
left: 5px;
|
||||
top: 15px;
|
||||
height: 32px;
|
||||
overflow: hidden;
|
||||
padding-left: 44px;
|
||||
z-index: 35;
|
||||
.btn_hover{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 2;
|
||||
color: #4e4d4d;
|
||||
font-size: 14px;
|
||||
background: #fff;
|
||||
padding: 8px;
|
||||
border-radius: 5px;
|
||||
display: table;
|
||||
cursor: pointer;
|
||||
float: left;
|
||||
height: 32px;
|
||||
}
|
||||
.button_group_box{
|
||||
float: left;
|
||||
transition: all 0.5s;
|
||||
overflow: hidden;
|
||||
margin-left: -700px;
|
||||
// transform: translateX(0px);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -3,9 +3,6 @@
|
||||
<div class="display-card" :style="{top: offset + 'px'}">
|
||||
<el-row style="vertical-align:middle; ">
|
||||
<span class="display-time">{{ formatUsedTime }}</span>
|
||||
<!--<el-select v-if="showSelectStation" v-model="showStation" style="width: 100px;position: fixed; right: 10px;" size="small" @change="switchStationMode">-->
|
||||
<!--<el-option v-for="item in stationList" :key="item.value" :label="item.name" :value="item.value" />-->
|
||||
<!--</el-select>-->
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="display-draft" :style="{bottom: offsetBottom + 'px'}">
|
||||
@ -20,6 +17,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getTrainingDetailNew } from '@/api/jmap/training';
|
||||
import TipExamList from './tipExamList';
|
||||
import { Notification } from 'element-ui';
|
||||
import { startTrainingNew } from '@/api/jmap/training';
|
||||
@ -41,24 +39,6 @@ export default {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
showSelectStation: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
stationList: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
showStation: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
dataError: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
@ -74,6 +54,12 @@ export default {
|
||||
id: '',
|
||||
name: '',
|
||||
remarks: ''
|
||||
},
|
||||
prdTypeMap: {
|
||||
'01': '01', // 现地 => 现地
|
||||
'02': '02', // 行调 => 行调
|
||||
'04': '02', // 司机 => 行调
|
||||
'05': '' // 派班 => null
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -88,8 +74,14 @@ export default {
|
||||
watch: {
|
||||
'$store.state.map.mapViewLoadedCount': function() {
|
||||
this.$store.dispatch('exam/countUsedTime');
|
||||
},
|
||||
$route() {
|
||||
this.initData();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initData();
|
||||
},
|
||||
methods: {
|
||||
tipInfo(opt) {
|
||||
if (opt && opt.hasOwnProperty('color') && opt.hasOwnProperty('message')) {
|
||||
@ -181,8 +173,30 @@ export default {
|
||||
this.isDisable = false;
|
||||
this.$store.dispatch('training/end', null);
|
||||
},
|
||||
switchStationMode(val) {
|
||||
this.$emit('switchStationMode', val);
|
||||
// 课程和考试系统
|
||||
async initData() {
|
||||
this.$store.dispatch('training/end', null);
|
||||
if (parseInt(this.$route.query.trainingId)) {
|
||||
// 设置地图数据
|
||||
// 设置实训数据
|
||||
const resp = await getTrainingDetailNew(this.$route.query.trainingId);
|
||||
this.$store.dispatch('exam/setCenter', resp.data.locateDeviceCode);
|
||||
if (resp && resp.code == 200) {
|
||||
const detail = resp.data;
|
||||
await this.$store.dispatch('training/setPrdType', this.prdTypeMap[detail.prdType]);
|
||||
} else {
|
||||
this.$messageBox(`获取实训步骤数据失败`);
|
||||
this.endViewLoading();
|
||||
}
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
},
|
||||
// 结束加载状态
|
||||
endViewLoading(isSuccess) {
|
||||
if (!isSuccess) {
|
||||
this.$store.dispatch('map/mapClear');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -194,8 +208,7 @@ export default {
|
||||
z-index: 9;
|
||||
display: inline;
|
||||
position: absolute;
|
||||
// float: left;
|
||||
left: 160px;
|
||||
left: 10px;
|
||||
}
|
||||
|
||||
.display-time {
|
||||
|
@ -9,9 +9,6 @@
|
||||
</el-radio-group>
|
||||
<span class="display-time">{{ formatUsedTime }}</span>
|
||||
<span v-if="demoMode === TrainingMode.TEST" class="display-score">{{ $t('display.lesson.score') }}{{ formatScore }}</span>
|
||||
<el-select v-if="showSelectStation" v-model="showStation" style="width: 100px; position: fixed; right: 10px;" size="small" @change="switchStationMode">
|
||||
<el-option v-for="item in stationList" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
</el-row>
|
||||
</div>
|
||||
<div id="teachGroupButton" class="display-draft" :style="{bottom: offsetBottom + 'px'}">
|
||||
@ -27,6 +24,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getTrainingDetailNew } from '@/api/jmap/training';
|
||||
import TipTrainingDetail from './tipTrainingDetail';
|
||||
import LeftSlider from '@/views/newMap/displayNew/LeftSlider';
|
||||
import { mapGetters } from 'vuex';
|
||||
@ -56,24 +54,6 @@ export default {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
showSelectStation: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
stationList: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
showStation: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
dataError: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
@ -89,7 +69,13 @@ export default {
|
||||
demoMode: TrainingMode.TEACH,
|
||||
isDisable: false,
|
||||
backDisable: false,
|
||||
startLoading: false
|
||||
startLoading: false,
|
||||
prdTypeMap: {
|
||||
'01': '01', // 现地 => 现地
|
||||
'02': '02', // 行调 => 行调
|
||||
'04': '02', // 司机 => 行调
|
||||
'05': '' // 派班 => null
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -110,6 +96,9 @@ export default {
|
||||
},
|
||||
isShowLeftSlider() {
|
||||
return this.$route.query.lessonId != '0';
|
||||
},
|
||||
prdType() {
|
||||
return this.$route.query.prdType;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -119,7 +108,6 @@ export default {
|
||||
this.$store.dispatch('training/setStopCountTime');
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
|
||||
this.isDisable = false;
|
||||
},
|
||||
'$store.state.map.mapViewLoadedCount': function (val) {
|
||||
@ -142,6 +130,9 @@ export default {
|
||||
this.tipInfo({ color: val.color, message: val.errMsg });
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initData();
|
||||
},
|
||||
methods: {
|
||||
tipInfo(opt) {
|
||||
if (opt && opt.hasOwnProperty('color') && opt.hasOwnProperty('message')) {
|
||||
@ -169,7 +160,7 @@ export default {
|
||||
this.isDisable = true;
|
||||
startTrainingNew(this.trainingObj, this.group).then(response => {
|
||||
this.$store.dispatch('map/clearJlmapTrainView').then(() => {
|
||||
this.$store.dispatch('training/teachModeStart');
|
||||
this.$store.dispatch('training/teachModeStart', this.demoMode);
|
||||
this.$store.dispatch('training/countTime', 'Lesson'); // 开始计时
|
||||
this.$store.dispatch('training/setMapDefaultState').then(() => {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
@ -194,10 +185,10 @@ export default {
|
||||
lessonId: this.$route.query.lessonId,
|
||||
usedTime: this.usedTime
|
||||
};
|
||||
|
||||
endTrainingNew(mode, this.group).then(response => {
|
||||
const data = response.data;
|
||||
this.$store.dispatch('training/judgeFinish', data).then(rsp => {
|
||||
this.$store.dispatch('training/setStopCountTime');
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
}).catch(() => {
|
||||
@ -238,9 +229,7 @@ export default {
|
||||
}
|
||||
},
|
||||
back() {
|
||||
this.$emit('quit');
|
||||
Notification.closeAll();
|
||||
|
||||
if (this.$route.params.mode == 'record') {
|
||||
/** 如果是演示返回时,需要重新创建仿真*/
|
||||
trainingNotifyNew({ trainingId: this.$route.query.trainingId }).then(resp => {
|
||||
@ -252,8 +241,30 @@ export default {
|
||||
history.go(-1);
|
||||
}
|
||||
},
|
||||
switchStationMode(val) {
|
||||
this.$emit('switchStationMode', val);
|
||||
// 课程和考试系统
|
||||
async initData() {
|
||||
this.$store.dispatch('training/end', null);
|
||||
if (parseInt(this.$route.query.trainingId)) {
|
||||
// 设置地图数据
|
||||
// 设置实训数据
|
||||
const resp = await getTrainingDetailNew(this.$route.query.trainingId);
|
||||
this.$store.dispatch('exam/setCenter', resp.data.locateDeviceCode);
|
||||
if (resp && resp.code == 200) {
|
||||
const detail = resp.data;
|
||||
await this.$store.dispatch('training/setPrdType', this.prdTypeMap[detail.prdType]);
|
||||
} else {
|
||||
this.$messageBox(`获取实训步骤数据失败`);
|
||||
this.endViewLoading();
|
||||
}
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
},
|
||||
// 结束加载状态
|
||||
endViewLoading(isSuccess) {
|
||||
if (!isSuccess) {
|
||||
this.$store.dispatch('map/mapClear');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -4,9 +4,7 @@
|
||||
<el-select v-model="swch" size="small" :placeholder="$t('display.schema.selectProduct')" @change="switchMode">
|
||||
<el-option v-for="item in swchList" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
<el-select v-if="showSelectStation&&swch=='01'" v-model="showStationContent" style="width: 100px;" size="small" @change="switchStationModeInfo">
|
||||
<el-option v-for="item in stationList" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
<select-station ref="selectStation" :style-css="'width: 100px;'" />
|
||||
</div>
|
||||
<div class="practice-bottom" :style="{bottom: offsetBottom + 'px'}">
|
||||
<el-button-group>
|
||||
@ -19,13 +17,16 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import SelectStation from './selectStation';
|
||||
import { TrainingMode } from '@/scripts/ConstDic';
|
||||
import SetTime from '@/views/newMap/displayNew/demon/setTime';
|
||||
import { ranAsPlan, exitRunPlan } from '@/api/simulation';
|
||||
import { Notification } from 'element-ui';
|
||||
export default {
|
||||
name: 'MenuPractice',
|
||||
components:{
|
||||
SetTime
|
||||
SetTime,
|
||||
SelectStation
|
||||
},
|
||||
props: {
|
||||
offset: {
|
||||
@ -41,24 +42,6 @@ export default {
|
||||
default() {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
showSelectStation: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
showStation: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
stationList: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -128,7 +111,7 @@ export default {
|
||||
});
|
||||
},
|
||||
switchMode(swch) {
|
||||
this.$emit('switchMode', swch);
|
||||
this.$store.dispatch('training/setPrdType', swch); // 改变prdType
|
||||
this.switchModeInner(swch);
|
||||
},
|
||||
switchModeInner(swch) {
|
||||
@ -149,18 +132,6 @@ export default {
|
||||
}
|
||||
});
|
||||
this.$jlmap.updateShowMode(list, showMode);
|
||||
if (swch == '02') {
|
||||
this.switchStationMode('');
|
||||
} else {
|
||||
this.switchStationMode(null);
|
||||
}
|
||||
},
|
||||
switchStationModeInfo(val) {
|
||||
this.showStationContent = val;
|
||||
this.$emit('switchStationMode', val);
|
||||
},
|
||||
switchStationMode(val) {
|
||||
this.$emit('switchStationMode', val);
|
||||
},
|
||||
end() {
|
||||
this.isDisable = false;
|
||||
@ -175,6 +146,17 @@ export default {
|
||||
this.isDisable = true;
|
||||
this.$messageBox(this.$t('display.demon.endSimulationFail'));
|
||||
});
|
||||
},
|
||||
// 加载实操地图数据
|
||||
async initData() {
|
||||
this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
||||
this.$store.dispatch('training/setPrdType', '01'); // 改变prdType
|
||||
},
|
||||
// 结束加载状态
|
||||
endViewLoading(isSuccess) {
|
||||
if (!isSuccess) {
|
||||
this.$store.dispatch('map/mapClear');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1,9 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="schema" :style="{top: offset+'px'}">
|
||||
<el-select v-if="showSelectStation && isLocalStation && !isScript" v-model="showStationContent" style="width: 100px;" size="small" @change="switchStationModeInfo">
|
||||
<el-option v-for="item in stationList" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
<select-station v-if="isLocalStation && !isScript" ref="selectStation" :style-css="'width: 100px;'" />
|
||||
<template v-if="!dataError">
|
||||
<el-button-group>
|
||||
<el-button v-if="isScheduling && isDepot" size="small" type="primary" @click="runPlanEditShow">运行图编辑</el-button>
|
||||
@ -27,6 +25,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import SelectStation from './selectStation';
|
||||
import RunPlanLoad from './demon/runPlanLoad';
|
||||
import RunPlanView from './demon/runPlanView';
|
||||
import FaultChoose from './demon/faultChoose';
|
||||
@ -34,8 +33,7 @@ import AddQuest from './demon/addQuest';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { getByGroupStationList } from '@/api/jmap/map';
|
||||
import RunPlanEdit from './demon/runPlanEdit';
|
||||
import { getEveryDayRunPlanNew, loadScriptNew } from '@/api/simulation';
|
||||
import Vue from 'vue';
|
||||
import { getEveryDayRunPlanNew } from '@/api/simulation';
|
||||
|
||||
// 右上角操作
|
||||
export default {
|
||||
@ -45,31 +43,14 @@ export default {
|
||||
RunPlanView,
|
||||
FaultChoose,
|
||||
AddQuest,
|
||||
RunPlanEdit
|
||||
RunPlanEdit,
|
||||
SelectStation
|
||||
},
|
||||
props: {
|
||||
offset: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
showSelectStation: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
stationList: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
showStation: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
dataError: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
@ -83,7 +64,6 @@ export default {
|
||||
OperateMode: OperateMode,
|
||||
viewDisabled: true,
|
||||
swch: '02',
|
||||
showStationContent:'',
|
||||
isScriptCommand:false,
|
||||
faultMode: false,
|
||||
firstLoad: true
|
||||
@ -143,9 +123,6 @@ export default {
|
||||
if (val == '01') { this.switchModeInner('01'); } else { this.switchModeInner('02'); }
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
// await this.loadRunData();
|
||||
},
|
||||
methods: {
|
||||
loadRunData() {
|
||||
this.$store.dispatch('runPlan/clear').then(() => {
|
||||
@ -201,21 +178,8 @@ export default {
|
||||
viewRunQuest() {
|
||||
this.$refs.addQuest.doShow();
|
||||
},
|
||||
async selectQuest(row, id, mapLocation, roleName) {
|
||||
try {
|
||||
const res = await loadScriptNew(row.id, id, this.group);
|
||||
if (res && res.code == 200) {
|
||||
this.questId = parseInt(row.id);
|
||||
if (mapLocation) {
|
||||
const newMapLocation = {'offsetX': mapLocation.x, 'offsetY': mapLocation.y, 'scaleRate': mapLocation.scale};
|
||||
Vue.prototype.$jlmap.setOptions(newMapLocation);
|
||||
}
|
||||
}
|
||||
this.$emit('selectQuest', {row, roleName, id});
|
||||
this.$store.dispatch('scriptRecord/updateBgSet', true);
|
||||
} catch (error) {
|
||||
this.$messageBox(error.message);
|
||||
}
|
||||
selectQuest(row, id, mapLocation, roleName) {
|
||||
this.$emit('selectQuest', {row, id, mapLocation, roleName});
|
||||
},
|
||||
switchModeInner(swch) {
|
||||
let showMode = '03';
|
||||
@ -241,10 +205,6 @@ export default {
|
||||
}
|
||||
this.$jlmap.updateShowMode(list, showMode); // 二次过滤
|
||||
},
|
||||
switchStationModeInfo(val) {
|
||||
this.showStationContent = val;
|
||||
this.$emit('switchStationMode', val);
|
||||
},
|
||||
runPlanEditShow() {
|
||||
this.$refs.runPlanEdit.doShow();
|
||||
}
|
||||
|
@ -7,22 +7,26 @@
|
||||
<el-button type="primary" @click="back">{{ $t('scriptRecord.scriptBack') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<div v-if="!dataError" class="display_top_draft" :style="{top: offset+textStatusHeight+'px'}">
|
||||
<div class="btn_hover" @click="menuClick">菜单</div>
|
||||
<el-button-group ref="button_group_box" class="button_group_box" :style="`margin-left:-${btnWidth}px`">
|
||||
<!-- 地图错误判断 -->
|
||||
<!-- 设备视图 -->
|
||||
<!-- <el-button v-if="isShow3dmodel && !isShowScheduling" size="small" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button> -->
|
||||
<!-- 三维视图 -->
|
||||
<el-button v-if="!isShowScheduling&&!isDriver" size="small" @click="jumpjlmap3d">{{ $t('display.demon.threeDimensionalView') }}</el-button>
|
||||
<!-- 故障设备视图 -->
|
||||
<el-button v-if="isStation" size="small" @click="jumpjlmap3dFault">故障设备</el-button>
|
||||
<!-- cctv视图 -->
|
||||
<!-- <el-button v-if="!isShowScheduling" size="small" @click="jumpjl3dpassflow">{{ jl3dpassflow }}</el-button> -->
|
||||
<!-- 司机视角 -->
|
||||
<el-button v-if="isDriver" size="small" type="jumpjlmap3d" @click="jumpjlmap3dDriver">{{ $t('joinTraining.driverPerspective') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<demon-menu
|
||||
ref="demonMenu"
|
||||
:is-all-show="!dataError"
|
||||
:jl3dmodel-show="false"
|
||||
:jl3dname-show="!isShowScheduling&&!isDriver"
|
||||
:cctv-show="false"
|
||||
:schedule-load-show="false"
|
||||
:schedule-preview-show="false"
|
||||
:jlmap3d-fault-show="isStation"
|
||||
:driver-show="isDriver"
|
||||
:all-style="'top:'+(offset+textStatusHeight)+'px'"
|
||||
/>
|
||||
|
||||
<menu-schema
|
||||
ref="menuSchema"
|
||||
:offset="offset"
|
||||
:data-error="dataError"
|
||||
:offset-bottom="offsetBottom"
|
||||
/>
|
||||
|
||||
<script-chat ref="chatbox" :group="group" :user-role="userRole" />
|
||||
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
||||
<tip-script-record-new ref="tipTaskRecordNew" :group="group" :offset-bottom="offsetBottom" :offset="offset" />
|
||||
@ -31,7 +35,9 @@
|
||||
|
||||
<!-- 单人仿真 -->
|
||||
<script>
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { TrainingMode } from '@/scripts/ConstDic';
|
||||
import MenuSchema from '@/views/newMap/displayNew/menuSchema';
|
||||
import DemonMenu from './demonMenu';
|
||||
import ScriptChat from './scriptChat';
|
||||
import TipScriptRecordNew from '@/views/scriptManage/tipScriptRecord';
|
||||
import SetTime from './demon/setTime';
|
||||
@ -44,6 +50,8 @@ export default {
|
||||
components: {
|
||||
SetTime,
|
||||
ScriptChat,
|
||||
MenuSchema,
|
||||
DemonMenu,
|
||||
TipScriptRecordNew
|
||||
},
|
||||
props: {
|
||||
@ -77,9 +85,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
isDisable: false,
|
||||
isScriptCommand:false,
|
||||
hoverBtn: false,
|
||||
btnWidth: 0
|
||||
isScriptCommand:false
|
||||
};
|
||||
},
|
||||
|
||||
@ -119,8 +125,10 @@ export default {
|
||||
// if (!this.isScriptCommand) {
|
||||
// this.$store.dispatch('training/setPrdType', '02');
|
||||
// }
|
||||
this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
||||
this.$store.dispatch('training/setPrdType', '01');
|
||||
this.$nextTick(() => {
|
||||
this.menuClick();
|
||||
this.$refs.demonMenu.menuClick();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
@ -133,16 +141,6 @@ export default {
|
||||
resetBeginTime() {
|
||||
this.isDisable = false;
|
||||
},
|
||||
menuClick() {
|
||||
this.hoverBtn = !this.hoverBtn;
|
||||
if (this.hoverBtn) {
|
||||
// this.$refs.button_group_box.$el.clientWidth ||
|
||||
this.btnWidth = 500; // 默认宽度
|
||||
} else {
|
||||
// button_group_box
|
||||
this.btnWidth = 0;
|
||||
}
|
||||
},
|
||||
start(model) {
|
||||
this.isDisable = true;
|
||||
const data = {
|
||||
@ -198,35 +196,6 @@ export default {
|
||||
history.go(-1);
|
||||
Notification.closeAll();
|
||||
});
|
||||
},
|
||||
jumpjlmap3dDriver() {
|
||||
this.$emit('script3ddriveshow');
|
||||
},
|
||||
jumpjlmap3d() {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/sandbox',
|
||||
query:{
|
||||
mapid:this.$route.query.mapId,
|
||||
group:this.group,
|
||||
token:getToken(),
|
||||
project: this.project,
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
},
|
||||
jumpjlmap3dFault() {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/maintainer',
|
||||
query:{
|
||||
mapid:this.$route.query.mapId,
|
||||
group:this.group,
|
||||
token:getToken(),
|
||||
project: this.project,
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
this.openWindow = window.open(routeData.href);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -87,14 +87,16 @@ export default {
|
||||
member.disabled = false;
|
||||
} else {
|
||||
member.disabled = true;
|
||||
member.userName = this.$store.state.user.nickname;
|
||||
}
|
||||
const userName = member.userName ? '-' + member.userName : '';
|
||||
const name = member.name == undefined ? '' : '-' + member.name;
|
||||
if (member.deviceCode) {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
|
||||
if (device) {
|
||||
if (device._type == 'Train') {
|
||||
member.label = member.type + device.groupNumber + name;
|
||||
member.deviceName = member.deviceCode;
|
||||
member.deviceName = device.deviceCode;
|
||||
member.label = member.type + device.groupNumber + name + userName;
|
||||
lastMemberList.push(member);
|
||||
if (this.activeTrainList.length > 0) {
|
||||
if (this.activeTrainList.includes(member.deviceCode)) {
|
||||
@ -105,7 +107,7 @@ export default {
|
||||
}
|
||||
} else {
|
||||
member.deviceName = device.name;
|
||||
member.label = member.type + device.name + name;
|
||||
member.label = member.type + device.name + name + userName;
|
||||
lastMemberList.push(member);
|
||||
if (device._type == 'Station') {
|
||||
stationSupervisorList.push(member);
|
||||
@ -113,11 +115,12 @@ export default {
|
||||
}
|
||||
} else {
|
||||
member.deviceName = member.deviceCode;
|
||||
member.label = member.type + member.deviceCode + name;
|
||||
member.label = member.type + member.deviceCode + name + userName;
|
||||
lastMemberList.push(member);
|
||||
}
|
||||
} else {
|
||||
member.label = member.type + name;
|
||||
member.label = member.type + name + userName;
|
||||
member.deviceName = '';
|
||||
if (member.type == '行调') {
|
||||
dispatcherList.push(member);
|
||||
} else if (member.type == '通号') {
|
||||
@ -160,6 +163,14 @@ export default {
|
||||
this.$messageBox('获取仿真成员列表失败!');
|
||||
});
|
||||
},
|
||||
'$store.state.training.addMemberInScript':function(val, oldval) {
|
||||
this.memberData.push(val);
|
||||
const roleList = ['行调', '车站值班员', '司机', '通号', '车辆段'];
|
||||
const roleIndex = roleList.indexOf(val.type);
|
||||
if (roleIndex >= 0) {
|
||||
this.treeData[roleIndex].children.push(val);
|
||||
}
|
||||
},
|
||||
'userRole':function(val, oldval) {
|
||||
// 切换对象
|
||||
this.changeRole(oldval, val);
|
||||
|
@ -28,11 +28,18 @@ export default {
|
||||
this.scriptTipMessage = '请说:' + val.content;
|
||||
} else if (val.type == 'Operation') {
|
||||
const commandName = val.operationType;
|
||||
let operateName = {};
|
||||
if (commandName == 'Set_Fault') {
|
||||
operateName.label = '设置故障';
|
||||
} else if (commandName == 'Cancel_Fault') {
|
||||
operateName.label = '取消故障';
|
||||
} else {
|
||||
let device = val.operationType.split('_')[0];
|
||||
if (device == 'CM') {
|
||||
device = 'ControlConvertMenu';
|
||||
}
|
||||
const operateName = Object.values(CMD[device]).find(res=>{ return res.value == commandName; });
|
||||
operateName = Object.values(CMD[device]).find(res=>{ return res.value == commandName; });
|
||||
}
|
||||
this.scriptTipMessage = '请执行【' + operateName.label + '】操作';
|
||||
} else if (val.type == 'Over_Conversation') {
|
||||
this.scriptTipMessage = '请结束当前会话';
|
@ -7,6 +7,7 @@
|
||||
<script-button-group
|
||||
ref="scriptButtonGroup"
|
||||
:offset="offset"
|
||||
:text-status-height="textStatusHeight"
|
||||
:group="group"
|
||||
@viewScriptRoles="viewScriptRoles"
|
||||
@viewRunPlan="viewRunPlan"
|
||||
@ -36,7 +37,7 @@ import { getToken } from '@/utils/auth';
|
||||
|
||||
import RunPlanLoad from '@/views/newMap/displayNew/demon/runPlanLoad';
|
||||
import RunPlanView from '@/views/newMap/displayNew/demon/runPlanView';
|
||||
import SelectRole from './selectRole';
|
||||
import SelectRole from '../component/selectRole';
|
||||
import ScriptPreviewChat from './scriptPreviewChat.vue';
|
||||
import MapSystemDraft from '@/views/newMap/mapsystemNew/index';
|
||||
import ScriptButtonGroup from './scriptButtonGroup';
|
||||
@ -69,6 +70,7 @@ export default {
|
||||
trainingObj: {},
|
||||
timeDemonNum: 0,
|
||||
offset: 15,
|
||||
textStatusHeight: 0,
|
||||
panelShow: true,
|
||||
memberData:[],
|
||||
mapLocation:{},
|
||||
@ -196,13 +198,31 @@ export default {
|
||||
this.memberData.map(member=>{
|
||||
if (member.id == role.id) {
|
||||
member.userId = this.$store.state.user.id;
|
||||
member.name = this.$store.state.user.nickname;
|
||||
member.userName = this.$store.state.user.nickname;
|
||||
member.disabled = true;
|
||||
} else {
|
||||
member.userId = '';
|
||||
member.userName = '';
|
||||
member.disabled = false;
|
||||
}
|
||||
const userName = member.userName ? '-' + member.userName : '';
|
||||
const name = member.name == undefined ? '' : '-' + member.name;
|
||||
member.label = member.type + member.deviceName + name + userName;
|
||||
});
|
||||
|
||||
} else {
|
||||
this.userRole = 'AUDIENCE';
|
||||
this.$store.dispatch('training/setRoles', 'AUDIENCE');
|
||||
this.memberData.map(member=>{
|
||||
if (member.userId) {
|
||||
member.userId = '';
|
||||
member.userName = '';
|
||||
member.disabled = false;
|
||||
const userName = member.userName ? '-' + member.userName : '';
|
||||
const name = member.name == undefined ? '' : '-' + member.name;
|
||||
member.label = member.type + member.deviceName + name + userName;
|
||||
}
|
||||
});
|
||||
this.switchMode('');
|
||||
}
|
||||
} catch (error) {
|
||||
@ -214,6 +234,11 @@ export default {
|
||||
const menuBar = document.getElementById('menuBar');
|
||||
const menuTool = document.getElementById('menuTool');
|
||||
this.offset = 15 + (menuBar ? menuBar.offsetHeight || 0 : 0) + (menuTool ? menuTool.offsetHeight || 0 : 0);
|
||||
const textStatus = document.getElementById('textStatus');
|
||||
if (textStatus) {
|
||||
this.textStatusHeight = textStatus.offsetHeight || 0;
|
||||
textStatus.style.top = this.offset - 15 + 'px';
|
||||
}
|
||||
});
|
||||
},
|
||||
switchMode(prdType) {
|
||||
|
@ -5,7 +5,7 @@
|
||||
<el-button v-if="isscriptRun&&!dataError" type="danger" @click="handleQuitQuest">{{ $t('display.demon.exitScript') }}</el-button>
|
||||
<el-button type="primary" @click="back">{{ $t('display.demon.back') }}</el-button>
|
||||
</div>
|
||||
<!-- 左上角按钮列表 -->
|
||||
<!-- 右上角按钮列表 -->
|
||||
<div class="schema" :style="{top: offset+'px'}">
|
||||
<template v-if="!dataError">
|
||||
<el-button-group>
|
||||
@ -19,15 +19,27 @@
|
||||
</template>
|
||||
</div>
|
||||
<!-- 菜单按钮列表 -->
|
||||
|
||||
<demon-menu
|
||||
ref="demonMenu"
|
||||
:is-all-show="!dataError"
|
||||
:jl3dmodel-show="false"
|
||||
:jl3dname-show="!isScheduling&&!isDriver"
|
||||
:cctv-show="false"
|
||||
:schedule-load-show="false"
|
||||
:schedule-preview-show="false"
|
||||
:jlmap3d-fault-show="isStation"
|
||||
:driver-show="isDriver"
|
||||
:all-style="'top:'+(offset+textStatusHeight)+'px'"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import DemonMenu from '@/views/newMap/displayNew/demonMenu';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { clearSimulation, getSimulationInfoNew } from '@/api/simulation';
|
||||
import { quitScriptNew, scriptRePreview } from '@/api/simulation';
|
||||
import { scriptRePreview } from '@/api/simulation';
|
||||
import {getDraftScriptByGroupNew } from '@/api/script';
|
||||
import { loadNewMapDataByGroup } from '@/utils/loaddata';
|
||||
import { getByGroupStationList } from '@/api/jmap/map';
|
||||
@ -37,6 +49,9 @@ import Cookies from 'js-cookie';
|
||||
import { Notification } from 'element-ui';
|
||||
export default {
|
||||
name:'ScriptButtonGroup',
|
||||
components:{
|
||||
DemonMenu
|
||||
},
|
||||
props:{
|
||||
offset: {
|
||||
type: Number,
|
||||
@ -45,6 +60,12 @@ export default {
|
||||
group: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
textStatusHeight: {
|
||||
type: Number,
|
||||
default() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -67,6 +88,12 @@ export default {
|
||||
},
|
||||
height() {
|
||||
return this.$store.state.app.height;
|
||||
},
|
||||
isDriver() {
|
||||
return this.$store.state.scriptRecord.userRole == 'DRIVER';
|
||||
},
|
||||
isStation() {
|
||||
return this.$store.state.training.prdType == '01';
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
@ -100,6 +127,7 @@ export default {
|
||||
methods:{
|
||||
// 加载地图数据
|
||||
async initLoadData() {
|
||||
this.$store.dispatch('training/setPrdType', '');
|
||||
this.setWindowSize();
|
||||
this.$store.dispatch('training/reset');
|
||||
try {
|
||||
@ -190,28 +218,40 @@ export default {
|
||||
const maintainerList = [];
|
||||
this.treeData = [];
|
||||
lastData.forEach((member, index)=>{
|
||||
if (!member.userId) {
|
||||
member.userId = '';
|
||||
member.disabled = false;
|
||||
} else {
|
||||
member.disabled = true;
|
||||
member.userName = this.$store.state.user.nickname;
|
||||
}
|
||||
if (member.type != '观众') {
|
||||
const userName = member.userName ? '-' + member.userName : '';
|
||||
const name = member.name == undefined ? '' : '-' + member.name;
|
||||
if (member.deviceCode) {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
|
||||
if (device) {
|
||||
if (device._type == 'Train') {
|
||||
member.label = member.type + device.groupNumber + name;
|
||||
member.deviceName = device.groupNumber;
|
||||
member.label = member.type + device.groupNumber + name + userName;
|
||||
lastMemberList.push(member);
|
||||
driverList.push(member);
|
||||
} else {
|
||||
member.label = member.type + device.name + name;
|
||||
member.deviceName = device.name;
|
||||
member.label = member.type + device.name + name + userName;
|
||||
lastMemberList.push(member);
|
||||
if (device._type == 'Station') {
|
||||
stationSupervisorList.push(member);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
member.label = member.type + member.deviceCode + name;
|
||||
member.deviceName = member.deviceCode;
|
||||
member.label = member.type + member.deviceCode + name + userName;
|
||||
lastMemberList.push(member);
|
||||
}
|
||||
} else {
|
||||
member.label = member.type + name;
|
||||
member.label = member.type + name + userName;
|
||||
member.deviceName = '';
|
||||
if (member.type == '行调') {
|
||||
dispatcherList.push(member);
|
||||
} else if (member.type == '通号') {
|
||||
@ -322,13 +362,14 @@ export default {
|
||||
},
|
||||
// 退出剧本
|
||||
handleQuitQuest() {
|
||||
quitScriptNew(this.group).then(resp => {
|
||||
scriptRePreview(this.group).then(resp=>{
|
||||
getSimulationInfoNew(this.group).then(()=>{
|
||||
this.isscriptRun = false;
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause', false);
|
||||
this.$store.dispatch('scriptRecord/updateBgSet', false);
|
||||
this.userRole = '';
|
||||
// this.userRole = '';
|
||||
this.$store.dispatch('training/setRoles', '');
|
||||
this.$store.dispatch('training/setPrdType', '');
|
||||
this.$emit('clearAllData');
|
||||
// if (resp.data.planRunning) {
|
||||
// this.$store.dispatch('training/start');// 仿真开始按计划行车
|
||||
@ -341,9 +382,6 @@ export default {
|
||||
}).catch(()=>{
|
||||
this.$messageBox(this.$t('display.demon.exitTaskFail'));
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('display.demon.exitTaskFail'));
|
||||
});
|
||||
},
|
||||
async back() {
|
||||
await clearSimulation(this.group);
|
||||
|
@ -18,7 +18,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import ChatBox from '@/views/newMap/chatView/chatBox.vue';
|
||||
import ScriptTip from '../scriptTip';
|
||||
import ScriptTip from '@/views/newMap/displayNew/scriptDisplay/component/scriptTip';
|
||||
export default {
|
||||
name:'ScriptPreviewChat',
|
||||
components:{
|
||||
@ -70,7 +70,6 @@ export default {
|
||||
watch:{
|
||||
// 创建会话
|
||||
'$store.state.socket.createConversition':function(val) {
|
||||
// debugger;
|
||||
if (this.memberData.length > 0) {
|
||||
const member = this.memberData.find(member=>{ return member.id == val.creatorId; });
|
||||
if (member && member.userId == this.$store.state.user.id) {
|
||||
@ -86,7 +85,8 @@ export default {
|
||||
memberList.push(member);
|
||||
} else {
|
||||
const member = this.memberData.find(member=>{ return member.id == id; });
|
||||
member.connect = false;
|
||||
// member.connect = false;
|
||||
member.connect = true;
|
||||
member && memberList.push(member);
|
||||
}
|
||||
});
|
||||
@ -123,8 +123,13 @@ export default {
|
||||
memberList.push(this.inviteUser);
|
||||
this.inviteUser = {};
|
||||
this.isStartRecord = true;
|
||||
if (member.userId != this.inviteUser.userId) {
|
||||
this.isQuitShow = false;
|
||||
} else {
|
||||
this.isQuitShow = true;
|
||||
}
|
||||
this.isHasCoversition = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.currentMemberList = memberList;
|
||||
@ -155,13 +160,22 @@ export default {
|
||||
},
|
||||
// 邀请会话的消息
|
||||
'$store.state.socket.inviteSimulationConversition':function(val) {
|
||||
const member = this.memberData.find(member=>{ return member.id == val.creatorId; });
|
||||
if (member) {
|
||||
this.inviteUserName = member.label;
|
||||
const invitemember = this.memberData.find(member=>{ return member.id == val.creatorId; });
|
||||
if (invitemember) {
|
||||
this.inviteUserName = invitemember.label;
|
||||
this.conversitionId = val.id;
|
||||
invitemember.connect = true;
|
||||
this.inviteUser = invitemember;
|
||||
this.currentMemberList.push(invitemember);
|
||||
const member = this.memberData.find(member=>{ return member.id == val.memberId; });
|
||||
member.connect = true;
|
||||
this.inviteUser = member;
|
||||
this.$refs.chatbox.inviteMember();
|
||||
const userName = member.userName ? '-' + member.userName : '';
|
||||
const name = member.name == undefined ? '' : '-' + member.name;
|
||||
member.label = member.type + member.deviceName + name + userName;
|
||||
this.currentMemberList.push(member);
|
||||
this.isStartRecord = true;
|
||||
// this.$refs.chatbox.inviteMember();
|
||||
this.$message.success(this.inviteUserName + '与你开启会话');
|
||||
}
|
||||
}
|
||||
},
|
||||
|
102
src/views/newMap/displayNew/selectStation.vue
Normal file
102
src/views/newMap/displayNew/selectStation.vue
Normal file
@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<el-select v-if="showSelectStation" v-model="showStation" :style="styleCss" size="small" @change="switchStationMode">
|
||||
<el-option v-for="item in stationListMode" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
export default {
|
||||
name:'SelectStation',
|
||||
props:{
|
||||
styleCss: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
stationListMode: [], // 设备集中站列表
|
||||
showStation: '', // 展示的设备集中站
|
||||
showSelectStation: false // 是否展示现地选择设备集中站select
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
...mapGetters('map', [
|
||||
'map',
|
||||
'stationList'
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'stationList': function () {
|
||||
this.setStationList();
|
||||
},
|
||||
'$store.state.map.mapViewLoadedCount': function (val) { // 地图视图加载完成标识 开始加载默认状态
|
||||
this.setMode();
|
||||
this.setStationList();
|
||||
this.switchStationMode(this.showStation);
|
||||
},
|
||||
'$store.state.training.centerStationCode': function(code) {
|
||||
if (code) {
|
||||
this.showStation = code;
|
||||
}
|
||||
},
|
||||
'$store.state.training.prdType': function (val) { // 根据权限类型计算高度
|
||||
this.setMode();
|
||||
},
|
||||
'$store.state.socket.simulationStart':function(val) {
|
||||
if (val) {
|
||||
if (this.$route.query.lineCode == '06') {
|
||||
this.switchStationMode(this.showStation);// 宁波线 过滤列车显示
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
setMode() {
|
||||
if (this.map) {
|
||||
this.showSelectStation = this.map.skinVO.code === '06' && this.$store.state.training.prdType === '01';
|
||||
}
|
||||
},
|
||||
switchStationMode(val) {
|
||||
if (this.stationListMode.length > 0) {
|
||||
if (val == null) {
|
||||
this.showStation = this.stationListMode[0].value;
|
||||
} else {
|
||||
this.showStation = val;
|
||||
}
|
||||
const nameList = Object.keys(this.$store.state.map.map);
|
||||
let list = [];
|
||||
nameList.forEach(item => {
|
||||
if (this.$store.state.map.map[item] && this.$store.state.map.map[item].constructor === Array) {
|
||||
if (item === 'trainList') {
|
||||
this.$store.state.map.map[item].forEach(elem => {
|
||||
elem && list.push(elem);
|
||||
});
|
||||
} else {
|
||||
list = [...list, ...this.$store.state.map.map[item]];
|
||||
}
|
||||
}
|
||||
});
|
||||
this.$jlmap.updateShowStation(list, this.showStation);
|
||||
this.setCenter(this.showStation);
|
||||
// this.$store.dispatch('map/setShowCentralizedStationCode', this.showStation);
|
||||
// this.$store.dispatch('map/setShowCentralizedStationNum');
|
||||
}
|
||||
},
|
||||
setCenter(code) {
|
||||
this.$jlmap.setCenter(code);
|
||||
},
|
||||
setStationList() {
|
||||
this.stationListMode = [];
|
||||
(this.stationList || []).forEach(item => {
|
||||
if (item.centralized) {
|
||||
this.stationListMode.push({value: item.code, name: item.name});
|
||||
}
|
||||
});
|
||||
if (this.stationListMode.length && this.showSelectStation) {
|
||||
this.showStation = this.stationListMode[0].value;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -39,8 +39,9 @@ export default {
|
||||
watch:{
|
||||
'$store.state.socket.inviteSimulationConversition':function(val) {
|
||||
this.userName = this.coverName(val);
|
||||
this.dialogVisible = true;
|
||||
this.conversationId = val.id;
|
||||
// this.dialogVisible = true;
|
||||
// this.conversationId = val.id;
|
||||
this.$message.success(this.userName + '与你开启会话');
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
|
@ -19,9 +19,12 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="仿真成员名称:" prop="name">
|
||||
<el-input v-model="formModel.name" placeholder="请输入成员名称" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button type="primary" :lodaing="lodaing" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
@ -34,13 +37,18 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
lodaing:false,
|
||||
formModel: {
|
||||
type: ''
|
||||
type: '',
|
||||
name:''
|
||||
},
|
||||
rules: {
|
||||
type: [
|
||||
{ required: true, message: '请选择显示位置', trigger: 'change' }
|
||||
{ required: true, message: '请选择成员类型', trigger: 'change' }
|
||||
]
|
||||
// name:[
|
||||
// { required: true, message: '请输入成员名称', trigger: 'blur' }
|
||||
// ]
|
||||
},
|
||||
typeList: [{label: '行调', value: 'DISPATCHER'}, {label: '通号', value: 'MAINTAINER'}]
|
||||
};
|
||||
@ -59,20 +67,26 @@ export default {
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
doSave() {
|
||||
this.$refs.form.validate(() => {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.lodaing = true;
|
||||
addSimulationMember(this.formModel, this.$route.query.group).then((res) => {
|
||||
this.lodaing = false;
|
||||
this.$message.success('添加仿真角色成员成功!');
|
||||
this.$emit('addScriptMember', res.data);
|
||||
this.handleClose();
|
||||
}).catch(() => {
|
||||
this.lodaing = false;
|
||||
this.$message.error('添加仿真角色成员失败!');
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false;
|
||||
this.formModel = {
|
||||
type: ''
|
||||
type: '',
|
||||
name:''
|
||||
};
|
||||
this.$refs.form.resetFields();
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ export default {
|
||||
{
|
||||
// const command = CommandHandler.getScriptDefinition(element.operationType);
|
||||
const commandName = element.operationType;
|
||||
if (commandName != 'Set_Fault') {
|
||||
if (commandName != 'Set_Fault' && commandName != 'Cancel_Fault' ) {
|
||||
let operateType = commandName.split('_')[0];
|
||||
if (operateType == 'CM') {
|
||||
operateType = 'ControlConvertMenu';
|
||||
@ -158,7 +158,11 @@ export default {
|
||||
// deviceFaultType
|
||||
// element.operationParamMap.faultType;
|
||||
// '(' + operateName.label + ')'
|
||||
if (commandName == 'Set_Fault') {
|
||||
this.actionInfoList.push({id: element.id, isOperation: true, memberName: memberName, command: '设置故障', row: element, visible: false});
|
||||
} else if (commandName == 'Cancel_Fault') {
|
||||
this.actionInfoList.push({id: element.id, isOperation: true, memberName: memberName, command: '取消故障', row: element, visible: false});
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -167,13 +167,12 @@ export default {
|
||||
},
|
||||
addScriptMember(member) {
|
||||
member.userId = '';
|
||||
member.name = '';
|
||||
member.disabled = false;
|
||||
this.$store.dispatch('training/addMemberListInScript', member);
|
||||
const lastData = JSON.stringify([member]);
|
||||
const covertmember = this.covert(lastData, ConstConfig.ConstSelect.roleTypeNew);
|
||||
covertmember.forEach(each=>{
|
||||
this.memberList.push(each);
|
||||
this.$store.dispatch('training/addMemberListInScript', each);
|
||||
});
|
||||
|
||||
},
|
||||
@ -249,7 +248,7 @@ export default {
|
||||
deviceName = each.deviceCode;
|
||||
}
|
||||
}
|
||||
each.name = each.type + deviceName;
|
||||
each.name = each.type + deviceName + (each.name ? '' + each.name : '');
|
||||
each.label = each.name;
|
||||
});
|
||||
return lastData;
|
||||
|
Loading…
Reference in New Issue
Block a user