diff --git a/src/api/management/exam.js b/src/api/management/exam.js index 5691838ae..cd3e23ffc 100644 --- a/src/api/management/exam.js +++ b/src/api/management/exam.js @@ -222,7 +222,7 @@ export function getPaperDetail(pcId) { */ export function getQuestionAmount(data) { return request({ - url: `/api/v2/paper/${data.orgId}/question/count`, + url: `/api/v2/paper/question/count`, method: 'POST', data }); diff --git a/src/api/simulation.js b/src/api/simulation.js index 913f081fa..53780883c 100644 --- a/src/api/simulation.js +++ b/src/api/simulation.js @@ -228,22 +228,22 @@ export function handlerIbpEvent(group, button, stationCode, buttonCode) { }); } -/** 处理ibp盘事件(按下) */ - -export function handleIbpPress(group, stationCode, buttonCode) { - return request({ - url: `/simulation/${group}/ibp/press/${stationCode}/${buttonCode}`, - method: 'put' - }); -} -/** 处理ibp盘事件(松开) */ - -export function handleIbpRelease(group, stationCode, buttonCode) { - return request({ - url: `/simulation/${group}/ibp/release/${stationCode}/${buttonCode}`, - method: 'put' - }); -} +// /** 处理ibp盘事件(按下) */ +// +// export function handleIbpPress(group, stationCode, buttonCode) { +// return request({ +// url: `/simulation/${group}/ibp/press/${stationCode}/${buttonCode}`, +// method: 'put' +// }); +// } +// /** 处理ibp盘事件(松开) */ +// +// export function handleIbpRelease(group, stationCode, buttonCode) { +// return request({ +// url: `/simulation/${group}/ibp/release/${stationCode}/${buttonCode}`, +// method: 'put' +// }); +// } /** 预览脚本仿真(新版)*/ export function scriptDraftRecordNotifyNew(scriptId) { diff --git a/src/directive/verticalDrag/index.js b/src/directive/verticalDrag/index.js new file mode 100644 index 000000000..73c83960a --- /dev/null +++ b/src/directive/verticalDrag/index.js @@ -0,0 +1,8 @@ +import Vue from 'vue'; +import install from './verticalDrag'; + +const verticalDrag = function(Vue) { + Vue.directive('verticalDrag', install); +}; + +Vue.use(verticalDrag); diff --git a/src/directive/verticalDrag/verticalDrag.js b/src/directive/verticalDrag/verticalDrag.js new file mode 100644 index 000000000..88f1a3e5d --- /dev/null +++ b/src/directive/verticalDrag/verticalDrag.js @@ -0,0 +1,101 @@ +/* 垂直拖拽 */ +export default { + bind(el) { + const dialogHeaderEl = el.querySelector('.verticalDrag__header'); + const dialogFooterEl = el.querySelector('.verticalDrag__footer'); + const dragDom = el; + dialogHeaderEl.style.cursor = 'move'; + dialogFooterEl.style.cursor = 'move'; + const vD = 5; + + /** 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);*/ + const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null); + + dialogHeaderEl.onmousedown = (e) => { + e.stopPropagation(); + /** 鼠标按下,计算当前元素距离可视区的距离*/ + const disY = e.clientY; + const oY = dialogHeaderEl.offsetHeight; + const bY = dragDom.offsetHeight; + + /** 获取到的值带px 正则匹配替换*/ + let styT; + + /** 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px*/ + if (sty.top.includes('%')) { + styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100); + } else { + styT = +sty.top.replace(/\px/g, ''); + } + + document.onmousemove = function (e) { + e.preventDefault(); + e.stopPropagation(); + let cY = e.clientY; + if (cY < oY + vD) { + cY = oY + vD; + } + if (cY > document.body.clientHeight - bY - vD) { + cY = document.body.clientHeight - bY - vD; + } + /** 通过事件委托,计算移动的距离*/ + const t = cY - disY; + + /** 移动当前元素*/ + dragDom.style.top = `${t + styT}px`; + + /** 将此时的位置传出去*/ + // binding.value({ x: e.pageX, y: e.pageY }); + }; + + document.onmouseup = function () { + e.stopPropagation(); + document.onmousemove = null; + document.onmouseup = null; + }; + }; + dialogFooterEl.onmousedown = (e) => { + e.stopPropagation(); + /** 鼠标按下,计算当前元素距离可视区的距离*/ + const disY = e.clientY; + const oY = dialogFooterEl.offsetHeight; + const bY = dragDom.offsetHeight; + + /** 获取到的值带px 正则匹配替换*/ + let styT; + + /** 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px*/ + if (sty.top.includes('%')) { + styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100); + } else { + styT = +sty.top.replace(/\px/g, ''); + } + + document.onmousemove = function (e) { + e.preventDefault(); + e.stopPropagation(); + let cY = e.clientY; + if (cY < bY + vD) { + cY = bY + vD; + } + if (cY > document.body.clientHeight - oY - vD) { + cY = document.body.clientHeight - oY - vD; + } + /** 通过事件委托,计算移动的距离*/ + const t = cY - disY; + + /** 移动当前元素*/ + dragDom.style.top = `${t + styT}px`; + + /** 将此时的位置传出去*/ + // binding.value({ x: e.pageX, y: e.pageY }); + }; + + document.onmouseup = function () { + e.stopPropagation(); + document.onmousemove = null; + document.onmouseup = null; + }; + }; + } +}; diff --git a/src/jlmap3d/jl3dmaintainer/maintainerconnect.js b/src/jlmap3d/jl3dmaintainer/maintainerconnect.js index a84a8a59d..98cc9f403 100644 --- a/src/jlmap3d/jl3dmaintainer/maintainerconnect.js +++ b/src/jlmap3d/jl3dmaintainer/maintainerconnect.js @@ -282,7 +282,7 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) { return; } }; - + this.updatamap = function(newsectionlist,newlinklist,newsignallist,newstationstandlist,newtrainlisttest,newrealsectionlist,newrails, materiallist, nowaction, scene) { trainlisttest = newtrainlisttest; sectionlist = newsectionlist; diff --git a/src/jmapNew/config/skinCode/bejing_01.js b/src/jmapNew/config/skinCode/bejing_01.js index d630c6e58..9bdb8503f 100644 --- a/src/jmapNew/config/skinCode/bejing_01.js +++ b/src/jmapNew/config/skinCode/bejing_01.js @@ -254,7 +254,7 @@ class SkinCode extends defaultStyle { /** 引导总锁 */ this[deviceType.GuideLock] = { - // 是否显示 + // 是否显示s text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -264,8 +264,9 @@ class SkinCode extends defaultStyle { fill: 'rgba(0,0,0,0)', // 填充色 radiusR: 6, // 控制灯大小 controlColor: '#b5b3b3', // 控制灯颜色 (灰色) - lightUpColor: '#FF0000' // 点亮灯颜色 - } + lightUpColor: '#FF0000' // 点亮灯颜色 + }, + mouseOverStyle: true }; // 供电线路 diff --git a/src/jmapNew/config/skinCode/datie_02.js b/src/jmapNew/config/skinCode/datie_02.js index 373ce0062..174999e02 100644 --- a/src/jmapNew/config/skinCode/datie_02.js +++ b/src/jmapNew/config/skinCode/datie_02.js @@ -586,7 +586,8 @@ class SkinCode extends defaultStyle { lamp: { radiusR: 6, // 控制灯大小 controlColor: '#FFFF00' // 控制灯颜色 - } + }, + mouseOverStyle: {} }; this[deviceType.PowerSupply] = { text: { @@ -808,14 +809,21 @@ class SkinCode extends defaultStyle { text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 - distance: 5 // 灯跟文字距离 + distance: 5, // 灯跟文字距离 + lightHighColor: '#0000FF', // 高亮颜色 + flashColor: '#0000FF' // 闪烁颜色 }, lamp: { fill: 'rgba(0,0,0,0)', // 填充色 radiusR: 6, // 控制灯大小 controlColor: '#b5b3b3', // 控制灯颜色 (灰色) - lightUpColor: '#FF0000' // 点亮灯颜色 - } + lightUpColor: '#FF0000', // 点亮灯颜色 + lightHighColor: '#00FFFF', // 高亮颜色 + flashColor: '#0000FF' // 闪烁颜色 + }, + mouseOverStyle: true, + lightHigh: true, // 鼠标悬浮高亮 + selectFlash: true // 选中闪烁 }; this[deviceType.TrainWindow] = { @@ -929,6 +937,7 @@ class SkinCode extends defaultStyle { trainTip:true // 鼠标悬停列车状态信息框是否显示 }, trainStatusStyle: { + runLineHide: true, trainTypeStatus: [ {type: '03', serviceNumberColor: '#FFF000', groupNumberColor: '#FFF000'}, {type: '02', trainNumberColor: '#FFF000', groupNumberColor: '#FFF000'} diff --git a/src/jmapNew/parser/parser-graph.js b/src/jmapNew/parser/parser-graph.js index 3c80b6032..c1298bca1 100644 --- a/src/jmapNew/parser/parser-graph.js +++ b/src/jmapNew/parser/parser-graph.js @@ -124,7 +124,13 @@ export function parser(data, skinCode, showConfig) { zrUtil.each(data.totalGuideLockButtonVOList || [], elem => { // 引导总锁列表 mapDevice[elem.code] = createDevice(deviceType.GuideLock, elem, propConvert, showConfig); - mapDevice[elem.stationCode].guideLockCode = elem.code; // 保证处理车站列表在处理引导总锁列表之前 + if (!elem.direction) { + mapDevice[elem.stationCode].guideLockCode = elem.code; // 保证处理车站列表在处理引导总锁列表之前 + } else if (elem.direction === 'S') { + mapDevice[elem.stationCode].sGuideLockCode = elem.code; + } else if (elem.direction === 'X') { + mapDevice[elem.stationCode].xGuideLockCode = elem.code; + } }, this); zrUtil.each(data.automaticRouteButtonList || [], elem => { // 自动进路列表 diff --git a/src/jmapNew/shape/graph/GuideLock/EMouse.js b/src/jmapNew/shape/graph/GuideLock/EMouse.js index 3c4551ead..3cfd40327 100644 --- a/src/jmapNew/shape/graph/GuideLock/EMouse.js +++ b/src/jmapNew/shape/graph/GuideLock/EMouse.js @@ -28,26 +28,20 @@ export default class EMouse extends Group { this.text.hide(); } mouseover(e) { - if (e && - e.target && - e.target._subType == 'Text') { + 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); + } else if (this.device.style.GuideLock.lightHigh && !this.device.__down) { + this.device.control.setStyle({ fill: this.device.style.GuideLock.lamp.lightHighColor }); + this.device.text.setStyle({ textFill: this.device.style.GuideLock.text.lightHighColor, textBackgroundColor: '#fff' }); } } 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'); - } + if (e && e.target && e.target._subType == 'Text' && !this.device.__down) { + this.text.hide(); + } else if (this.device.style.GuideLock.lightHigh && !this.device.__down) { + this.device.control.setStyle({ fill: this.device.guideLock ? this.device.style.GuideLock.lamp.lightUpColor : this.device.style.GuideLock.lamp.controlColor }); + this.device.text.setStyle({ textFill: '#FFFFFF', textBackgroundColor: '#000' }); } } } diff --git a/src/jmapNew/shape/graph/GuideLock/index.js b/src/jmapNew/shape/graph/GuideLock/index.js index 909bd6b41..bcd78c7fb 100644 --- a/src/jmapNew/shape/graph/GuideLock/index.js +++ b/src/jmapNew/shape/graph/GuideLock/index.js @@ -23,6 +23,7 @@ export default class GuideLock extends Group { } this.model = model; this.style = style; + this.guideLock = false; this.create(); this.createMouseEvent(); this.setState(model); @@ -34,6 +35,7 @@ export default class GuideLock extends Group { _subType: 'Control', zlevel: this.zlevel, z: this.z, + cursor: 'crosshair', shape: { cx: this.computedPosition.x, cy: this.computedPosition.y, @@ -87,10 +89,14 @@ export default class GuideLock extends Group { this.add(this.text); } recover() { + this.control && this.control.stopAnimation(false); + this.text && this.text.stopAnimation(false); this.control && this.control.show(); this.text && this.text.show(); this.subtitleText && this.subtitleText.show(); this.control && this.control.setStyle({ fill: this.style.GuideLock.lamp.controlColor }); + this.text && this.text.setStyle({ textFill: '#fff', textBackgroundColor: '#000' }); + this.__down = false; } handleSignal() { this.control.setStyle({ fill: this.style.GuideLock.lamp.lightUpColor }); @@ -99,7 +105,24 @@ export default class GuideLock extends Group { setAshShow() { this.control && this.control.setStyle({fill:'#FFF'}); } - + handleSelect() { + this.control && this.control.animateStyle(true) + .when(500, { fill: this.style.GuideLock.lamp.flashColor }) + .when(1000, { fill: this.style.GuideLock.lamp.controlColor }) + .start(); + this.text && this.text.animateStyle(true) + .when(500, { textFill: this.style.GuideLock.text.flashColor }) + .when(1000, { textFill: '#fff' }) + .start(); + this.__down = true; + setTimeout(() => { + this.control && this.control.stopAnimation(false); + this.text && this.text.stopAnimation(false); + this.control && this.control.setStyle({ fill: this.guideLock ? this.style.GuideLock.lamp.lightUpColor : this.style.GuideLock.lamp.controlColor }); + this.text && this.text.setStyle({ textFill: '#fff', textBackgroundColor: '#000' }); + this.__down = false; + }, 15000); + } // 设置状态 setState(model) { // 只响应前端自定义类型的状态变化 @@ -113,13 +136,17 @@ export default class GuideLock extends Group { this.setAshShow(); } else { model.totalGuideLock && this.handleSignal(); + model.hasSelected && this.handleSelect(); + this.handleGuideLock(this.guideLock); } } - } - + handleGuideLock(flag) { + this.guideLock = flag; + this.control && this.control.setStyle({ fill: flag ? this.style.GuideLock.lamp.lightUpColor : this.style.GuideLock.lamp.controlColor }); + } createMouseEvent() { - if (this.style.LcControl.mouseOverStyle) { + if (this.style.GuideLock.mouseOverStyle) { this.mouseEvent = new EMouse(this); this.add(this.mouseEvent); this.on('mouseout', (e) => { this.mouseEvent.mouseout(e); }); diff --git a/src/jmapNew/shape/graph/Station/index.js b/src/jmapNew/shape/graph/Station/index.js index 4061db974..3bfc9d237 100644 --- a/src/jmapNew/shape/graph/Station/index.js +++ b/src/jmapNew/shape/graph/Station/index.js @@ -978,6 +978,7 @@ export default class Station extends Group { model.emergencyController != undefined && this.handleEmergencyChange(model.emergencyController); model.controlApplicant && this.handleControlApplicant(model); model.allowAutonomy && this.handleAllowAutonomy(); + this.handleGuideLock(model); if (this.style.Station.syncCentralizeStation && (model.controlMode || model.controller || model.emergencyController != undefined) && model.centralized) { model.chargeStationCodeList.forEach(item => { const device = store.getters['map/getDeviceByCode'](item); @@ -1018,6 +1019,12 @@ export default class Station extends Group { } } + handleGuideLock(model) { + const sGuideLock = store.getters['map/getDeviceByCode'](model.sGuideLockCode); + const xGuideLock = store.getters['map/getDeviceByCode'](model.xGuideLockCode); + sGuideLock && sGuideLock.instance && sGuideLock.instance.handleGuideLock(model.sguideMasterLock); + xGuideLock && xGuideLock.instance && xGuideLock.instance.handleGuideLock(model.xguideMasterLock); + } handlePreResetLamp() { this.controlPreReset && this.controlPreReset.setColor('#f00'); } diff --git a/src/jmapNew/shape/graph/Switch/ESwLocal.js b/src/jmapNew/shape/graph/Switch/ESwLocal.js index 399fabe3e..1adc9622a 100644 --- a/src/jmapNew/shape/graph/Switch/ESwLocal.js +++ b/src/jmapNew/shape/graph/Switch/ESwLocal.js @@ -40,7 +40,7 @@ class ESwLocal extends Group { } show() { - this.locShelter.show(); + this.locShelter.show(); } stopAnimation(flag) { @@ -56,13 +56,13 @@ class ESwLocal extends Group { this.locShelter.setStyle(data); } - addHover(style) { - this.__zr && this.__zr.addHover(this.locShelter, style) - } + addHover(style) { + this.__zr && this.__zr.addHover(this.locShelter, style); + } - removeHover() { - this.__zr && this.__zr.removeHover(this.locShelter); - } + removeHover() { + this.__zr && this.__zr.removeHover(this.locShelter); + } animateStyle(cb) { this.eachChild((child) => { diff --git a/src/jmapNew/shape/graph/Train/index.js b/src/jmapNew/shape/graph/Train/index.js index e9686ae9c..a042d87c0 100644 --- a/src/jmapNew/shape/graph/Train/index.js +++ b/src/jmapNew/shape/graph/Train/index.js @@ -137,15 +137,15 @@ export default class Train extends Group { if (style.Section.trainPosition.display) { const data = this.model.physicalCode; const oldmodel = store.getters['map/getDeviceByCode'](data); - const leftPoint = oldmodel.points[0]; - const rightPoint = oldmodel.points[oldmodel.points.length - 1]; + const leftPoint = oldmodel.instance.computedPoints[0]; + const rightPoint = oldmodel.instance.computedPoints[oldmodel.instance.computedPoints.length - 1]; this.startX = this.model.right == 1 ? leftPoint.x : rightPoint.x; this.startY = this.model.right == 1 ? leftPoint.y : rightPoint.y; // 算出折线的长度 this.lineLength = 0; let oldPoint = null; this.pointList = []; - oldmodel.points.forEach((point) => { + oldmodel.instance.computedPoints.forEach((point) => { if (oldPoint) { const temp = Math.sqrt( Math.pow(point.x - oldPoint.x, 2) + diff --git a/src/jmapNew/theme/beijing_01/menus/menuSection.vue b/src/jmapNew/theme/beijing_01/menus/menuSection.vue index 88a020e40..f81a1e719 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSection.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSection.vue @@ -101,11 +101,6 @@ export default { handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT - }, { label: '设置备用车', handler: this.loadSpare, @@ -319,9 +314,6 @@ export default { } }); }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); - }, cancelSpeed() { let sectionCode = this.selected.code; if (this.selected.type == '02' || this.selected.type == '03') { diff --git a/src/jmapNew/theme/beijing_01/menus/menuSignal.vue b/src/jmapNew/theme/beijing_01/menus/menuSignal.vue index 737799077..053cbf4d7 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSignal.vue @@ -117,11 +117,6 @@ export default { label: '取消故障', handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -460,9 +455,6 @@ export default { }).catch(() => { this.$refs.noticeInfo.doShow(operate); }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/beijing_01/menus/menuStation.vue b/src/jmapNew/theme/beijing_01/menus/menuStation.vue index 7c121a37d..7835aedee 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuStation.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuStation.vue @@ -114,11 +114,6 @@ export default { label: '重启联锁机', handler: this.restartInterlock, cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -290,9 +285,6 @@ export default { this.$refs.stationSetRouteControlAll.doShow(operate, this.selected); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue b/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue index 3d1b00058..fe40addfb 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue @@ -141,11 +141,6 @@ export default { label: '取消故障', handler: this.cancelStoppage, cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -325,9 +320,6 @@ export default { this.$refs.standDetail.doShow(operate, this.selected, []); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue b/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue index 7b6c2e497..1b6f517e4 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue @@ -90,11 +90,6 @@ export default { { label: '取消故障', handler: this.cancelStoppage - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -305,9 +300,6 @@ export default { callback: action => { } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/beijing_01/menus/menuTrain.vue b/src/jmapNew/theme/beijing_01/menus/menuTrain.vue index 9e4a6d29c..bc33c5079 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuTrain.vue @@ -220,10 +220,6 @@ export default { { label: '取消故障', handler: this.cancelStoppage - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement } ], menuDirective: [ @@ -374,9 +370,6 @@ export default { } }); }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); - }, nextStation() { commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { diff --git a/src/jmapNew/theme/chengdu_01/menus/menuSection.vue b/src/jmapNew/theme/chengdu_01/menus/menuSection.vue index 30aa378a7..af230d5b0 100644 --- a/src/jmapNew/theme/chengdu_01/menus/menuSection.vue +++ b/src/jmapNew/theme/chengdu_01/menus/menuSection.vue @@ -87,11 +87,6 @@ export default { handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT - }, { label: '设置备用车', handler: this.loadSpare, @@ -285,9 +280,6 @@ export default { callback: action => { } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/chengdu_01/menus/menuSignal.vue b/src/jmapNew/theme/chengdu_01/menus/menuSignal.vue index 2272f6f44..03f9ea685 100644 --- a/src/jmapNew/theme/chengdu_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/chengdu_01/menus/menuSignal.vue @@ -209,11 +209,6 @@ export default { label: '取消故障', handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -473,9 +468,6 @@ export default { createDeviceLabel() { this.doClose(); this.$refs.createDeviceLabel.doShow(); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/chengdu_01/menus/menuStation.vue b/src/jmapNew/theme/chengdu_01/menus/menuStation.vue index 1b63d6e2c..0d733d1f2 100644 --- a/src/jmapNew/theme/chengdu_01/menus/menuStation.vue +++ b/src/jmapNew/theme/chengdu_01/menus/menuStation.vue @@ -126,11 +126,6 @@ export default { label: '重启联锁机', handler: this.restartInterlock, cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -377,9 +372,6 @@ export default { callback: action => { } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/chengdu_01/menus/menuStationStand.vue b/src/jmapNew/theme/chengdu_01/menus/menuStationStand.vue index 596d3d260..0448cc45f 100644 --- a/src/jmapNew/theme/chengdu_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/chengdu_01/menus/menuStationStand.vue @@ -95,11 +95,6 @@ export default { label: '取消故障', handler: this.cancelStoppage, cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -237,9 +232,6 @@ export default { }).catch(() => { this.$refs.noticeInfo.doShow(); }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/chengdu_01/menus/menuSwitch.vue b/src/jmapNew/theme/chengdu_01/menus/menuSwitch.vue index f484f8283..f9d15ffc0 100644 --- a/src/jmapNew/theme/chengdu_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/chengdu_01/menus/menuSwitch.vue @@ -113,11 +113,6 @@ export default { { label: '取消故障', handler: this.cancelStoppage - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -285,9 +280,6 @@ export default { }, createDeviceLabel() { this.$refs.createDeviceLabel.doShow(); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/chengdu_01/menus/menuTrain.vue b/src/jmapNew/theme/chengdu_01/menus/menuTrain.vue index 1476dda68..6ec4d1da9 100644 --- a/src/jmapNew/theme/chengdu_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/chengdu_01/menus/menuTrain.vue @@ -142,10 +142,6 @@ export default { { label: '取消故障', handler: this.cancelStoppage - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement } ], menuDirective: [ @@ -293,9 +289,6 @@ export default { } }); }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); - }, nextStation() { commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { diff --git a/src/jmapNew/theme/chengdu_03/menus/menuSection.vue b/src/jmapNew/theme/chengdu_03/menus/menuSection.vue index 426490735..4b7cadb11 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuSection.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuSection.vue @@ -81,11 +81,6 @@ export default { handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT - }, { label: '设置备用车', handler: this.loadSpare, @@ -227,9 +222,6 @@ export default { this.$refs.trainAddPlan.doShow(operate); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/chengdu_03/menus/menuSignal.vue b/src/jmapNew/theme/chengdu_03/menus/menuSignal.vue index 27896bbc3..fb111ac3d 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuSignal.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuSignal.vue @@ -179,11 +179,6 @@ export default { label: '取消故障', handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -371,9 +366,6 @@ export default { } } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/chengdu_03/menus/menuStation.vue b/src/jmapNew/theme/chengdu_03/menus/menuStation.vue index 5763bf8e7..ee41c5571 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuStation.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuStation.vue @@ -59,11 +59,6 @@ export default { label: '重启联锁机', handler: this.restartInterlock, cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -140,9 +135,6 @@ export default { console.error('该车站无zc设备'); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/chengdu_03/menus/menuStationStand.vue b/src/jmapNew/theme/chengdu_03/menus/menuStationStand.vue index 08397f540..26ec057c2 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuStationStand.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuStationStand.vue @@ -107,11 +107,6 @@ export default { label: '取消故障', handler: this.cancelStoppage, cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -231,9 +226,6 @@ export default { this.$refs.standDetail.doShow(operate, this.selected, []); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/chengdu_03/menus/menuSwitch.vue b/src/jmapNew/theme/chengdu_03/menus/menuSwitch.vue index af199b865..919f4c840 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuSwitch.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuSwitch.vue @@ -120,11 +120,6 @@ export default { { label: '取消故障', handler: this.cancelStoppage - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -273,9 +268,6 @@ export default { callback: action => { } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue b/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue index f1cbb9119..8a85e5ae6 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue @@ -143,10 +143,6 @@ export default { { label: '取消故障', handler: this.cancelStoppage - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement } ], menuDirective: [ @@ -287,9 +283,6 @@ export default { } }); }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); - }, nextStation() { commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { diff --git a/src/jmapNew/theme/components/menus/dialog/setFault.vue b/src/jmapNew/theme/components/menus/dialog/setFault.vue index f949d1bec..57424dc31 100644 --- a/src/jmapNew/theme/components/menus/dialog/setFault.vue +++ b/src/jmapNew/theme/components/menus/dialog/setFault.vue @@ -33,7 +33,7 @@ - + { diff --git a/src/jmapNew/theme/components/menus/dialog/switchControl.vue b/src/jmapNew/theme/components/menus/dialog/switchControl.vue index 86751faa1..f29e42d06 100644 --- a/src/jmapNew/theme/components/menus/dialog/switchControl.vue +++ b/src/jmapNew/theme/components/menus/dialog/switchControl.vue @@ -63,7 +63,7 @@ - + @@ -158,7 +158,7 @@ export default { }, methods: { doShow(operate, selected) { - this.$root.$emit('dialogOpen', selected); + this.$root.$emit('dialogOpen', selected); this.selected = selected; if (!this.dialogShow) { this.switchName = ''; @@ -198,7 +198,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'); mouseCancelState(this.selected); }, diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuDialog/trainOperation.vue b/src/jmapNew/theme/components/menus/dialog/trainOperation.vue similarity index 100% rename from src/jmapNew/theme/fuzhou_01/menus/menuDialog/trainOperation.vue rename to src/jmapNew/theme/components/menus/dialog/trainOperation.vue diff --git a/src/jmapNew/theme/components/menus/driverAtsWorMenu.vue b/src/jmapNew/theme/components/menus/driverAtsWorMenu.vue new file mode 100644 index 000000000..c846b9863 --- /dev/null +++ b/src/jmapNew/theme/components/menus/driverAtsWorMenu.vue @@ -0,0 +1,44 @@ + + + diff --git a/src/jmapNew/theme/components/menus/menuTrain.vue b/src/jmapNew/theme/components/menus/menuTrain.vue new file mode 100644 index 000000000..6d9980f72 --- /dev/null +++ b/src/jmapNew/theme/components/menus/menuTrain.vue @@ -0,0 +1,217 @@ + + diff --git a/src/jmapNew/theme/components/utils/menuOperate.js b/src/jmapNew/theme/components/utils/menuOperate.js index d9b244b3d..e57f202a6 100644 --- a/src/jmapNew/theme/components/utils/menuOperate.js +++ b/src/jmapNew/theme/components/utils/menuOperate.js @@ -250,6 +250,16 @@ export const menuOperate = { // 取消分路不良 operation: OperationEvent.Switch.cancelDefectiveShunting.menu.operation, cmdType: CMD.Switch.CMD_SWITCH_CANCEL_DEFECTIVE_SHUNTING + }, + beforeForkDirective:{ + // 岔前分路不良 + operation: OperationEvent.Switch.defectiveShunting.before.operation, + cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING_FRONT + }, + locateForkDirective:{ + // 定位分路不良 + operation: OperationEvent.Switch.defectiveShunting.locate.operation, + cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING_FIXED } }, StationStand:{ @@ -415,6 +425,11 @@ export const menuOperate = { operation: OperationEvent.MixinCommand.collocation.menu.operation, cmdType: CMD.Train.CMD_TRAIN_TRUST }, + // 机器人司机模拟驾驶 Train_Drive + trainDrive: { + operation: OperationEvent.MixinCommand.trainDrive.menu.operation, + cmdType: CMD.Train.CMD_TRAIN_DRIVE + }, // 设置连挂 setLink: { operation: OperationEvent.MixinCommand.setLink.menu.operation, @@ -879,6 +894,11 @@ export const menuOperate = { modifyDispatcherLogerRpDirection:{ operation: OperationEvent.CTCCommand.modifyDispatcherLogerRpSection.menu.operation, cmdType: CMD.CTC.CTC_ZONE_SAVE_DIRECTION + }, + // 状态切换操作 + switchRouteSetModel:{ + operation: OperationEvent.CTCCommand.switchRouteSetModel.confirm.operation, + cmdType: CMD.CTC.CTC_SWITCH_ROUTE_SET_MODEL } }, Rail: { @@ -901,6 +921,31 @@ export const menuOperate = { railQueryRegister: { operation: OperationEvent.RailCommand.railQueryRegister.menu.operation, cmdType: CMD.RAIL.CMD_RAIL_QUERY_REGISTER + }, + // 行车设备施工登记簿 保存 + equipmentConstructionFill:{ + operation: OperationEvent.RailCommand.equipmentConstructionFill.menu.operation, + cmdType: CMD.RAIL.CMD_RAIL_EQUIPMENT_CONSTRUCTION_INFO_SAVE + }, + // 行车设备施工登记簿 列表 + equipmentConstructionQuery:{ + operation: OperationEvent.RailCommand.equipmentConstructionQuery.menu.operation, + cmdType: CMD.RAIL.CMD_RAIL_EQUIPMENT_CONSTRUCTION_INFO_QUERY + }, + // 防洪安全上岗签到表 提交 + floodControlSafetyTableSave:{ + operation: OperationEvent.FloodSafetyRegister.formInput.submit.operation, + cmdType: CMD.RAIL.CMD_RAIL_FLOOD_CONTROL_SAFETY_SUBMIT + }, + // 防洪安全上岗签到表 更新 + floodControlSafetyTableUpdate:{ + operation: OperationEvent.FloodSafetyRegister.formInput.update.operation, + cmdType: CMD.RAIL.CMD_RAIL_FLOOD_CONTROL_SAFETY_UPDATE + }, + // 非正常情况接发列车关键环节控制表 提交 + abnormalTrainTableSave:{ + operation: OperationEvent.AbnormalTrainRegister.formInput.submit.operation, + cmdType: CMD.RAIL.CMD_RAIL_ABNORMAL_TRAIN_SAVE } }, Conversation: { diff --git a/src/jmapNew/theme/datie_02/menus/ctcWorkMenu.vue b/src/jmapNew/theme/datie_02/menus/ctcWorkMenu.vue index 4a4b84d24..813cdf081 100644 --- a/src/jmapNew/theme/datie_02/menus/ctcWorkMenu.vue +++ b/src/jmapNew/theme/datie_02/menus/ctcWorkMenu.vue @@ -33,7 +33,7 @@
Communication with the centre is normal
- + diff --git a/src/jmapNew/theme/datie_02/menus/dialog/applyOrAgreeModeCovert.vue b/src/jmapNew/theme/datie_02/menus/dialog/applyOrAgreeModeCovert.vue new file mode 100644 index 000000000..0f9048bb4 --- /dev/null +++ b/src/jmapNew/theme/datie_02/menus/dialog/applyOrAgreeModeCovert.vue @@ -0,0 +1,151 @@ + + + diff --git a/src/jmapNew/theme/datie_02/menus/dialog/childDialog/defectivePasswordBox.vue b/src/jmapNew/theme/datie_02/menus/dialog/childDialog/defectivePasswordBox.vue new file mode 100644 index 000000000..7845e7a5b --- /dev/null +++ b/src/jmapNew/theme/datie_02/menus/dialog/childDialog/defectivePasswordBox.vue @@ -0,0 +1,118 @@ + + + diff --git a/src/jmapNew/theme/datie_02/menus/dialog/forkDirective.vue b/src/jmapNew/theme/datie_02/menus/dialog/forkDirective.vue new file mode 100644 index 000000000..28cc0e6e7 --- /dev/null +++ b/src/jmapNew/theme/datie_02/menus/dialog/forkDirective.vue @@ -0,0 +1,160 @@ + + + diff --git a/src/jmapNew/theme/datie_02/menus/dialog/statusSelect.vue b/src/jmapNew/theme/datie_02/menus/dialog/statusSelect.vue new file mode 100644 index 000000000..1963f5c24 --- /dev/null +++ b/src/jmapNew/theme/datie_02/menus/dialog/statusSelect.vue @@ -0,0 +1,250 @@ + + + diff --git a/src/jmapNew/theme/datie_02/menus/menuButton.vue b/src/jmapNew/theme/datie_02/menus/menuButton.vue index 9efe8e1f7..aec2e19db 100644 --- a/src/jmapNew/theme/datie_02/menus/menuButton.vue +++ b/src/jmapNew/theme/datie_02/menus/menuButton.vue @@ -1,7 +1,6 @@ @@ -130,7 +137,9 @@ import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo' import { MouseEvent, DeviceMenu } from '@/scripts/ConstDic'; import { EventBus } from '@/scripts/event-bus'; import {UserOperationType} from '../../../../scripts/ConstDic'; - +import ForkDirective from './dialog/forkDirective'; +import ApplyOrAgreeModeCovert from './dialog/applyOrAgreeModeCovert'; +import StatusSelect from './dialog/statusSelect'; export default { name: 'MapButtonMenu', components: { @@ -139,7 +148,10 @@ export default { NoticeInfo, PopMenu, TrainRoute, - ShuntRoute + ShuntRoute, + ForkDirective, + ApplyOrAgreeModeCovert, + StatusSelect }, props: { selected: { @@ -147,6 +159,12 @@ export default { default: () => { return null; } + }, + work: { + type: String, + default: () => { + return 'ctcWork'; + } } }, data() { @@ -156,6 +174,7 @@ export default { y: 0 }, operation: '', + modeCovertShow:false, buttonName: '', guideColorDown: '#FEEE1A', guideColorUp: '#DCDCDC', @@ -346,6 +365,9 @@ export default { this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + if (operate.operationPre === this.Station.guideLock.button.operation) { + this.$refs.password.doShow({userOperationType: UserOperationType.LEFTCLICK, operation: operate.operation, operateNext: this.Command.close.password.operation }); + } } }).catch(e => { console.error(e); @@ -372,39 +394,18 @@ export default { } } }, - // S引导总锁按钮点击 - guideLockLeftButtonDown() { + statusSelectBtn() { const operate = { - userOperationType: UserOperationType.LEFTCLICK, - operation: this.Switch.guideLock.leftButton.operation + operation: OperationEvent.CTCCommand.switchRouteSetModel.menu.operation }; this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - operate.nextCmdType = CMD.Switch.CMD_SWITCH_MASTER_UNBLOCK; - operate.param = {right: false}; - operate['operateNext'] = this.Command.close.password.operation; - this.$refs.password.doShow(operate); - } - }); - }, - // X引导总锁按钮点击 - guideLockRightButtonDown() { - const operate = { - userOperationType: UserOperationType.LEFTCLICK, - operation: this.Switch.guideLock.rightButton.operation - }; - this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - operate.nextCmdType = CMD.Switch.CMD_SWITCH_MASTER_UNBLOCK; - operate.param = {right: true}; - operate['operateNext'] = this.Command.close.password.operation; - this.$refs.password.doShow(operate); + this.$refs.statusSelect.doShow(); } }); }, buttonDown(operation, commandTypeList) { + // MixinCommand.modeCovert.button.operation const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.training.roleDeviceCode); if (!station || station.controlMode === 'Interlock') { return; } const operate = { @@ -412,25 +413,58 @@ export default { userOperationType: UserOperationType.LEFTCLICK, operation: operation }; - this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { - if (valid) { - this.$store.dispatch('menuOperation/setButtonOperation', operation === this.Command.cancel.clearMbm.operation ? null : operation); - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + if (operation == this.MixinCommand.modeCovert.button.operation) { + this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { + this.modeCovertShow = true; this.operation = operation; - this.commandTypeList = commandTypeList; - const operationList = [ - this.Signal.humanTrainRoute.button.operation, - this.Section.fault.button.operation, - this.Signal.guide.button.operation - ]; - if (operationList.includes(operation)) { - operate['operateNext'] = this.Command.close.password.operation; - this.$refs.password.doShow(operate); + }); + } else { + this.modeCovertShow = false; + this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { + if (valid) { + this.$store.dispatch('menuOperation/setButtonOperation', operation === this.Command.cancel.clearMbm.operation ? null : operation); + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.operation = operation; + this.commandTypeList = commandTypeList; + const operationList = [ + this.Signal.humanTrainRoute.button.operation, + this.Section.fault.button.operation, + this.Signal.guide.button.operation, + this.Station.guideLock.button.operation + ]; + if (operationList.includes(operation)) { + operate['operateNext'] = this.Command.close.password.operation; + this.$refs.password.doShow(operate); + } + this.timeNode = this.$store.state.socket.simulationTimeSync; } - this.timeNode = this.$store.state.socket.simulationTimeSync; - } + }); + } + + }, + applyModeCovert() { + const operate = { + userOperationType: UserOperationType.LEFTCLICK, + operation: this.MixinCommand.modeCovert.applyModeCovert.operation + }; + this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { + this.modeCovertShow = false; + this.$refs.applyOrAgreeModeCovert.doShow(operate); + this.clearOperate(); }); }, + agreeModeCovert() { + const operate = { + userOperationType: UserOperationType.LEFTCLICK, + operation: this.MixinCommand.modeCovert.agreeModeCovert.operation + }; + this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { + this.modeCovertShow = false; + this.$refs.applyOrAgreeModeCovert.doShow(operate); + this.clearOperate(); + }); + + }, // 解析进路数据 handleRouteDataMap() { this.routeDataMap = {}; @@ -547,6 +581,7 @@ export default { }; this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { if (valid) { + this.deviceList.push(model); this.$store.dispatch('training/updateMapState', [{code: model.code, _type: model._type, hasSelected: 1}]); } }); @@ -646,11 +681,19 @@ export default { handleGuideLock(model) { const operate = { code: model.code, - operation: this.Signal.guide.button.operation, + operation: this.Station.guideLock.button.operation, userOperationType: UserOperationType.LEFTCLICK, - param: {signalCode: model.signalCode} + param: {stationCode: model.stationCode, throat: model.direction} }; - this.$store.dispatch('trainingNew/next', operate); + this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('training/updateMapState', [{code: model.code, _type: model._type, hasSelected: 1}]); + } + }).catch(e => { + console.error(e); + this.$refs.noticeInfo.doShow(); + this.clearOperate(); + }); }, handleFaultSection(model) { if (model._type === 'Section') { @@ -680,6 +723,7 @@ export default { return; } const buttonOperation = this.$store.state.menuOperation.buttonOperation; + console.log(model._type, buttonOperation, this.commandTypeList.includes(model._type), this.commandTypeList); if (buttonOperation && this.commandTypeList.includes(model._type)) { if (buttonOperation === this.MixinCommand.totalCancel.button.operation) { this.handleTotalCancel(model); @@ -697,12 +741,16 @@ export default { } } else if (buttonOperation === this.Section.fault.button.operation) { this.handleFaultSection(model); + } else if (buttonOperation === this.Section.defectiveShunting.button.operation) { + this.handelDefectiveShunting(model); } else if (buttonOperation === this.Signal.reopenSignal.button.operation) { this.handleReopenSignal(model); } else if (buttonOperation === this.Signal.arrangementRoute.button.operation) { this.arrangementRouteOperation(model); } else if (buttonOperation === this.Signal.guide.button.operation ) { this.handleGuideSignal(model); + } else if (buttonOperation === this.Station.guideLock.button.operation ) { + this.handleGuideLock(model); } else if (buttonOperation === this.MixinCommand.functionButton.button.operation) { const signalButtonList = ['ASSIST', 'CHANGE_DIRECTION', 'PICK_ASSIST', 'DEPART_ASSIST', 'OCCLUSION', 'RECOVERY', 'ACCIDENT']; if (model._type === 'SignalButton' && signalButtonList.includes(model.type)) { @@ -787,14 +835,20 @@ export default { operate.userOperationType = UserOperationType.LEFTCLICK; operate.over = true; operate.cmdType = CMD.Switch.CMD_SWITCH_BLOCK; + } else if (this.operation === OperationEvent.Station.guideLock.button.operation) { + console.log(this.selected, 'selected'); + operate.userOperationType = UserOperationType.LEFTCLICK; + operate.over = true; + operate.cmdType = this.selected.instance && this.selected.instance.guideLock ? CMD.Station.CMD_STATION_MASTER_UNLOCK : CMD.Station.CMD_STATION_MASTER_LOCK; } this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { - if (valid) { - this.clearOperate(); - } }).catch(e => { console.error(e); this.$refs.noticeInfo.doShow(); + }).finally(() => { + if (this.operation === OperationEvent.Station.guideLock.button.operation) { + this.$store.dispatch('training/updateMapState', [{code: this.selected.code, _type: this.selected._type, hasSelected: 0}]); + } this.clearOperate(); }); } @@ -802,6 +856,43 @@ export default { commandClear() { this.clearOperate(); }, + // 分路不良 + handelDefectiveShunting(model) { + if (model._type == 'Section') { + const operate = { + start: true, + // cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING, + operation: OperationEvent.Section.defectiveShunting.menu.operation, + userOperationType: UserOperationType.LEFTCLICK, + param:{ + sectionCode: model.code, + shuntingTypeList:['SECTION_SHUNTING'] + } + }; + this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { + if (valid) { + // operate.operation = OperationEvent.Section.defectiveShunting.menu.operation; + this.$refs.forkDirective.doShow(operate, this.selected); + } + }); + } else if (model._type == 'Switch') { + const operate = { + start: true, + operation: OperationEvent.Section.defectiveShunting.menu.operation, + userOperationType: UserOperationType.LEFTCLICK, + param:{ + sectionCode: model.sectionACode + } + }; + this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { + if (valid) { + operate.operation = OperationEvent.Switch.defectiveShunting.before.operation; + this.$refs.forkDirective.doShow(operate, this.selected); + } + }); + } + this.clearOperate(); + }, assistOperateOrChange(model) { // mode.type== const modelTypeMap = { @@ -945,4 +1036,20 @@ export default { background-color: $hoverBg; } } + .modeCovertPopList{ + position: absolute; + width: 130px; + background: #F0F0F0; + bottom: 18px; + left: 780px; + box-shadow: 1px 3px 3px #000; + } + .eachModeCovertPop{ + font-size: 15px; + padding: 5px 0px 5px 10px; + cursor: pointer; + } + .eachModeCovertPop:hover{ + background: #c3c3c3; + } diff --git a/src/jmapNew/theme/datie_02/menus/menuSection.vue b/src/jmapNew/theme/datie_02/menus/menuSection.vue index bb2cd6312..1462ce5f8 100644 --- a/src/jmapNew/theme/datie_02/menus/menuSection.vue +++ b/src/jmapNew/theme/datie_02/menus/menuSection.vue @@ -67,11 +67,6 @@ export default { label: 'Cancel faults', handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT - }, - { - label: 'Trigger fault management', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -174,9 +169,6 @@ export default { this.$refs.trainAddPlan.doShow(operate); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/datie_02/menus/menuSignal.vue b/src/jmapNew/theme/datie_02/menus/menuSignal.vue index 0754e1995..51c1879c0 100644 --- a/src/jmapNew/theme/datie_02/menus/menuSignal.vue +++ b/src/jmapNew/theme/datie_02/menus/menuSignal.vue @@ -26,7 +26,7 @@ import PasswordBox from '@/jmapNew/theme/components/menus/childDialog/passwordIn import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import DrawSelect from './dialog/drawSelect'; import { EventBus } from '@/scripts/event-bus'; -import {UserOperationType} from "../../../../scripts/ConstDic"; +import {UserOperationType} from '../../../../scripts/ConstDic'; export default { name: 'SignalMenu', @@ -62,34 +62,40 @@ export default { label: 'Processing Passing approach', handler: this.arrangementRoute, cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, - isDisabled: (signal, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork' + isDisabled: (signal, station, work) => station.controlMode !== 'Local', + isShow: (section, work) => { return work === 'ctcWork' && section.type !== 'SHUNTING2'; } }, { - type: 'separator' + type: 'separator', + isShow: (section, work) => work === 'ctcWork' }, { label: 'Trains Process approach', handler: this.arrangementRoute, cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, - isDisabled: (signal, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork' + isDisabled: (signal, station, work) => station.controlMode !== 'Local', + isShow: (section, work) => work === 'ctcWork' }, { label: 'Cancellation of approach', handler: this.cancelTrainRoute, cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, - isDisabled: (signal, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork' + isDisabled: (signal, station, work) => station.controlMode !== 'Local', + isShow: (section, work) => work === 'ctcWork' }, { label: 'Signal reopening', handler: this.reopenSignal, cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, - isDisabled: (signal, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork' + isDisabled: (signal, station, work) => station.controlMode !== 'Local', + isShow: (section, work) => work === 'ctcWork' }, { label: 'Blocking/unblocking', handler: this.lockOrUnlock, cmdType: '', - isDisabled: (signal, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork' + isDisabled: (signal, station, work) => station.controlMode !== 'Local', + isShow: (section, work) => work === 'ctcWork' // cmdType: CMD.Signal.CMD_SIGNAL_BLOCK }, @@ -97,22 +103,26 @@ export default { label: 'Master unblock', handler: this.humanTrainRoute, cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE, - isDisabled: (signal, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork' + isDisabled: (signal, station, work) => station.controlMode !== 'Local', + isShow: (section, work) => work === 'ctcWork' }, { - type: 'separator' + type: 'separator', + isShow: (section, work) => work === 'ctcWork' }, { label: 'Guiding', handler: this.guide, cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, - isDisabled: (signal, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork' + isDisabled: (signal, station, work) => station.controlMode !== 'Local', + isShow: (section, work) => work === 'ctcWork' }, { label: 'Ramp unlocking', handler: '', cmdType: '', - isDisabled: (signal, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork' + isDisabled: (signal, station, work) => station.controlMode !== 'Local', + isShow: (section, work) => work === 'ctcWork' } ], menuForce: [ @@ -125,11 +135,6 @@ export default { label: 'Cancel faults', handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT - }, - { - label: 'Trigger fault management', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -315,9 +320,6 @@ export default { } } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/datie_02/menus/menuStation.vue b/src/jmapNew/theme/datie_02/menus/menuStation.vue index fb2f4dbd5..c9703769e 100644 --- a/src/jmapNew/theme/datie_02/menus/menuStation.vue +++ b/src/jmapNew/theme/datie_02/menus/menuStation.vue @@ -65,11 +65,6 @@ export default { label: 'Restart interlocking level', handler: this.restartInterlock, cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE - }, - { - label: 'Trigger fault management', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -154,9 +149,6 @@ export default { } }); }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); - }, // 非常站控 veryControlClick(selected) { // stationCode车站编号、pressDown:1按下、0抬起 diff --git a/src/jmapNew/theme/datie_02/menus/menuStationStand.vue b/src/jmapNew/theme/datie_02/menus/menuStationStand.vue index 8734e80f6..f13b1b1d6 100644 --- a/src/jmapNew/theme/datie_02/menus/menuStationStand.vue +++ b/src/jmapNew/theme/datie_02/menus/menuStationStand.vue @@ -50,11 +50,6 @@ export default { label: 'Cancel faults', handler: this.cancelStoppage, cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT - }, - { - label: 'Trigger fault management', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -113,9 +108,6 @@ export default { this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/datie_02/menus/menuSwitch.vue b/src/jmapNew/theme/datie_02/menus/menuSwitch.vue index 0cff98d07..814cf321e 100644 --- a/src/jmapNew/theme/datie_02/menus/menuSwitch.vue +++ b/src/jmapNew/theme/datie_02/menus/menuSwitch.vue @@ -8,6 +8,7 @@ + @@ -25,6 +26,9 @@ import { mapGetters } from 'vuex'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import RouteCancel from './menuDialog/routeCancel'; +import { UserOperationType } from '@/scripts/ConstDic'; +import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; +import ForkDirective from './dialog/forkDirective'; export default { name: 'SwitchMenu', @@ -36,7 +40,8 @@ export default { SetFault, SwitchHookLock, DrawSelect, - RouteCancel + RouteCancel, + ForkDirective }, mixins: [ CancelMouseState @@ -63,72 +68,109 @@ export default { label: 'Directional operations', handler: this.locate, cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION, - isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork' + isDisabled: (section, station, work) => station.controlMode !== 'Local', + isShow: (section, work) => work === 'ctcWork' }, { label: 'Reverse operation', handler: this.reverse, cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION, - isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork' + isDisabled: (section, station, work) => station.controlMode !== 'Local', + isShow: (section, work) => work === 'ctcWork' }, { label: 'Individually locked', handler: this.lock, cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK, - isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork' + isDisabled: (section, station, work) => station.controlMode !== 'Local', + isShow: (section, work) => work === 'ctcWork' }, { label: 'Individually unlocked', handler: this.unlock, cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK, - isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork' + isDisabled: (section, station, work) => station.controlMode !== 'Local', + isShow: (section, work) => work === 'ctcWork' }, { label: 'Turnout hook lock', handler: this.hookLock, cmdType: CMD.Switch.CMD_SWITCH_HOOK_LOCK, - isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork' + isDisabled: (section, station, work) => station.controlMode !== 'Local', + isShow: (section, work) => work === 'ctcWork' }, { label: 'Blocking/unblocking', - handle: '' + handler: this.blockOrUnblock, + cmdType: CMD.Switch.CMD_SWITCH_BLOCK, + isDisabled: (section, station, work) => station.controlMode !== 'Local', + isShow: (section, work) => work === 'ctcWork' }, { label: 'Zone fault release', - handle: '' + handler: this.fault, + cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK, + isDisabled: (_section, station, work) => station.controlMode !== 'Local', + isShow: (section, work) => work === 'ctcWork' }, { label: 'Poor switchback split', - handle: '' + handler: this.beforeForkDirective, + cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING, + isDisabled: (section, station, work) => station.controlMode !== 'Local', + isShow: (section, work) => work === 'ctcWork' }, { label: 'Poor normal split', - handle: '' + handler: this.locateForkDirective, + cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING, + isDisabled: (section, station, work) => station.controlMode !== 'Local', + isShow: (section, work) => work === 'ctcWork' }, { label: 'Poor reverse split', - handle: '' + handler: this.reverseForkDirective, + cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING, + isDisabled: (section, station, work) => station.controlMode !== 'Local', + isShow: (section, work) => work === 'ctcWork' }, { - label: 'No power for contact network positioning', - handle: '' - }, - { - label: 'No power for contact network reversal', - handle: '' - }, - { - label: 'Add shunter number', - handle: '' - }, - { - label: 'Delete shunter number', - handle: '' - }, - { - label: 'Modify shunting number', - handle: '' + label: 'Leisure', + handler: this.cancleForkDirective, + cmdType: CMD.Section.CMD_SECTION_CANCEL_DEFECTIVE_SHUNTING, + isDisabled: (section, station, work) => station.controlMode !== 'Local', + isShow: (section, work) => work === 'ctcWork' } + // { + // label: '接触网定位无电', + // handle: '', + // isDisabled: (section, station, work) => station.controlMode !== 'Local', + // isShow: (section, work) => work === 'ctcWork' + // }, + // { + // label: '接触网反位无电', + // handle: '', + // isDisabled: (section, station, work) => station.controlMode !== 'Local', + // isShow: (section, work) => work === 'ctcWork' + // }, + // { + // label: '添加调机号', + // handle: '', + // isDisabled: (section, station, work) => station.controlMode !== 'Local', + // isShow: (section, work) => work === 'ctcWork' + // }, + // { + // label: '删除调机号', + // handle: '', + // isDisabled: (section, station, work) => station.controlMode !== 'Local', + // isShow: (section, work) => work === 'ctcWork' + // }, + // { + // label: '修改调机号', + // handle: '', + // isDisabled: (section, station, work) => station.controlMode !== 'Local', + // isShow: (section, work) => work === 'ctcWork' + // } ], menuForce: [ { @@ -138,11 +180,6 @@ export default { { label: 'Cancel faults', handler: this.cancelStoppage - }, - { - label: 'Trigger fault management', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -238,27 +275,37 @@ export default { } }); }, + + blockOrUnblock() { + if (this.selected.blockade) { + this.unblock(); + } else { + this.block(); + } + }, + // 道岔封锁 block() { - commitOperate(menuOperate.Switch.block, { switchCode: this.selected.code}, 0).then(({valid, operate}) => { + commitOperate(menuOperate.Switch.block, { switchCode: this.selected.code}, 3).then(({valid, operate}) => { if (valid) { - this.$refs.switchControl.doShow(operate, this.selected); + // this.$refs.switchControl.doShow(operate, this.selected); } }); }, // 道岔解封 unblock() { - commitOperate(menuOperate.Switch.unblock, { switchCode: this.selected.code}, 0).then(({valid, operate}) => { + commitOperate(menuOperate.Switch.unblock, { switchCode: this.selected.code}, 3).then(({valid, operate}) => { if (valid) { - this.$refs.switchControl.doShow(operate, this.selected); + // this.$refs.switchControl.doShow(operate, this.selected); } }); }, + // 道岔故障解锁/ 区故解 fault() { - commitOperate(menuOperate.Switch.fault, { switchCode: this.selected.code}, 0).then(({valid, operate}) => { + commitOperate(menuOperate.Switch.fault, { switchCode: this.selected.code}, 3).then(({valid, operate}) => { if (valid) { - this.$refs.switchControl.doShow(operate, this.selected); + // this.$refs.switchControl.doShow(operate, this.selected); } }); }, @@ -287,6 +334,47 @@ export default { } }); }, + // 岔前 分路不良 + beforeForkDirective() { + commitOperate(menuOperate.Switch.beforeForkDirective, {sectionCode:this.selected.sectionACode}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.forkDirective.doShow(operate, this.selected); + } + }); + }, + // 定位 分路不良 + locateForkDirective() { + commitOperate(menuOperate.Switch.locateForkDirective, {sectionCode:this.selected.sectionACode}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.forkDirective.doShow(operate, this.selected); + } + }); + }, + // 反位 分路不良 + reverseForkDirective() { + commitOperate(menuOperate.Switch.locateForkDirective, {sectionCode:this.selected.sectionACode}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.forkDirective.doShow(operate, this.selected); + } + }); + }, + // 区段确认空闲,取消分路不良 + cancleForkDirective() { + const operate = { + start: true, + // cmdType:CMD.Section.CMD_SECTION_CANCEL_DEFECTIVE_SHUNTING, + operation: OperationEvent.Switch.cancelDefectiveShunting.menu.operation, + userOperationType: UserOperationType.RIGHTCLICK, + param:{ + sectionCode:this.selected.sectionACode + } + }; + this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { + if (valid) { + this.$refs.forkDirective.doShow(operate, this.selected); + } + }); + }, // 道岔钩锁 hookLock() { this.$refs.switchHookLock.doShow(this.selected); @@ -298,9 +386,6 @@ export default { callback: action => { } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/datie_02/menus/menuTrain.vue b/src/jmapNew/theme/datie_02/menus/menuTrain.vue index b4c44153f..8183f6bf2 100644 --- a/src/jmapNew/theme/datie_02/menus/menuTrain.vue +++ b/src/jmapNew/theme/datie_02/menus/menuTrain.vue @@ -6,6 +6,7 @@ + @@ -21,8 +22,10 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum'; import { menuOperate } from '@/jmapNew/theme/components/utils/menuOperate'; import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit'; import TrainStop from '@/jmapNew/theme/components/menus/dialog/trainStop'; +import TrainOperation from '@/jmapNew/theme/components/menus/dialog/trainOperation'; import {UserOperationType} from '../../../../scripts/ConstDic'; - +import { MouseEvent } from '@/scripts/ConstDic'; +import { getSessionStorage } from '@/utils/auth'; export default { name: 'MenuTrain', components: { @@ -31,7 +34,8 @@ export default { SetFault, UpdateTrip, SpeedLimit, - TrainStop + TrainStop, + TrainOperation }, mixins: [ CancelMouseState @@ -60,13 +64,13 @@ export default { cmdType: CMD.Train.CMD_TRAIN_UPDATE_TRIP_NUMBER_TRAIN }, { - label: '删车次号', + label: 'Remove train number', handler: this.removeTripNumber, cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE, isShow: (train, work) => work === 'localWork' || work === 'ctcWork' }, { - label: '换端', + label: 'Change end', handler: this.turnDirection, cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE, isShow: (train, work) => work === 'localWork' || work === 'ctcWork' @@ -80,10 +84,6 @@ export default { { label: 'Cancel faults', handler: this.cancelStoppage - }, - { - label: 'Trigger fault management', - handler: this.triggerFaultManagement } ], menuDirective: [ @@ -135,7 +135,10 @@ export default { ]), ...mapGetters('menuOperation', [ 'buttonOperation' - ]) + ]), + project() { + return getSessionStorage('project'); + } }, watch: { '$store.state.menuOperation.menuCount': function () { @@ -144,6 +147,11 @@ export default { } else { this.doClose(); } + }, + '$store.state.menuOperation.selected': function (val) { + if (val._type === 'Train' && val._event === MouseEvent.Left && this.project === 'thailandsandbox') { + this.$refs.trainOperation.doShow(val); + } } }, methods: { @@ -216,9 +224,6 @@ export default { } }); }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); - }, handleSpeedLimit() { // 限速指令 this.$refs.speedLimit.doShow(this.selected); }, @@ -317,15 +322,14 @@ export default { const operate = { start: true, userOperationType: UserOperationType.LEFTCLICK, - operation: menuOperate.Driver.changePreselectionMode.operation, - cmdType: menuOperate.Driver.changePreselectionMode.cmdType, + operation: menuOperate.Common.trainDrive, param: { code: this.selected.code } }; this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { if (valid) { - this.$refs.setFault.doShow(menuOperate.Common.collocation, this.selected, true); + this.$refs.setFault.doShow(menuOperate.Common.trainDrive, this.selected, true); } }); }, diff --git a/src/jmapNew/theme/factory.js b/src/jmapNew/theme/factory.js index 36904a306..3f0e64d42 100644 --- a/src/jmapNew/theme/factory.js +++ b/src/jmapNew/theme/factory.js @@ -114,6 +114,10 @@ class Theme { loadLocalWorkMenuComponent(code) { return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/localWorkMenu`).default); } + // 加载司机ats工作站菜单组件 + loadDriverAtsWorkMenuComponent(code) { + return Object.assign({}, require(`./components/menus/driverAtsWorMenu`).default); + } loadCtcWorkMenuComponent(code) { if (code == '16') { return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/ctcWorkMenu`).default); diff --git a/src/jmapNew/theme/foshan_01/menus/menuSection.vue b/src/jmapNew/theme/foshan_01/menus/menuSection.vue index b264861fd..35eaff63a 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuSection.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuSection.vue @@ -116,11 +116,6 @@ export default { handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT - }, { label: '设置备用车', handler: this.loadSpare, @@ -303,9 +298,6 @@ export default { this.$refs.allLineCancelLimit.doShow(operate, this.selected); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/foshan_01/menus/menuSignal.vue b/src/jmapNew/theme/foshan_01/menus/menuSignal.vue index 56e2d3136..753a358da 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuSignal.vue @@ -174,11 +174,6 @@ export default { label: '取消故障', handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -452,9 +447,6 @@ export default { } }); return routes; - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/foshan_01/menus/menuStation.vue b/src/jmapNew/theme/foshan_01/menus/menuStation.vue index e87e9a346..b6975004c 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuStation.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuStation.vue @@ -73,11 +73,6 @@ export default { label: '重启联锁机', handler: this.restartInterlock, cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -179,9 +174,6 @@ export default { this.$refs.stationCmdControl.doShow(operate, this.selected); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/foshan_01/menus/menuStationStand.vue b/src/jmapNew/theme/foshan_01/menus/menuStationStand.vue index df4a9f847..4153f8c6c 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuStationStand.vue @@ -166,11 +166,6 @@ export default { label: '取消故障', handler: this.cancelStoppage, cmdType:CMD.Stand.CMD_STAND_REMOVE_FAULT - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -324,9 +319,6 @@ export default { this.$refs.standDetail.doShow(operate, this.selected); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/foshan_01/menus/menuSwitch.vue b/src/jmapNew/theme/foshan_01/menus/menuSwitch.vue index c5ac56154..20304e6b2 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuSwitch.vue @@ -153,11 +153,6 @@ export default { label: '取消故障', handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -428,9 +423,6 @@ export default { this.$refs.allLineCancelLimit.doShow(operate, this.selected); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/foshan_01/menus/menuTrain.vue b/src/jmapNew/theme/foshan_01/menus/menuTrain.vue index 5bb9cba52..6a09cbebf 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuTrain.vue @@ -123,10 +123,6 @@ export default { { label: '取消故障', handler: this.cancelStoppage - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement } ], menuDirective: [ @@ -275,9 +271,6 @@ export default { } }); }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); - }, nextStation() { commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch(() => { diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue b/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue index 2d7b90a10..afeb3d702 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue @@ -127,11 +127,6 @@ export default { handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT }, - { - label: this.$t('menu.menuSection.triggerFaultManagement'), - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT - }, { label: '设置备用车', handler: this.loadSpare, @@ -325,9 +320,6 @@ export default { this.$refs.speedCmdControl.doShow(operate, this.selected); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuSignal.vue b/src/jmapNew/theme/fuzhou_01/menus/menuSignal.vue index 19c2f66e1..da1d05613 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuSignal.vue @@ -178,11 +178,6 @@ export default { label: this.$t('menu.menuSignal.cancelFault'), handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT - }, - { - label: this.$t('menu.menuSection.triggerFaultManagement'), - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -513,9 +508,6 @@ export default { this.$refs.routeDetail.doShow(operate, this.selected, this.getRouteList(this.selected)); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue b/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue index 4294b3d24..7c27ea55f 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue @@ -101,11 +101,6 @@ export default { label: '重启联锁机', handler: this.restartInterlock, cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE - }, - { - label: this.$t('menu.menuSection.triggerFaultManagement'), - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -234,9 +229,6 @@ export default { this.$refs.stationSetRouteControlAll.doShow(operate, this.selected); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuStationStand.vue b/src/jmapNew/theme/fuzhou_01/menus/menuStationStand.vue index a4ff1dd83..18ca49971 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuStationStand.vue @@ -167,11 +167,6 @@ export default { label: '取消站台紧急停车', handler: this.cancelEmergencyClose, cmdType: CMD.Stand.CMD_STAND_CANCEL_EMERGENCY_CLOSE - }, - { - label: this.$t('menu.menuSection.triggerFaultManagement'), - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -356,9 +351,6 @@ export default { this.$refs.noticeInfo.doShow(); }); }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); - }, // 打开PSL面板 openPsl() { this.$refs.psl.doShow(this.selected); diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuSwitch.vue b/src/jmapNew/theme/fuzhou_01/menus/menuSwitch.vue index d40d2f0a8..8c75d9c2d 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuSwitch.vue @@ -140,11 +140,6 @@ export default { { label: this.$t('menu.menuSwitch.cancelFault'), handler: this.cancelStoppage - }, - { - label: this.$t('menu.menuSection.triggerFaultManagement'), - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -337,9 +332,6 @@ export default { // 道岔钩锁 hookLock() { this.$refs.switchHookLock.doShow(this.selected); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue b/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue index a5a0689d2..73d2becdc 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue @@ -28,7 +28,7 @@ import TrainSwitch from './dialog/trainSwitch'; import TrainEditNumber from './dialog/trainEditNumber'; import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit'; import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate'; -import TrainOperation from './menuDialog/trainOperation'; +import TrainOperation from '@/jmapNew/theme/components/menus/dialog/trainOperation'; import { MouseEvent } from '@/scripts/ConstDic'; import { getSessionStorage } from '@/utils/auth'; @@ -91,10 +91,6 @@ export default { { label: '取消故障', handler: this.cancelStoppage - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement } ], menuDirective: [ @@ -243,9 +239,6 @@ export default { } }); }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); - }, nextStation() { commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { diff --git a/src/jmapNew/theme/haerbin_01/menus/menuSection.vue b/src/jmapNew/theme/haerbin_01/menus/menuSection.vue index b18398d42..22e3547ee 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuSection.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuSection.vue @@ -47,11 +47,6 @@ export default { handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT - }, { label: '设置备用车', handler: this.loadSpare, @@ -126,9 +121,6 @@ export default { this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/haerbin_01/menus/menuSignal.vue b/src/jmapNew/theme/haerbin_01/menus/menuSignal.vue index 9639baf40..9367394d1 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuSignal.vue @@ -41,11 +41,6 @@ export default { label: '取消故障', handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -112,9 +107,6 @@ export default { this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/haerbin_01/menus/menuStation.vue b/src/jmapNew/theme/haerbin_01/menus/menuStation.vue index d26115d02..ec0dd4342 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuStation.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuStation.vue @@ -59,11 +59,6 @@ export default { label: '重启联锁机', handler: this.restartInterlock, cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -156,9 +151,6 @@ export default { console.error('该车站无zc设备'); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/haerbin_01/menus/menuStationStand.vue b/src/jmapNew/theme/haerbin_01/menus/menuStationStand.vue index 9eb3af287..0f2460e8b 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuStationStand.vue @@ -59,11 +59,6 @@ export default { label: '取消站台紧急停车', handler: this.cancelEmergencyClose, cmdType: CMD.Stand.CMD_STAND_CANCEL_EMERGENCY_CLOSE - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -146,9 +141,6 @@ export default { this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/haerbin_01/menus/menuSwitch.vue b/src/jmapNew/theme/haerbin_01/menus/menuSwitch.vue index f716af1fb..a2fc4fb76 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuSwitch.vue @@ -46,11 +46,6 @@ export default { label: '取消故障', handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -126,9 +121,6 @@ export default { // 道岔钩锁 hookLock() { this.$refs.switchHookLock.doShow(this.selected); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/haerbin_01/menus/menuTrain.vue b/src/jmapNew/theme/haerbin_01/menus/menuTrain.vue index c5b174024..369acffe6 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuTrain.vue @@ -51,11 +51,6 @@ export default { { label: '取消故障', handler: this.cancelStoppage - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ], menuDirective: [ @@ -312,9 +307,6 @@ export default { console.error(error); this.$refs.noticeInfo.doShow(); }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } // // 添加列车识别号 // addTrainId() { diff --git a/src/jmapNew/theme/nanjing_02/menus/menuSection.vue b/src/jmapNew/theme/nanjing_02/menus/menuSection.vue index 01cb72cdb..685d64584 100644 --- a/src/jmapNew/theme/nanjing_02/menus/menuSection.vue +++ b/src/jmapNew/theme/nanjing_02/menus/menuSection.vue @@ -44,11 +44,6 @@ export default { handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT - }, { label: '设置备用车', handler: this.loadSpare, @@ -142,9 +137,6 @@ export default { this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/nanjing_02/menus/menuSignal.vue b/src/jmapNew/theme/nanjing_02/menus/menuSignal.vue index cb75601cb..a8a62e598 100644 --- a/src/jmapNew/theme/nanjing_02/menus/menuSignal.vue +++ b/src/jmapNew/theme/nanjing_02/menus/menuSignal.vue @@ -41,11 +41,6 @@ export default { label: '取消故障', handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -112,9 +107,6 @@ export default { this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/nanjing_02/menus/menuStation.vue b/src/jmapNew/theme/nanjing_02/menus/menuStation.vue index 65a915235..df0e21132 100644 --- a/src/jmapNew/theme/nanjing_02/menus/menuStation.vue +++ b/src/jmapNew/theme/nanjing_02/menus/menuStation.vue @@ -56,11 +56,6 @@ export default { label: '重启联锁机', handler: this.restartInterlock, cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -154,9 +149,6 @@ export default { console.error('该车站无zc设备'); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/nanjing_02/menus/menuStationStand.vue b/src/jmapNew/theme/nanjing_02/menus/menuStationStand.vue index 0065d4570..a47c3296d 100644 --- a/src/jmapNew/theme/nanjing_02/menus/menuStationStand.vue +++ b/src/jmapNew/theme/nanjing_02/menus/menuStationStand.vue @@ -40,11 +40,6 @@ export default { label: this.$t('menu.menuStationStand.cancelFault'), handler: this.cancelStoppage, cmdType:CMD.Stand.CMD_STAND_REMOVE_FAULT - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -109,9 +104,6 @@ export default { this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/nanjing_02/menus/menuSwitch.vue b/src/jmapNew/theme/nanjing_02/menus/menuSwitch.vue index cf74f4d27..8c61e1d4f 100644 --- a/src/jmapNew/theme/nanjing_02/menus/menuSwitch.vue +++ b/src/jmapNew/theme/nanjing_02/menus/menuSwitch.vue @@ -49,11 +49,6 @@ export default { label: '取消故障', handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -130,9 +125,6 @@ export default { // 道岔钩锁 hookLock() { this.$refs.switchHookLock.doShow(this.selected); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/nanjing_02/menus/menuTrain.vue b/src/jmapNew/theme/nanjing_02/menus/menuTrain.vue index 19b2c6053..5a836c0a7 100644 --- a/src/jmapNew/theme/nanjing_02/menus/menuTrain.vue +++ b/src/jmapNew/theme/nanjing_02/menus/menuTrain.vue @@ -45,11 +45,6 @@ export default { { label: '取消故障', handler: this.cancelStoppage - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ], menuDirective: [ @@ -306,9 +301,6 @@ export default { console.error(error); this.$refs.noticeInfo.doShow(); }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/ningbo_01/menus/menuSection.vue b/src/jmapNew/theme/ningbo_01/menus/menuSection.vue index a39c95cd8..f839f50d7 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuSection.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuSection.vue @@ -142,11 +142,6 @@ export default { handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT - }, { label: '设置备用车', handler: this.loadSpare, @@ -351,9 +346,6 @@ export default { } else if (operate.operation === OperationEvent.Section.unlock.confirm.operation) { this.$refs.sectionUnLock.doShow(menuOperate.Section.unlock, this.selected); } - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/ningbo_01/menus/menuSignal.vue b/src/jmapNew/theme/ningbo_01/menus/menuSignal.vue index b14e909e7..1e7211d2a 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuSignal.vue @@ -165,11 +165,6 @@ export default { label: '取消故障', handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -381,9 +376,6 @@ export default { this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/ningbo_01/menus/menuStation.vue b/src/jmapNew/theme/ningbo_01/menus/menuStation.vue index 6ff6e1741..af078f91c 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuStation.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuStation.vue @@ -107,11 +107,6 @@ export default { label: '重启联锁机', handler: this.restartInterlock, cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -259,9 +254,6 @@ export default { callback: action => { } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/ningbo_01/menus/menuStationStand.vue b/src/jmapNew/theme/ningbo_01/menus/menuStationStand.vue index c9b43fea2..a84a137d1 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuStationStand.vue @@ -176,11 +176,6 @@ export default { label: '取消故障', handler: this.cancelStoppage, cmdType:CMD.Stand.CMD_STAND_REMOVE_FAULT - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -354,9 +349,6 @@ export default { this.$refs.standDetail.doShow(operate, this.selected); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue b/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue index 154c82c76..38b2782b9 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue @@ -165,11 +165,6 @@ export default { label: '取消故障', handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -363,9 +358,6 @@ export default { // 道岔钩锁 hookLock() { this.$refs.switchHookLock.doShow(this.selected); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue b/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue index 0848b0dad..10ab4a906 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue @@ -140,10 +140,6 @@ export default { { label: '取消故障', handler: this.cancelStoppage - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement } ], menuDirective: [ @@ -285,9 +281,6 @@ export default { } }); }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); - }, nextStation() { commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { diff --git a/src/jmapNew/theme/ningbo_03/menus/menuTrain.vue b/src/jmapNew/theme/ningbo_03/menus/menuTrain.vue index 04eb36e1e..d9cfa9a08 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuTrain.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuTrain.vue @@ -141,10 +141,6 @@ export default { { label: '取消故障', handler: this.cancelStoppage - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement } ], menuDirective: [ @@ -286,9 +282,6 @@ export default { } }); }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); - }, nextStation() { commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ }).catch((error) => { diff --git a/src/jmapNew/theme/race_01/menus/menuPower.vue b/src/jmapNew/theme/race_01/menus/menuPower.vue index 841d507c3..f61087de0 100644 --- a/src/jmapNew/theme/race_01/menus/menuPower.vue +++ b/src/jmapNew/theme/race_01/menus/menuPower.vue @@ -38,11 +38,6 @@ export default { label: '取消故障', handler: this.cancelStoppage, cmdType:CMD.Fault.CMD_CANCEL_FAULT - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -106,9 +101,6 @@ export default { this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/race_01/menus/menuSection.vue b/src/jmapNew/theme/race_01/menus/menuSection.vue index 5df27104e..5d0c83f35 100644 --- a/src/jmapNew/theme/race_01/menus/menuSection.vue +++ b/src/jmapNew/theme/race_01/menus/menuSection.vue @@ -127,11 +127,6 @@ export default { handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT - }, { label: '设置备用车', handler: this.loadSpare, @@ -334,9 +329,6 @@ export default { this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/race_01/menus/menuSignal.vue b/src/jmapNew/theme/race_01/menus/menuSignal.vue index a34bfe348..960351990 100644 --- a/src/jmapNew/theme/race_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/race_01/menus/menuSignal.vue @@ -168,11 +168,6 @@ export default { label: '取消故障', handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -362,9 +357,6 @@ export default { this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/race_01/menus/menuStation.vue b/src/jmapNew/theme/race_01/menus/menuStation.vue index 5789df8b2..8f7315b43 100644 --- a/src/jmapNew/theme/race_01/menus/menuStation.vue +++ b/src/jmapNew/theme/race_01/menus/menuStation.vue @@ -109,11 +109,6 @@ export default { label: '重启联锁机', handler: this.restartInterlock, cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -253,9 +248,6 @@ export default { callback: action => { } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/race_01/menus/menuStationStand.vue b/src/jmapNew/theme/race_01/menus/menuStationStand.vue index fb6913f21..c74ac5328 100644 --- a/src/jmapNew/theme/race_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/race_01/menus/menuStationStand.vue @@ -173,11 +173,6 @@ export default { label: '手动开启屏蔽门', handler: this.openPsdByHand, cmdType: CMD.Stand.CMD_STAND_OPEN_PSD - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -344,9 +339,6 @@ export default { } }); }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); - }, // 手动开启屏蔽门 openPsdByHand() { commitOperate(menuOperate.StationStand.openPsdByHand, {standCode:this.selected.code}, 3).then(({valid, operate})=>{ diff --git a/src/jmapNew/theme/race_01/menus/menuSwitch.vue b/src/jmapNew/theme/race_01/menus/menuSwitch.vue index 0baaea01b..78f61c656 100644 --- a/src/jmapNew/theme/race_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/race_01/menus/menuSwitch.vue @@ -167,11 +167,6 @@ export default { handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT - }, { label: '道岔钩锁', handler: this.hookLock, @@ -362,9 +357,6 @@ export default { this.$refs.switchHookLock.doShow(this.selected, operate); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/race_01/menus/menuTrain.vue b/src/jmapNew/theme/race_01/menus/menuTrain.vue index 2c1a7c9bb..74a0e6caa 100644 --- a/src/jmapNew/theme/race_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/race_01/menus/menuTrain.vue @@ -154,10 +154,6 @@ export default { label: '取消故障', handler: this.cancelStoppage }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement - }, { label: '托管', handler: this.setCollocation @@ -321,9 +317,6 @@ export default { } }); }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); - }, // 设置连挂 setLink() { commitOperate(menuOperate.Common.setLink, { code: this.selected.code }, 0).then(({valid, operate})=>{ diff --git a/src/jmapNew/theme/xian_01/menus/menuSection.vue b/src/jmapNew/theme/xian_01/menus/menuSection.vue index e07dd9921..8edbe7839 100644 --- a/src/jmapNew/theme/xian_01/menus/menuSection.vue +++ b/src/jmapNew/theme/xian_01/menus/menuSection.vue @@ -150,11 +150,6 @@ export default { handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT - }, { label: '设置备用车', handler: this.loadSpare, @@ -311,9 +306,6 @@ export default { this.$refs.speedCmdControl.doShow(operate, this.selected); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/xian_01/menus/menuSignal.vue b/src/jmapNew/theme/xian_01/menus/menuSignal.vue index 63eab3df1..c1c85498a 100644 --- a/src/jmapNew/theme/xian_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/xian_01/menus/menuSignal.vue @@ -218,11 +218,6 @@ export default { label: '取消故障', handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -449,9 +444,6 @@ export default { this.$refs.routeDetail.doShow(operate, this.selected, this.getRouteList(this.selected)); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/xian_01/menus/menuStation.vue b/src/jmapNew/theme/xian_01/menus/menuStation.vue index 4da15dea5..0d83409c2 100644 --- a/src/jmapNew/theme/xian_01/menus/menuStation.vue +++ b/src/jmapNew/theme/xian_01/menus/menuStation.vue @@ -161,11 +161,6 @@ export default { label: '重启联锁机', handler: this.restartInterlock, cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -302,9 +297,6 @@ export default { callback: action => { } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/xian_01/menus/menuStationStand.vue b/src/jmapNew/theme/xian_01/menus/menuStationStand.vue index 81d513375..1814db426 100644 --- a/src/jmapNew/theme/xian_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/xian_01/menus/menuStationStand.vue @@ -169,11 +169,6 @@ export default { { label: '取消故障', handler: this.cancelStoppage - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -343,10 +338,6 @@ export default { } }); }, - // 触发故障管理 - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); - }, // 打开PSL面板 openPsl() { this.$refs.psl.doShow(this.selected); diff --git a/src/jmapNew/theme/xian_01/menus/menuSwitch.vue b/src/jmapNew/theme/xian_01/menus/menuSwitch.vue index 5cb403b64..155773f0b 100644 --- a/src/jmapNew/theme/xian_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/xian_01/menus/menuSwitch.vue @@ -175,11 +175,6 @@ export default { { label: '取消故障', handler: this.cancelStoppage - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ], menuDirective: [ @@ -352,9 +347,6 @@ export default { // 道岔钩锁 hookLock() { this.$refs.switchHookLock.doShow(this.selected); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/xian_01/menus/menuTrain.vue b/src/jmapNew/theme/xian_01/menus/menuTrain.vue index 8db4b35e4..82a617952 100644 --- a/src/jmapNew/theme/xian_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/xian_01/menus/menuTrain.vue @@ -132,10 +132,6 @@ export default { { label: '取消故障', handler: this.cancelStoppage - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement } ], menuDirective: [ @@ -526,9 +522,6 @@ export default { callback: action => { } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } // // 交换列车识别号 // switchTrainId() { diff --git a/src/jmapNew/theme/xian_02/menus/menuSection.vue b/src/jmapNew/theme/xian_02/menus/menuSection.vue index 4be17f28f..0f614e975 100644 --- a/src/jmapNew/theme/xian_02/menus/menuSection.vue +++ b/src/jmapNew/theme/xian_02/menus/menuSection.vue @@ -183,11 +183,6 @@ export default { handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT - }, { label: '设置备用车', handler: this.loadSpare, @@ -371,9 +366,6 @@ export default { callback: action => { } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/xian_02/menus/menuSignal.vue b/src/jmapNew/theme/xian_02/menus/menuSignal.vue index 807fcc29a..ec9955591 100644 --- a/src/jmapNew/theme/xian_02/menus/menuSignal.vue +++ b/src/jmapNew/theme/xian_02/menus/menuSignal.vue @@ -187,11 +187,6 @@ export default { label: '取消故障', handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -577,9 +572,6 @@ export default { if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) { this.$refs.popMenu.resetShowPosition(point); } - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/xian_02/menus/menuStation.vue b/src/jmapNew/theme/xian_02/menus/menuStation.vue index 6e786f079..f55cd9b5b 100644 --- a/src/jmapNew/theme/xian_02/menus/menuStation.vue +++ b/src/jmapNew/theme/xian_02/menus/menuStation.vue @@ -227,11 +227,6 @@ export default { label: '重启联锁机', handler: this.restartInterlock, cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -485,9 +480,6 @@ export default { callback: action => { } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/xian_02/menus/menuSwitch.vue b/src/jmapNew/theme/xian_02/menus/menuSwitch.vue index 5033c3aa8..f22e14c23 100644 --- a/src/jmapNew/theme/xian_02/menus/menuSwitch.vue +++ b/src/jmapNew/theme/xian_02/menus/menuSwitch.vue @@ -169,11 +169,6 @@ export default { label: '取消故障', handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -378,9 +373,6 @@ export default { callback: action => { } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/theme/xian_02/menus/popStationStand.vue b/src/jmapNew/theme/xian_02/menus/popStationStand.vue index da6c80368..5d2f1e5bf 100644 --- a/src/jmapNew/theme/xian_02/menus/popStationStand.vue +++ b/src/jmapNew/theme/xian_02/menus/popStationStand.vue @@ -249,11 +249,6 @@ export default { label: '取消故障', handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT - }, - { - label: '触发故障管理', - handler: this.triggerFaultManagement, - cmdType: CMD.Fault.CMD_TRIGGER_FAULT } ] }; @@ -516,9 +511,6 @@ export default { this.$refs.stopProfile.doShow(step, this.selected, 'down'); } }); - }, - triggerFaultManagement() { - this.$store.dispatch('training/setTriggerFaultCount', this.selected); } } }; diff --git a/src/jmapNew/transformHandle.js b/src/jmapNew/transformHandle.js index bb6e25b8c..0c087471b 100644 --- a/src/jmapNew/transformHandle.js +++ b/src/jmapNew/transformHandle.js @@ -41,7 +41,7 @@ class TransformHandle { // const scale = parseFloat((20 / this.scaleIndex).toFixed(2)); const scaleRate = this.$painter.$jmap.$options.getScaleRate(); if (scaleRate < 1) { - view.trainB.mouseEvent.arrowText.setStyle({ textFont: (10 / scaleRate).ceil() + 'px consolas' }); + view.trainB.mouseEvent.arrowText.setStyle({ textFont: Math.ceil(10 / scaleRate) + 'px consolas' }); } } diff --git a/src/main.js b/src/main.js index 0e17c5626..e7ada36b6 100644 --- a/src/main.js +++ b/src/main.js @@ -24,6 +24,7 @@ import '@/directive/dialogLoading/index.js'; import '@/directive/drag/index.js'; import '@/directive/focus/index.js'; import '@/directive/quickMenuDrag/index.js'; +import '@/directive/verticalDrag/index.js'; import '@/directive/waves/index.js'; import messages from '@/i18n/index'; diff --git a/src/router/index.js b/src/router/index.js index 1415cdc2b..c4005bf0a 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -249,24 +249,6 @@ export const admin = '04'; // 管理员 export const superAdmin = '05'; // 超级管理员 // export const referee = '07'; // 裁判员 -export const projectTrain = '011'; // 城市轨道项目 -export const projectXian = '012'; // 西安地铁项目 -export const projectXty = '013'; // 西铁院 -export const projectGzzb = '014'; // 贵州装备 -export const projectJsxt = '015'; // 竞赛系统 -export const projectJyd = '017'; // 竞业达 -export const projectTky = '018'; // 铁科院 -export const projectHeb = '019'; // 哈盈达 -export const projectDrts = '020'; // 行调实训 -export const projectSdy = '021';// 苏电院 -export const projectRichor = '022';// 中航锐创 -export const projectRichorJoint = '023'; // 中航锐创(实训室) -export const projectSrsandbox = '024'; // 上饶沙盘 -export const projectJxgm = '025'; // 江西工贸 -export const projectSay = '026'; // 江苏安全 -export const projectRichorhhcj = '027'; // 红河财经 -export const projectTeaching = '028'; // 教学通用 - export const userTrainingPlatform = '016'; // 实训系统 // export const refereePlatform = '017'; // 裁判系统 @@ -292,17 +274,6 @@ export const constantRoutes = [ component: Login, hidden: true }, - // 设计平台登录 - { - path: '/design', - redirect: '/design/login', - hidden: true - }, - { - path: '/design/login', - component: Login, - hidden: true - }, { path: '/authorization', component: Authorization, @@ -2119,198 +2090,6 @@ export const asyncRouter = [ ] } ]; -/* merge 是否再路由处理中与asyncRouter进行合并 mergeIndex合并进入asyncRouter【mergeIndex】 慎重调整asyncRouter顺序 */ -export const projectRoute = { - designgzb: [ - { // 系统管理 - path: '/system', - component: Layout, - merge: true, - mergeIndex: 4, - meta: { - i18n: 'router.systemManage', - roles: [admin] - }, - children: [ - { - path: 'deviceManage', - component: DeviceManage, - meta: { - i18n: 'router.deviceManage' - } - } - ] - } - ], - designxty: [ - { // 系统管理 - path: '/system', - component: Layout, - merge: true, - mergeIndex: 4, - meta: { - i18n: 'router.systemManage', - roles: [admin] - }, - children: [ - { - path: 'deviceManage', - component: DeviceManage, - meta: { - i18n: 'router.deviceManage' - } - } - ] - } - ], - designheb: [ - { // 系统管理 - path: '/system', - component: Layout, - merge: true, - mergeIndex: 4, - meta: { - i18n: 'router.systemManage', - roles: [admin] - }, - children: [ - { - path: 'deviceManage', - component: DeviceManage, - meta: { - i18n: 'router.deviceManage' - } - } - ] - } - ], - designsdy: [ - { // 系统管理 - path: '/system', - component: Layout, - merge: true, - mergeIndex: 4, - meta: { - i18n: 'router.systemManage', - roles: [admin] - }, - children: [ - { - path: 'deviceManage', - component: DeviceManage, - meta: { - i18n: 'router.deviceManage' - } - } - ] - } - ], - designrichorjoint: [ - { // 系统管理 - path: '/system', - component: Layout, - merge: true, - mergeIndex: 4, - meta: { - i18n: 'router.systemManage', - roles: [admin] - }, - children: [ - { - path: 'deviceManage', - component: DeviceManage, - meta: { - i18n: 'router.deviceManage' - } - } - ] - } - ], - designsrsandbox: [ - { // 系统管理 - path: '/system', - component: Layout, - merge: true, - mergeIndex: 4, - meta: { - i18n: 'router.systemManage', - roles: [admin] - }, - children: [ - { - path: 'deviceManage', - component: DeviceManage, - meta: { - i18n: 'router.deviceManage' - } - } - ] - } - ], - designjxgm: [ - { // 系统管理 - path: '/system', - component: Layout, - merge: true, - mergeIndex: 4, - meta: { - i18n: 'router.systemManage', - roles: [admin] - }, - children: [ - { - path: 'deviceManage', - component: DeviceManage, - meta: { - i18n: 'router.deviceManage' - } - } - ] - } - ], - designsay: [ - { // 系统管理 - path: '/system', - component: Layout, - merge: true, - mergeIndex: 4, - meta: { - i18n: 'router.systemManage', - roles: [admin] - }, - children: [ - { - path: 'deviceManage', - component: DeviceManage, - meta: { - i18n: 'router.deviceManage' - } - } - ] - } - ], - designrichorhhcj: [ - { // 系统管理 - path: '/system', - component: Layout, - merge: true, - mergeIndex: 4, - meta: { - i18n: 'router.systemManage', - roles: [admin] - }, - children: [ - { - path: 'deviceManage', - component: DeviceManage, - meta: { - i18n: 'router.deviceManage' - } - } - ] - } - ] -}; const createRouter = () => new Router({ base: process.env.VUE_APP_PRO == 'local' ? '/' : '/cbtc/', mode: 'history', // require service support diff --git a/src/scripts/ConstConfig.js b/src/scripts/ConstConfig.js index ec2a2fc2e..503d1d6d2 100644 --- a/src/scripts/ConstConfig.js +++ b/src/scripts/ConstConfig.js @@ -62,6 +62,7 @@ export default { { label: '通号', value: 'MAINTAINER', enLabel: 'Repairman ' }, { label: '车辆段/停车场调度', value: 'DEPOT_DISPATCHER', enLabel: 'Depot dispatcher ' }, { label: '电力调度', value: 'ELECTRIC_DISPATCHER', enLabel: 'Electric dispatcher' }, + { label: '电力工务', value: 'STATION_ELECTRIC_WORKER', enLabel: 'Station electric worker' }, { label: '行调', value: 'DISPATCHER', enLabel: 'Dispatcher ' }, { label: '上级部门', value: 'PARENT_DEPARTMENT', enLabel: 'Parent department' }, { label: '车辆段/停车场信号楼', value: 'SIGNAL_BUILDING', enLabel: 'Signal Building' }, @@ -91,6 +92,7 @@ export default { {label: '车站工务工', value: 'STATION_WORKER'}, {label: '车务段段长', value: 'TRAIN_MASTER'}, {label: '工电调度', value: 'ELECTRIC_DISPATCHER'}, + { label: '电力工务', value: 'STATION_ELECTRIC_WORKER'}, {label: '上级部分', value: 'PARENT_DEPARTMENT'}, {label: '派班员', value: 'SCHEDULING'}, {label: '设备管理员', value: 'DEVICE_MANAGER'}, diff --git a/src/scripts/cmdPlugin/CommandEnum.js b/src/scripts/cmdPlugin/CommandEnum.js index a7a5df465..01ed906ed 100644 --- a/src/scripts/cmdPlugin/CommandEnum.js +++ b/src/scripts/cmdPlugin/CommandEnum.js @@ -201,7 +201,16 @@ export default { /** 增加备用车 大铁线路使用*/ CMD_TRAIN_LOAD_TRIP_NUMBER_TRAIN: {value: 'Train_Load_Trip_Number_Train', label: '增加备用车'}, /** 分路不良 大铁线路使用*/ - CMD_SECTION_DEFECTIVE_SHUNTING: {value: 'Section_Defective_Shunting', label: '分路不良'} + CMD_SECTION_DEFECTIVE_SHUNTING: {value: 'Section_Defective_Shunting', label: '分路不良'}, + /** 岔前分路不良 大铁线路使用*/ + CMD_SECTION_DEFECTIVE_SHUNTING_FRONT: {value: 'Section_Defective_Shunting_Front', label: '岔前分路不良'}, + /** 定位分路不良 大铁线路使用*/ + CMD_SECTION_DEFECTIVE_SHUNTING_FIXED: {value: 'Section_Defective_Shunting_Fixed', label: '定位分路不良'}, + /** 反位分路不良 大铁线路使用*/ + CMD_SECTION_DEFECTIVE_SHUNTING_REVERSE:{value: 'Section_Defective_Shunting_Reverse', label: '反位分路不良'}, + /** 区段确认空闲,取消分路不良 */ + CMD_SECTION_CANCEL_DEFECTIVE_SHUNTING:{value: 'Section_Cancel_Defective_Shunting', label: '区段确认空闲'} + }, // 站台 @@ -334,6 +343,7 @@ export default { CMD_TRAIN_CHANGE_DESTINATION_CODE: {value:'Train_Change_Destination_Code', label: '更改目的地码'}, CMD_TRAIN_TRUST: {value: 'Train_Trust', label: '设置托管'}, CMD_TRAIN_LINK: {value: 'Train_Link', label: '设置连挂'}, + CMD_TRAIN_DRIVE: {value: 'Train_Drive', label: '机器人司机模拟驾驶'}, /** 下令停车 */ CMD_TRAIN_ORDER_STOP: {value: 'Train_Order_Stop', label:'下令停车'}, /** 取消停车命令 */ @@ -481,7 +491,8 @@ export default { CTC_QUERY_DISPATCH_COMMAND:{value:'CTC_QUERY_DISPATCH_COMMAND', label: '调度台命令查询'}, CTC_SEND_DISPATCH_COMMAND:{value:'CTC_SEND_DISPATCH_COMMAND', label: '调度台命令下达'}, CTC_SIGN_DISPATCH_COMMAND:{value:'CTC_SIGN_DISPATCH_COMMAND', label: '调度台命令签收'}, - CTC_READ_DISPATCH_COMMAND:{value:'CTC_READ_DISPATCH_COMMAND', label: '调度台命令已读'} + CTC_READ_DISPATCH_COMMAND:{value:'CTC_READ_DISPATCH_COMMAND', label: '调度台命令已读'}, + CTC_SWITCH_ROUTE_SET_MODEL:{value:'Station_Switch_Route_Set_Model', label: '状态切换操作'} }, RAIL: { @@ -489,10 +500,22 @@ export default { CMD_RAIL_QUERY_TICKET: {value: 'RAIL_QUERY_TICKET', label: '查询票据'}, CMD_RAIL_FILL_IN_REGISTER: {value: 'RAIL_FILL_IN_REGISTER', label: '填写行车簿册'}, CMD_RAIL_QUERY_REGISTER: {value: 'RAIL_QUERY_REGISTER', label: '查询行车簿册'}, - CMD_RAIL_GIVE_TICKET_TO: {value: 'RAIL_GIVE_TICKET_TO', label: '给出票据'} + CMD_RAIL_GIVE_TICKET_TO: {value: 'RAIL_GIVE_TICKET_TO', label: '给出票据'}, + CMD_RAIL_EQUIPMENT_CONSTRUCTION_INFO_SAVE:{value: 'EQUIPMENT_CONSTRUCTION_INFO_SAVE', label: '填写施工登记簿册'}, + CMD_RAIL_EQUIPMENT_CONSTRUCTION_INFO_QUERY:{value: 'EQUIPMENT_CONSTRUCTION_INFO_QUERY', label: '查询施工登记簿册'}, + CMD_RAIL_FLOOD_CONTROL_SAFETY_SUBMIT:{value: 'CONTROL_FLOOD_SIGN_SAVE', label: '填写防洪安全上岗签到表'}, + CMD_RAIL_FLOOD_CONTROL_SAFETY_UPDATE:{value: 'CONTROL_FLOOD_SIGN_UPDATE', label: '更新防洪安全上岗签到表'}, + CMD_RAIL_ABNORMAL_TRAIN_SAVE:{value: 'KEY_LINK_CONTROL_INFO_SAVE', label: '填写非正常情况接发列车关键环节控制表'} }, Conversation: { CMD_Conversation_Chat_Text: {value: 'Conversation_Chat_Text', label: '发送文本消息'}, CMD_Conversation_Chat_Audio_Base64: {value: 'Conversation_Chat_Audio_Base64', label: '发送语音消息'} + }, + PSL: { + CMD_PSL_PRESS_BUTTON: {value: 'PSL_PRESS_BUTTON', label: 'PSL按钮操作'} + }, + IBP: { + CMD_IBP_PRESS_BUTTON: {value: 'IBP_PRESS_BUTTON', label: 'IBP按钮按下'}, + CMD_IBP_RELEASE_BUTTON: {value: 'IBP_RELEASE_BUTTON', label: 'IBP按钮抬起'} } }; diff --git a/src/scripts/cmdPlugin/OperationHandler.js b/src/scripts/cmdPlugin/OperationHandler.js index 5310078d3..1540247a5 100644 --- a/src/scripts/cmdPlugin/OperationHandler.js +++ b/src/scripts/cmdPlugin/OperationHandler.js @@ -1297,7 +1297,32 @@ export const OperationEvent = { menu: { operation: '11c', domId: '_Tips-Switch-DefectiveShunting-Menu{TOP}' + }, + locate:{ + operation: '11e', + domId: '_Tips-Switch-DefectiveShunting-Locate{TOP}' + }, + reverse:{ + operation: '11f', + domId: '_Tips-Switch-DefectiveShunting-Reverse{TOP}' + }, + before:{ + operation: '11g', + domId: '_Tips-Switch-DefectiveShunting-Before{TOP}' + }, + confirm:{ + operation: '11h', + domId: '_Tips-Switch-DefectiveShunting-confirm{TOP}' + }, + password:{ + operation: '11i', + domId: '_Tips-Switch-DefectiveShunting-password{TOP}' + }, + twoConfirm:{ + operation: '11j', + domId: '_Tips-Switch-DefectiveShunting-twoConfirm{TOP}' } + }, // 取消分路不良 cancelDefectiveShunting:{ @@ -2448,6 +2473,10 @@ export const OperationEvent = { shuntingTypeListChange: { operation: '4282', domId: '_Tips-Section-Defective-Shunting-Change' + }, + menu:{ + operation: '4283', + domId: '_Tips-Section-Defective-Shunting-Menu' } // menuButton: { // operation: '428', @@ -3746,6 +3775,13 @@ export const OperationEvent = { domId: '_Tips-Collocation-Menu{TOP}' } }, + // 机器人司机模拟驾驶 Train_Drive + trainDrive:{ + menu: { + operation: '299d', + domId: '_Tips-trainDrive-Menu{TOP}' + } + }, // 设置连挂 setLink: { menu: { @@ -3767,6 +3803,28 @@ export const OperationEvent = { operation: '299c', domId: '_Tips-Control-StationControl-Confirm{TOP}' } + }, + modeCovert:{ + button:{ + operation: '299d', + domId: '_Tips-Mode-Covert-Button{TOP}' + }, + agreeModeCovert:{ + operation: '299e', + domId: '_Tips-Agree-Mode-Covert{TOP}' + }, + applyModeCovert:{ + operation: '299f', + domId: '_Tips-Apply-Mode-Covert{TOP}' + }, + agreeModeCovertCommit:{ + operation: '299g', + domId: '_Tips-Agree-Mode-Covert-Commit{TOP}' + }, + applyModeCovertCommit:{ + operation: '299g', + domId: '_Tips-Apply-Mode-Covert-Commit{TOP}' + } } }, CTCCommand: { @@ -4190,6 +4248,20 @@ export const OperationEvent = { operation: 'a062', domId: '_Tips-CTC-loadUpdateStationTrainFixedPath-Menu{TOP}' } + }, + switchRouteSetModel: { + menu: { + operation: 'a063', + domId: '_Tips-CTC-switchRouteSetModel-menu{TOP}' + }, + confirm: { + operation: 'a064', + domId: '_Tips-CTC-switchRouteSetModel-confirm' + }, + cancel: { + operation: 'a065', + domId: '_Tips-CTC-switchRouteSetModel-cancel' + } } // CTC_ZONE_SAVE_TRIP_NUMBER // CTC_ZONE_SAVE_STATION @@ -4355,6 +4427,546 @@ export const OperationEvent = { endTimeInfo: { operation: 'b112', domId: '_Tips-TicketOrRegister-RegisterInput-EndTimeInfo' + }, + tabs: { + operation: 'b113', + domId: '_Tips-TicketOrRegister-RegisterInput-tabs' + } + } + }, + AbnormalTrainRegister: { // 薄册--非正常情况接发列车关键环节控制表 + tabType: { + typeChange: { + operation: 'c000', + domId: '_Tips-AbnormalTrainRegister-tabType-typeChange' + } + }, + formInput: { + submit: { + operation: 'c001', + domId: '_Tips-AbnormalTrainRegister-formInput-submit{BOTTOM}' + }, + supervisor: { + operation: 'c002', + domId: '_Tips-AbnormalTrainRegister-formInput-supervisor' + }, + cadresPost: { + operation: 'c003', + domId: '_Tips-AbnormalTrainRegister-formInput-cadresPost' + }, + monitorCadres: { + operation: 'c004', + domId: '_Tips-AbnormalTrainRegister-formInput-monitorCadres' + }, + weather: { + operation: 'c005', + domId: '_Tips-AbnormalTrainRegister-formInput-weather' + }, + registerDate: { + operation: 'c006', + domId: '_Tips-AbnormalTrainRegister-formInput-registerDate' + }, + noticeCadresTimeHour: { + operation: 'c007', + domId: '_Tips-AbnormalTrainRegister-formInput-noticeCadresTimeHour' + }, + noticeCadresTimeMinute: { + operation: 'c008', + domId: '_Tips-AbnormalTrainRegister-formInput-noticeCadresTimeMinute' + }, + reportDispatcherTimeHour: { + operation: 'c009', + domId: '_Tips-AbnormalTrainRegister-formInput-reportDispatcherTimeHour' + }, + reportDispatcherTimeMinute: { + operation: 'c0010', + domId: '_Tips-AbnormalTrainRegister-formInput-reportDispatcherTimeMinute' + }, + reportCommandCentreTimeHour: { + operation: 'c0011', + domId: '_Tips-AbnormalTrainRegister-formInput-reportCommandCentreTimeHour' + }, + reportCommandCentreTimeMinute: { + operation: 'c0012', + domId: '_Tips-AbnormalTrainRegister-formInput-reportCommandCentreTimeMinute' + }, + monitorArriveTimeHour: { + operation: 'c0013', + domId: '_Tips-AbnormalTrainRegister-formInput-monitorArriveTimeHour' + }, + monitorArriveTimeMinute: { + operation: 'c0014', + domId: '_Tips-AbnormalTrainRegister-formInput-monitorArriveTimeMinute' + }, + departmentName0: { + operation: 'c0015', + domId: '_Tips-AbnormalTrainRegister-formInput-departmentName0' + }, + registration0: { + operation: 'c0016', + domId: '_Tips-AbnormalTrainRegister-formInput-registration0' + }, + reportSign0: { + operation: 'c0017', + domId: '_Tips-AbnormalTrainRegister-formInput-reportSign0' + }, + reportDispatcher0: { + operation: 'c0018', + domId: '_Tips-AbnormalTrainRegister-formInput-reportDispatcher0' + }, + centerDispatchCommandCheck0: { + operation: 'c0019', + domId: '_Tips-AbnormalTrainRegister-formInput-centerDispatchCommandCheck0' + }, + monitorArrive0: { + operation: 'c0020', + domId: '_Tips-AbnormalTrainRegister-formInput-monitorArrive0' + }, + writeOff0: { + operation: 'c0021', + domId: '_Tips-AbnormalTrainRegister-formInput-writeOff0' + }, + workerDispatchCommandCheck0: { + operation: 'c0022', + domId: '_Tips-AbnormalTrainRegister-formInput-workerDispatchCommandCheck0' + }, + departmentName1: { + operation: 'c0023', + domId: '_Tips-AbnormalTrainRegister-formInput-departmentName1' + }, + registration1: { + operation: 'c0024', + domId: '_Tips-AbnormalTrainRegister-formInput-registration1' + }, + reportSign1: { + operation: 'c0025', + domId: '_Tips-AbnormalTrainRegister-formInput-reportSign1' + }, + reportDispatcher1: { + operation: 'c0026', + domId: '_Tips-AbnormalTrainRegister-formInput-reportDispatcher1' + }, + centerDispatchCommandCheck1: { + operation: 'c0027', + domId: '_Tips-AbnormalTrainRegister-formInput-centerDispatchCommandCheck1' + }, + monitorArrive1: { + operation: 'c0028', + domId: '_Tips-AbnormalTrainRegister-formInput-monitorArrive1' + }, + writeOff1: { + operation: 'c0029', + domId: '_Tips-AbnormalTrainRegister-formInput-writeOff1' + }, + workerDispatchCommandCheck1: { + operation: 'c0030', + domId: '_Tips-AbnormalTrainRegister-formInput-workerDispatchCommandCheck1' + }, + departmentName2: { + operation: 'c0031', + domId: '_Tips-AbnormalTrainRegister-formInput-departmentName2' + }, + registration2: { + operation: 'c0032', + domId: '_Tips-AbnormalTrainRegister-formInput-registration2' + }, + reportSign2: { + operation: 'c0033', + domId: '_Tips-AbnormalTrainRegister-formInput-reportSign2' + }, + reportDispatcher2: { + operation: 'c0034', + domId: '_Tips-AbnormalTrainRegister-formInput-reportDispatcher2' + }, + centerDispatchCommandCheck2: { + operation: 'c0035', + domId: '_Tips-AbnormalTrainRegister-formInput-centerDispatchCommandCheck2' + }, + monitorArrive2: { + operation: 'c0036', + domId: '_Tips-AbnormalTrainRegister-formInput-monitorArrive2' + }, + writeOff2: { + operation: 'c0037', + domId: '_Tips-AbnormalTrainRegister-formInput-writeOff2' + }, + workerDispatchCommandCheck2: { + operation: 'c0038', + domId: '_Tips-AbnormalTrainRegister-formInput-workerDispatchCommandCheck2' + }, + departmentName3: { + operation: 'c0039', + domId: '_Tips-AbnormalTrainRegister-formInput-departmentName3' + }, + registration3: { + operation: 'c0040', + domId: '_Tips-AbnormalTrainRegister-formInput-registration3' + }, + reportSign3: { + operation: 'c0041', + domId: '_Tips-AbnormalTrainRegister-formInput-reportSign3' + }, + reportDispatcher3: { + operation: 'c0042', + domId: '_Tips-AbnormalTrainRegister-formInput-reportDispatcher3' + }, + centerDispatchCommandCheck3: { + operation: 'c0043', + domId: '_Tips-AbnormalTrainRegister-formInput-centerDispatchCommandCheck3' + }, + monitorArrive3: { + operation: 'c0044', + domId: '_Tips-AbnormalTrainRegister-formInput-monitorArrive3' + }, + writeOff3: { + operation: 'c0045', + domId: '_Tips-AbnormalTrainRegister-formInput-writeOff3' + }, + workerDispatchCommandCheck3: { + operation: 'c0046', + domId: '_Tips-AbnormalTrainRegister-formInput-workerDispatchCommandCheck3' + }, + departmentName4: { + operation: 'c0047', + domId: '_Tips-AbnormalTrainRegister-formInput-departmentName4' + }, + registration4: { + operation: 'c0048', + domId: '_Tips-AbnormalTrainRegister-formInput-registration4' + }, + reportSign4: { + operation: 'c0049', + domId: '_Tips-AbnormalTrainRegister-formInput-reportSign4' + }, + reportDispatcher4: { + operation: 'c0050', + domId: '_Tips-AbnormalTrainRegister-formInput-reportDispatcher4' + }, + centerDispatchCommandCheck4: { + operation: 'c0051', + domId: '_Tips-AbnormalTrainRegister-formInput-centerDispatchCommandCheck4' + }, + monitorArrive4: { + operation: 'c0052', + domId: '_Tips-AbnormalTrainRegister-formInput-monitorArrive4' + }, + writeOff4: { + operation: 'c0053', + domId: '_Tips-AbnormalTrainRegister-formInput-writeOff4' + }, + workerDispatchCommandCheck4: { + operation: 'c0054', + domId: '_Tips-AbnormalTrainRegister-formInput-workerDispatchCommandCheck4' + }, + departmentName5: { + operation: 'c0055', + domId: '_Tips-AbnormalTrainRegister-formInput-departmentName5' + }, + registration5: { + operation: 'c0056', + domId: '_Tips-AbnormalTrainRegister-formInput-registration5' + }, + reportSign5: { + operation: 'c0057', + domId: '_Tips-AbnormalTrainRegister-formInput-reportSign5' + }, + reportDispatcher5: { + operation: 'c0058', + domId: '_Tips-AbnormalTrainRegister-formInput-reportDispatcher5' + }, + centerDispatchCommandCheck5: { + operation: 'c0059', + domId: '_Tips-AbnormalTrainRegister-formInput-centerDispatchCommandCheck5' + }, + monitorArrive5: { + operation: 'c0060', + domId: '_Tips-AbnormalTrainRegister-formInput-monitorArrive5' + }, + writeOff5: { + operation: 'c0061', + domId: '_Tips-AbnormalTrainRegister-formInput-writeOff5' + }, + workerDispatchCommandCheck5: { + operation: 'c0062', + domId: '_Tips-AbnormalTrainRegister-formInput-workerDispatchCommandCheck5' + }, + faultContent: { + operation: 'c0063', + domId: '_Tips-AbnormalTrainRegister-formInput-faultContent' + }, + sectionContent: { + operation: 'c0064', + domId: '_Tips-AbnormalTrainRegister-formInput-sectionContent' + }, + pickRoutePrepareContent: { + operation: 'c0065', + domId: '_Tips-AbnormalTrainRegister-formInput-pickRoutePrepareContent' + }, + pickSignal: { + operation: 'c0066', + domId: '_Tips-AbnormalTrainRegister-formInput-pickSignal' + }, + departRoutePrepareContent: { + operation: 'c0067', + domId: '_Tips-AbnormalTrainRegister-formInput-departRoutePrepareContent' + }, + otherKeyLinkContent: { + operation: 'c0068', + domId: '_Tips-AbnormalTrainRegister-formInput-otherKeyLinkContent' + } + } + }, + FloodSafetyRegister: { // 薄册--防洪安全上岗签到表 + tabType: { + typeChange: { + operation: 'd000', + domId: '_Tips-FloodSafetyRegister-tabType-typeChange' + } + }, + formInput: { + submit: { + operation: 'd001', + domId: '_Tips-FloodSafetyRegister-formInput-submit' + }, + update: { + operation: 'd002', + domId: '_Tips-FloodSafetyRegister-formInput-update' + }, + stationCode: { + operation: 'd003', + domId: '_Tips-FloodSafetyRegister-formInput-stationCode' + }, + supervisor: { + operation: 'd004', + domId: '_Tips-FloodSafetyRegister-formInput-supervisor' + }, + signDateStr: { + operation: 'd005', + domId: '_Tips-FloodSafetyRegister-formInput-signDateStr' + }, + supervisorNoticeInfoReporter: { + operation: 'd006', + domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoReporter' + }, + supervisorNoticeInfoNoticeStationTime: { + operation: 'd007', + domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoNoticeStationTime' + }, + supervisorNoticeInfoNoticeModel: { + operation: 'd008', + domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoNoticeModel' + }, + supervisorNoticeInfoHazardCategory: { + operation: 'd009', + domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoHazardCategory' + }, + supervisorNoticeInfoRainfallLevel: { + operation: 'd0010', + domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoRainfallLevel' + }, + supervisorNoticeInfoNoticeStationMasterTime: { + operation: 'd0011', + domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoNoticeStationMasterTime' + }, + supervisorNoticeInfoStationMasterArrivalTime: { + operation: 'd0012', + domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoStationMasterArrivalTime' + }, + supervisorNoticeInfoStationMasterSign: { + operation: 'd0013', + domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoStationMasterSign' + }, + supervisorNoticeInfoOccurredSite: { + operation: 'd0014', + domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoOccurredSite' + }, + supervisorNoticeInfoDrivingRequirement: { + operation: 'd0015', + domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoDrivingRequirement' + }, + stationMasterNoticeListDepartment0: { + operation: 'd0016', + domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListDepartment0' + }, + stationMasterNoticeListReceiver0: { + operation: 'd0017', + domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListReceiver0' + }, + stationMasterNoticeListNoticeTime0: { + operation: 'd0018', + domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListNoticeTime0' + }, + stationMasterNoticeListNoticeModel0: { + operation: 'd0019', + domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListNoticeModel0' + }, + stationMasterNoticeListRemark0: { + operation: 'd0020', + domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListRemark0' + }, + stationMasterNoticeListDepartment1: { + operation: 'd0021', + domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListDepartment1' + }, + stationMasterNoticeListReceiver1: { + operation: 'd0022', + domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListReceiver1' + }, + stationMasterNoticeListNoticeTime1: { + operation: 'd0023', + domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListNoticeTime1' + }, + stationMasterNoticeListNoticeModel1: { + operation: 'd0024', + domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListNoticeModel1' + }, + stationMasterNoticeListRemark1: { + operation: 'd0025', + domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListRemark1' + }, + stationMasterNoticeListDepartment2: { + operation: 'd0026', + domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListDepartment2' + }, + stationMasterNoticeListReceiver2: { + operation: 'd0027', + domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListReceiver2' + }, + stationMasterNoticeListNoticeTime2: { + operation: 'd0028', + domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListNoticeTime2' + }, + stationMasterNoticeListNoticeModel2: { + operation: 'd0029', + domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListNoticeModel2' + }, + stationMasterNoticeListRemark2: { + operation: 'd0030', + domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListRemark2' + }, + workerSignInfoListDepartment0: { + operation: 'd0031', + domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListDepartment0' + }, + workerSignInfoListArriveTime0: { + operation: 'd0032', + domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListArriveTime0' + }, + workerSignInfoListAppointment0: { + operation: 'd0033', + domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListAppointment0' + }, + workerSignInfoListTelephone0: { + operation: 'd0034', + domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListTelephone0' + }, + workerSignInfoListSign0: { + operation: 'd0035', + domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListSign0' + }, + workerSignInfoListReturnTime0: { + operation: 'd0036', + domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListReturnTime0' + }, + workerSignInfoListDepartment1: { + operation: 'd0037', + domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListDepartment1' + }, + workerSignInfoListArriveTime1: { + operation: 'd0038', + domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListArriveTime1' + }, + workerSignInfoListAppointment1: { + operation: 'd0039', + domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListAppointment1' + }, + workerSignInfoListTelephone1: { + operation: 'd0040', + domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListTelephone1' + }, + workerSignInfoListSign1: { + operation: 'd0041', + domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListSign1' + }, + workerSignInfoListReturnTime1: { + operation: 'd0042', + domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListReturnTime1' + }, + workerSignInfoListDepartment2: { + operation: 'd0043', + domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListDepartment2' + }, + workerSignInfoListArriveTime2: { + operation: 'd0044', + domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListArriveTime2' + }, + workerSignInfoListAppointment2: { + operation: 'd0045', + domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListAppointment2' + }, + workerSignInfoListTelephone2: { + operation: 'd0046', + domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListTelephone2' + }, + workerSignInfoListSign2: { + operation: 'd0047', + domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListSign2' + }, + workerSignInfoListReturnTime2: { + operation: 'd0048', + domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListReturnTime2' + } + } + }, + Psl: { + standChange: { + change: { + operation: 'e001', + domId: '_Tips-Psl-standChange-Change' + } + }, + pslOperation: { + turn: { + operation: 'e002', + domId: '_Tips-Psl-pslOperation-Turn' + } + }, + hsjcOperation: { + turn: { + operation: 'e003', + domId: '_Tips-Psl-hsjcOperation-Turn' + } + }, + openDoor: { + button: { + operation: 'e004', + domId: '_Tips-Psl-openDoor-Button' + } + }, + closeDoor: { + button: { + operation: 'e005', + domId: '_Tips-Psl-closeDoor-Button' + } + }, + testLamp: { + button: { + operation: 'e006', + domId: '_Tips-Psl-testLamp-Button' + } + } + }, + Ibp: { + buttonPressed: { + button: { + operation: 'f001', + domId: '_Tips-Ibp-buttonPressed-Button' + } + }, + buttonRelease: { + button: { + operation: 'f002', + domId: '_Tips-Ibp-buttonRelease-Button' } } }, @@ -4388,6 +5000,62 @@ export const OperationEvent = { operation: '1205', domId: '_Tips-Rail-railGiveTicketTo' } + }, + equipmentConstructionFill: { + menu: { + operation: '1206', + domId: '_Tips-Rail-equipmentConstructionFill-Menu' + }, + constructionInput:{ + operation: '1207', + domId: '_Tips-Rail-equipmentConstructionFill-Input' + }, + num:{ + operation: '1208', + domId: '_Tips-Rail-equipmentConstructionFill-num' + }, + projectName:{ + operation: '1209', + domId: '_Tips-Rail-equipmentConstructionFill-projectName' + }, + requestDate:{ + operation: '120a', + domId: '_Tips-Rail-equipmentConstructionFill-requestDate' + }, + requestDetails:{ + operation: '120b', + domId: '_Tips-Rail-equipmentConstructionFill-requestDetails' + }, + planSpendTime:{ + operation: '120c', + domId: '_Tips-Rail-equipmentConstructionFill-planSpendTime' + }, + acceptDetail:{ + operation: '120d', + domId: '_Tips-Rail-equipmentConstructionFill-acceptDetail' + }, + confirmReviewDate:{ + operation: '120e', + domId: '_Tips-Rail-equipmentConstructionFill-confirmReviewDate' + }, + confirmReviewDetail:{ + operation: '120f', + domId: '_Tips-Rail-equipmentConstructionFill-confirmReviewDetail' + }, + constructionOpenDetail:{ + operation: '1207g', + domId: '_Tips-Rail-equipmentConstructionFill-constructionOpenDetail' + }, + remark:{ + operation: '1207h', + domId: '_Tips-Rail-equipmentConstructionFill-remark' + } + }, + equipmentConstructionQuery: { + menu: { + operation: '120I', + domId: '_Tips-Rail-equipmentConstructionQuery' + } } }, Driver: { @@ -4571,6 +5239,22 @@ export const OperationEvent = { signCmdFalse: { operation: '1708', domId: '_Tips-DispatchCmd-menuButton-signCmdFalse{BOTTOM}' + }, + findTrain: { + operation: '1709', + domId: '_Tips-DispatchCmd-menuButton-findTrain{BOTTOM}' + }, + permissionAddWireless: { + operation: '1710', + domId: '_Tips-DispatchCmd-menuButton-permissionAddWireless{BOTTOM}' + }, + trainAllographCmd: { + operation: '1711', + domId: '_Tips-DispatchCmd-menuButton-trainAllographCmd{BOTTOM}' + }, + deleteTrainTable: { + operation: '1712', + domId: '_Tips-DispatchCmd-menuButton-deleteTrainTable{BOTTOM}' } } } diff --git a/src/scripts/cmdPlugin/newHandler.js b/src/scripts/cmdPlugin/newHandler.js index 18a82be23..b0cd0779e 100644 --- a/src/scripts/cmdPlugin/newHandler.js +++ b/src/scripts/cmdPlugin/newHandler.js @@ -88,34 +88,39 @@ class Handler { // 获取实训操作 getTrainingOperation() { const stepInfo = store.state.trainingNew.stepInfo; - const operateOrder = store.state.trainingNew.operateOrder; - return stepInfo.operations ? stepInfo.operations[operateOrder] : {}; + const operation = stepInfo.operations ? stepInfo.operations[store.state.trainingNew.operateOrder] : {}; + return this.isSpecialOperation(operation); + } + // 是否为特殊操作 特殊操作需跳过 + isSpecialOperation(operation) { + if (operation && operation.special) { + store.dispatch('trainingNew/operateOrderIncrease'); + return this.getTrainingOperation(); + } else { + return operation; + } } // 是否为步骤最后一步操作 isLastOperation() { const stepInfo = store.state.trainingNew.stepInfo; const operateOrder = store.state.trainingNew.operateOrder; - return stepInfo.operations.length <= operateOrder + 1; + return stepInfo.operations.length <= operateOrder + 1 || this.allSpecialOperation(stepInfo, operateOrder + 1); + } + // 检查后面操作是否均为特殊操作 + allSpecialOperation(stepInfo, operateOrder) { + let flag = true; + for (; operateOrder < stepInfo.operations.length; operateOrder++) { + if (stepInfo.operations[operateOrder] && !stepInfo.operations[operateOrder].special) flag = false; + } + return flag; } // 是否未特殊语音执行步骤列表的最后一步 isLastVoiceStep() { return store.state.trainingNew.voiceStepList.length <= store.state.trainingNew.voiceStepIndex + 1; } - // 计算当前步骤得分 - computedScoring() { - const stepInfo = store.state.trainingNew.stepInfo; - const MyMemberId = store.state.training.myMemberId; - const scoringRules = store.state.trainingNew.scoringRules; - const scoringRule = scoringRules.find(rule => rule.memberId == MyMemberId); - if (scoringRule) { - const scoring = scoringRule.details.find(item => item.elementId == stepInfo.id); - store.dispatch('trainingNew/pushScoreList', scoring); - } - } nextStep() { const group = router.currentRoute.query.group; const stepInfo = store.state.trainingNew.stepInfo; - this.computedScoring(); endTrainingStep(group, stepInfo.id).then(resp => { store.dispatch('trainingNew/clearOperateOrder'); }).catch(e => { diff --git a/src/scripts/cmdPlugin/newValidateHandler.js b/src/scripts/cmdPlugin/newValidateHandler.js index 3c798b584..2e152eeb3 100644 --- a/src/scripts/cmdPlugin/newValidateHandler.js +++ b/src/scripts/cmdPlugin/newValidateHandler.js @@ -22,6 +22,40 @@ class ValidateHandler { valid = false; } return valid; } + isNeedCheckLinkSwitch(operation) { + // 道岔单锁/单解 单操到定位/反位 + const needCheckLinkSwitchOperation = [OperationEvent.Switch.lock.menu.operation, OperationEvent.Switch.unlock.menu.operation, + OperationEvent.Switch.locate.menu.operation, OperationEvent.Switch.reverse.menu.operation, OperationEvent.Switch.lock.button.operation, + OperationEvent.Switch.unlock.button.operation, OperationEvent.Switch.locate.button.operation, OperationEvent.Switch.reverse.button.operation, + OperationEvent.Switch.turnout.menu.operation, OperationEvent.Switch.turnout.menuButton.operation, OperationEvent.Switch.lock.menuButton.operation, + OperationEvent.Switch.unlock.menuButton.operation, OperationEvent.Switch.locate.menuButton.operation, OperationEvent.Switch.reverse.menuButton.operation]; + return needCheckLinkSwitchOperation.includes(operation); + } + checkDeviceCodeConsistent(deviceCode1, deviceCode2, operation) { + let linkDeviceCode1 = ''; + if (this.isNeedCheckLinkSwitch(operation)) { + linkDeviceCode1 = store.state.map.linkSwitchMap[deviceCode1]; + } + return deviceCode1 === deviceCode2 || linkDeviceCode1 === deviceCode2; + } + checkParamConsistent(param1, param2, operation) { + const linkParam = {}; + let linkDataFlag = false; + if (this.isNeedCheckLinkSwitch(operation)) { + for (const key in param1) { + linkParam[key] = param1[key]; + if (store.state.map.linkSwitchMap[param1[key]]) { + linkDataFlag = true; + linkParam[key] = store.state.map.linkSwitchMap[param1[key]]; + } + } + } + if (linkDataFlag) { + return objectIsEqual(param1, param2) || objectIsEqual(linkParam, param2); + } else { + return objectIsEqual(param1, param2); + } + } // 判断实训操作正确性 judgeTraining(operate) { let stepOperation = {}; @@ -36,7 +70,7 @@ class ValidateHandler { valid = (cmd === stepOperation.operationType) && valid; } if (operate.code || stepOperation.deviceCode) { - valid = (operate.code === stepOperation.deviceCode) && valid; + valid = this.checkDeviceCodeConsistent(operate.code, stepOperation.deviceCode, operate.operation) && valid; } if (stepOperation.subType) { valid = (operate.subType === stepOperation.subType) && valid; @@ -48,24 +82,26 @@ class ValidateHandler { valid = (operate.userOperationType === stepOperation.userOperationType) && valid; } if (stepOperation.val) { - // || operate.val valid = ((operate.val).toString() === stepOperation.val.toString()) && valid; } const opParam = operate.param === undefined ? {} : operate.param; if ((opParam || stepOperation.params) && !opParam.hasOwnProperty('fileBase64Str')) { - valid = objectIsEqual(opParam, stepOperation.params) && valid; + valid = this.checkParamConsistent(opParam, stepOperation.params, operate.operation) && valid; } if (valid && store.state.trainingNew.voiceStepIndex > -1) { !Handler.isLastVoiceStep() && store.dispatch('trainingNew/voiceStepIndexIncrease'); } else if (valid && Handler.isLastOperation()) { + store.dispatch('trainingNew/handleStepRecord', { type:'OVER', stepOperation }); Handler.nextStep(); } else if (valid) { store.dispatch('trainingNew/operateOrderIncrease'); + store.dispatch('trainingNew/handleStepRecord', { type:'CONTINUE', stepOperation }); Handler.judgeIsTextSendOperation(); } else { console.log(operate, stepOperation, '----------'); + store.dispatch('trainingNew/handleStepRecord', { type:'ERROR', stepOperation }); console.error('校验失败;'); } return valid; diff --git a/src/store/modules/map.js b/src/store/modules/map.js index d3b1cb5c3..4c20295aa 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -259,7 +259,8 @@ const map = { pictureDeviceMap: {}, // 画面设备修正map picture:'', // 当前的客户端 domConfig: null, // 仿真配置 - initClient: '' // 仿真初始客户端 + initClient: '', // 仿真初始客户端 + linkSwitchMap: {} // 联动道岔数据 }, getters: { @@ -1147,6 +1148,9 @@ const map = { }, setPicture: (state, picture) => { state.picture = picture; + }, + setLinkSwitchMap: (state, linkSwitchMap) => { + state.linkSwitchMap = linkSwitchMap; } }, @@ -1429,6 +1433,9 @@ const map = { }, setPicture: ({ commit }, picture) => { commit('setPicture', picture); + }, + setLinkSwitchMap: ({ commit }, linkSwitchMap) => { + commit('setLinkSwitchMap', linkSwitchMap); } } }; diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index 1a1bef2a3..d7d07009c 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -1,7 +1,5 @@ -import { publicAsyncRoute, asyncRouter, constantRoutes, user, projectTrain, projectXian, projectXty, projectGzzb, projectJsxt, projectRichorJoint, - projectJyd, projectRichor, projectTky, projectHeb, superAdmin, admin, userTrainingPlatform, JSXT, projectRoute, projectDrts, projectSdy, - projectSrsandbox, projectJxgm, projectSay, projectRichorhhcj, projectTeaching } from '@/router/index'; -import { loginInfo } from '@/scripts/ProjectConfig'; +// import { loginInfo } from '@/scripts/ProjectConfig'; +import { userTrainingPlatform, admin, publicAsyncRoute, asyncRouter, constantRoutes, superAdmin, user } from '@/router/index'; import { getSessionStorage } from '@/utils/auth'; import store from '@/store/index'; @@ -40,32 +38,9 @@ function hasPermission(roles, route, parentsRoles) { * 根据项目重置 路由 * @param systemType 项目类型 */ -function resetAsyncRouter({ systemType }) { +function resetAsyncRouter() { let list = publicAsyncRoute; - const projectList = [projectTrain, projectXian, projectJyd, projectTky, projectDrts, projectRichor]; - const specialProjects = [projectXty, projectGzzb, projectHeb, projectSdy, projectRichorJoint, projectSrsandbox, projectJxgm, projectSay, projectRichorhhcj, projectTeaching]; - const specialProjectEnum = {[projectXty]:'designxty', [projectGzzb]:'designgzb', [projectHeb]:'designheb', - [projectSdy]:'designsdy', [projectRichorJoint]:'designrichorjoint', [projectSrsandbox]: 'designsrsandbox', [projectJxgm]: 'designjxgm', - [projectSay]: 'designsay', [projectRichorhhcj]: 'designrichorhhcj', [projectTeaching]: 'designteaching' }; - if (projectList.includes(systemType)) { - list = [...list, ...asyncRouter]; - } else if (specialProjects.includes(systemType) ) { - if (projectRoute) { - const proRoute = projectRoute[specialProjectEnum[systemType]]; - if (proRoute && proRoute.length) { - proRoute.forEach(item => { - if (item.merge) { - asyncRouter[item.mergeIndex].children = [...asyncRouter[item.mergeIndex].children, ...item.children]; - } else { - list.push(item); - } - }); - } - } - list = [...list, ...asyncRouter]; - } else if (systemType == projectJsxt) { - list = [...list, ...JSXT]; - } + list = [...list, ...asyncRouter]; return list; } @@ -113,7 +88,8 @@ const permission = { if (roles.includes(admin) && !roles.includes(user)) { // 只拥有管理员 不拥有普通用户权限 则增加用户权限 roles.push(user); } - const routeList = resetAsyncRouter(loginInfo[getSessionStorage('project') || 'login']); + // loginInfo[getSessionStorage('project') || 'login'] + const routeList = resetAsyncRouter(); const accessedRouters = filterAsyncRouter(routeList, roles); accessedRouters.forEach(route => { diff --git a/src/store/modules/training.js b/src/store/modules/training.js index 050a60b79..547888a91 100644 --- a/src/store/modules/training.js +++ b/src/store/modules/training.js @@ -43,8 +43,6 @@ const training = { orignalUserRoleId:'', // 设置旧的角色的id scriptQuitCount: 0, // 主动退出剧本 scriptOperationType: '', // 剧本操作类型 - triggerFaultCount: 0, // 触发故障计数器 - triggerFaultDevice: '', // 触发故障目标设备 trainingStart: false, // 实训开始状态 notifySelected: null, // 场景弹窗内容 runPathList:[], // 运行线 (宁波三号线) @@ -306,10 +304,6 @@ const training = { setScriptOperationType: (state, scriptOperationType) => { state.scriptOperationType = scriptOperationType; }, - setTriggerFaultCount: (state, device) => { - state.triggerFaultCount++; - state.triggerFaultDevice = device; - }, setTrainingStart: (state, flag) => { state.trainingStart = flag; }, @@ -646,10 +640,6 @@ const training = { setScriptOperationType: ({ commit }, data) => { commit('setScriptOperationType', data); }, - /** 触发故障计数器 */ - setTriggerFaultCount: ({ commit }, device) => { - commit('setTriggerFaultCount', device); - }, /** 运行线 (宁波三号线) */ setRunPathSelected: ({ commit }, runPathList) => { commit('setRunPathSelected', runPathList); diff --git a/src/store/modules/trainingNew.js b/src/store/modules/trainingNew.js index 8a558a949..210444b43 100644 --- a/src/store/modules/trainingNew.js +++ b/src/store/modules/trainingNew.js @@ -16,10 +16,11 @@ const training = { scoringRules: [], // 当前实训评分规则 operateOrder: 0, // 操作order operateErrMsg: '', - scoreList: [], // 实训得分 draftStepList: null, // 显示的步骤列表 voiceStepList: [], // 实训特殊语音步骤列表 - voiceStepIndex: -1 + voiceStepIndex: -1, + examSwitch: false, // 考试开始结束标注 + stepRecord: [] // 操作记录 }, getters: { teachMode: (state) => { @@ -50,7 +51,7 @@ const training = { state.trainingSwitch = flag; state.stepInfo = {}; state.operateOrder = 0; - state.scoreList = []; + state.stepRecord = []; }, setTrainingOperate: (state, trainingOperate) => { state.trainingOperate = trainingOperate; @@ -75,6 +76,9 @@ const training = { }, setStepInfo: (state, stepInfo) => { state.stepInfo = state.stepList.find(step => step.id === stepInfo.stepId); + if (store.state.training.myMemberId == state.stepInfo.memberId) { + state.stepRecord.push({ stepId: state.stepInfo.id, success: false, clientOperations: [] }); + } Handler.judgeIsTextSendOperation(); }, clearStepInfo: (state, stepInfo) => { @@ -91,10 +95,7 @@ const training = { state.operateOrder = 0; state.operateErrMsg = ''; state.scoringRules = []; - state.scoreList = []; - }, - pushScoreList: (state, scoring) => { - state.scoreList.push(scoring); + state.stepRecord = []; }, editDraftStepList: (state, draftStepList) => { state.draftStepList = draftStepList; @@ -102,7 +103,6 @@ const training = { setVoiceStepList: (state, voiceStepList) => { state.voiceStepIndex = 0; state.voiceStepList = voiceStepList; - console.log(voiceStepList, state.voiceStepIndex); }, voiceStepIndexIncrease: (state) => { state.voiceStepIndex++; @@ -110,6 +110,21 @@ const training = { clearVoiceStepList: (state) => { state.voiceStepIndex = -1; state.voiceStepList = []; + }, + setExamSwitch: (state, flag) => { + state.examSwitch = flag; + }, + handleStepRecord: (state, { type, stepOperation }) => { + if (!state.stepRecord.length) { + return; + } + const step = state.stepRecord[state.stepRecord.length - 1]; + if (!step.clientOperations.length || step.clientOperations[step.clientOperations.length - 1].id !== stepOperation.id) { + step.clientOperations.push({ id: stepOperation.id }); + } + if (type === 'OVER') { + step.success = true; + } } }, actions: { @@ -172,9 +187,6 @@ const training = { clearTrainingData: ({ commit }) => { commit('clearTrainingData'); }, - pushScoreList: ({ commit }, scoring) => { - commit('pushScoreList', scoring); - }, editDraftStepList: ({ commit }, draftStepList) => { commit('editDraftStepList', draftStepList); }, @@ -188,22 +200,32 @@ const training = { commit('clearVoiceStepList'); }, handleMatchVoice: ({ commit }, info) => { + const stepOperation = Handler.getTrainingOperation(); if (info && info.content === 'true') { const rightMsg = {errMsg: LangStorage.getLang() === 'en' ? "Correct operation! That's great!" : '操作正确!真棒!', color: 'green'}; commit('setOperateErrMsg', rightMsg); if (Handler.isLastOperation()) { + store.dispatch('trainingNew/handleStepRecord', { type:'OVER', stepOperation }); Handler.nextStep(); commit('clearVoiceStepList'); } else { + store.dispatch('trainingNew/handleStepRecord', { type:'CONTINUE', stepOperation }); commit('clearVoiceStepList'); commit('operateOrderIncrease'); Handler.judgeIsTextSendOperation(); } } else if (info && info.content === 'false') { const errorMsg = {errMsg: LangStorage.getLang() === 'en' ? 'operation mistake!' : '操作错误!', color: 'red'}; + store.dispatch('trainingNew/handleStepRecord', { type:'ERROR', stepOperation }); commit('setOperateErrMsg', errorMsg); Handler.handleVoiceStepList(); } + }, + setExamSwitch: ({ commit }, flag) => { + commit('setExamSwitch', flag); + }, + handleStepRecord: ({ commit }, { type, stepOperation }) => { + commit('handleStepRecord', { type, stepOperation }); } } }; diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index f84210e59..d0b5c5a8d 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -37,7 +37,7 @@ export function handlerUrl() { // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 BASE_SITE = 'https://test.joylink.club/cbtc'; OSS_URL = 'https://192.168.3.233/oss-rtss'; - } else if (process.env.NODE_ENV === 'test' && process.env.VUE_APP_PRO === 'local-test') { + } else if (process.env.NODE_ENV === 'test' && process.env.VUE_APP_PRO === 'local-test') { // 本地打包测试分支 BASE_API = 'https://192.168.3.233/rtss-server'; // api地址 BASE_SITE = 'https://192.168.3.233/cbtc'; // 前端项目地址 diff --git a/src/utils/index.js b/src/utils/index.js index 72288aaa6..11660d8f4 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -75,7 +75,7 @@ export function getDomOffset(dom) { pol = dom.offsetLeft; } if (pot != dom.offsetTop) { - offsetTop += dom.offsetTop; + offsetTop += (dom.offsetTop - dom.scrollTop); pot = dom.offsetTop; } dom = dom.offsetParent; diff --git a/src/utils/simulation.js b/src/utils/simulation.js index 58dd673a1..bf9b156cc 100644 --- a/src/utils/simulation.js +++ b/src/utils/simulation.js @@ -15,7 +15,7 @@ export function covertMemberData (activeTrainList, resp) { lastData = JSON.parse(lastData); const lastMemberList = []; // const electricDispatcherList = []; - const deviceListData = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]; + const deviceListData = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]; const driverList = []; lastData.forEach((member, index)=>{ if (member.userId && member.userId == store.state.user.id) { @@ -37,7 +37,7 @@ export function covertMemberData (activeTrainList, resp) { member.label = member.type + name + userName; member.normalName = member.type + name; } - const deviceType = ['行调', '通号', '行值', '司机', '车辆段/停车场调度', '上级部门', '电力调度', '车辆段/停车场信号楼', '车站助理', '车站站长', '车站信号员', '车站客运员', '车站扳道员', '车站引导员', '车站工务工', '设备管理员', '车务段段长']; + const deviceType = ['行调', '通号', '行值', '司机', '车辆段/停车场调度', '上级部门', '电力调度', '车辆段/停车场信号楼', '车站助理', '车站站长', '车站信号员', '车站客运员', '车站扳道员', '车站引导员', '车站工务工', '设备管理员', '车务段段长', '电力工务']; /** * 车站助理 diff --git a/src/views/ibp/ibpsystem/index.vue b/src/views/ibp/ibpsystem/index.vue index 71e32ab5a..b712a2281 100644 --- a/src/views/ibp/ibpsystem/index.vue +++ b/src/views/ibp/ibpsystem/index.vue @@ -20,7 +20,6 @@ import Vue from 'vue'; import IbpPan from '@/ibp/ibpPan'; import { parser } from '@/ibp/utils/parser'; import { mapGetters } from 'vuex'; -import { handleIbpPress, handleIbpRelease } from '@/api/simulation'; import { IbpOperation } from '@/scripts/ConstDic'; import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp'; import { getToken } from '@/utils/auth'; @@ -29,6 +28,8 @@ import { getSimulationInfoNew, getIbpInitialState } from '@/api/simulation'; import BuzzerAudio from '@/assets/buzzer.mp3'; import { getStationList } from '@/api/runplan'; import { EventBus } from '@/scripts/event-bus'; +import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; +import CMD from '@/scripts/cmdPlugin/CommandEnum'; const pressedKeys = new Set(); export default { @@ -242,24 +243,74 @@ export default { onKeyboardAction(e) { if (this.preResetBtn) { if (e.type === 'keydown' && e.key === 'Control') { - pressedKeys.add(e.key); - this.preResetBtn.press(); - handleIbpPress(this.$route.query.group, this.stationCode, this.preResetBtn._code).catch(error => { this.$message.error(error.message); }); + // pressedKeys.add(e.key); + // this.preResetBtn.press(); + // handleIbpPress(this.$route.query.group, this.stationCode, this.preResetBtn._code).catch(error => { this.$message.error(error.message); }); + const operate = { + start: true, + send: true, + operation: OperationEvent.Ibp.buttonPressed.operation, + cmdType: CMD.IBP.CMD_IBP_PRESS_BUTTON, + param: { + stationCode: this.stationCode, + buttonCode: this.preResetBtn._code + } + }; + this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { + pressedKeys.add(e.key); + this.preResetBtn.press(); + }).catch(error => { this.$message.error(error.message); }); } else if (e.type === 'keyup' && e.key === 'Control') { - pressedKeys.delete(e.key); - this.preResetBtn.release(); - handleIbpRelease(this.$route.query.group, this.stationCode, this.preResetBtn._code).catch(error => { this.$message.error(error.message); }); + // pressedKeys.delete(e.key); + // this.preResetBtn.release(); + // handleIbpRelease(this.$route.query.group, this.stationCode, this.preResetBtn._code).catch(error => { this.$message.error(error.message); }); + const operate = { + start: true, + send: true, + operation: OperationEvent.Ibp.buttonRelease.operation, + cmdType: CMD.IBP.CMD_IBP_RELEASE_BUTTON, + param: { + stationCode: this.stationCode, + buttonCode: this.preResetBtn._code + } + }; + this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { + pressedKeys.delete(e.key); + this.preResetBtn.release(); + }).catch(error => { this.$message.error(error.message); }); } } }, onMouseDown(em) { if (['SquareButton', 'Key'].includes(em.deviceType)) { - handleIbpPress(this.$route.query.group, this.stationCode, em.deviceCode).catch(error => { this.$message.error(error.message); }); + const operate = { + start: true, + send: true, + operation: OperationEvent.Ibp.buttonPressed.operation, + cmdType: CMD.IBP.CMD_IBP_PRESS_BUTTON, + param: { + stationCode: this.stationCode, + buttonCode: em.deviceCode + } + }; + this.$store.dispatch('trainingNew/next', operate).catch(error => { this.$message.error(error.message); }); + // handleIbpPress(this.$route.query.group, this.stationCode, em.deviceCode).catch(error => { this.$message.error(error.message); }); } }, onMouseUp(em) { if (['SquareButton'].includes(em.deviceType)) { - handleIbpRelease(this.$route.query.group, this.stationCode, em.deviceCode).catch(error => { this.$message.error(error.message); }); + const operate = { + start: true, + send: true, + operation: OperationEvent.Ibp.buttonRelease.operation, + cmdType: CMD.IBP.CMD_IBP_RELEASE_BUTTON, + param: { + stationCode: this.stationCode, + buttonCode: em.deviceCode + } + }; + this.$store.dispatch('trainingNew/next', operate).catch(error => { this.$message.error(error.message); }); + // handleIbpRelease(this.$route.query.group, this.stationCode, em.deviceCode).catch(error => { this.$message.error(error.message); }); } }, // 右键点击事件 diff --git a/src/views/iscs/iscsSystemNew/stationConfig/iscsCanvas.vue b/src/views/iscs/iscsSystemNew/stationConfig/iscsCanvas.vue index b026f9661..9a169deef 100644 --- a/src/views/iscs/iscsSystemNew/stationConfig/iscsCanvas.vue +++ b/src/views/iscs/iscsSystemNew/stationConfig/iscsCanvas.vue @@ -47,6 +47,7 @@ export default { return ['iscs', (Math.random().toFixed(5)) * 100000].join('_'); } }, + watch: { '$store.state.iscs.alarmList': function(list) { if (list.length) { @@ -60,6 +61,9 @@ export default { document.querySelector('#teleRing').pause(); this.$store.commit('iscs/setCloseMusic', 0); } + }, + '$store.state.socket.iscsStateMessages': function (list) { + this.$store.dispatch('iscs/updateIscsState', list); } }, methods:{ diff --git a/src/views/iscs/iscsSystemNew/stationConfig/psdSystem.vue b/src/views/iscs/iscsSystemNew/stationConfig/psdSystem.vue index 5a4eadac7..3945f7d94 100644 --- a/src/views/iscs/iscsSystemNew/stationConfig/psdSystem.vue +++ b/src/views/iscs/iscsSystemNew/stationConfig/psdSystem.vue @@ -46,6 +46,12 @@ export default { } }, + watch: { + 'stationId': function (newVal, oldVal) { + this.clearSubscribe(oldVal); + this.subscribe(newVal); + } + }, beforeDestroy() { this.clearSubscribe(this.stationId); }, @@ -72,7 +78,6 @@ export default { viewLoaded() { }, subscribe(stationCode) { - this.clearSubscribe(); const header = { group: this.$route.query.group || '', 'X-Token': getToken() }; creatSubscribe(getTopic('ISCSPSD', this.$route.query.group, {stationCode} ), header); this.$store.dispatch('app/animationsClose'); diff --git a/src/views/newMap/chatView/chatBox.vue b/src/views/newMap/chatView/chatBox.vue index bdad46f2a..4315fbcba 100644 --- a/src/views/newMap/chatView/chatBox.vue +++ b/src/views/newMap/chatView/chatBox.vue @@ -397,6 +397,7 @@ export default { const stationWorker = {}; const deviceManager = {}; const trainMaster = {}; + const stationElectricWorker = {}; val.forEach(item => { const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode); this.memberData[item.id]['active'] = false; @@ -492,6 +493,13 @@ export default { this.memberData[item.id].labelName = '车务段段长-' + (item.name || ''); trainMaster[item.id] = this.memberData[item.id]; break; + case 'STATION_ELECTRIC_WORKER': + // + device.name + // + device.name + this.memberData[item.id].label = '电力工务-' + (item.name || ''); + this.memberData[item.id].labelName = '电力工务-' + (item.name || ''); + stationElectricWorker[item.id] = this.memberData[item.id]; + break; } }); // { label: '全部集中站', value: 'allConcentrateStation', active: false, sign: 'DEVICE_STATION' }, @@ -591,9 +599,16 @@ export default { }, { label: '车务段段长', - id: 'trainMaster', + id: 'stationElectricWorker', type: 'role', - children: trainMaster + children: stationElectricWorker + }, + { + + label: '电力工务', + id: 'stationElectricWorker', + type: 'role', + children: stationElectricWorker } ]; this.initCommonMemberList(); @@ -1152,6 +1167,7 @@ export default { const temStationWorkerList = []; const temDeviceManagerList = []; const temTrainMasterList = []; + const temStationElectricWorkerList = []; this.$store.state.training.memberList.forEach(item =>{ switch (item.type) { case 'DISPATCHER': @@ -1196,11 +1212,14 @@ export default { case 'TRAIN_MASTER': temTrainMasterList.push({memberId: item.id, connect:true }); break; + case 'STATION_ELECTRIC_WORKER': + temStationElectricWorkerList.push({memberId: item.id, connect:true }); + break; } }); this.commonMemberList = [...temDispatcherList, ...temStationSupervisorList, ...temMaintainerList, ...temDriverList, ...temDepotDispatcherList, ...temStationAssistList, ...temStationMasterList, ...temStationSignalerList, ...temStationPassengerList, ...temStationSwitchManList, - ...temStationFacilitatorList, ...temStationWorkerList, ...temDeviceManagerList, ...temTrainMasterList]; + ...temStationFacilitatorList, ...temStationWorkerList, ...temDeviceManagerList, ...temTrainMasterList, ...temStationElectricWorkerList]; if (this.userRole == 'AUDIENCE' || this.commonConversation) { this.conversitionMemberList = []; this.messageList = [...this.commonMessageList]; diff --git a/src/views/newMap/chatView/voiceChatBox.vue b/src/views/newMap/chatView/voiceChatBox.vue index 36f0cecaa..dfd30109b 100644 --- a/src/views/newMap/chatView/voiceChatBox.vue +++ b/src/views/newMap/chatView/voiceChatBox.vue @@ -54,7 +54,7 @@ import { getSimulationMemberList} from '@/api/simulation'; import { getUserListCommon } from '@/api/rtSimulation'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; -import {UserOperationType} from "../../../scripts/ConstDic"; +import {UserOperationType} from '../../../scripts/ConstDic'; export default { name: 'NewChatBox', components:{ @@ -307,6 +307,7 @@ export default { const stationWorker = {}; const deviceManager = {}; const trainMaster = {}; + const stationElectricWorker = {}; val.forEach(item => { const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode); this.memberData[item.id]['active'] = false; @@ -402,6 +403,11 @@ export default { this.memberData[item.id].labelName = '车务段段长-' + (item.name || ''); trainMaster[item.id] = this.memberData[item.id]; break; + case 'STATION_ELECTRIC_WORKER': + this.memberData[item.id].label = '电力工务' + (item.name || ''); + this.memberData[item.id].labelName = '电力工务' + (item.name || ''); + stationElectricWorker[item.id] = this.memberData[item.id]; + break; } }); // { label: '全部集中站', value: 'allConcentrateStation', active: false, sign: 'DEVICE_STATION' }, @@ -504,6 +510,12 @@ export default { id: 'trainMaster', type: 'role', children: trainMaster + }, + { + label: '电力工务', + id: 'stationElectricWorker', + type: 'role', + children: stationElectricWorker } ]; this.initCommonMemberList(); @@ -909,6 +921,7 @@ export default { const temStationWorkerList = []; const temDeviceManagerList = []; const temTrainMasterList = []; + const temStationElectricWorkerList = []; this.$store.state.training.memberList.forEach(item =>{ switch (item.type) { case 'DISPATCHER': @@ -953,11 +966,15 @@ export default { case 'TRAIN_MASTER': temTrainMasterList.push({memberId: item.id, connect:true }); break; + case 'STATION_ELECTRIC_WORKER': + temStationElectricWorkerList.push({memberId: item.id, connect:true }); + break; + } }); this.commonMemberList = [...temDispatcherList, ...temStationSupervisorList, ...temMaintainerList, ...temDriverList, ...temDepotDispatcherList, ...temStationAssistList, ...temStationMasterList, ...temStationSignalerList, ...temStationPassengerList, ...temStationSwitchManList, - ...temStationFacilitatorList, ...temStationWorkerList, ...temDeviceManagerList, ...temTrainMasterList]; + ...temStationFacilitatorList, ...temStationWorkerList, ...temDeviceManagerList, ...temTrainMasterList, ...temStationElectricWorkerList]; if (this.userRole == 'AUDIENCE' || this.commonConversation) { this.conversitionMemberList = []; this.messageList = [...this.commonMessageList]; diff --git a/src/views/newMap/display/chatBox.vue b/src/views/newMap/display/chatBox.vue index 1047707fd..ef4748c62 100644 --- a/src/views/newMap/display/chatBox.vue +++ b/src/views/newMap/display/chatBox.vue @@ -128,7 +128,7 @@ export default { methods: { scrollTop() { this.$nextTick(() => { - const scrollTop = this.messageList.length * 65 - 250; + const scrollTop = this.messageList.length * 62; document.querySelector('.chat-box-content').scrollTop = scrollTop; }); }, @@ -146,6 +146,9 @@ export default { playAllAudio() { this.$nextTick(function() { this.currentMessage = this.currentAudioList.shift(); + if (this.currentMessage.type === 'Text') { + return; + } document.querySelector('#audioPlay').src = this.currentMessage.audioPath; document.querySelector('#audioPlay').play(); this.$set(this.currentMessage, 'activeAuto', true); diff --git a/src/views/newMap/display/exam/examPanel.vue b/src/views/newMap/display/exam/examPanel.vue index d8b315428..b959ecd4b 100644 --- a/src/views/newMap/display/exam/examPanel.vue +++ b/src/views/newMap/display/exam/examPanel.vue @@ -35,7 +35,9 @@ v-for="(question, index) in questionList[1]" :key="index" class="item training" - :class="{ current: currentQuestionIndex === index && currentQuestionType === 2 }" + :class="{ current: currentQuestionIndex === index && currentQuestionType === 2, + submited: questionStateList[1][index] + }" @click="questionSelect(index, 2)" > {{ index + 1 }} @@ -63,7 +65,10 @@ + + diff --git a/src/views/newMap/display/terminals/abnormalTrain/index.vue b/src/views/newMap/display/terminals/abnormalTrain/index.vue new file mode 100644 index 000000000..f2bc7929c --- /dev/null +++ b/src/views/newMap/display/terminals/abnormalTrain/index.vue @@ -0,0 +1,110 @@ + + + + + diff --git a/src/views/newMap/display/terminals/dispatchCmd.vue b/src/views/newMap/display/terminals/dispatchCmd.vue index 1d01736ad..3e8d9ae7e 100644 --- a/src/views/newMap/display/terminals/dispatchCmd.vue +++ b/src/views/newMap/display/terminals/dispatchCmd.vue @@ -381,7 +381,7 @@
- + @@ -409,9 +409,88 @@
- +
- 常用词汇 +
+ + +
+
{{ item.name }}
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ 查找机车 +
+
+
+
+
+ + + + + + + + + + + + + + + + + + +
+
+ 增加 + 代签 + 删除 +
+
+
@@ -430,8 +509,11 @@ export default { operateTableHeight: 100, searchTableHeight: 260, tableHeight: 200, + trainTableHeight: 200, activeTab: 'operate', cmdTab: 'cmd', + wordTab: 'word', + wirelessTab: 'wireless', textTab: 'text', typeObj: { Normal: '普通调度命令', @@ -527,7 +609,16 @@ export default { { value: '', label: '全部'}, { value: true, label: '只显示签收完成的'}, { value: false, label: '只显示未签收完成的'} - ] + ], + wirelessObj: { + type: 'dispatchCmd', + transStationCode: '', + trainNum: '', + code: '' + }, + trainRow: null, + trainTableData: [], + permissionWireless: false }; }, computed: { @@ -559,6 +650,14 @@ export default { } return s; }, + disabledTrainAllograph() { + let s = false; + const sArr = ['Sent', 'Received', 'SrmReceived']; + if (!this.trainRow || !sArr.includes(this.getCurrentState(this.trainRow).state)) { + s = true; + } + return s; + }, typeOptions() { const list = []; Object.keys(this.typeObj).forEach(item => { @@ -613,6 +712,11 @@ export default { }, DisStationId() { return this.getActiveSender.deviceCode ? this.getActiveSender.deviceCode : ''; + }, + transStationOption() { + // const list = [...this.getTableData, {code:'', name: 'GSM-R系统'}]; + const list = [...this.getTableData]; + return list; } }, watch: { @@ -633,10 +737,12 @@ export default { this.getOperateTableHeight(); this.getSearchTableHeight(); this.getTableHeight(); + this.getTrainTableHeight(); }, '$store.state.socket.simulationReset': function (val) { this.queryResData = {}; this.$store.dispatch('socket/setDispatchCommandState', null); + this.initData(); } }, beforeDestroy() {}, @@ -649,8 +755,180 @@ export default { this.getOperateTableHeight(); this.getSearchTableHeight(); this.getTableHeight(); + this.getTrainTableHeight(); }, methods:{ + trainAllographCmd() { + if (!this.trainRow) { return; } + const test = `将为【${this.trainRow.trainNum}】次列车,代签 无线调度命令`; + const messageData = [test]; + const h = this.$createElement; + messageData.push(h('p', null, '代签之前,请务必与本次列车司机联系确认!')); + messageData.push(h('p', null, '您确定要进行【无线调度命令 代签】操作吗?')); + this.$confirm('提示', { + title: '无线代签操作提示', + message: h('div', null, messageData), + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + console.log('无线受令代签'); + const rcId = this.getRcId(this.trainRow.code); + const params = {cmdId: this.command.cmdId, rcId: rcId, proxySign: true}; + const operate = { + operation: this.getDomObj('trainAllographCmd').operation, + param: params, + userOperationType: UserOperationType.LEFTCLICK + }; + this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => { + if (valid) { + sendCommandNew(this.group, 'CTC_SIGN_DIS_COMMAND', params).then((res) => { + console.log(res, '---res'); + this.$message.success('无线受令代签成功!'); + this.searchCmd(); + this.initData(); + }).catch(error => { + this.$messageBox('无线受令代签令失败:' + error.message); + }); + } + }); + }).catch((err) => { + console.log('取消无线受令代签', err); + }); + }, + getRcId(val) { + let id = ''; + const find = this.command.rcvCompanies.find(item => { + return item.code == val; + }); + if (find && find.id) { + id = find.id; + } + return id; + }, + getTransStationName(code) { + let name = ''; + const find = this.transStationOption.find(item => { + return item.code == code; + }); + if (find) { + name = find.name; + } + return name; + }, + permissionAdd() { + if (this.permissionWireless) { return; } + const operate = { + operation: this.getDomObj('permissionAddWireless').operation, + userOperationType: UserOperationType.LEFTCLICK + }; + this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { + if (valid) { + this.permissionWireless = true; + this.initWirelessData(); + } + }); + }, + initWirelessData() { + this.wirelessObj = { + ...this.resetWirelessData() + }; + this.trainRow = null; + this.trainTableData = []; + }, + resetWirelessData() { + return { + type: 'dispatchCmd', + transStationCode: '', + trainNum: '', + code: '' + }; + }, + findTrainToTable() { + if (!this.wirelessObj.trainNum) { + this.$messageBox('请选择车次号'); + return; + } + const operate = { + operation: this.getDomObj('findTrain').operation, + param: {...this.wirelessObj}, + userOperationType: UserOperationType.LEFTCLICK + }; + this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { + if (valid) { + sendCommandNew(this.group, 'Train_Query_Trip_Number_Online_Train', {tripNumber: this.wirelessObj.trainNum}).then((res) => { + const code = res.data; + this.wirelessObj.code = code; + const obj = { + name: '', + code: code, + cpType: 'Train', + rsCompany: true, + trainViaGsmR: !this.wirelessObj.transStationCode, + trainNum: this.wirelessObj.trainNum, + transStationCode: this.wirelessObj.transStationCode + }; + const index = this.trainTableData.findIndex(item => { + return item.code == code; + }); + if (index >= 0) { + this.trainTableData.splice(index, 1, obj); + } else { + this.trainTableData.push(obj); + } + const rcIndex = this.command.rcvCompanies.findIndex(item => { + return item.code == code; + }); + if (rcIndex >= 0) { + this.command.rcvCompanies.splice(rcIndex, 1, obj); + } else { + this.command.rcvCompanies.push(obj); + } + }).catch(error => { + this.$messageBox('查找机车失败:' + error.message); + }); + } + }); + }, + deleteTrainTable() { + const operate = { + operation: this.getDomObj('deleteTrainTable').operation, + param: this.trainRow, + userOperationType: UserOperationType.LEFTCLICK + }; + this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { + if (valid) { + const index = this.trainTableData.findIndex(item => { + return item == this.trainRow; + }); + if (index >= 0) { + this.trainTableData.splice(index, 1); + } + const rcIndex = this.command.rcvCompanies.findIndex(item => { + return item == this.trainRow; + }); + if (index >= 0) { + this.command.rcvCompanies.splice(rcIndex, 1); + } + this.trainRow = null; + } + }); + }, + trainTableRowChange(row) { + this.trainRow = row; + this.setCurrentRow(row, 'table6'); + }, + getTrainTableHeight() { + const allH = this.$store.state.app.height; + const rightTopH = 241; + const fH = 160; + const tabHeardH = 29; + const paddingH = 10; + const btnH = 40; + let h = allH - rightTopH - fH - tabHeardH - paddingH - btnH; + h = h > 0 ? h : 0; + this.trainTableHeight = h; + }, getDomObj(key) { return OperationEvent.DispatchCmd.menuButton[key]; }, @@ -750,9 +1028,9 @@ export default { } }); } - if (state == 'Signed') { - console.log(list, 'list'); - } + // if (state == 'Signed') { + // console.log(list, 'list'); + // } return list.reverse(); }, findDisCmdObj(obj, val) { @@ -834,7 +1112,7 @@ export default { return status; }, setCurrentRow(obj, refName) { - const tableArr = ['table', 'table1', 'table2', 'table3', 'table4', 'table5']; + const tableArr = ['table', 'table1', 'table2', 'table3', 'table4', 'table5', 'table6']; tableArr.forEach(key => { if (key != refName) { this.$refs[key] && this.$refs[key].setCurrentRow(); @@ -853,12 +1131,20 @@ export default { }); this.setCurrentRow(obj, refName); this.$refs.table.clearSelection(); + this.initWirelessData(); const infoList = this.command.rcvCompanies || []; infoList.forEach(item => { - const findObj = this.getTableData.find(ii => { - return ii.code == item.code; - }); - findObj && this.$refs.table.toggleRowSelection(findObj, true); + if (item.cpType == 'Train') { + this.trainTableData.push(item); + if (refName == 'table1') { + this.permissionWireless = true; + } + } else { + const findObj = this.getTableData.find(ii => { + return ii.code == item.code; + }); + findObj && this.$refs.table.toggleRowSelection(findObj, true); + } }); }, getSignedBy(info) { @@ -994,6 +1280,8 @@ export default { this.command = { ...this.resetData() }; + this.initWirelessData(); + this.permissionWireless = false; // this.currentInfo = {}; this.$refs.table && this.$refs.table.clearSelection(); this.$refs.form && this.$refs.form.resetFields(); @@ -1036,17 +1324,21 @@ export default { console.log('tabClick'); }, selectionChange(selection) { - const arr = []; selection.forEach(item => { - arr.push({ - name: item.name, - rsCompany: true, - cpType: item.cpType, - code: item.code, - ...item + const find = this.command.rcvCompanies.find(every => { + return item.code == every.code; }); + if (!find) { + const obj = { + name: item.name, + rsCompany: true, + cpType: item.cpType, + code: item.code, + ...item + }; + this.command.rcvCompanies.push(obj); + } }); - this.command.rcvCompanies = arr; }, getCompanyIdList(sum) { return new Promise((resolve, reject) => { @@ -1129,7 +1421,8 @@ export default { type: 'warning' }).then(() => { console.log('代签'); - const params = {cmdId: this.command.cmdId, rcId: this.allographRow.cpId, proxySign: true}; + const rcId = this.getRcId(this.allographRow.code); + const params = {cmdId: this.command.cmdId, rcId: rcId, proxySign: true}; const operate = { operation: this.getDomObj('allographCmd').operation, param: params, @@ -1147,8 +1440,8 @@ export default { }); } }); - }).catch(() => { - console.log('取消代签'); + }).catch((err) => { + console.log('取消代签', err); }); }, sendCmd() { @@ -1156,7 +1449,8 @@ export default { const messageData = [test]; const h = this.$createElement; this.command.rcvCompanies.forEach((item, index) => { - const msg = `${index + 1}. ${item.name || ''}`; + const txtTrainNum = item.trainNum ? item.trainNum + '车次' : ''; + const msg = `${index + 1}. ${item.name || ''} ${txtTrainNum}`; messageData.push(h('p', null, msg)); }); this.$confirm('提示', { @@ -1306,7 +1600,7 @@ export default { content: ""; position: absolute; } - .middle, .left { + .middle, .left, .right { .middle-padding { padding-right: 5px; } @@ -1328,6 +1622,19 @@ export default { align-items: center; } } + .right { + height: 100%; + .right-top { + .word-box { + padding: 5px; + height: 200px; + overflow: auto; + } + } + .wirelessTab-footer { + height: 40px; + } + } } diff --git a/src/views/newMap/display/terminals/equipmentConstructionTable.vue b/src/views/newMap/display/terminals/equipmentConstructionTable.vue new file mode 100644 index 000000000..c15b65a48 --- /dev/null +++ b/src/views/newMap/display/terminals/equipmentConstructionTable.vue @@ -0,0 +1,265 @@ + + + diff --git a/src/views/newMap/display/terminals/floodControlSafetyTable/controlTable.vue b/src/views/newMap/display/terminals/floodControlSafetyTable/controlTable.vue new file mode 100644 index 000000000..49fb3abcf --- /dev/null +++ b/src/views/newMap/display/terminals/floodControlSafetyTable/controlTable.vue @@ -0,0 +1,398 @@ + + + + + diff --git a/src/views/newMap/display/terminals/floodControlSafetyTable/index.vue b/src/views/newMap/display/terminals/floodControlSafetyTable/index.vue new file mode 100644 index 000000000..b47454e05 --- /dev/null +++ b/src/views/newMap/display/terminals/floodControlSafetyTable/index.vue @@ -0,0 +1,110 @@ + + + + + diff --git a/src/views/newMap/display/terminals/index.vue b/src/views/newMap/display/terminals/index.vue index 9e61dea1c..749df5fdc 100644 --- a/src/views/newMap/display/terminals/index.vue +++ b/src/views/newMap/display/terminals/index.vue @@ -34,6 +34,8 @@ + +
PSL
- +
-
+
禁止
允许
-
+
禁止
-
+
开门按钮
-
+
关门按钮
-
+
试灯按钮
import icons from '@/assets/psl_images/psl_icons'; -import { getPslStatus, pressPslButton } from '@/api/simulation'; +import { getPslStatus } from '@/api/simulation'; import {mapGetters} from 'vuex'; +import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; +import CMD from '@/scripts/cmdPlugin/CommandEnum'; export default { name: 'PSL', data() { @@ -112,6 +114,9 @@ export default { ]), group() { return this.$route.query.group; + }, + psl() { + return OperationEvent.Psl; } }, watch: { @@ -147,9 +152,23 @@ export default { this.indicators = resp.data; } }) - .catch(err => {}); + .catch(() => {}); + }, + standCodeChange(val) { + const operate = { + start: true, + over: true, + operation: OperationEvent.Psl.standChange.change.operation, + param: { + standCode: val + } + }; + this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { + if (valid) { + this.initData(this.group, this.standCode); + } + }); }, - doClose() { this.loading = false; this.dialogShow = false; @@ -159,7 +178,25 @@ export default { return status !== undefined ? icons[`${type}_${status}`] : icons[type]; }, btnClickHandler(btnType) { - pressPslButton(this.group, this.standCode, btnType); + const operationMap = { + YXJZ: this.psl.pslOperation.turn.operation, + HSJC: this.psl.hsjcOperation.turn.operation, + KM: this.psl.openDoor.button.operation, + GM: this.psl.closeDoor.button.operation, + SD: this.psl.testLamp.button.operation + }; + const operate = { + start: true, + send: true, + operation: operationMap[btnType], + cmdType: CMD.PSL.CMD_PSL_PRESS_BUTTON, + param: { + standCode: this.standCode, + button: btnType + } + }; + this.$store.dispatch('trainingNew/next', operate); + // pressPslButton(this.group, this.standCode, btnType); } } }; diff --git a/src/views/newMap/display/terminals/registerBook.vue b/src/views/newMap/display/terminals/registerBook.vue index 091eb2b48..1080e4c1f 100644 --- a/src/views/newMap/display/terminals/registerBook.vue +++ b/src/views/newMap/display/terminals/registerBook.vue @@ -1,124 +1,168 @@ - - diff --git a/src/views/newMap/trainTicket/greenLicence.vue b/src/views/newMap/trainTicket/greenLicence.vue deleted file mode 100644 index 74e91c188..000000000 --- a/src/views/newMap/trainTicket/greenLicence.vue +++ /dev/null @@ -1,91 +0,0 @@ - - - - - diff --git a/src/views/newMap/trainTicket/index.vue b/src/views/newMap/trainTicket/index.vue deleted file mode 100644 index 338b950f4..000000000 --- a/src/views/newMap/trainTicket/index.vue +++ /dev/null @@ -1,342 +0,0 @@ - - - - - diff --git a/src/views/newMap/trainTicket/redLicence.vue b/src/views/newMap/trainTicket/redLicence.vue deleted file mode 100644 index b7db04b4b..000000000 --- a/src/views/newMap/trainTicket/redLicence.vue +++ /dev/null @@ -1,119 +0,0 @@ - - - - - diff --git a/src/views/newMap/trainTicket/ticketInfo.vue b/src/views/newMap/trainTicket/ticketInfo.vue deleted file mode 100644 index 3cf6d53a3..000000000 --- a/src/views/newMap/trainTicket/ticketInfo.vue +++ /dev/null @@ -1,90 +0,0 @@ - - - - - diff --git a/src/views/newMap/trainTicket/trainTicket.vue b/src/views/newMap/trainTicket/trainTicket.vue deleted file mode 100644 index e1f159717..000000000 --- a/src/views/newMap/trainTicket/trainTicket.vue +++ /dev/null @@ -1,95 +0,0 @@ - - - - - diff --git a/src/views/organization/classManage/studentManage/createStudent.vue b/src/views/organization/classManage/studentManage/createStudent.vue index f1e2d48a9..260c00003 100644 --- a/src/views/organization/classManage/studentManage/createStudent.vue +++ b/src/views/organization/classManage/studentManage/createStudent.vue @@ -1,12 +1,19 @@