Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
6eefe21444
BIN
src/assets/icon/favicon_bjd.png
Normal file
BIN
src/assets/icon/favicon_bjd.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.5 KiB |
@ -17,10 +17,10 @@ export default {
|
||||
/** 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px*/
|
||||
if (sty.left.includes('%')) {
|
||||
styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100);
|
||||
styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100);
|
||||
styT = +document.body.clientHeight * (+sty.bottom.replace(/\%/g, '') / 100);
|
||||
} else {
|
||||
styL = +sty.left.replace(/\px/g, '');
|
||||
styT = +sty.top.replace(/\px/g, '');
|
||||
styT = +sty.bottom.replace(/\px/g, '');
|
||||
}
|
||||
|
||||
document.onmousemove = function (e) {
|
||||
@ -28,20 +28,23 @@ export default {
|
||||
const l = e.clientX - disX;
|
||||
const t = e.clientY - disY;
|
||||
|
||||
console.log(l, l + styL, dragDom.style.left);
|
||||
|
||||
/** 移动当前元素*/
|
||||
if (l + styL < 0) {
|
||||
dragDom.style.left = `0px`;
|
||||
} else if (l + styL > document.body.clientWidth - dragDom.clientWidth - 30) {
|
||||
dragDom.style.left = `${document.body.clientWidth - dragDom.clientWidth - 30}px`;
|
||||
} else if (l + styL > document.body.clientWidth - dragDom.clientWidth - 100) {
|
||||
dragDom.style.left = `${document.body.clientWidth - dragDom.clientWidth - 100}px`;
|
||||
} else {
|
||||
dragDom.style.left = `${l + styL}px`;
|
||||
}
|
||||
if (t + styT < 0) {
|
||||
dragDom.style.top = `0px`;
|
||||
} else if (t + styT > document.body.clientHeight - dragDom.clientHeight - 10) {
|
||||
dragDom.style.top = `${document.body.clientHeight - dragDom.clientHeight - 10}px`;
|
||||
|
||||
if (document.body.clientHeight - (styT - t) - dragDom.clientHeight < 0) {
|
||||
dragDom.style.bottom = `${document.body.clientHeight - dragDom.clientHeight}px`;
|
||||
} else if (document.body.clientHeight - (styT - t) - dragDom.clientHeight > document.body.clientHeight - dragDom.clientHeight) {
|
||||
dragDom.style.bottom = `0px`;
|
||||
} else {
|
||||
dragDom.style.top = `${t + styT}px`;
|
||||
dragDom.style.bottom = `${styT - t}px`;
|
||||
}
|
||||
|
||||
/** 将此时的位置传出去*/
|
||||
|
@ -3,6 +3,7 @@ const mapDeviceStyle = {
|
||||
'02': 'fuzhou_01',
|
||||
'03': 'bejing_01',
|
||||
'04': 'chengdu_03',
|
||||
'05': 'fuzhou_01',
|
||||
'06': 'ningbo_01',
|
||||
'07': 'haerbin_01',
|
||||
'08': 'foshan_01',
|
||||
|
@ -270,8 +270,8 @@ class SkinCode extends defaultStyle {
|
||||
|
||||
// 供电线路
|
||||
this[deviceType.Power] = {
|
||||
lineColor: '#FFFFFF', // 线条颜色
|
||||
strokeColor: 'red', // 线条颜色
|
||||
noElectricStrokeColor:'#808080',
|
||||
defaultStrokeColor: '#F00', // 线条颜色
|
||||
extendLength: 10 // 延伸长度
|
||||
};
|
||||
|
||||
|
@ -407,8 +407,8 @@ class SkinCode extends defaultStyle {
|
||||
|
||||
// 供电线路
|
||||
this[deviceType.Power] = {
|
||||
lineColor: '#FFFFFF', // 线条颜色
|
||||
strokeColor: 'red', // 线条颜色
|
||||
noElectricStrokeColor:'#808080', // 无电颜色
|
||||
defaultStrokeColor: '#F00', // 线条颜色
|
||||
extendLength: 10 // 延伸长度
|
||||
};
|
||||
|
||||
|
@ -208,8 +208,8 @@ class SkinCode extends defaultStyle {
|
||||
|
||||
// 供电线路
|
||||
this[deviceType.Power] = {
|
||||
lineColor: '#FFFFFF', // 线条颜色
|
||||
strokeColor: 'red', // 线条颜色
|
||||
noElectricStrokeColor:'#808080', // 无电颜色
|
||||
defaultStrokeColor: '#F00', // 线条颜色
|
||||
extendLength: 10 // 延伸长度
|
||||
};
|
||||
|
||||
|
@ -424,8 +424,8 @@ class SkinCode extends defaultStyle {
|
||||
|
||||
// 供电线路
|
||||
this[deviceType.Power] = {
|
||||
lineColor: '#FFFFFF', // 线条颜色
|
||||
strokeColor: 'red', // 线条颜色
|
||||
noElectricStrokeColor:'#808080', // 无电颜色
|
||||
defaultStrokeColor: '#F00', // 线条颜色
|
||||
extendLength: 10 // 延伸长度
|
||||
};
|
||||
|
||||
|
@ -464,8 +464,9 @@ class SkinCode extends defaultStyle {
|
||||
};
|
||||
// 供电线路
|
||||
this[deviceType.Power] = {
|
||||
strokeColor: 'red', // 线条颜色
|
||||
extendLength: 8 // 延伸长度
|
||||
noElectricStrokeColor:'#808080', // 无电颜色
|
||||
defaultStrokeColor: '#F00', // 线条颜色
|
||||
extendLength: 10 // 延伸长度
|
||||
};
|
||||
|
||||
// 延续保护计时
|
||||
|
@ -266,7 +266,7 @@ class SkinCode extends defaultStyle {
|
||||
z:1,
|
||||
position: 1, // 停跳方向
|
||||
text: 'S', // 停跳显示内容
|
||||
offset: { x: 10, y: 20 },
|
||||
offset: { x: 20, y: 21 },
|
||||
textColor: '#00FF00', // 停跳文字颜色
|
||||
fontWeight: 'bold', // 文字居中
|
||||
fontSize: 18 // 文字大小
|
||||
@ -448,8 +448,8 @@ class SkinCode extends defaultStyle {
|
||||
|
||||
// 供电线路
|
||||
this[deviceType.Power] = {
|
||||
lineColor: '#FFFFFF', // 线条颜色
|
||||
strokeColor: 'red', // 线条颜色
|
||||
noElectricStrokeColor:'#808080', // 无电颜色
|
||||
defaultStrokeColor: '#F00', // 线条颜色
|
||||
extendLength: 10 // 延伸长度
|
||||
};
|
||||
// 延续保护计时
|
||||
|
@ -472,8 +472,8 @@ class SkinCode extends defaultStyle {
|
||||
|
||||
// 供电线路
|
||||
this[deviceType.Power] = {
|
||||
lineColor: '#FFFFFF', // 线条颜色
|
||||
strokeColor: 'red', // 线条颜色
|
||||
noElectricStrokeColor:'#808080', // 无电颜色
|
||||
defaultStrokeColor: '#F00', // 线条颜色
|
||||
extendLength: 10 // 延伸长度
|
||||
};
|
||||
|
||||
|
@ -527,8 +527,8 @@ class SkinCode extends defaultStyle {
|
||||
|
||||
// 供电线路
|
||||
this[deviceType.Power] = {
|
||||
lineColor: '#FFFFFF', // 线条颜色
|
||||
strokeColor: 'red', // 线条颜色
|
||||
noElectricStrokeColor:'#808080', // 无电颜色
|
||||
defaultStrokeColor: '#F00', // 线条颜色
|
||||
extendLength: 10 // 延伸长度
|
||||
};
|
||||
|
||||
|
@ -282,8 +282,8 @@ class SkinCode extends defaultStyle {
|
||||
|
||||
// 供电线路
|
||||
this[deviceType.Power] = {
|
||||
lineColor: '#FFFFFF', // 线条颜色
|
||||
strokeColor: 'red', // 线条颜色
|
||||
noElectricStrokeColor:'#808080', // 无电颜色
|
||||
defaultStrokeColor: '#F00', // 线条颜色
|
||||
extendLength: 10 // 延伸长度
|
||||
};
|
||||
|
||||
|
@ -440,8 +440,8 @@ class SkinCode extends defaultStyle {
|
||||
|
||||
// 供电线路
|
||||
this[deviceType.Power] = {
|
||||
lineColor: '#FFFFFF', // 线条颜色
|
||||
strokeColor: 'red', // 线条颜色
|
||||
noElectricStrokeColor:'#808080', // 无电颜色
|
||||
defaultStrokeColor: '#F00', // 线条颜色
|
||||
extendLength: 10 // 延伸长度
|
||||
};
|
||||
|
||||
|
@ -564,8 +564,8 @@ class SkinCode extends defaultStyle {
|
||||
|
||||
// 供电线路
|
||||
this[deviceType.Power] = {
|
||||
lineColor: '#FFFFFF', // 线条颜色
|
||||
strokeColor: 'red', // 线条颜色
|
||||
noElectricStrokeColor:'#808080', // 无电颜色
|
||||
defaultStrokeColor: '#F00', // 线条颜色
|
||||
extendLength: 10 // 延伸长度
|
||||
};
|
||||
|
||||
|
@ -18,7 +18,7 @@ export default class AutomacticRoute extends Group {
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.isShowShape = true;
|
||||
if (isShowThePrdType(model.prdType, style.AutomaticRoute.displayCondition) || model.previewOrMapDraw) {
|
||||
if (isShowThePrdType(model.prdType, (style.AutomaticRoute || {}).displayCondition) || model.previewOrMapDraw) {
|
||||
this.create();
|
||||
this.createMouseEvent();
|
||||
this.setState(model);
|
||||
@ -134,7 +134,7 @@ export default class AutomacticRoute extends Group {
|
||||
|
||||
setShowMode() {
|
||||
const showMode = this.model.showMode;
|
||||
const showConditions = this.style.AutomaticRoute.displayCondition;
|
||||
const showConditions = (this.style.AutomaticRoute || {}).displayCondition;
|
||||
if (!showConditions || showConditions === '01' || showMode === showConditions) {
|
||||
this.showMode();
|
||||
} else {
|
||||
|
@ -18,7 +18,7 @@ export default class AxleReset extends Group {
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.isShowShape = true;
|
||||
if (isShowThePrdType(model.prdType, style.AxleReset.displayCondition) || model.previewOrMapDraw) {
|
||||
if (isShowThePrdType(model.prdType, (style.AxleReset || {}).displayCondition) || model.previewOrMapDraw) {
|
||||
this.create();
|
||||
this.createMouseEvent();
|
||||
this.setState(model);
|
||||
@ -129,7 +129,7 @@ export default class AxleReset extends Group {
|
||||
}
|
||||
setShowMode() {
|
||||
const showMode = this.model.showMode;
|
||||
const showConditions = this.style.AxleReset.displayCondition;
|
||||
const showConditions = (this.style.AxleReset || {}).displayCondition;
|
||||
if (!showConditions || showConditions === '01' || showMode === showConditions) {
|
||||
this.showMode();
|
||||
} else {
|
||||
|
@ -13,7 +13,7 @@ export default class DirectionRod extends Group {
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.isShowShape = true;
|
||||
if (isShowThePrdType(model.prdType, style.DirectionRod.displayCondition) || model.previewOrMapDraw) {
|
||||
if (isShowThePrdType(model.prdType, (style.DirectionRod || {}).displayCondition) || model.previewOrMapDraw) {
|
||||
this.create();
|
||||
this.createMouseEvent();
|
||||
this.setState(model);
|
||||
@ -91,7 +91,7 @@ export default class DirectionRod extends Group {
|
||||
|
||||
setShowMode() {
|
||||
const showMode = this.model.showMode;
|
||||
const showConditions = this.style.DirectionRod.displayCondition;
|
||||
const showConditions = (this.style.DirectionRod || {}).displayCondition;
|
||||
if (!showConditions || showConditions === '01' || showMode === showConditions) {
|
||||
this.showMode();
|
||||
} else {
|
||||
|
@ -16,7 +16,7 @@ export default class FloodGate extends Group {
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.isShowShape = true;
|
||||
if (isShowThePrdType(model.prdType, style.FloodGate.displayCondition) || model.previewOrMapDraw) {
|
||||
if (isShowThePrdType(model.prdType, (style.FloodGate || {}).displayCondition) || model.previewOrMapDraw) {
|
||||
this.create();
|
||||
this.createMouseEvent();
|
||||
this.setState(model);
|
||||
@ -58,7 +58,7 @@ export default class FloodGate extends Group {
|
||||
|
||||
setShowMode() {
|
||||
const showMode = this.model.showMode;
|
||||
const showConditions = this.style.FloodGate.displayCondition;
|
||||
const showConditions = (this.style.FloodGate || {}).displayCondition;
|
||||
if (!showConditions || showConditions === '01' || showMode === showConditions) {
|
||||
this.showMode();
|
||||
} else {
|
||||
|
@ -18,7 +18,7 @@ export default class GuideLock extends Group {
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.isShowShape = true;
|
||||
if (isShowThePrdType(model.prdType, style.GuideLock.displayCondition) || model.previewOrMapDraw) {
|
||||
if (isShowThePrdType(model.prdType, (style.GuideLock || {}).displayCondition) || model.previewOrMapDraw) {
|
||||
this.create();
|
||||
this.createMouseEvent();
|
||||
this.setState(model);
|
||||
@ -134,7 +134,7 @@ export default class GuideLock extends Group {
|
||||
}
|
||||
setShowMode() {
|
||||
const showMode = this.model.showMode;
|
||||
const showConditions = this.style.GuideLock.displayCondition;
|
||||
const showConditions = (this.style.GuideLock || {}).displayCondition;
|
||||
if (!showConditions || showConditions === '01' || showMode === showConditions) {
|
||||
this.showMode();
|
||||
} else {
|
||||
|
@ -41,7 +41,7 @@ export default class Line2 extends Group {
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.width,
|
||||
stroke: style.Power.strokeColor
|
||||
stroke: style.Power.defaultStrokeColor
|
||||
}
|
||||
});
|
||||
this.add(this.line);
|
||||
@ -59,7 +59,7 @@ export default class Line2 extends Group {
|
||||
z: this.z + 3,
|
||||
traingle: traingle,
|
||||
width: model.width,
|
||||
stroke: style.Power.strokeColor,
|
||||
stroke: style.Power.noElectricStrokeColor,
|
||||
point: {
|
||||
x: model.points[0].x,
|
||||
y: model.points[0].y
|
||||
@ -75,7 +75,7 @@ export default class Line2 extends Group {
|
||||
z: this.z + 3,
|
||||
traingle: traingle,
|
||||
width: model.width,
|
||||
stroke: style.Power.strokeColor,
|
||||
stroke: style.Power.noElectricStrokeColor,
|
||||
point: {
|
||||
x: model.points[model.points.length - 1].x,
|
||||
y: model.points[model.points.length - 1].y
|
||||
@ -85,6 +85,20 @@ export default class Line2 extends Group {
|
||||
}
|
||||
}
|
||||
|
||||
getBoundingRect() {
|
||||
const rect = this.line.getBoundingRect().clone();
|
||||
if (this.model.leftTerminal) {
|
||||
const subheadText = this.leftTerminal.getBoundingRect().clone();
|
||||
rect.union(subheadText);
|
||||
return rect;
|
||||
}
|
||||
if (this.model.rightTerminal) {
|
||||
const subheadText = this.rightTerminal.getBoundingRect().clone();
|
||||
rect.union(subheadText);
|
||||
}
|
||||
return rect;
|
||||
}
|
||||
|
||||
setLineType(type) {
|
||||
switch (type) {
|
||||
case '01': break;
|
||||
@ -95,11 +109,22 @@ export default class Line2 extends Group {
|
||||
break;
|
||||
}
|
||||
}
|
||||
setCharged() {
|
||||
// noElectricStrokeColor
|
||||
this.line.setStyle('stroke', this.style.Power.defaultStrokeColor);
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
this.recover();
|
||||
this.setLineType(model.type);
|
||||
model.on && this.setCharged();
|
||||
}
|
||||
|
||||
recover() {
|
||||
this.line.setStyle('stroke', this.style.Power.noElectricStrokeColor);
|
||||
}
|
||||
|
||||
// 设置显示模式
|
||||
setShowMode() {
|
||||
const showMode = this.model.showMode;
|
||||
|
@ -23,7 +23,7 @@ export default class SaidLamp extends Group {
|
||||
this.deviceStyle = style[model._type];
|
||||
if (this.deviceStyle) {
|
||||
this.isShowShape = true;
|
||||
if (isShowThePrdType(model.prdType, this.deviceStyle.displayCondition) || model.previewOrMapDraw) {
|
||||
if (isShowThePrdType(model.prdType, (this.deviceStyle || {}).displayCondition) || model.previewOrMapDraw) {
|
||||
this.create();
|
||||
this.createMouseEvent();
|
||||
this.setState(model);
|
||||
@ -206,7 +206,7 @@ export default class SaidLamp extends Group {
|
||||
setShowMode() {
|
||||
const showMode = this.model.showMode;
|
||||
if (this.deviceStyle) {
|
||||
const showConditions = this.deviceStyle.displayCondition;
|
||||
const showConditions = (this.deviceStyle || {}).displayCondition;
|
||||
if (showConditions === '01' || showMode === showConditions) {
|
||||
this.control && this.control.show();
|
||||
} else {
|
||||
|
@ -89,7 +89,7 @@ export default class ELimitLines extends Group {
|
||||
const beg = Object.assign({}, model.points[0]);
|
||||
const end = Object.assign({}, model.points[model.points.length - 1]);
|
||||
if (model.isSwitchSection && beg.y !== end.y) {
|
||||
const swch = Vue.prototype.$jlmap.mapDevice[model.switch.code]; // 获取道岔model 及状态数据
|
||||
const swch = Vue.prototype.$jlmap.mapDevice[model.relSwitchCode]; // 获取道岔model 及状态数据
|
||||
|
||||
if (swch && swch.instance) {
|
||||
const traingle = new JTriangle(swch.intersection, swch.skew);
|
||||
|
@ -290,7 +290,7 @@ export default class Section extends Group {
|
||||
getShapeTipPoint() {
|
||||
let rect = this.getBoundingRect();
|
||||
const distance = this.style.Section.line.width / 2;
|
||||
if (this.line) {
|
||||
if (this.line && this.line.getBoundingRect()) {
|
||||
rect = this.line.getBoundingRect();
|
||||
}
|
||||
return {
|
||||
|
@ -160,7 +160,7 @@ export default class StationTurnBack extends Group {
|
||||
|
||||
setShowMode() {
|
||||
const showMode = this.model.showMode;
|
||||
const showConditions = this.style.StationTurnBack.displayCondition;
|
||||
const showConditions = (this.style.StationTurnBack || {}).displayCondition;
|
||||
if (!showConditions || showConditions == '01' || showMode === showConditions) {
|
||||
this.eachChild(item => item.show() );
|
||||
} else {
|
||||
|
@ -126,7 +126,8 @@ export default {
|
||||
Local: [
|
||||
{
|
||||
title: '系统',
|
||||
operate: OperationEvent.Command.mBar.system,
|
||||
// operate: OperationEvent.Command.mBar.system,
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '登录',
|
||||
@ -174,7 +175,8 @@ export default {
|
||||
},
|
||||
{
|
||||
title: '查看',
|
||||
operate: OperationEvent.Command.mBar.check,
|
||||
// operate: OperationEvent.Command.mBar.check,
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '运行图',
|
||||
@ -287,7 +289,8 @@ export default {
|
||||
},
|
||||
{
|
||||
title: '显示',
|
||||
operate: OperationEvent.Command.mBar.view,
|
||||
// operate: OperationEvent.Command.mBar.view,
|
||||
operate: '',
|
||||
hide: true,
|
||||
children: [
|
||||
{
|
||||
|
@ -119,7 +119,11 @@ export default {
|
||||
if (selected._type == 'Train') {
|
||||
name = selected.serviceNumber;
|
||||
}
|
||||
if (name) {
|
||||
this.deviceName = deviceType[selected._type] + '-' + name;
|
||||
} else {
|
||||
this.deviceName = deviceType[selected._type];
|
||||
}
|
||||
this.faultList = deviceFaultType[selected._type];
|
||||
if (this.faultList && this.faultList.length) {
|
||||
this.form.faultType = this.faultList[0].value;
|
||||
|
@ -302,6 +302,11 @@ export const menuOperate = {
|
||||
// 批量取消扣车
|
||||
operation: OperationEvent.StationStand.cancelBulkBuckleTrain.menu.operation,
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_ALL
|
||||
},
|
||||
openPsdByHand:{
|
||||
// 手动开启屏蔽门
|
||||
operation: OperationEvent.StationStand.openPsdByHand.menu.operation,
|
||||
cmdType:CMD.Stand.CMD_STAND_OPEN_PSD
|
||||
}
|
||||
},
|
||||
StationControl:{
|
||||
|
@ -13,6 +13,7 @@
|
||||
<menu-train ref="menuTrain" :selected="selected" />
|
||||
<menu-station ref="menuStation" :selected="selected" />
|
||||
<menu-limit ref="menuLimit" :selected="selected" />
|
||||
<menu-power ref="menuPower" :selected="selected" />
|
||||
<!--<passive-alarm ref="passiveAlarm" />-->
|
||||
<passive-contorl ref="passiveControl" pop-class="ningbo-01__systerm" />
|
||||
<!--<passive-Timeout ref="passiveTimeout" />-->
|
||||
@ -34,6 +35,7 @@ import MenuStation from './menuStation';
|
||||
import MenuBar from './menuBar';
|
||||
import MenuLimit from './menuLimit';
|
||||
import MenuStationTurnBack from './menuStationTurnBack';
|
||||
import MenuPower from './menuPower';
|
||||
// import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
|
||||
// import PassiveTimeout from './passiveDialog/timeout';
|
||||
@ -54,6 +56,7 @@ export default {
|
||||
MenuTrain,
|
||||
MenuStationTurnBack,
|
||||
MenuLimit,
|
||||
MenuPower,
|
||||
// PassiveAlarm,
|
||||
PassiveContorl
|
||||
// PassiveTimeout
|
||||
|
117
src/jmapNew/theme/race_01/menus/menuPower.vue
Normal file
117
src/jmapNew/theme/race_01/menus/menuPower.vue
Normal file
@ -0,0 +1,117 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { mapGetters } from 'vuex';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data( ) {
|
||||
return {
|
||||
menu: [],
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType:CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType:CMD.Fault.CMD_CANCEL_FAULT
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
handler: this.triggerFaultManagement,
|
||||
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Power) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -142,12 +142,17 @@ export default {
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType:CMD.Stand.CMD_STAND_ADD_FAULT
|
||||
cmdType:CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType:CMD.Stand.CMD_STAND_REMOVE_FAULT
|
||||
cmdType:CMD.Fault.CMD_CANCEL_FAULT
|
||||
},
|
||||
{
|
||||
label: '手动开启屏蔽门',
|
||||
handler: this.openPsdByHand,
|
||||
cmdType: CMD.Stand.CMD_STAND_OPEN_PSD
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
@ -317,6 +322,13 @@ export default {
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
},
|
||||
// 手动开启屏蔽门
|
||||
openPsdByHand() {
|
||||
commitOperate(menuOperate.StationStand.openPsdByHand, {standCode:this.selected.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -118,6 +118,7 @@ export const DeviceMenu = {
|
||||
AxleReset: '12',
|
||||
Enabled: '13',
|
||||
StationTurnBack: '14',
|
||||
Power:'15',
|
||||
|
||||
Map: '100',
|
||||
PrdCategory: '101',
|
||||
|
@ -12,6 +12,7 @@ import FaviconTky from '@/assets/icon/favicon_tky.png';
|
||||
import FaviconBxkc from '@/assets/icon/favicon_bxkc.png';
|
||||
import FaviconCrsc from '@/assets/icon/favicon_crsc.png';
|
||||
import FaviconNty from '@/assets/icon/favicon_nty.png';
|
||||
import FaviconBjd from '@/assets/icon/favicon_bjd.png';
|
||||
import Link_Bxkc from '@/assets/icon/link_bxkc.png';
|
||||
import Link_Crsc from '@/assets/icon/link_crsc.png';
|
||||
import Link_Hls from '@/assets/icon/link_hls.png';
|
||||
@ -29,6 +30,19 @@ export const loginInfo = {
|
||||
navigationMarginLeft: '60px',
|
||||
systemType: '013'
|
||||
},
|
||||
bjd: {
|
||||
title: '城市轨道交通列车运行智慧辅助系统',
|
||||
loginPath: '/login?project=bjd',
|
||||
logoWidth: '400px',
|
||||
bottomIcon: FaviconBjd,
|
||||
bottomColumn: '',
|
||||
loginTitle: '空串',
|
||||
linkIcon: FaviconBjd,
|
||||
loginParam: 'BJD',
|
||||
navigationLogoWidth: '160px',
|
||||
navigationMarginLeft: '175px',
|
||||
systemType: '011'
|
||||
},
|
||||
nty: {
|
||||
title: '南京铁道职业技术学院城市轨道交通实训平台',
|
||||
loginPath:'/login?project=nty',
|
||||
@ -72,6 +86,18 @@ export const loginInfo = {
|
||||
navigationMarginLeft: '60px',
|
||||
systemType: '020'
|
||||
},
|
||||
designbjd: {
|
||||
title: '城市轨道交通列车运行智慧辅助系统',
|
||||
loginPath: '/design/login?project=bjd',
|
||||
logoWidth: '400px',
|
||||
bottomIcon: FaviconBjd,
|
||||
bottomColumn: '',
|
||||
linkIcon: '',
|
||||
loginParam: 'BJD',
|
||||
navigationLogoWidth: '160px',
|
||||
navigationMarginLeft: '175px',
|
||||
systemType: '011'
|
||||
},
|
||||
designxty: {
|
||||
title: '西安铁路职业技术学院城市轨道交通设计平台',
|
||||
loginPath:'/design/login?project=xty',
|
||||
@ -352,7 +378,9 @@ export const ProjectIcon = {
|
||||
drts: Favicon,
|
||||
designdrts: Favicon,
|
||||
nty: FaviconNty,
|
||||
designnty: FaviconNty
|
||||
designnty: FaviconNty,
|
||||
bjd: FaviconBjd,
|
||||
designbjd: FaviconBjd
|
||||
};
|
||||
|
||||
export const ProjectCode = {
|
||||
@ -375,7 +403,7 @@ export const CaseHideProjectList = ['heb', 'designheb']; // 案例展示隐藏
|
||||
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'hyd', 'designhyd']; // 登录页右下角版本开发基于不展示
|
||||
export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 登录页右下角主体不展示
|
||||
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', 'drts', 'hyd', 'designhyd', 'nty', 'designnty']; // 登录页样式
|
||||
export const ProjectLoginStyleList = ['jsxt', 'refereeJsxt', 'gzb', 'designgzb', 'xty', 'designxty', 'xadt', 'designxadt', 'tky', 'designtky', 'jyd', 'designjyd', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'hyd', 'designhyd', 'nty', 'designnty', 'bjd', 'designbjd']; // 登录页样式
|
||||
export const NoQrcodeList = ['heb', 'designheb'];
|
||||
export const goOtherPlatformMenu = { // 导航栏快速切换平台
|
||||
login: '/design/login',
|
||||
|
@ -183,7 +183,9 @@ export default {
|
||||
/** 查看站台状态 */
|
||||
CMD_STAND_VIEW_STATUS:{value:'Stand_View_Status', label: '查看站台状态'},
|
||||
/** 站台总取消 */
|
||||
CMD_STAND_TOTAL_CANCLE:{value:'Stand_Total_Cancle', label: '站台总取消'}
|
||||
CMD_STAND_TOTAL_CANCLE:{value:'Stand_Total_Cancle', label: '站台总取消'},
|
||||
/** 手动开启屏蔽门 */
|
||||
CMD_STAND_OPEN_PSD:{value:'Stand_Open_Psd', label: '手动开启屏蔽门'}
|
||||
},
|
||||
|
||||
Station: {
|
||||
|
@ -41,13 +41,17 @@ export const deviceFaultType = {
|
||||
{label: '反位失表', value: 'REVERSE_SPLIT'}
|
||||
],
|
||||
StationStand: [
|
||||
{label: '屏蔽门故障打开', value: 'FAULT_PSD_OPEN'}
|
||||
{label: '屏蔽门无法关闭', value: 'PSD_CANNOT_BE_CLOSED'},
|
||||
{label: '屏蔽门无法开启', value: 'PSD_CANNOT_BE_OPENED'}
|
||||
],
|
||||
ZcControl:[
|
||||
{label: 'zc故障', value: 'FAULT'}
|
||||
],
|
||||
Train: [
|
||||
{label: '通信异常', value: 'COMMUNICATION_ABNORMAL'}
|
||||
],
|
||||
Power:[
|
||||
{label: '供电故障', value: 'FAULT'}
|
||||
]
|
||||
};
|
||||
/** 设备类型 */
|
||||
@ -58,5 +62,6 @@ export const deviceType = {
|
||||
Station: '车站',
|
||||
StationStand: '站台',
|
||||
Train: '列车',
|
||||
ZcControl:'ZC'
|
||||
ZcControl:'ZC',
|
||||
Power:'供电线'
|
||||
};
|
||||
|
@ -141,7 +141,7 @@ class Handler {
|
||||
}
|
||||
|
||||
getTrainingStart() {
|
||||
return store.state.training.started;
|
||||
return store.state.training.trainingStart;
|
||||
}
|
||||
|
||||
getOperateBreakStatus () {
|
||||
|
@ -42,15 +42,15 @@ class MenuContextHandler {
|
||||
data.conditionList.forEach(val=>{
|
||||
switch (val.expression) {
|
||||
case 'eq': {
|
||||
result = result || (selected[val.name].toString() == val.value);
|
||||
result = result || ((selected[val.name] || 0).toString() == val.value);
|
||||
break;
|
||||
}
|
||||
case 'neq': {
|
||||
result = result || (selected[val.name].toString() != val.value);
|
||||
result = result || ((selected[val.name] || 0).toString() != val.value);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
result = result || (selected[val.name].toString() == val.value);
|
||||
result = result || ((selected[val.name] || 0).toString() == val.value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1766,6 +1766,13 @@ export const OperationEvent = {
|
||||
operation: '518',
|
||||
domId: '_Tips-Stand-cancelDetainTrainAuto-Menu'
|
||||
}
|
||||
},
|
||||
// 手动开启屏蔽门
|
||||
openPsdByHand:{
|
||||
menu: {
|
||||
operation: '519',
|
||||
domId: '_Tips-Stand-openPsdByHand-Menu'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -31,7 +31,6 @@ class ValidateHandler {
|
||||
const steps = Handler.getSteps();
|
||||
const order = Handler.getOrder();
|
||||
let valid = false;
|
||||
|
||||
if (operate.over && steps.length == 1) { // 右键菜单直接发送校验
|
||||
if (operate && steps[0] &&
|
||||
operate.code == steps[0].code &&
|
||||
|
@ -43,7 +43,8 @@ const training = {
|
||||
scriptQuitCount: 0, // 主动退出剧本
|
||||
scriptOperationType: '', // 剧本操作类型
|
||||
triggerFaultCount: 0, // 触发故障计数器
|
||||
triggerFaultDevice: '' // 触发故障目标设备
|
||||
triggerFaultDevice: '', // 触发故障目标设备
|
||||
trainingStart: false // 实训开始状态
|
||||
},
|
||||
|
||||
getters: {
|
||||
@ -279,6 +280,9 @@ const training = {
|
||||
setTriggerFaultCount: (state, device) => {
|
||||
state.triggerFaultCount++;
|
||||
state.triggerFaultDevice = device;
|
||||
},
|
||||
setTrainingStart: (state, flag) => {
|
||||
state.trainingStart = flag;
|
||||
}
|
||||
},
|
||||
|
||||
@ -314,7 +318,6 @@ const training = {
|
||||
*/
|
||||
reset: ({ commit }) => {
|
||||
commit('over');
|
||||
commit('resetOrder');
|
||||
// commit('stopCountTime');
|
||||
|
||||
// 清空计时器以及得分
|
||||
@ -338,13 +341,20 @@ const training = {
|
||||
commit('resetScore');
|
||||
commit('start');
|
||||
},
|
||||
|
||||
// setTrainingStart:({ commit }) ={
|
||||
// commit('setTrainingStart');
|
||||
// },
|
||||
setTrainingStart: ({ commit }, flag) => {
|
||||
commit('setTrainingStart', flag);
|
||||
if (!flag) {
|
||||
commit('resetOrder');
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 结束
|
||||
*/
|
||||
over: ({ commit }) => {
|
||||
commit('over');
|
||||
commit('resetOrder');
|
||||
// commit('stopCountTime');
|
||||
},
|
||||
|
||||
@ -368,7 +378,7 @@ const training = {
|
||||
* 主动判断是否结束
|
||||
*/
|
||||
judgeFinish: ({ dispatch, commit, state }, rtn) => {
|
||||
if (state.started) {
|
||||
if (state.trainingStart) {
|
||||
if (state.order >= state.steps.length) {
|
||||
if (rtn && rtn.valid) {
|
||||
commit('next');
|
||||
@ -470,7 +480,7 @@ const training = {
|
||||
try {
|
||||
// 处理operation
|
||||
Handler.handle(operate).then(rtn => {
|
||||
if (state.started) {
|
||||
if (state.trainingStart) {
|
||||
// 教学和联系模式需要给出过程步骤提示
|
||||
if (TrainingMode.TEACH === state.mode || TrainingMode.PRACTICE === state.mode) {
|
||||
if (rtn && rtn.valid) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
BASE_API = 'https://joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.8.144:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.175:9000'; // 张赛
|
||||
|
@ -96,15 +96,15 @@ export default {
|
||||
this.startLoading = true;
|
||||
if (this.$route.query.trainingId) {
|
||||
this.isDisable = true;
|
||||
this.$store.dispatch('training/setMapDefaultState');
|
||||
startTrainingNew({ id: this.$route.query.trainingId }, this.group).then(response => {
|
||||
this.$store.dispatch('training/setTrainingStart', true);
|
||||
this.$store.dispatch('training/examModeStart');
|
||||
this.$store.dispatch('exam/start');
|
||||
this.$store.dispatch('map/clearJlmapTrainView').then(() => {
|
||||
this.$store.dispatch('training/setMapDefaultState').then(() => {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('training/countTime', 'Lesson'); // 开始计时
|
||||
});
|
||||
});
|
||||
this.startLoading = false;
|
||||
}).catch(() => {
|
||||
this.isDisable = false;
|
||||
|
@ -1,23 +1,25 @@
|
||||
<template>
|
||||
<div v-drag class="reminder-drag">
|
||||
<div ref="drapBox" class="reminder-box" :style="{bottom: offsetBottom + 'px'}">
|
||||
<div v-quickMenuDrag class="reminder-drag" :style="{bottom: offsetBottom + 'px'}">
|
||||
<div ref="drapBox" class="reminder-box">
|
||||
<div class="tip-title">
|
||||
<i v-show="isShrink" class="icon el-icon-minus" @click="shrink" />
|
||||
<i v-show="!isShrink" class="icon el-icon-plus" @click="shrink" />
|
||||
<p v-if="!isShrink" style="color: #fff;">
|
||||
<span class="time-label">{{ $t('display.exam.examTime') }}</span>
|
||||
|
||||
<span class="time-elem">{{ formatRemainTime }}</span>
|
||||
</p>
|
||||
<p v-if="isShrink" style="color: #fff;">
|
||||
<span>{{ examName }}</span>
|
||||
</p>
|
||||
</div>
|
||||
<div v-if="isShrink" class="reminder-box-content">
|
||||
<div class="zhezhao" />
|
||||
<div ref="dragBody" class="tip-body-box">
|
||||
<div v-show="detailShow" class="tip-body">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<el-tree
|
||||
ref="treeQuestion"
|
||||
style="background:rgba(0,0,0,0)"
|
||||
:data="trainingList"
|
||||
node-key="id"
|
||||
highlight-current
|
||||
@ -73,6 +75,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -298,16 +301,22 @@ export default {
|
||||
});
|
||||
},
|
||||
shrink() {
|
||||
const height = this.$refs.dragBody.offsetHeight + 40;
|
||||
const top = this.$refs.drapBox.style.top;
|
||||
// const height = this.$refs.dragBody.offsetHeight + 40;
|
||||
// const top = this.$refs.drapBox.style.top;
|
||||
if (this.isShrink) {
|
||||
this.$refs.drapBox.style.height = '40px';
|
||||
this.$refs.drapBox.style.top = '';
|
||||
// this.$refs.drapBox.style.height = '40px';
|
||||
// this.$refs.drapBox.style.top = '';
|
||||
this.isShrink = false;
|
||||
} else {
|
||||
this.$refs.drapBox.style.height = height + 'px';
|
||||
this.$refs.drapBox.style.top = top;
|
||||
// this.$refs.drapBox.style.height = height + 'px';
|
||||
// this.$refs.drapBox.style.top = top;
|
||||
this.isShrink = true;
|
||||
this.$nextTick(()=>{
|
||||
const dragDom = document.querySelector('.reminder-drag').style.bottom;
|
||||
if (document.body.clientHeight - 470 - parseInt(dragDom.replace('px', '')) < 0) {
|
||||
document.querySelector('.reminder-drag').style.bottom = `${document.body.clientHeight - 470}px`;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -316,26 +325,46 @@ export default {
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
.reminder-drag{
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
left: 15px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.tip-body-box {
|
||||
position: relative;
|
||||
height: 430px;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.zhezhao{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
filter: blur(8px);
|
||||
background: rgba(255,255,255,0.9);
|
||||
}
|
||||
.reminder-box-content{
|
||||
width: 500px;
|
||||
height: 430px;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 2;
|
||||
background: rgba(255,255,255,0.8);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.reminder-box {
|
||||
position: absolute;
|
||||
float: left;
|
||||
left: 15px;
|
||||
bottom: 15px;
|
||||
width: 650px;
|
||||
height: 470px;
|
||||
background-color: #fff;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
z-index: 10;
|
||||
font-size: 18px;
|
||||
|
||||
.tip-title {
|
||||
width: 100%;
|
||||
width: 500px;
|
||||
overflow: hidden;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
@ -385,7 +414,7 @@ export default {
|
||||
}
|
||||
|
||||
.tip-body {
|
||||
height: 366px;
|
||||
height: 370px;
|
||||
padding: 10px;
|
||||
|
||||
.list-label {
|
||||
@ -398,7 +427,6 @@ export default {
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
background-color: #fff;
|
||||
padding: 10px 0 10px 10px;
|
||||
|
||||
.foot-detail {
|
||||
|
@ -81,7 +81,6 @@ export default {
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'score',
|
||||
'started',
|
||||
'usedTime',
|
||||
'basicInfo'
|
||||
]),
|
||||
@ -155,20 +154,19 @@ export default {
|
||||
start() {
|
||||
// 清空按钮操作
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
this.$store.dispatch('training/setMapDefaultState');
|
||||
this.startLoading = true;
|
||||
// console.log(2222222222222, this.startLoading, this.started, this.trainingObj);
|
||||
if (this.trainingObj && this.trainingObj.id) {
|
||||
startTrainingNew(this.trainingObj, this.group).then(response => {
|
||||
this.isDisable = true;
|
||||
this.$store.dispatch('training/setTrainingStart', true);
|
||||
this.$store.dispatch('map/clearJlmapTrainView').then(() => {
|
||||
this.$store.dispatch('training/teachModeStart', this.demoMode).then(()=>{
|
||||
this.$store.dispatch('training/countTime', 'Lesson'); // 开始计时
|
||||
this.$store.dispatch('training/setMapDefaultState').then(() => {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.tipInfo({ color: 'green', message: this.$t('global.pleaseOpearte') });
|
||||
});
|
||||
});
|
||||
});
|
||||
this.startLoading = false;
|
||||
}).catch(() => {
|
||||
this.isDisable = false;
|
||||
@ -192,6 +190,7 @@ export default {
|
||||
this.$store.dispatch('training/judgeFinish', data).then(rsp => {
|
||||
this.$store.dispatch('training/setStopCountTime');
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('training/setTrainingStart', false);
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('display.lesson.endTrainingError'));
|
||||
@ -200,7 +199,6 @@ export default {
|
||||
end() {
|
||||
// 如果是测试模式需要获取最终的得分
|
||||
if (this.trainingObj && this.trainingObj.id) {
|
||||
if (this.started) {
|
||||
this.isDisable = false;
|
||||
this.$store.dispatch('training/isStepOver').then((rnt) => {
|
||||
if (rnt) {
|
||||
@ -227,6 +225,7 @@ export default {
|
||||
this.$store.dispatch('training/setStopCountTime');
|
||||
this.$store.dispatch('training/setScore', 0);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('training/setTrainingStart', false);
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('display.lesson.endTrainingError'));
|
||||
});
|
||||
@ -236,9 +235,6 @@ export default {
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$messageBox(this.$t('display.lesson.startTrainingTip'));
|
||||
}
|
||||
}
|
||||
},
|
||||
back() {
|
||||
|
@ -1,9 +1,7 @@
|
||||
<template>
|
||||
<!-- v-drag 拖拽 调整宽高 -->
|
||||
<div v-quickMenuDrag class="reminder-drag">
|
||||
<div ref="drapBox" class="reminder-box" :style="{bottom: offsetBottom + 'px'}">
|
||||
<div class="zhezhao" />
|
||||
<div class="reminder-box-content">
|
||||
<div v-quickMenuDrag class="reminder-drag" :style="{bottom: offsetBottom + 'px'}">
|
||||
<div ref="drapBox" class="reminder-box">
|
||||
<div class="tip-title">
|
||||
<i v-show="isShrink" class="icon el-icon-minus" @click="shrink" />
|
||||
<i v-show="!isShrink" class="icon el-icon-plus" @click="shrink" />
|
||||
@ -11,6 +9,8 @@
|
||||
<span>{{ lessonName }}</span>
|
||||
</p>
|
||||
</div>
|
||||
<div v-if="isShrink" class="reminder-box-content">
|
||||
<div class="zhezhao" />
|
||||
<div ref="dragBody" class="tip-body-box">
|
||||
<div class="tip-body">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
@ -135,16 +135,23 @@ export default {
|
||||
launchFullscreen();
|
||||
},
|
||||
shrink() {
|
||||
const height = this.$refs.dragBody.offsetHeight + 40;
|
||||
const top = this.$refs.drapBox.style.top;
|
||||
// const height = this.$refs.dragBody.offsetHeight + 40;
|
||||
// const top = this.$refs.drapBox.style.top;
|
||||
if (this.isShrink) {
|
||||
this.$refs.drapBox.style.height = '40px';
|
||||
this.$refs.drapBox.style.top = '';
|
||||
//
|
||||
// this.$refs.drapBox.style.height = '40px';
|
||||
// this.$refs.drapBox.style.top = '';
|
||||
this.isShrink = false;
|
||||
} else {
|
||||
this.$refs.drapBox.style.height = height + 'px';
|
||||
this.$refs.drapBox.style.top = top;
|
||||
this.isShrink = true;
|
||||
this.$nextTick(()=>{
|
||||
const dragDom = document.querySelector('.reminder-drag').style.bottom;
|
||||
if (document.body.clientHeight - 300 - parseInt(dragDom.replace('px', '')) < 0) {
|
||||
document.querySelector('.reminder-drag').style.bottom = `${document.body.clientHeight - 300}px`;
|
||||
}
|
||||
});
|
||||
// this.$refs.drapBox.style.height = height + 'px';
|
||||
// this.$refs.drapBox.style.top = top;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -156,14 +163,17 @@ export default {
|
||||
.tip-body-box {
|
||||
position: relative;
|
||||
height: 260px;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.reminder-drag{
|
||||
position: absolute;
|
||||
width: 500px;
|
||||
height: 300px;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
left: 15px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.elem-span{
|
||||
@ -175,37 +185,31 @@ export default {
|
||||
height: 100%;
|
||||
filter: blur(8px);
|
||||
background: rgba(255,255,255,0.9);
|
||||
position:absolute;
|
||||
}
|
||||
.reminder-box-content{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: 500px;
|
||||
height: 260px;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 2;
|
||||
background: rgba(255,255,255,0.8);
|
||||
position: relative;
|
||||
}
|
||||
.reminder-box {
|
||||
position: absolute;
|
||||
float: left;
|
||||
left: 15px;
|
||||
bottom: 15px;
|
||||
width: 500px;
|
||||
height: 300px;
|
||||
background: transparent;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
z-index: 10;
|
||||
font-size: 18px;
|
||||
|
||||
.tip-title {
|
||||
width: 100%;
|
||||
width: 500px;
|
||||
overflow: hidden;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row-reverse;
|
||||
background-color: rgba(64, 158, 255,0.8);
|
||||
background-color: rgba(64, 158, 255,1);
|
||||
border-radius: 5px 5px 0 0;
|
||||
justify-content: space-between;
|
||||
padding: 0 10px;
|
||||
@ -249,7 +253,7 @@ export default {
|
||||
}
|
||||
|
||||
.tip-body {
|
||||
height: 366px;
|
||||
height: 260px;
|
||||
padding: 10px;
|
||||
|
||||
.list-label {
|
||||
|
@ -205,13 +205,13 @@ export function covertOperate(operationType, operationParamMap) {
|
||||
if (operationType == 'Set_Fault' || operationType == 'Cancel_Fault') {
|
||||
let deviceName = '';
|
||||
const device = store.getters['map/getDeviceByCode'](operationParamMap.code);
|
||||
if (device._type == 'StationStand') {
|
||||
if (device._type == 'StationStand' || device._type == 'Signal' || device._type == 'Switch') {
|
||||
const station = store.getters['map/getDeviceByCode'](device.stationCode);
|
||||
deviceName += '【车站-' + station.name + '】/';
|
||||
deviceName += '【车站-' + station.name + '】 / ' + deviceType[device._type] + device.name;
|
||||
} else {
|
||||
deviceName = '' + device.name;
|
||||
}
|
||||
let tip = '请找到' + deviceType[device._type] + deviceName + ',';
|
||||
let tip = '请找到' + deviceName + ',';
|
||||
if (operationType == 'Set_Fault') {
|
||||
tip += '设置故障,';
|
||||
} else {
|
||||
@ -262,9 +262,9 @@ export function covertOperate(operationType, operationParamMap) {
|
||||
function covertDeviceName(deviceInfo, deviceType) {
|
||||
let deviceName = '';
|
||||
const device = store.getters['map/getDeviceByCode'](deviceInfo);
|
||||
if (device._type == 'StationStand') {
|
||||
if (device._type == 'StationStand' || device._type == 'Signal' || device._type == 'Switch') {
|
||||
const station = store.getters['map/getDeviceByCode'](device.stationCode);
|
||||
deviceName += '车站-' + station.name + '/';
|
||||
deviceName += '车站-' + station.name + ' / ';
|
||||
}
|
||||
if (device._type == 'Section') {
|
||||
if (device.parentCode && device.type == '02') {
|
||||
|
@ -41,7 +41,7 @@ export default {
|
||||
this.$store.dispatch('training/isTeachMode').then(() => {
|
||||
this.tipShow = true;
|
||||
const offset = this.$store.state.config.canvasOffset;
|
||||
if (this.$store.state.training.started) {
|
||||
if (this.$store.state.training.trainingStart) {
|
||||
const order = this.$store.state.training.order;
|
||||
const steps = this.$store.state.training.steps;
|
||||
if (order > -1 && order < steps.length) {
|
||||
|
Loading…
Reference in New Issue
Block a user