diff --git a/.env.sai b/.env.sai new file mode 100644 index 000000000..82235e634 --- /dev/null +++ b/.env.sai @@ -0,0 +1,9 @@ +# just a flag +NODE_ENV = 'production' +VUE_APP_PRO = 'common' + +# base api +# VUE_APP_BASE_API = 'http://160.20.60.15:9000' +# VUE_APP_VOICE_API = 'http://160.20.60.15/oss/joylink' +# VUE_APP_UPLOAD_API = 'http://160.20.60.15' +# VUE_APP_BASE_SITE='http://160.20.60.15' diff --git a/src/api/jmap/training.js b/src/api/jmap/training.js index 8d2c8339d..2067026e9 100644 --- a/src/api/jmap/training.js +++ b/src/api/jmap/training.js @@ -265,3 +265,11 @@ export function loadTrainingBg(group, trainingId) { method: 'post' }); } +/** 预备开始场景 */ +export function prepareScene(group, params) { + return request({ + url:`/api/training2Simulation/${group}/prepare/start`, + method: 'post', + params + }); +} diff --git a/src/api/trainingManage.js b/src/api/trainingManage.js index 81cb57a4c..97f016604 100644 --- a/src/api/trainingManage.js +++ b/src/api/trainingManage.js @@ -166,3 +166,26 @@ export function clearDesignTraining(trainingId, group) { method: 'delete' }); } +/** 导出实训数据 */ +export function exportTrainingData(data) { + return request({ + url: `/api/v2/training/published/export`, + method: 'post', + data + }); +} +/** 导入实训数据 */ +export function importTrainingData(data) { + return request({ + url: `/api/v2/training/published/import`, + method: 'post', + data + }); +} +/** 实训跳转到当前步骤*/ +export function jumpToTraining(group, stepId) { + return request({ + url: `/api/training2Simulation/${group}/jumpTo/${stepId}`, + method: 'put' + }); +} diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index b726598e5..abda1beef 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -635,6 +635,19 @@ class SkinCode extends defaultStyle { controlColor: 'red' // 控制灯颜色 (灰色) } }; + /* 上电解锁 */ + this[deviceType.PowerUnLock] = { + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + lamp: { + fill: 'rgba(0,0,0,0)', // 填充色 + radiusR: 6, // 控制灯大小 + controlColor: 'red' // 控制灯颜色 (灰色) + } + }; /** 引导总锁 */ this[deviceType.GuideLock] = { diff --git a/src/jmapNew/constant/deviceRender.js b/src/jmapNew/constant/deviceRender.js index 19d6604bc..0a01e0071 100644 --- a/src/jmapNew/constant/deviceRender.js +++ b/src/jmapNew/constant/deviceRender.js @@ -347,4 +347,9 @@ deviceRender[deviceType.Counter] = { _type: deviceType.Counter, zlevel: 1 }; +/** PowerUnLock 上电解锁*/ +deviceRender[deviceType.PowerUnLock] = { + _type: deviceType.PowerUnLock, + zlevel: 1 +}; export default deviceRender; diff --git a/src/jmapNew/constant/deviceType.js b/src/jmapNew/constant/deviceType.js index acbf522e8..9a65ce5f9 100644 --- a/src/jmapNew/constant/deviceType.js +++ b/src/jmapNew/constant/deviceType.js @@ -63,6 +63,7 @@ const deviceType = { SectionOccupied: 'SectionOccupied', ThroatRoute: 'ThroatRoute', NoStatusLamp: 'NoStatusLamp', - Counter: 'Counter' + Counter: 'Counter', + PowerUnLock: 'PowerUnLock' }; export default deviceType; diff --git a/src/jmapNew/parser/parser-graph.js b/src/jmapNew/parser/parser-graph.js index c1298bca1..9216b42f0 100644 --- a/src/jmapNew/parser/parser-graph.js +++ b/src/jmapNew/parser/parser-graph.js @@ -122,6 +122,11 @@ export function parser(data, skinCode, showConfig) { mapDevice[elem.code] = createDevice(deviceType.AxleReset, elem, propConvert, showConfig); }, this); + zrUtil.each(data.powerUnLockButtonList || [], elem => { // 上电解锁列表 + mapDevice[elem.code] = createDevice(deviceType.PowerUnLock, elem, propConvert, showConfig); + mapDevice[elem.stationCode].powerUnLockCode = elem.code; + }, this); + zrUtil.each(data.totalGuideLockButtonVOList || [], elem => { // 引导总锁列表 mapDevice[elem.code] = createDevice(deviceType.GuideLock, elem, propConvert, showConfig); if (!elem.direction) { @@ -342,6 +347,7 @@ export function updateMapData(state, model) { case deviceType.Esp: updateForList(model, state, 'espList'); break; case deviceType.AutoTurnBack: updateForList(model, state, 'cycleButtonList'); break; case deviceType.AxleReset: updateForList(model, state, 'axleCounterResetButtonList'); break; + case deviceType.PowerUnLock: updateForList(model, state, 'powerUnLockButtonList'); break; case deviceType.GuideLock: updateForList(model, state, 'totalGuideLockButtonVOList'); break; case deviceType.OutFrame: updateForList(model, state, 'outerFrameList'); break; case deviceType.AutomaticRoute: updateForList(model, state, 'automaticRouteButtonList'); break; diff --git a/src/jmapNew/shape/graph/PowerUnLock/EMouse.js b/src/jmapNew/shape/graph/PowerUnLock/EMouse.js new file mode 100644 index 000000000..3dfd09e38 --- /dev/null +++ b/src/jmapNew/shape/graph/PowerUnLock/EMouse.js @@ -0,0 +1,57 @@ +import Group from 'zrender/src/container/Group'; +import Text from 'zrender/src/graphic/Text'; + +export default class EMouse extends Group { + constructor(device) { + super(); + this.device = device; + this.create(); + } + create() { + this.text = new Text({ + zlevel: this.device.zlevel, + z: this.device.z + 1, + position: [0, 0], + style: { + x: this.device.computedPosition.x, + y: this.device.computedPosition.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance - 30, + fontWeight: 'normal', + fontSize: this.device.style.LcControl.mouseOverStyle.fontSize, + fontFamily: this.device.style.fontFamily, + text: this.device.model.name, + textFill: this.device.style.LcControl.mouseOverStyle.fontColor, + textAlign: this.device.style.LcControl.mouseOverStyle.textAlign, + textVerticalAlign: this.device.style.LcControl.mouseOverStyle.textVerticalAlign + } + }); + this.add(this.text); + this.text.hide(); + } + mouseover(e) { + if (e && + e.target && + e.target._subType == 'Text') { + this.text.show(); + } else { + // this.device.control.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor); + // this.device.control.setTextColor(this.device.style.LcControl.mouseOverStyle.textColor); + // this.device.control.setTextBorder(true); + // this.device.control.setArcBorder(true); + } + } + + mouseout(e) { + if (!this.device.__down) { + if (e && + e.target && + e.target._subType == 'Text') { + this.text.hide(); + } else { + // this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor); + // this.device.control.setTextColor('#FFFFFF'); + // this.device.control.setTextBorder(false); + // this.device.control.setArcBorder(false); + } + } + } +} diff --git a/src/jmapNew/shape/graph/PowerUnLock/index.js b/src/jmapNew/shape/graph/PowerUnLock/index.js new file mode 100644 index 000000000..07ac9a690 --- /dev/null +++ b/src/jmapNew/shape/graph/PowerUnLock/index.js @@ -0,0 +1,165 @@ +/* +* 上电解锁 控制器 +*/ +import Group from 'zrender/src/container/Group'; +import Arc from 'zrender/src/graphic/shape/Arc'; +import Text from 'zrender/src/graphic/Text'; +import EMouse from './EMouse'; +import BoundingRect from 'zrender/src/core/BoundingRect'; +import store from '@/store/index'; + +export default class PowerUnLock extends Group { + constructor(model, {style}) { + super(); + this.z = 20; + this._code = model.code; + this._type = model._type; + this.zlevel = model.zlevel; + const pictureDevice = store.getters['map/getPictureDeviceByCode'](model.code); + if (pictureDevice) { + this.computedPosition = pictureDevice.position; + } else { + this.computedPosition = model.position; + } + this.model = model; + this.style = style; + this.isShowShape = true; + this.create(); + this.createMouseEvent(); + this.setState(model); + } + + create() { + const powerUnLockStyle = this.style.PowerUnLock ? this.style.PowerUnLock : { lamp: {}, text: {}, subtitleText: {} }; + const model = this.model; + this.control = new Arc({ + _subType: 'Control', + zlevel: this.zlevel, + z: this.z, + shape: { + cx: this.computedPosition.x, + cy: this.computedPosition.y, + r: powerUnLockStyle.lamp.radiusR + }, + style: { + stroke: '##b5b3b3', + lineWidth: 1.5, + fill: powerUnLockStyle.lamp.controlColor + } + }); + + this.text = new Text({ + _subType: 'Text', + zlevel: this.zlevel, + z: this.z, + position: [0, 0], + style: { + x: this.computedPosition.x, + y: this.computedPosition.y + powerUnLockStyle.lamp.radiusR + powerUnLockStyle.text.distance, + fontWeight: powerUnLockStyle.text.fontWeight, + fontSize: powerUnLockStyle.text.fontSize, + fontFamily: this.style.fontFamily, + text: model.name, + textFill: '#fff', + textAlign: 'middle', + textVerticalAlign: 'top' + } + }); + + if (this.model.subtitleName) { + this.subtitleText = new Text({ + _subType: 'Text', + zlevel: this.zlevel, + z: this.z, + position: [0, 0], + style: { + x: this.computedPosition.x, + y: this.computedPosition.y + powerUnLockStyle.lamp.radiusR + powerUnLockStyle.subtitleText.distance, + fontWeight: powerUnLockStyle.subtitleText.fontWeight, + fontSize: powerUnLockStyle.subtitleText.fontSize, + fontFamily: this.style.fontFamily, + text: model.subtitleName, + textFill: '#fff', + textAlign: 'middle', + textVerticalAlign: 'top' + } + }); + this.add(this.subtitleText); + } + this.add(this.control); + this.add(this.text); + } + + setAshShow() { + this.control && this.control.setStyle({fill:'#FFF'}); + } + + // 设置状态 + setState(model) { + this.recover(); + // 只响应前端自定义类型的状态变化 + if (!store.getters['map/checkDeviceShow'](this._code)) { + this.control && this.control.hide(); + this.text && this.text.hide(); + this.subtitleText && this.subtitleText.hide(); + } else if (model._free) { + this.setAshShow(); + } + } + handleShowHide(powerUnLockCode) { + const path = window.location.href; + if (powerUnLockCode || path.includes('/map/draw')) { + this.control && this.control.show(); + this.text && this.text.show(); + this.subtitleText && this.subtitleText.show(); + } else { + this.control && this.control.hide(); + this.text && this.text.hide(); + this.subtitleText && this.subtitleText.hide(); + } + } + + recover() { + this.control && this.control.show(); + this.text && this.text.show(); + this.subtitleText && this.subtitleText.show(); + } + + createMouseEvent() { + if (this.style.LcControl.mouseOverStyle) { + this.mouseEvent = new EMouse(this); + this.add(this.mouseEvent); + this.on('mouseout', (e) => { this.mouseEvent.mouseout(e); }); + this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); }); + } + } + getShapeTipPoint() { + if (this.control) { + var distance = 2; + var rect = this.control.getBoundingRect(); + return { + x: rect.x + rect.width / 2, + y: rect.y - distance + }; + } + return null; + } + + getBoundingRect() { // 计算自动折返包围框 + if (this.control) { + const rect = this.control.getBoundingRect().clone(); + if (this.text) { + const text = this.text.getBoundingRect().clone(); + rect.union(text); + return rect; + } else { + return rect; + } + } else { + return new BoundingRect(0, 0, 0, 0); + } + } + getAnchorPoint() { + return this.computedPosition; + } +} diff --git a/src/jmapNew/shape/graph/Psd/index.js b/src/jmapNew/shape/graph/Psd/index.js index 99efd2e16..22fd69f26 100644 --- a/src/jmapNew/shape/graph/Psd/index.js +++ b/src/jmapNew/shape/graph/Psd/index.js @@ -75,6 +75,9 @@ export default class Line2 extends Group { currentTypeList.forEach(element => { this[element].setState(model); }); + if (model.noStatus) { + this.setAshShow(); + } } } diff --git a/src/jmapNew/shape/graph/Section/index.js b/src/jmapNew/shape/graph/Section/index.js index 26790f43f..b7e4a3583 100644 --- a/src/jmapNew/shape/graph/Section/index.js +++ b/src/jmapNew/shape/graph/Section/index.js @@ -446,6 +446,10 @@ export default class Section extends Group { this.line && this.line.setStyle({stroke: '#7F7F7F'}); this.line && this.line.setCross({fill: '#7F7F7F'}); this.name && this.name.setStyle({textFill: '#7F7F7f'}); + this.standTrackText && this.standTrackText.setStyle({textFill: '#7F7F7f'}); + this.reentryTrackText && this.reentryTrackText.setStyle({textFill: '#7F7F7f'}); + this.transferTrackText && this.transferTrackText.setStyle({textFill: '#7F7F7f'}); + this.destinationText && this.destinationText.setStyle({textFill: '#7F7F7f'}); } /** 计轴预复位 */ preReset(blockade) { diff --git a/src/jmapNew/shape/graph/Station/EStationText.js b/src/jmapNew/shape/graph/Station/EStationText.js index 7d4c96574..601b92673 100644 --- a/src/jmapNew/shape/graph/Station/EStationText.js +++ b/src/jmapNew/shape/graph/Station/EStationText.js @@ -21,7 +21,7 @@ class EStationText extends Group { x: model.computedPosition.x, y: model.computedPosition.y, fontWeight: style.Station.stationText.fontWeight, - fontSize: isNaN(Number(model.nameFont)) ? 20 : Number(model.nameFont), + fontSize: model.nameFont || 20, fontFamily: style.fontFamily, text: model.number ? model.number + model.name : model.name, textAlign: 'middle', diff --git a/src/jmapNew/shape/graph/Station/index.js b/src/jmapNew/shape/graph/Station/index.js index 2a51a7314..c36946808 100644 --- a/src/jmapNew/shape/graph/Station/index.js +++ b/src/jmapNew/shape/graph/Station/index.js @@ -1008,6 +1008,7 @@ export default class Station extends Group { model.emergencyController != undefined && this.handleEmergencyChange(model.emergencyController); model.controlApplicant && this.handleControlApplicant(model); model.allowAutonomy && this.handleAllowAutonomy(model); + // this.handlePowerUnlockShow(model); this.handleGuideLock(model); if (this.style.Station.syncCentralizeStation && (model.controlMode || model.controller || model.emergencyController != undefined) && model.centralized) { model.chargeStationCodeList.forEach(item => { @@ -1062,6 +1063,12 @@ export default class Station extends Group { handleAllowAutonomy() { this.selfDiscipline && this.selfDiscipline.setColor(this.style.Station.StationControl.selfDiscipline.lightColor); } + // handlePowerUnlockShow(model) { + // if (model.powerUnLockCode) { + // const powerUnLock = store.getters['map/getDeviceByCode'](model.powerUnLockCode); + // powerUnLock && powerUnLock.instance && powerUnLock.instance.handleShowHide(model.powerUnlockButtonShow); + // } + // } handleControlApplicant(model) { if (this.style.Station.stationText.isSpecialType) { diff --git a/src/jmapNew/shape/graph/StationStand/safeStand/EHollowStand.js b/src/jmapNew/shape/graph/StationStand/safeStand/EHollowStand.js index a649688f8..d29aa12d5 100644 --- a/src/jmapNew/shape/graph/StationStand/safeStand/EHollowStand.js +++ b/src/jmapNew/shape/graph/StationStand/safeStand/EHollowStand.js @@ -1,5 +1,6 @@ import Group from 'zrender/src/container/Group'; import Rect from 'zrender/src/graphic/shape/Rect'; +import store from '@/store/index'; class EHollowStand extends Group { constructor(model) { @@ -52,6 +53,9 @@ class EHollowStand extends Group { model.trainParking && this.setColor(style.StationStand.hollowStand.doorOpenColor); // 紧急停车 model.emergencyClosed && this.setColor(style.StationStand.hollowStand.spareColor); + if (model.noStatus || (model.atsNoStatus && store.state.map.picture === '02')) { + this.setColor('#7F7F7F'); + } } } diff --git a/src/jmapNew/shape/graph/StationStand/safeStand/ELineStand.js b/src/jmapNew/shape/graph/StationStand/safeStand/ELineStand.js index fffa00868..531377ed9 100644 --- a/src/jmapNew/shape/graph/StationStand/safeStand/ELineStand.js +++ b/src/jmapNew/shape/graph/StationStand/safeStand/ELineStand.js @@ -2,6 +2,7 @@ import Group from 'zrender/src/container/Group'; import Polyline from 'zrender/src/graphic/shape/Polyline'; // import Rect from 'zrender/src/graphic/shape/Rect'; // import Text from 'zrender/src/graphic/Text'; +import store from '@/store/index'; class ESolidStand extends Group { constructor(model) { @@ -65,6 +66,9 @@ class ESolidStand extends Group { } setState(model) { + if (model.noStatus || (model.atsNoStatus && store.state.map.picture === '02')) { + this.setColor('#7F7F7F'); + } } } diff --git a/src/jmapNew/shape/graph/StationStand/safeStand/ESolidStand.js b/src/jmapNew/shape/graph/StationStand/safeStand/ESolidStand.js index e3672e9b2..8b36bff85 100644 --- a/src/jmapNew/shape/graph/StationStand/safeStand/ESolidStand.js +++ b/src/jmapNew/shape/graph/StationStand/safeStand/ESolidStand.js @@ -145,6 +145,10 @@ class ESolidStand extends Group { model.sysHoldTrain && this.setHoldTrain('System'); // 站台关闭 model.closed && this.setColor(style.StationStand.solidStand.closeColor); + + if (model.noStatus || (model.atsNoStatus && store.state.map.picture === '02')) { + this.setColor('#7F7F7F'); + } } else { this.handlePassagerColor(model.num); } diff --git a/src/jmapNew/shape/graph/Switch/index.js b/src/jmapNew/shape/graph/Switch/index.js index 044ea66f4..67955d493 100644 --- a/src/jmapNew/shape/graph/Switch/index.js +++ b/src/jmapNew/shape/graph/Switch/index.js @@ -318,11 +318,12 @@ export default class Switch extends Group { /** 名称动画*/ nameTextAnimation() { - this.name.getNameText().animateStyle(true) - .when(0, { textFill: this.style.backgroundColor }) - .when(1000, { textFill: this.style.Switch.text.lossColor }) - .when(2000, { textFill: this.style.backgroundColor }) - .start(); + if (this.name.getNameText()) { + this.name.getNameText().animateStyle(true) + .when(0, { textFill: this.style.backgroundColor }) + .when(1000, { textFill: this.style.Switch.text.lossColor }) + .when(2000, { textFill: this.style.backgroundColor }); + } this.name.getTextRect().animateStyle(true) .when(0, { textFill: this.style.backgroundColor }) diff --git a/src/jmapNew/shape/graph/index.js b/src/jmapNew/shape/graph/index.js index 0ce89fc8f..90cd12036 100644 --- a/src/jmapNew/shape/graph/index.js +++ b/src/jmapNew/shape/graph/index.js @@ -17,6 +17,7 @@ import Train from './Train/index.js'; import Line from './Line/index.js'; import Text2 from './Text/index.js'; import AxleReset from './AxleReset/index'; +import PowerUnLock from './PowerUnLock/index'; import GuideLock from './GuideLock/index'; import AutoTurnBack from './AutoTurnBack/index.js'; import OutFrame from './OutFrame/index.js'; @@ -99,5 +100,6 @@ mapShape[deviceType.FloodGate] = FloodGate; mapShape[deviceType.DirectionRod] = DirectionRod; mapShape[deviceType.Responder] = Responder; mapShape[deviceType.SignalButton] = SignalButton; +mapShape[deviceType.PowerUnLock] = PowerUnLock; export default mapShape; diff --git a/src/jmapNew/theme/beijing_01/menus/menuDialog/helpAbout.vue b/src/jmapNew/theme/beijing_01/menus/menuDialog/helpAbout.vue index 156d7779f..3281c7d96 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuDialog/helpAbout.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuDialog/helpAbout.vue @@ -24,7 +24,7 @@ >确定
- 版权所有(C)2010-2011 北京玖琏科技有限公司 + 版权所有(C)2010-2011 北京玖琏科技有限公司
@@ -40,6 +40,7 @@ diff --git a/src/jmapNew/theme/datie_02/menus/dialog/loadSpareTrain.vue b/src/jmapNew/theme/datie_02/menus/dialog/loadSpareTrain.vue new file mode 100644 index 000000000..6f9248a37 --- /dev/null +++ b/src/jmapNew/theme/datie_02/menus/dialog/loadSpareTrain.vue @@ -0,0 +1,163 @@ + + + + diff --git a/src/jmapNew/theme/datie_02/menus/menuSection.vue b/src/jmapNew/theme/datie_02/menus/menuSection.vue index df324087f..3fab36a55 100644 --- a/src/jmapNew/theme/datie_02/menus/menuSection.vue +++ b/src/jmapNew/theme/datie_02/menus/menuSection.vue @@ -4,6 +4,7 @@ + @@ -22,6 +23,7 @@ import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/men import AddSpareTrain from './dialog/addSpareTrain'; import DrawSelect from './dialog/drawSelect'; import ForkDirective from './dialog/forkDirective'; +import LoadSpareTrain from './dialog/loadSpareTrain'; export default { name: 'SectionMenu', @@ -32,7 +34,8 @@ export default { SetFault, AddSpareTrain, DrawSelect, - ForkDirective + ForkDirective, + LoadSpareTrain }, props: { selected: { @@ -84,6 +87,11 @@ export default { label: 'Cancel faults', handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT + }, + { + label: 'Add a spare train', + handler: this.loadSpare, + cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN } ] }; @@ -107,14 +115,14 @@ export default { } }, mounted() { - const isDev = process.env.NODE_ENV === 'development'; - if (isDev) { - this.menuNormal.push( { - label: 'New planned train', - handler: this.createPlanTrain, - cmdType: CMD.Section.CMD_Train_Init_Plan - }); - } + // const isDev = process.env.NODE_ENV === 'development'; + // if (isDev) { + // this.menuNormal.push( { + // label: '新建计划列车', + // handler: this.createPlanTrain, + // cmdType: CMD.Section.CMD_Train_Init_Plan + // }); + // } }, methods: { initMenu() { @@ -202,6 +210,13 @@ export default { this.$refs.trainAddPlan.doShow(operate); } }); + }, + loadSpare() { + commitOperate(menuOperate.Section.loadSpareTrain, {sectionCode:this.selected.code}).then(({valid, operate})=>{ + if (valid) { + this.$refs.loadSpareTrain.doShow(operate, this.selected); + } + }); } } }; diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuDialog/helpAbout.vue b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/helpAbout.vue new file mode 100644 index 000000000..96cef4648 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/helpAbout.vue @@ -0,0 +1,140 @@ + + + + diff --git a/src/jmapNew/theme/datie_ksk/menus/menuDialog/helpAbout.vue b/src/jmapNew/theme/datie_ksk/menus/menuDialog/helpAbout.vue new file mode 100644 index 000000000..2284ea481 --- /dev/null +++ b/src/jmapNew/theme/datie_ksk/menus/menuDialog/helpAbout.vue @@ -0,0 +1,140 @@ + + + + diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue b/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue index afeb3d702..6612aaa04 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue @@ -105,14 +105,14 @@ export default { label: '设置限速', handler: this.setSpeed, cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, - isDisabled: (section, work) => section.speedUpLimit !== -1, + isDisabled: (section, work) => section.speedUpLimit > 0, isShow: (section, work) => section.type === '02' }, { label: '取消限速', handler: this.cancelSpeed, cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, - isDisabled: (section, work) => section.speedUpLimit === -1, + isDisabled: (section, work) => section.speedUpLimit <= 0, isShow: (section, work) => section.type === '02' } ], diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue b/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue index 7c27ea55f..0100537f7 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue @@ -78,6 +78,13 @@ export default { isDisabled: (station, work) => false, isShow: (station, work) => work === 'dispatchWork' }, + { + label: '上电解锁', + handler: this.powerUnLock, + cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK, + isDisabled: (station, work) => false, + isShow: (station, work) => work === 'localWork' + }, { label: this.$t('menu.menuStation.execKeyOperationTest'), handler: this.execKeyOperationTest, @@ -97,6 +104,11 @@ export default { handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT }, + { + label: '设置车站故障', + handler: this.setStationStoppage, + cmdType: CMD.Station.CMD_SET_FAULT + }, { label: '重启联锁机', handler: this.restartInterlock, @@ -229,6 +241,20 @@ export default { this.$refs.stationSetRouteControlAll.doShow(operate, this.selected); } }); + }, + setStationStoppage() { + commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); + } + }); + }, + cancelStationStoppage() { + commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); + } + }); } } }; diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/childDialog/confirmTip.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/childDialog/confirmTip.vue index 39b9eb3a0..64819b1e0 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/childDialog/confirmTip.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/childDialog/confirmTip.vue @@ -275,6 +275,16 @@ export default { this.doClose(); } }).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); }); + } else if (this.operation === OperationEvent.Station.powerUnLock.confirm1.operation) { + const step = { + operation: OperationEvent.Command.common.affirm.operation, + cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK + }; + commitOperate(step, {}, 2).then(({valid}) => { + if (valid) { + this.doClose(); + } + }).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); }); } }, doClose() { diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/passwordInput.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/passwordInput.vue index c53ee69f6..7780cfd77 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/passwordInput.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/passwordInput.vue @@ -13,7 +13,7 @@ > -
密码:
+
密码(root):
diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/sectionAlxeReset.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/sectionAlxeReset.vue index b1c077800..966541082 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/sectionAlxeReset.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/sectionAlxeReset.vue @@ -54,7 +54,7 @@ export default { loading: false, operation: '', sectionCode: '', - selected: null + selected: null }; }, computed: { @@ -64,7 +64,7 @@ export default { switchAndPhySicalSectionList() { let list = []; if (this.sectionList && this.sectionList.length) { - list = this.sectionList.filter(elem => { return elem.type === '01' || elem.type === '03'; }); + list = this.sectionList.filter(elem => { return elem.type === '01' || elem.type === '04'; }); } return list; }, @@ -93,9 +93,9 @@ export default { }, methods: { doShow(operate, selected) { - this.$root.$emit('dialogOpen', selected); + this.$root.$emit('dialogOpen', selected); if (!this.dialogShow) { - this.selected = selected; + this.selected = selected; this.sectionCode = ''; this.operation = operate.operation || ''; } @@ -107,7 +107,7 @@ export default { doClose() { this.loading = false; this.dialogShow = false; - this.$root.$emit('dialogClose', this.selected); + this.$root.$emit('dialogClose', this.selected); this.$store.dispatch('training/emitTipFresh'); }, sectionSelectChange() { diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/stationPowerUnLock.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/stationPowerUnLock.vue new file mode 100644 index 000000000..9b6db4ab3 --- /dev/null +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/stationPowerUnLock.vue @@ -0,0 +1,143 @@ + + + diff --git a/src/jmapNew/theme/ningbo_01/menus/localWorkMenu.vue b/src/jmapNew/theme/ningbo_01/menus/localWorkMenu.vue index 38aa8b08a..48fb57e58 100644 --- a/src/jmapNew/theme/ningbo_01/menus/localWorkMenu.vue +++ b/src/jmapNew/theme/ningbo_01/menus/localWorkMenu.vue @@ -16,6 +16,7 @@ + @@ -37,6 +38,7 @@ import MenuLimit from './menuLimit'; import MenuStationTurnBack from './menuStationTurnBack'; import MenuStationLight from './menuStationLight'; import MenuStationPreReset from './menuStationPreReset'; +import MenuPowerUnLock from './menuPowerUnLock'; // import PassiveAlarm from './passiveDialog/alarm'; import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control'; import AlarmDetail from './alarmDetail'; @@ -61,7 +63,8 @@ export default { PassiveContorl, MenuStationLight, MenuStationPreReset, - AlarmDetail + AlarmDetail, + MenuPowerUnLock // PassiveTimeout }, props: { diff --git a/src/jmapNew/theme/ningbo_01/menus/menuDialog/helpAbout.vue b/src/jmapNew/theme/ningbo_01/menus/menuDialog/helpAbout.vue index 8ccd0ebcd..aee4288ad 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuDialog/helpAbout.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuDialog/helpAbout.vue @@ -24,7 +24,7 @@ >确定
- 版权所有(C)2010-2011 北京玖琏科技有限公司 + 版权所有(C)2010-2011 北京玖琏科技有限公司
@@ -40,6 +40,7 @@ diff --git a/src/jmapNew/theme/ningbo_01/menus/menuStation.vue b/src/jmapNew/theme/ningbo_01/menus/menuStation.vue index ea2e1125d..9005f07ad 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuStation.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuStation.vue @@ -61,12 +61,12 @@ export default { cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER, isShow: (selected, work) => work == 'localWork' }, - { - label: '上电解锁', - handler: this.powerUnLock, - cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK, - isShow: (selected, work) => work == 'localWork' - }, + // { + // label: '上电解锁', + // handler: this.powerUnLock, + // cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK, + // isShow: (selected, work) => work == 'localWork' + // }, // { // label: '执行关键操作测试', // handler: this.execKeyOperationTest, @@ -101,6 +101,11 @@ export default { handler: this.cancelStoppage, cmdType: CMD.Station.CMD_STATION_REMOVE_FAULT }, + { + label: '设置车站故障', + handler: this.setStationStoppage, + cmdType: CMD.Station.CMD_SET_FAULT + }, { label: '重启联锁机', handler: this.restartInterlock, @@ -186,6 +191,13 @@ export default { } }); }, + setStationStoppage() { + 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.zcCode }, 0).then(({valid, operate})=>{ diff --git a/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue b/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue index 712e5c8ec..e49140b2d 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue @@ -214,7 +214,7 @@ export default { if (this.operatemode === OperateMode.FAULT) { // if (!this.$store.state.scriptRecord.bgSet) { const menuHook = [{ - label: '道岔钩锁', + label: '手摇道岔钩锁', handler: this.hookLock }]; this.menu = [...this.menuForce, ...menuHook]; diff --git a/src/jmapNew/theme/race_01/menus/menuDialog/helpAbout.vue b/src/jmapNew/theme/race_01/menus/menuDialog/helpAbout.vue index 7543de030..cb8198096 100644 --- a/src/jmapNew/theme/race_01/menus/menuDialog/helpAbout.vue +++ b/src/jmapNew/theme/race_01/menus/menuDialog/helpAbout.vue @@ -24,7 +24,7 @@ >确定
- 版权所有(C)2010-2011 北京玖琏科技有限公司 + 版权所有(C)2010-2011 北京玖琏科技有限公司
@@ -40,6 +40,7 @@ diff --git a/src/views/newMap/display/terminals/index.vue b/src/views/newMap/display/terminals/index.vue index 8a0f07154..4a8ebe78b 100644 --- a/src/views/newMap/display/terminals/index.vue +++ b/src/views/newMap/display/terminals/index.vue @@ -39,7 +39,7 @@ - + - + @@ -33,15 +35,17 @@ - + @@ -53,15 +57,17 @@ - + @@ -73,15 +79,17 @@ - + @@ -307,6 +315,15 @@ export default { }; - diff --git a/src/views/newMap/display/terminals/terminalMenu.vue b/src/views/newMap/display/terminals/terminalMenu.vue index 60bdb0a85..5d7da89fd 100644 --- a/src/views/newMap/display/terminals/terminalMenu.vue +++ b/src/views/newMap/display/terminals/terminalMenu.vue @@ -19,7 +19,7 @@ @@ -53,6 +53,9 @@ export default { }, trainingDesign() { return this.$store.state.training.domConfig && this.$store.state.training.domConfig.trainingDesign; + }, + thirdLogin() { + return this.$store.state.user.thirdLogin; } }, watch: { @@ -158,7 +161,6 @@ export default { findTerminalFromMapById(id) { const mapClientMap = this.$store.state.map.map ? this.$store.state.map.map.mapClientVOMap : {}; const mapClientList = mapClientMap ? mapClientMap[this.$route.query.simType] : []; - console.log(mapClientList, id, this.$route.query.simType, mapClientMap); return mapClientList.find(item => item.id === id); }, findTerminalFromMap(type) { diff --git a/src/views/newMap/display/trainingDesign/designPane.vue b/src/views/newMap/display/trainingDesign/designPane.vue index de579bafa..1a74ec4f3 100644 --- a/src/views/newMap/display/trainingDesign/designPane.vue +++ b/src/views/newMap/display/trainingDesign/designPane.vue @@ -351,6 +351,7 @@ export default { list.push(obj); }); await updateTrainingStep(this.group, this.editData.id, { step2VOList: list, playerIdList: this.playerIdList }); + this.getStepList(this.editData); this.$message.success('保存实训成功!'); } catch { this.$message.error('保存实训失败'); diff --git a/src/views/newMap/display/trainingDesign/draftTrainingList.vue b/src/views/newMap/display/trainingDesign/draftTrainingList.vue index b5e1d9166..f804ffa37 100644 --- a/src/views/newMap/display/trainingDesign/draftTrainingList.vue +++ b/src/views/newMap/display/trainingDesign/draftTrainingList.vue @@ -263,9 +263,9 @@ export default { this.$message.error('Please finish the current training before loading the new training!'); return; } - const qObj = {...this.$route.query}; - delete qObj.record; - this.$router.replace({ query:{...qObj}}); + // const qObj = {...this.$route.query}; + // delete qObj.record; + // this.$router.replace({ query:{...qObj}}); this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式 try { const detailResp = await getTrainingAll(data.id); @@ -274,14 +274,6 @@ export default { const mapLocation = JSON.parse(detailResp.data.mapLocationJson); this.$jlmap && this.$jlmap.updateTransform(mapLocation.scale, {x:mapLocation.x, y:mapLocation.y}); } - if (detailResp.data.playerIdJson) { - const playerId = JSON.parse(detailResp.data.playerIdJson)[0]; - if (playerId) { - const member = this.$store.state.training.memberData[playerId]; - this.$store.dispatch('training/setPrdType', this.prdTypeMap[member.type]); - this.$store.dispatch('training/setRoles', member.type); - } - } this.$emit('closeAllDialog'); this.$store.dispatch('trainingNew/setTrainingDetail', detailResp.data); await loadDraftTraining(this.group, data.id, {mode: this.teachMode}); diff --git a/src/views/newMap/display/trainingDesign/editOperate.vue b/src/views/newMap/display/trainingDesign/editOperate.vue index 5c68424c6..d2358876f 100644 --- a/src/views/newMap/display/trainingDesign/editOperate.vue +++ b/src/views/newMap/display/trainingDesign/editOperate.vue @@ -1,6 +1,8 @@