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 fa3aaac91..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) { @@ -349,6 +349,15 @@ export function simulationLoadRunPlan(group, templateId) { method: 'put' }); } + +/** 仿真里加载草稿运行图 */ +export function simulationLoadDraftRunPlan(group, draftRunPlanId) { + return request({ + url:`/simulation/${group}/load/draftRunPlan/${draftRunPlanId} `, + method: 'put' + }); +} + /** 根据车次号获取列车信息 */ export function getTrainDetailBytripNumber(group, params) { return request({ 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/map.js b/src/jmapNew/map.js index 6f2a12293..dd6ec8207 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -437,6 +437,7 @@ class Jlmap { this.$painter.$transformHandle.revisibleAll(); } updatePicture(list = []) { + const trainList = []; list.forEach(item => { const device = this.mapDevice[item]; if (device && device._type !== deviceType.Switch && device._type !== deviceType.Train) { @@ -450,8 +451,13 @@ class Jlmap { this.$painter.updatePicture(this.mapDevice[device.switch.code]); } } catch (e) { console.error(e); } + } else if (device._type === deviceType.Train) { + trainList.push(device); } }); + trainList.forEach(device => { + this.$painter.update(device); + }); } handleResetPoint(points) { return (points[points.length - 1].x >= points[0].x); 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/theme/chengdu_03/menus/dialog/routeHandControl.vue b/src/jmapNew/theme/chengdu_03/menus/dialog/routeHandControl.vue index 09860a94d..0cf0bb291 100644 --- a/src/jmapNew/theme/chengdu_03/menus/dialog/routeHandControl.vue +++ b/src/jmapNew/theme/chengdu_03/menus/dialog/routeHandControl.vue @@ -252,7 +252,7 @@ export default { }, cancel() { const operate = { - over: true, + userOperationType: UserOperationType.LEFTCLICK, operation: OperationEvent.Command.cancel.menu.operation }; diff --git a/src/jmapNew/theme/components/menus/dialog/cmdManage.vue b/src/jmapNew/theme/components/menus/dialog/cmdManage.vue index bfde97fa5..8b3e1f03a 100644 --- a/src/jmapNew/theme/components/menus/dialog/cmdManage.vue +++ b/src/jmapNew/theme/components/menus/dialog/cmdManage.vue @@ -210,7 +210,7 @@ export default { } }, dispatchCommandState(obj) { - Object.values(obj.cpStateMap).forEach(item => { + obj && Object.values(obj.cpStateMap).forEach(item => { if (item.cpId) { if (!this.queryResData.companyStateMap) { this.queryResData.companyStateMap = {}; @@ -218,6 +218,9 @@ export default { this.$set(this.queryResData.companyStateMap, item.cpId, item); } }); + }, + '$store.state.socket.simulationReset':function(val) { + this.cmdTableData = []; } }, beforeDestroy() {}, diff --git a/src/jmapNew/theme/components/menus/dialog/setFault.vue b/src/jmapNew/theme/components/menus/dialog/setFault.vue index 661e9dc9b..289f082d6 100644 --- a/src/jmapNew/theme/components/menus/dialog/setFault.vue +++ b/src/jmapNew/theme/components/menus/dialog/setFault.vue @@ -329,7 +329,9 @@ export default { } else if (this.operation == OperationEvent.MixinCommand.cancelStoppage.menu.operation) { this.cancelCommand(); } else if (this.operation == OperationEvent.MixinCommand.collocation.menu.operation) { - this.handleCollocation(); + this.handleTrainDrive(); + } else if (this.operation == OperationEvent.MixinCommand.trainDrive.menu.operation) { + this.handleTrainDrive(); } } }); @@ -362,11 +364,11 @@ export default { } this.sendCommand(setp); }, - handleCollocation() { // 设置托管 + handleTrainDrive() { // 机器人司机模拟驾驶 const setp = { over: true, - operation: menuOperate.Common.collocation.operation, - cmdType: menuOperate.Common.collocation.cmdType, + operation: menuOperate.Common.trainDrive.operation, + cmdType: menuOperate.Common.trainDrive.cmdType, param: { groupNumber: this.groupNumber, param: { @@ -378,6 +380,22 @@ export default { }; this.sendCommand(setp); }, + // handleCollocation() { // 设置托管 + // const setp = { + // over: true, + // operation: menuOperate.Common.collocation.operation, + // cmdType: menuOperate.Common.collocation.cmdType, + // param: { + // groupNumber: this.groupNumber, + // param: { + // speedLimit: this.formModel.speedLimit, + // through: this.formModel.through, + // targetDeviceCode: this.formModel.targetDeviceCode + // } + // } + // }; + // this.sendCommand(setp); + // }, sendCommand(setp) { this.loading = true; this.$store.dispatch('trainingNew/next', setp).then(({ valid }) => { 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..ac559ac93 --- /dev/null +++ b/src/jmapNew/theme/components/menus/menuTrain.vue @@ -0,0 +1,103 @@ + + diff --git a/src/jmapNew/theme/components/utils/menuOperate.js b/src/jmapNew/theme/components/utils/menuOperate.js index d9b244b3d..5ba4bef97 100644 --- a/src/jmapNew/theme/components/utils/menuOperate.js +++ b/src/jmapNew/theme/components/utils/menuOperate.js @@ -415,6 +415,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, @@ -901,6 +906,16 @@ 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 } }, Conversation: { diff --git a/src/jmapNew/theme/datie_01/menus/dialog/routeHandControl.vue b/src/jmapNew/theme/datie_01/menus/dialog/routeHandControl.vue index 09860a94d..e63f62c8e 100644 --- a/src/jmapNew/theme/datie_01/menus/dialog/routeHandControl.vue +++ b/src/jmapNew/theme/datie_01/menus/dialog/routeHandControl.vue @@ -61,6 +61,7 @@ + + + diff --git a/src/views/newMap/display/chatBox.vue b/src/views/newMap/display/chatBox.vue index 62fe02706..1b1d8a365 100644 --- a/src/views/newMap/display/chatBox.vue +++ b/src/views/newMap/display/chatBox.vue @@ -10,7 +10,7 @@
-
+
{{ covertName(content.memberId) }}
@@ -101,8 +101,10 @@ export default { } }, watch: { - '$store.state.socket.simulationReset': function () { // 仿真重置 - this.messageList = []; + '$store.state.socket.simulationReset': function (val) { // 仿真重置 + if (val) { + this.messageList = []; + } }, '$store.state.training.domConfig': function(val) { this.trainingDesign = val.trainingDesign; @@ -144,8 +146,13 @@ export default { playAllAudio() { this.$nextTick(function() { this.currentMessage = this.currentAudioList.shift(); + console.log(this.currentMessage, '************'); + if (this.currentMessage.type === 'Text') { + return; + } document.querySelector('#audioPlay').src = this.currentMessage.audioPath; document.querySelector('#audioPlay').play(); + console.log(document.querySelector('#audioPlay'), '--------------'); this.$set(this.currentMessage, 'activeAuto', true); this.play = true; document.querySelector('#audioPlay').onended = () => { @@ -454,6 +461,7 @@ export default { top: 0; border-radius: 50%; } +.eachChatContent{width: 100%;min-height: 65px;display:inline-block;} .chat-box-footer-send.disbled{ cursor: no-drop; } diff --git a/src/views/newMap/display/exam/examPanel.vue b/src/views/newMap/display/exam/examPanel.vue index ad437ab25..2e50d5c5a 100644 --- a/src/views/newMap/display/exam/examPanel.vue +++ b/src/views/newMap/display/exam/examPanel.vue @@ -1,10 +1,10 @@ diff --git a/src/views/newMap/display/memberManage/membersManage.vue b/src/views/newMap/display/memberManage/membersManage.vue index dcb79cc85..4d20055ca 100644 --- a/src/views/newMap/display/memberManage/membersManage.vue +++ b/src/views/newMap/display/memberManage/membersManage.vue @@ -189,6 +189,7 @@ export default { const stationWorkerList = []; const deviceManagerList = []; const trainMasterList = []; + const stationElectricWorkerList = []; val.forEach(item => { const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode); switch (item.type) { @@ -260,6 +261,10 @@ export default { case 'PARENT_DEPARTMENT': this.memberData[item.id].labelName = '上级部门' + (item.name ? `-${item.name }` : ''); break; + case 'STATION_ELECTRIC_WORKER': + this.memberData[item.id].labelName = '电力工务' + (item.name || ''); + stationElectricWorkerList.push(this.memberData[item.id]); + break; // DEVICE_MANAGER:'设备管理员' deviceManager } }); @@ -335,6 +340,11 @@ export default { labelName: '车务段段长 ', id: 'trainMaster', children: trainMasterList + }, + { + labelName: '电力工务 ', + id: 'stationElectricWorker', + children: stationElectricWorkerList } ]; EventBus.$emit('trainTicketMember', [...stationSupervisorList, ...stationAssistantList]); diff --git a/src/views/newMap/display/simulationMenu/simulationMenu.vue b/src/views/newMap/display/simulationMenu/simulationMenu.vue index 09609c718..fdfd2bc95 100644 --- a/src/views/newMap/display/simulationMenu/simulationMenu.vue +++ b/src/views/newMap/display/simulationMenu/simulationMenu.vue @@ -67,8 +67,16 @@ export default { { label: '切换客流数据', name: 'changeFlowData', click: this.changeFlowData, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasLpf && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } }, { label: '成员管理', name: 'memberManage', click: this.memberManage, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasMemberManage && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } }, { label: '考试', name: 'exam', click: this.goExam, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasExam && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } }, - { label: '按计划行车', name: 'drivingPlan', click: this.drivingPlan, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; }, isShow: () => { return this.$store.state.training.simulationUserType === SimulationUserType.TEACHER && this.$route.query.client !== 'diagramEdit'; } }, - { label: '初始化', name: 'initialize', click: this.initializeSim, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; }, isShow: () => { return this.$store.state.training.simulationUserType === SimulationUserType.TEACHER && this.$route.query.client !== 'diagramEdit'; } }, + { label: '按计划行车', name: 'drivingPlan', click: this.drivingPlan, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; }, + isShow: () => { + return this.$store.state.training.simulationUserType === SimulationUserType.TEACHER && + (this.$route.query.client !== 'diagramEdit' || (this.$route.query.client == 'diagramEdit' && this.$store.state.map.picture == 'testRunplan')); + } }, + { label: '初始化', name: 'initialize', click: this.initializeSim, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; }, + isShow: () => { + return this.$store.state.training.simulationUserType === SimulationUserType.TEACHER && + (this.$route.query.client !== 'diagramEdit' || (this.$route.query.client == 'diagramEdit' && this.$store.state.map.picture == 'testRunplan')); + } }, { label: '退出', name: 'quit', click: this.exitSim, isDisabled: () => { return false; }, isShow: () => { return true; } } ] }; @@ -94,6 +102,11 @@ export default { '$store.state.training.simulationUserType': function (val) { this.handleMenuShow(); }, + '$store.state.map.picture': function (val) { + if (val == 'testRunplan') { + this.handleMenuShow(); + } + }, '$store.state.socket.simulationOver':function(val) { this.back(); }, @@ -211,6 +224,7 @@ export default { this.$store.dispatch('map/resetActiveTrainList', false); this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/initSimulationButton'); + this.$store.dispatch('socket/clearDispatchCommandMsg'); // 清除调度命令 }); }).catch(() => { this.loading = false; diff --git a/src/views/newMap/display/stationDiagram/jlmap/index.vue b/src/views/newMap/display/stationDiagram/jlmap/index.vue index 92a4928f4..a5df3665a 100644 --- a/src/views/newMap/display/stationDiagram/jlmap/index.vue +++ b/src/views/newMap/display/stationDiagram/jlmap/index.vue @@ -112,11 +112,11 @@ export default { $route() { this.mapViewLoaded(true); }, - '$store.state.socket.simulationReset': function (val) { // 仿真结束标识 - if (val) { - this.simulationReset(val); - } - }, + // '$store.state.socket.simulationReset': function (val) { // 仿真结束标识 + // if (val) { + // this.simulationReset(val); + // } + // }, '$store.state.training.rezoomCount': function () { let code = this.$store.state.training.offsetStationCode; // 偏移集中站坐标 if (code && code.includes('Cycle')) { // 单独处理 自动折返 @@ -283,14 +283,14 @@ export default { break; } }, - simulationReset() { - this.$store.dispatch('socket/setSimulationStart');// 设置仿真状态-结束 - this.$store.dispatch('map/initClearTrainData'); // 清除战场图列车显示 - this.$store.dispatch('map/setTrainWindowShow', false); // 结束清除车次窗显示 - this.$store.dispatch('training/over'); // 设置实训状态-结束 - this.$store.dispatch('map/resetActiveTrainList'); // 清除活动列车列表 - this.$store.dispatch('training/setMapDefaultState'); // 设置默认状态 - }, + // simulationReset() { + // this.$store.dispatch('socket/setSimulationStart');// 设置仿真状态-结束 + // this.$store.dispatch('map/initClearTrainData'); // 清除战场图列车显示 + // this.$store.dispatch('map/setTrainWindowShow', false); // 结束清除车次窗显示 + // this.$store.dispatch('training/over'); // 设置实训状态-结束 + // this.$store.dispatch('map/resetActiveTrainList'); // 清除活动列车列表 + // this.$store.dispatch('training/setMapDefaultState'); // 设置默认状态 + // }, // 视图缩放事件 onDataZoom(dataZoom) { this.dataZoom.offsetX = dataZoom.offsetX.toFixed(1) + ''; diff --git a/src/views/newMap/display/terminals/abnormalTrain/controlTable.vue b/src/views/newMap/display/terminals/abnormalTrain/controlTable.vue new file mode 100644 index 000000000..115fbdc8e --- /dev/null +++ b/src/views/newMap/display/terminals/abnormalTrain/controlTable.vue @@ -0,0 +1,365 @@ + + + + + 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/diagramEdit/components/routingoperate/routeMap.vue b/src/views/newMap/display/terminals/diagramEdit/components/routingoperate/routeMap.vue index f250fd50b..e98f2c255 100644 --- a/src/views/newMap/display/terminals/diagramEdit/components/routingoperate/routeMap.vue +++ b/src/views/newMap/display/terminals/diagramEdit/components/routingoperate/routeMap.vue @@ -4,7 +4,7 @@
- +
@@ -113,7 +113,6 @@ export default { width = this.$store.state.app.width - 500; } else { width = this.$store.state.app.width * 0.7; - } const height = this.$store.state.app.height - 49; this.$store.dispatch('config/resize', { width, height }); diff --git a/src/views/newMap/display/terminals/diagramEdit/index.vue b/src/views/newMap/display/terminals/diagramEdit/index.vue index bbf374dc7..c58c8fff3 100644 --- a/src/views/newMap/display/terminals/diagramEdit/index.vue +++ b/src/views/newMap/display/terminals/diagramEdit/index.vue @@ -10,6 +10,7 @@ @loadingRunPlan="loadingRunPlan" @modifyRunPlanName="modifyRunPlanName" @refresh="refreshRunPlanList" + @pictureChange="pictureChange" @refreshData="refresh" /> @@ -90,6 +91,12 @@ export default { MovePlaningTrain, CreateEmptyPlan }, + props:{ + planId: { + type: String, + required: true + } + }, data() { return { PlanParser: {}, @@ -117,6 +124,10 @@ export default { this.refreshRunPlanList(true); generateRunPlanInfoSync(this.$route.query.mapId); } + if (this.planId) { + this.loadRunPlanId = this.planId; + this.refresh(); + } }, beforeDestroy() { }, @@ -204,6 +215,9 @@ export default { this.$refs.schedule.refreshRunPlanName(name); this.refreshRunPlanList(this.loadRunPlanId); this.$router.replace({ path: this.$route.path, query: { ...this.$route.query, planName: name }}); + }, + pictureChange(data) { + this.$emit('pictureChange', data); } } }; diff --git a/src/views/newMap/display/terminals/diagramEdit/menuBar.vue b/src/views/newMap/display/terminals/diagramEdit/menuBar.vue index dcec12677..d1045323d 100644 --- a/src/views/newMap/display/terminals/diagramEdit/menuBar.vue +++ b/src/views/newMap/display/terminals/diagramEdit/menuBar.vue @@ -138,6 +138,7 @@ import { planEffectiveCheck, clearPlaningData } from '@/api/runplan'; import { EventBus } from '@/scripts/event-bus'; import { publishRunPlanAllUser } from '@/api/designPlatform'; import { deleteRunPlan } from '@/api/runplan'; +import { simulationLoadDraftRunPlan } from '@/api/simulation'; export default { name: 'PlanMenuBar', @@ -285,11 +286,11 @@ export default { { title: this.$t('planMonitor.validityCheck'), click: this.handlePlanEffectiveCheck + }, + { + title: this.$t('planMonitor.testRunningDiagram'), + click: this.handleTestRunPlan } - // { - // title: this.$t('planMonitor.testRunningDiagram'), - // click: this.handleTestRunPlan - // } ] } // { @@ -719,6 +720,16 @@ export default { this.$messageBox(this.$t('tip.publishRunPlanFail')); this.publishVisible = false; }); + }, + // 测试运行图 + handleTestRunPlan() { + if (this.loadRunPlanId) { + simulationLoadDraftRunPlan(this.$route.query.group, this.loadRunPlanId).then(resp => { + this.$emit('pictureChange', {name:'testRunplan', planId:this.loadRunPlanId}); + }); + } else { + this.$messageBox(this.$t('tip.selectARunGraphFirst')); + } } } }; diff --git a/src/views/newMap/display/terminals/diagramEdit/statusBar.vue b/src/views/newMap/display/terminals/diagramEdit/statusBar.vue index dbd6ddfe0..508b7df05 100644 --- a/src/views/newMap/display/terminals/diagramEdit/statusBar.vue +++ b/src/views/newMap/display/terminals/diagramEdit/statusBar.vue @@ -160,22 +160,17 @@ export default { handlePlanEffectiveCheck() { const planId = this.loadRunPlanId; if (planId) { - if (/^\/plan\/usertool/.test(this.$route.fullPath)) { - this.$messageBox(' 功能待完善'); - } else { - planEffectiveCheck(planId).then(resp => { - this.$emit('dispatchDialog', { - name: 'systermOut', - params: { - width: 600, - contextList: resp.data.length > 0 ? resp.data : ['检查成功'] - } - }); - }).catch(error => { - this.$messageBox(error.message + ' ' + this.$t('tip.runGraphVerificationFailed')); + planEffectiveCheck(planId).then(resp => { + this.$emit('dispatchDialog', { + name: 'systermOut', + params: { + width: 600, + contextList: resp.data.length > 0 ? resp.data : ['检查成功'] + } }); - } - + }).catch(error => { + this.$messageBox(error.message + ' ' + this.$t('tip.runGraphVerificationFailed')); + }); } else { this.$messageBox(this.$t('tip.selectARunGraphFirst')); } diff --git a/src/views/newMap/display/terminals/dispatchCmd.vue b/src/views/newMap/display/terminals/dispatchCmd.vue index 514964f09..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,15 +609,24 @@ export default { { value: '', label: '全部'}, { value: true, label: '只显示签收完成的'}, { value: false, label: '只显示未签收完成的'} - ] + ], + wirelessObj: { + type: 'dispatchCmd', + transStationCode: '', + trainNum: '', + code: '' + }, + trainRow: null, + trainTableData: [], + permissionWireless: false }; }, computed: { ...mapState('training', [ - 'memberList', 'memberData', 'simulationUserList', 'initTime' + 'memberList', 'memberData', 'simulationUserList' ]), ...mapState('socket', [ - 'dispatchCommandState' + 'dispatchCommandState', 'simulationTimeSync' ]), currentStatus() { let s = '编辑'; @@ -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 => { @@ -570,7 +669,7 @@ export default { return list; }, getSimulationTime() { - const t = parseTime(this.initTime, '{h}:{i}:{s}'); + const t = parseTime(this.simulationTimeSync, '{h}:{i}:{s}'); const tArr = t.split(':'); let s = ' '; let h = tArr[0]; @@ -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: { @@ -620,7 +724,7 @@ export default { this.allographRow = null; }, dispatchCommandState(obj) { - Object.values(obj.cpStateMap).forEach(item => { + obj && Object.values(obj.cpStateMap).forEach(item => { if (item.cpId) { if (!this.queryResData.companyStateMap) { this.queryResData.companyStateMap = {}; @@ -633,6 +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() {}, @@ -645,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]; }, @@ -746,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) { @@ -830,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(); @@ -849,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) { @@ -990,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(); @@ -1032,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) => { @@ -1125,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, @@ -1143,8 +1440,8 @@ export default { }); } }); - }).catch(() => { - console.log('取消代签'); + }).catch((err) => { + console.log('取消代签', err); }); }, sendCmd() { @@ -1152,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('提示', { @@ -1302,7 +1600,7 @@ export default { content: ""; position: absolute; } - .middle, .left { + .middle, .left, .right { .middle-padding { padding-right: 5px; } @@ -1324,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/floodControlSafetyTable/controlTable.vue b/src/views/newMap/display/terminals/floodControlSafetyTable/controlTable.vue new file mode 100644 index 000000000..77fd480c0 --- /dev/null +++ b/src/views/newMap/display/terminals/floodControlSafetyTable/controlTable.vue @@ -0,0 +1,378 @@ + + + + + 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 c8ae59129..749df5fdc 100644 --- a/src/views/newMap/display/terminals/index.vue +++ b/src/views/newMap/display/terminals/index.vue @@ -25,7 +25,7 @@ - + @@ -33,6 +33,10 @@ + + + +
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 e7916f83f..858e8e82d 100644 --- a/src/views/newMap/display/terminals/registerBook.vue +++ b/src/views/newMap/display/terminals/registerBook.vue @@ -1,115 +1,166 @@ + diff --git a/src/views/newMap/display/terminals/trainTicket/greenLicence.vue b/src/views/newMap/display/terminals/trainTicket/greenLicence.vue index cda2ba62c..cbe3aea40 100644 --- a/src/views/newMap/display/terminals/trainTicket/greenLicence.vue +++ b/src/views/newMap/display/terminals/trainTicket/greenLicence.vue @@ -3,36 +3,36 @@
许     可     证
- +
- + 出站(进路)信号机故障 未设出站信号机 列车头部越过出站(进路)信号机 的情况下,准许第 - + 次列车由 - + 线上发车。
{{ greenLicenseForm.stationSeal }}(站名印)车站值班员(签名)
- +
- +
- +
- +
日填发
- + + + diff --git a/src/views/newMap/newMapdraft/dataRelation/indicatorAssociatedInfo/route.vue b/src/views/newMap/newMapdraft/dataRelation/indicatorAssociatedInfo/route.vue index 946dd5c50..c258c1cc8 100644 --- a/src/views/newMap/newMapdraft/dataRelation/indicatorAssociatedInfo/route.vue +++ b/src/views/newMap/newMapdraft/dataRelation/indicatorAssociatedInfo/route.vue @@ -101,7 +101,7 @@ >{{ $t('map.activate') }} - +