diff --git a/src/api/simulation.js b/src/api/simulation.js index a02097d8a..3c978e9b6 100644 --- a/src/api/simulation.js +++ b/src/api/simulation.js @@ -429,3 +429,11 @@ export function getLogList(group, params) { params:params }); } +/* 宁波三排列进路到 获取路径列表 */ +export function getPathListByStandCodeOrSignalCode( group, params ) { + return request({ + url: `/simulation/${group}/querySectionPaths`, + method: 'get', + params + }); +} diff --git a/src/assets/ibp_images/gray_button.png b/src/assets/ibp_images/gray_button.png index d7fba2e1d..b3f748517 100644 Binary files a/src/assets/ibp_images/gray_button.png and b/src/assets/ibp_images/gray_button.png differ diff --git a/src/assets/ibp_images/gray_button_on.png b/src/assets/ibp_images/gray_button_on.png index d86ba60cf..8fa01eb3e 100644 Binary files a/src/assets/ibp_images/gray_button_on.png and b/src/assets/ibp_images/gray_button_on.png differ diff --git a/src/directive/dialogDrag/dialogDrag.js b/src/directive/dialogDrag/dialogDrag.js index 864ede3f6..36af40898 100644 --- a/src/directive/dialogDrag/dialogDrag.js +++ b/src/directive/dialogDrag/dialogDrag.js @@ -10,6 +10,7 @@ export default { const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null); dialogHeaderEl.onmousedown = (e) => { + e.stopPropagation(); /** 鼠标按下,计算当前元素距离可视区的距离*/ const disX = e.clientX - dialogHeaderEl.offsetLeft; const disY = e.clientY - dialogHeaderEl.offsetTop; @@ -30,6 +31,7 @@ export default { } document.onmousemove = function (e) { + e.stopPropagation(); /** 通过事件委托,计算移动的距离*/ const l = e.clientX - disX; const t = e.clientY - disY; @@ -46,6 +48,7 @@ export default { }; document.onmouseup = function () { + e.stopPropagation(); document.onmousemove = null; document.onmouseup = null; }; diff --git a/src/i18n/langs/en/ibp.js b/src/i18n/langs/en/ibp.js index 3621069e7..20910b09b 100644 --- a/src/i18n/langs/en/ibp.js +++ b/src/i18n/langs/en/ibp.js @@ -41,7 +41,7 @@ export default { blueButton: 'Blue button', yellowButton: 'Yellow button', greenButton: 'Green button', - grayButton: 'Gray button', + grayButton: 'White button', digitalClockCode: 'Digital clock code', digitalClockWidth: 'Digital clock width', escalatorCode: 'Escalator code', diff --git a/src/i18n/langs/zh/ibp.js b/src/i18n/langs/zh/ibp.js index 3c4ba09d2..8e437bc29 100644 --- a/src/i18n/langs/zh/ibp.js +++ b/src/i18n/langs/zh/ibp.js @@ -1,69 +1,69 @@ export default { - stationName: '车站名称:', - save: '保存', - background: '背景板', - line: '线条', - text: '文字', - rect: '矩形', - button: '按钮', - circularLamp: '圆形灯', - arrow: '箭头', - escalatorFrame: '扶梯框', - alarm: '报警器', - telephoneTerminal: '电话端子', - escalator: '扶梯', - key: '钥匙', - digitalClock: '数字时钟', - rotateTip: '旋转提示', - alarmCode: '报警器编号', - alarmWidth: '报警器宽度', - xCoordinate: 'X轴坐标', - yCoordinate: 'Y轴坐标', - createNow: '立即创建', - generateCode: '生成编号', - escalatorFrameCode: '扶梯框编号', - escalatorFrameWidth: '扶梯框宽度', - escalatorFrameHeight: '扶梯框高度', - borderWidth: '边框宽度', - recommendedSize: '(建议尺寸25)', - arrowCode: '箭头编号', - arrowDirection: '箭头方向', - arrowLength: '箭头长度', - arrowWidth: '箭头宽度', - arrowColor: '箭头颜色', - vertexXCoordinate: '顶点X轴坐标', - vertexYCoordinate: '顶点Y轴坐标', - up: '向上', - down: '向下', - left: '向左', - right: '向右', - backgroundWidth: '背景板宽度', - backgroundHeight: '背景板高度', - buttonCode: '按钮编号', - buttonColor: '按钮颜色', - buttonWidth: '按钮宽度', - redButton: '红色按钮', - blueButton: '蓝色按钮', - yellowButton: '黄色按钮', - greenButton: '绿色按钮', - grayButton: '灰色按钮', - digitalClockCode: '数字时钟编号', - digitalClockWidth: '数字时钟宽度', - escalatorCode: '扶梯编号', - escalatorWidth: '扶梯宽度', - escalatorHeight: '扶梯高度', - escalatorColor: '扶梯颜色', - startingDirection: '启动方向', - doNotStart: '不启动', - startUp: '向上启动', - startDown: '向下启动', - keyCode: '钥匙编号', - keyWidth: '钥匙宽度', - keyDirection: '钥匙朝向', - level: '水平', - vertical: '竖直', - upperText: '上侧文字', - lowerText: '下侧文本', - circularLampCode: '圆形灯编号', - circularLampRadius: '圆形灯半径' + stationName: '车站名称:', + save: '保存', + background: '背景板', + line: '线条', + text: '文字', + rect: '矩形', + button: '按钮', + circularLamp: '圆形灯', + arrow: '箭头', + escalatorFrame: '扶梯框', + alarm: '报警器', + telephoneTerminal: '电话端子', + escalator: '扶梯', + key: '钥匙', + digitalClock: '数字时钟', + rotateTip: '旋转提示', + alarmCode: '报警器编号', + alarmWidth: '报警器宽度', + xCoordinate: 'X轴坐标', + yCoordinate: 'Y轴坐标', + createNow: '立即创建', + generateCode: '生成编号', + escalatorFrameCode: '扶梯框编号', + escalatorFrameWidth: '扶梯框宽度', + escalatorFrameHeight: '扶梯框高度', + borderWidth: '边框宽度', + recommendedSize: '(建议尺寸25)', + arrowCode: '箭头编号', + arrowDirection: '箭头方向', + arrowLength: '箭头长度', + arrowWidth: '箭头宽度', + arrowColor: '箭头颜色', + vertexXCoordinate: '顶点X轴坐标', + vertexYCoordinate: '顶点Y轴坐标', + up: '向上', + down: '向下', + left: '向左', + right: '向右', + backgroundWidth: '背景板宽度', + backgroundHeight: '背景板高度', + buttonCode: '按钮编号', + buttonColor: '按钮颜色', + buttonWidth: '按钮宽度', + redButton: '红色按钮', + blueButton: '蓝色按钮', + yellowButton: '黄色按钮', + greenButton: '绿色按钮', + grayButton: '白色按钮', + digitalClockCode: '数字时钟编号', + digitalClockWidth: '数字时钟宽度', + escalatorCode: '扶梯编号', + escalatorWidth: '扶梯宽度', + escalatorHeight: '扶梯高度', + escalatorColor: '扶梯颜色', + startingDirection: '启动方向', + doNotStart: '不启动', + startUp: '向上启动', + startDown: '向下启动', + keyCode: '钥匙编号', + keyWidth: '钥匙宽度', + keyDirection: '钥匙朝向', + level: '水平', + vertical: '竖直', + upperText: '上侧文字', + lowerText: '下侧文本', + circularLampCode: '圆形灯编号', + circularLampRadius: '圆形灯半径' }; diff --git a/src/i18n/langs/zh/planMonitor.js b/src/i18n/langs/zh/planMonitor.js index c8087acea..ed8fcf544 100644 --- a/src/i18n/langs/zh/planMonitor.js +++ b/src/i18n/langs/zh/planMonitor.js @@ -5,12 +5,12 @@ export default { level3: '等级三:', level4: '等级四:', level5: '等级五:', - updateData: '更新数据', - pleaseInputLevel1: '请输入等级一', - pleaseInputLevel2: '请输入等级二', - pleaseInputLevel3: '请输入等级三', - pleaseInputLevel4: '请输入等级四', - pleaseInputLevel5: '请输入等级五', + // updateData: '更新数据', + // pleaseInputLevel1: '请输入等级一', + // pleaseInputLevel2: '请输入等级二', + // pleaseInputLevel3: '请输入等级三', + // pleaseInputLevel4: '请输入等级四', + // pleaseInputLevel5: '请输入等级五', systemOutPut: '系统输出框', selectPrintArea: '选择打印区域', selectDeleteRoute: '选择删除交路', @@ -20,9 +20,9 @@ export default { deletePlanCar: '删除计划车' }, openRunPlan: { - selectRunplan: '选择运行图', + // selectRunplan: '选择运行图', delete: '删除', - modify: '修改', + // modify: '修改', runPlanList: '运行图列表', getRunPlanListFail: '获取运行图列表失败', confirmDeleteRunPlan: '您确认是否删除此运行图?', @@ -51,20 +51,20 @@ export default { // endStationTitle 终到站 // endSection 终到区段 // description 描述 - detail: '详情:', - station: '车站', - section: '区段', - stopTime: '停站时间', - runLevel: '运行等级', - arrivalTime: '到点', - departureTime: '发点', + // detail: '详情:', + // station: '车站', + // section: '区段', + // stopTime: '停站时间', + // runLevel: '运行等级', + // arrivalTime: '到点', + // departureTime: '发点', showDefaultTime: '显示默认停站时间和运行等级', automatic: '自动', default: '默认', modifyTask: '修改任务', - setMessageTip1: '请先设置开始区段', - setMessageTip2: '终到区段', - setMessageTip3: '的站间运行时间', + // setMessageTip1: '请先设置开始区段', + // setMessageTip2: '终到区段', + // setMessageTip3: '的站间运行时间', modifyTaskSuccess: '修改任务成功!', modifyTaskFailed: '修改任务失败', @@ -74,29 +74,29 @@ export default { endSection: '终点区段', direction: '方向', distance: '距离', - operation: '操作', - edit: '编辑', - save: '保存', - cancelAndQuit: '取消&退出', + // operation: '操作', + // edit: '编辑', + // save: '保存', + // cancelAndQuit: '取消&退出', modifySuccess: '修改成功!', modifyFailed: '修改失败', modifyRunLevel: '修改运行等级', modifyStopTime:'修改停站时间', - startStationTips: '起始站发车时间不变', - endStationTips: '终到站到达时间不变', - startStationTitle: '起始站', - startedStation: '起始站台', - endStationTitle: '终到站', - endedStation: '终到站台', - description: '描述', - modifyTaskRoute: '修改任务交路', - time: '时间', + // startStationTips: '起始站发车时间不变', + // endStationTips: '终到站到达时间不变', + // startStationTitle: '起始站', + // startedStation: '起始站台', + endStationTitle: '终到站' + // endedStation: '终到站台', + // description: '描述', + // modifyTaskRoute: '修改任务交路', + // time: '时间', - modifyStartTime: '修改开始时间:', - modifyStartTimeTitle: '修改起始时间', - search: '查找', - modifyTwoStationTime: '修改两站之间的时间' + // modifyStartTime: '修改开始时间:', + // modifyStartTimeTitle: '修改起始时间', + // search: '查找', + // modifyTwoStationTime: '修改两站之间的时间' }, editSmoothRun: { trainProportion: '分车比例', diff --git a/src/jmapNew/config/skinCode/ningbo_03.js b/src/jmapNew/config/skinCode/ningbo_03.js index 4d3fe52f4..beb70bc06 100644 --- a/src/jmapNew/config/skinCode/ningbo_03.js +++ b/src/jmapNew/config/skinCode/ningbo_03.js @@ -108,6 +108,11 @@ class SkinCode extends defaultStyle { width: 2, defaultColor: '#03FFF8' }, + runLineShow:{ + lineWidth: 6, + lineStroke:'#F37117', + pathStroke: '#00f' + }, routeArrow: { radius: 5, lineWidth: 3, diff --git a/src/jmapNew/config/skinCode/xian_02.js b/src/jmapNew/config/skinCode/xian_02.js index 64c6eb003..160f05814 100644 --- a/src/jmapNew/config/skinCode/xian_02.js +++ b/src/jmapNew/config/skinCode/xian_02.js @@ -415,54 +415,22 @@ class SkinCode extends defaultStyle { text: { distance: 2, // 灯和文字之间的距离 fontSize: 12, // 字体大小 + offsetX: 30, // 偏移差值X + offsetY: 0, // 偏移差值Y fontFormat: 'consolas', // 字体格式 - centerControlColor: '#ffffff', // 中控字体颜色 - stationControlColor: '#ff0', // 站控字体颜色 - emergencyControlColor:'#f00', // 紧急站控字体颜色 + centerControlColor: '#ffffff', // 中控字体颜色 + stationControlColor: '#ff0', // 站控字体颜色 + emergencyControlColor:'#f00', // 紧急站控字体颜色 + automaticRouteColor: '#3CB960', // 自动进路 + manualRouteColor: '#f00', // 人工进路 + openCommunicationColor: '#3CB960', // 建立通信 + closeCommunicationColor: '#f00', // 断开通信 + testValidColor: '#3CB960', // 验证生效 + testInvalidColor: '#f00', // 验证无效 fontWeight: 'normal', // 字体粗细 textAlign: 'middle', // 字体水平对齐 textVerticalAlign: 'top' // 字体垂直对齐 } - // lamp: { - // count: 4, // 控制模式的个数 - // offset: {x: 20, y: 0}, // 偏移量 - // emergencyOffset: {x: 0, y: 0}, - // radiusR: 4, // 控制模式灯的半径 - // distance: 46, // 控制模式之间灯之间的距离 - // grayColor: '#C0C0C0', // 控制模式灰色 - // greenColor: 'green', // 控制模式绿色 - // redColor: 'red', // 控制模式红色 - // yellowColor: 'yellow' // 控制模式黄色 - // }, - // emergencyControl: { // 紧急站控 - // show: true, - // offset: { x: 0, y: 0 }, - // text: '紧急', - // arrowShow: false, - // grayColor: '#7F7F7F' - // }, - // centerControl: { // 中控 - // show: true, - // offset: { x: 0, y: 0 }, - // text: '中控', - // buttonShow: false, - // arrowShow: false, - // grayColor: '#7F7F7F' - // }, - // substationControl: { // 站控按钮 - // show: true, - // offset: { x: 0, y: 0 }, - // text: '站控', - // arrowShow: false, - // grayColor: '#7F7F7F' - // }, - // interconnectedControl: { // 联锁控 - // show: false, - // offset: { x: 0, y: 0 }, - // text: '联锁控', - // arrowShow: false, - // grayColor: '#7F7F7F' - // } } }; @@ -748,7 +716,8 @@ class SkinCode extends defaultStyle { upPadding: 4, // 上边距离 trainBodyFillColor: '#2AA32A', // 列车车身填充颜色 trainSidelineColor: '#2AA32A', - trainNameFormat: 'serviceNumber:targetCode'// 列车显示格式 + trainNameFormat: 'serviceNumber:targetCode', // 列车显示格式 + trainBodyFaultFlashColor:'#f00' // 列车故障闪烁颜色 }, directionArrow: { }, diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index 80e8138da..6a24d028d 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -45,6 +45,7 @@ class Jlmap { // 显示集中站 this.stationCode = ''; this.isUpdateShowTrainList = false; + this.isUpdateRunLineTrain = false; } // 初始化属性有鼠标事件 缩放等 @@ -279,14 +280,14 @@ class Jlmap { } }); - const prdType2ShowMode = { '01': '03', '02': '02'}; - const showMode = prdType2ShowMode[this.showConfig.prdType]; - const stationCode = this.stationCode; + const prdType2ShowMode = { '01': '03', '02': '02'}; + const showMode = prdType2ShowMode[this.showConfig.prdType]; + const stationCode = this.stationCode; this.updateShowMode(list, showMode); this.updateShowStation(list, stationCode); - if (this.methods.viewUpdate instanceof Function) { this.methods.viewUpdate(list); } + if (this.methods.viewUpdate instanceof Function) { this.methods.viewUpdate(list); } } // 中间处理 @@ -360,7 +361,7 @@ class Jlmap { }); } } - updateShowStation(list = [], stationCode = '') { + updateShowStation(list = [], stationCode = '') { this.stationCode = stationCode; store.dispatch('map/setShowCentralizedStationCode', stationCode); @@ -388,30 +389,30 @@ class Jlmap { this.$painter.$transformHandle.setFoldLines([]); } } - // 模式选择 -> 更新 - updateShowMode(list = [], showMode = '03') { - this.showConfig.showMode = showMode; - list.forEach(elem => { - const code = elem.code; - const type = elem._type; - const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig); - oDevice.showMode = showMode; - this.$painter.updateShowMode(oDevice); - }); - this.$painter.$transformHandle.revisibleAll(); - } - updatePrdType(list = [], showMode = '03', val = '') { - this.showConfig.prdType = val; + // 模式选择 -> 更新 + updateShowMode(list = [], showMode = '03') { this.showConfig.showMode = showMode; - list.forEach(item => { - const code = item.code; - const type = item._type; - const oDevice = this.mapDevice[code] || deviceFactory(type, item, this.showConfig); - this.hookHandle(oDevice, this.showConfig); - this.$painter.update(oDevice); + list.forEach(elem => { + const code = elem.code; + const type = elem._type; + const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig); + oDevice.showMode = showMode; this.$painter.updateShowMode(oDevice); }); + this.$painter.$transformHandle.revisibleAll(); } + // updatePrdType(list = [], showMode = '03', val = '') { + // this.showConfig.prdType = val; + // this.showConfig.showMode = showMode; + // list.forEach(item => { + // const code = item.code; + // const type = item._type; + // const oDevice = this.mapDevice[code] || deviceFactory(type, item, this.showConfig); + // this.hookHandle(oDevice, this.showConfig); + // this.$painter.update(oDevice); + // this.$painter.updateShowMode(oDevice); + // }); + // } update(list = [], fetch = true) { this.setUpdateMapDevice(list, fetch); // 增加一个 前数据 处理 为了在区段中 获取全部的 道岔信息 @@ -480,6 +481,7 @@ class Jlmap { } else { if (elem.deviceType === 'TRAIN') { this.isUpdateShowTrainList = true; + if (elem.destinationCode) { this.isUpdateRunLineTrain = true; } store.commit('map/updateActiveTrainList', elem); } else if (elem.deviceType === 'STAND') { store.dispatch('map/updateStationStand', elem); @@ -527,6 +529,7 @@ class Jlmap { } const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig); + if (elem.dispose) { this.$painter.delete(oDevice); } else { @@ -545,6 +548,10 @@ class Jlmap { store.dispatch('map/setActiveTrainList'); this.isUpdateShowTrainList = false; } + if (this.isUpdateRunLineTrain) { + store.dispatch('map/setRunLineTrain'); + this.isUpdateRunLineTrain = false; + } if (selected && codeList.includes(selected.code)) { store.commit('menuOperation/setSelected', {device: {...selected}}); @@ -586,7 +593,7 @@ class Jlmap { const originX = payload.originX || zrWidth / 2; const originY = payload.originY || zrHeight / 2; - const x = (this.$options.offsetX + originX) / this.$options.scaleRate; + const x = (this.$options.offsetX + originX) / this.$options.scaleRate; const y = (this.$options.offsetY + originY) / this.$options.scaleRate; const newScaleRate = this.$options.getScaleRate(payload.scale); const dx = originX - (x * newScaleRate - this.$options.offsetX); @@ -614,7 +621,7 @@ class Jlmap { getShapeTipPoint(opts) { const device = adapter.adapterByDevice(this.mapDevice[opts.code], this.mapDevice); if (device) { - return this.$painter.getShapeTipPoint(device.instance, opts); + return this.$painter.getShapeTipPoint(device.instance, opts); } } @@ -637,9 +644,9 @@ class Jlmap { }); } - clearEvent() { - this.$zr.curEvent = null; - } + clearEvent() { + this.$zr.curEvent = null; + } clear() { this.lineCode = ''; diff --git a/src/jmapNew/mouseController.js b/src/jmapNew/mouseController.js index 58644d743..2ca7e4804 100644 --- a/src/jmapNew/mouseController.js +++ b/src/jmapNew/mouseController.js @@ -80,9 +80,6 @@ class MouseController extends Eventful { } mousedown(e) { - // if (eventTool.notLeftMouse(e)) { - // return; - // } this.$zr.dom.focus(); if (e.which == 1 || e.which == 3) { var x = e.offsetX; @@ -100,29 +97,23 @@ class MouseController extends Eventful { } mousemove(e) { - // if (eventTool.notLeftMouse(e) || - // !this._moveOnMouseMove || - // !this._dragging - // ) { - // return; - // } + if (this._dragging) { + const oldX = this._x; + const oldY = this._y; - const oldX = this._x; - const oldY = this._y; + const dx = e.offsetX - oldX; + const dy = e.offsetY - oldY; - const dx = e.offsetX - oldX; - const dy = e.offsetY - oldY; + this._x = e.offsetX; + this._y = e.offsetY; - this._x = e.offsetX; - this._y = e.offsetY; - - if (e.which == 1) { - this._preventDefaultMouseMove && eventTool.stop(e.event); - - this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y }); - } else if (e.which === 3 && this._zoomOnMouseWheel && this._previewOrMapDraw) { - this.handleMouseMoveRight({x: e.offsetX, y: e.offsetY}); - } + if (e.which == 1) { + this._preventDefaultMouseMove && eventTool.stop(e.event); + this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y }); + } else if (e.which === 3 && this._zoomOnMouseWheel && this._previewOrMapDraw) { + this.handleMouseMoveRight({x: e.offsetX, y: e.offsetY}); + } + } } mouseup(e) { diff --git a/src/jmapNew/shape/Section/ELines.js b/src/jmapNew/shape/Section/ELines.js index cb245dcb7..51a581bba 100644 --- a/src/jmapNew/shape/Section/ELines.js +++ b/src/jmapNew/shape/Section/ELines.js @@ -268,6 +268,28 @@ export default class ELines extends Group { this.bottomWithSection.hide(); } + if (style.Section.runLineShow && !isCurve) { + // 运行线 + const points = []; + for (let i = 0; i < modelPoints.length; i++) { + points.push([modelPoints[i].x, modelPoints[i].y]); + } + this.runLine = new Polyline({ + zlevel: this.zlevel, + // progressive: model.progressive, + z: Z + 2, + shape: { + points: points + }, + style: { + lineWidth: style.Section.runLineShow.lineWidth, + stroke: style.Section.runLineShow.lineStroke + } + }); + this.add(this.runLine); + this.runLine.hide(); + } + if (style.Section.routeArrow && !isCurve) { const cPointLeft = {x: 0, y:0}; const cPointRight = {x: 0, y:0}; @@ -402,6 +424,21 @@ export default class ELines extends Group { this.section && this.section.attr('z', lev); } + setRunLineDefault() { + this.runLine && this.runLine.hide(); + this.runLine && this.runLine.dirty(); + } + + runLineShow(type) { + if (type === 'runPath') { + this.runLine && this.runLine.setStyle({ stroke: this.model.style.Section.runLineShow.lineStroke }); + } else if (type === 'path') { + this.runLine && this.runLine.setStyle({ stroke: this.model.style.Section.runLineShow.pathStroke }); + } + this.runLine && this.runLine.show(); + this.runLine && this.runLine.dirty(); + } + hide() { this.eachChild((child) => { child.hide(); @@ -535,6 +572,14 @@ export default class ELines extends Group { } } + addHover(style) { + this.__zr && this.__zr.addHover(this.section, style); + } + + removeHover() { + this.__zr && this.__zr.removeHover(this.section); + } + recover() { } diff --git a/src/jmapNew/shape/Section/index.js b/src/jmapNew/shape/Section/index.js index e0a03ccc2..d4ee866d6 100644 --- a/src/jmapNew/shape/Section/index.js +++ b/src/jmapNew/shape/Section/index.js @@ -23,8 +23,8 @@ export default class Section extends Group { this.zlevel = model.zlevel; this.z = 5 + parseInt(model.layer || 0); this.model = model; - this.style = style; - this.mapDevice = mapDevice; + this.style = style; + this.mapDevice = mapDevice; this.selected = false; // 绘图选中状态 this.selectedType = ''; // 绘图批量选中状态 this.isShowShape = true; @@ -100,6 +100,7 @@ export default class Section extends Group { } this.line.setCrossSpeedUpperLimit(''); this.line.setCrossDefault(); + // this.line.setRunLineDefault(); } this.name && this.name.recover(); this.speedLimit && this.speedLimit.hide(); @@ -150,13 +151,17 @@ export default class Section extends Group { stroke: this.style.Section.line.communicationOccupiedColor, fill:this.style.Section.line.communicationOccupiedColor }); + + if (this.model.parentCode && this.model.type == '01') { + this.line.setCrossRouteLock(); + } } /** 非通信车占用状态 03*/ unCommunicationOccupied() { - if (this.style.Section.preAxleIgnoreFault && this.model.preReset) { - return ; - } + if (this.style.Section.preAxleIgnoreFault && this.model.preReset) { + return; + } if (this.line) { this.line.setStyle({ @@ -171,12 +176,16 @@ export default class Section extends Group { if (this.name && this.style.Section.name.occupyColor) { this.name.setStyle({ textFill: this.style.Section.name.occupyColor }); } + + if (this.model.parentCode && this.model.type == '01') { + this.line.setCrossRouteLock(); + } } /** ARB故障 */ invalid() { - if (this.style.Section.preAxleIgnoreFault && this.model.preReset) { - return ; - } + if (this.style.Section.preAxleIgnoreFault && this.model.preReset) { + return; + } this.line && this.line.setStyle({ stroke: this.style.Section.line.invalidColor, @@ -253,6 +262,13 @@ export default class Section extends Group { } } + showRunLine(type) { + this.line && this.line.runLineShow(type); + } + setRunLineDefault() { + this.line && this.line.setRunLineDefault(); + } + /** 保护区段锁闭 09*/ protectiveLock(lockRight) { if (this.line) { @@ -298,9 +314,9 @@ export default class Section extends Group { /** 计轴预复位 */ preReset(blockade) { if (this.style.Section.sectionMiddle && this.style.Section.sectionMiddle.preResetColor && !blockade) { // 南京二号线 - this.sectionMiddle.setStyle({stroke: this.style.Section.sectionMiddle.preResetColor}); - this.sectionMiddle.show(); - } + this.sectionMiddle && this.sectionMiddle.setStyle({stroke: this.style.Section.sectionMiddle.preResetColor}); + this.sectionMiddle && this.sectionMiddle.show(); + } } // 延时解锁 delayUnlock() { @@ -363,51 +379,53 @@ export default class Section extends Group { /** 设置状态*/ setState(model, flag = false) { if (!this.isShowShape) return; - this.recover(); + this.recover(); - // 只响应前端自定义类型的状态变化 - if (model._free) { - // 先初始化为灰色 - this.setAshShow() - model.preGreen && this.line.setStyle({stroke: '#00FF00'}); - model.preBlue && this.line.setStyle({stroke: '#4A76B7'}); - } else { - this.handleSwitchSection(model, flag); - // 顺序代表优先级 - /** 道岔保护区段锁闭 */ - model.overlapLock && this.protectiveLock(model.lockRight); - /** 空闲锁闭或者叫进路锁闭 */ - model.routeLock && this.routeLock(model.lockRight); - /** 计轴故障 */ - model.invalid && this.invalid(); - /** 轨道封锁 */ - model.blockade && this.block(model.routeLock); - /** 非通信车占用状态 */ - model.nctOccupied && this.unCommunicationOccupied(); - /** 通信车占用状态 */ - model.ctOccupied && this.communicationOccupied(); - // 计轴预复位 - model.preReset && this.preReset(model.blockade); - /** 区段切除*/ - model.cutOff && this.sectionCutOff(); - /** 是否限速*/ - model.speedUpLimit > 0 && this.setSpeedUpperLimit(model.speedUpLimit); - // 区段计轴预复位状态 (未处理) - // 区段延时解锁 - model.delayUnlock && this.delayUnlock(); - // 区段故障锁闭 之前是fault 暂时设置为faultLock - model.faultLock && this.faultLock(); - // 设置灰显 - model.noStatus && this.setAshShow(); - /** 道岔区段更新岔心颜色 */ - if (model.type === '03' && model.switch) { - const sectionSwitch = this.mapDevice[model.switch.code]; - if (sectionSwitch && sectionSwitch.sectionACode === model.code) { - sectionSwitch.instance && sectionSwitch.instance.setState(sectionSwitch); - sectionSwitch.instance && sectionSwitch.instance.setLimitState(model.speedUpLimit > 0, model.speedUpLimit); - } - } - } + // 只响应前端自定义类型的状态变化 + if (model._free) { + // 先初始化为灰色 + this.setAshShow(); + model.preGreen && this.line.setStyle({stroke: '#00FF00'}); + model.preBlue && this.line.setStyle({stroke: '#4A76B7'}); + } else { + this.handleSwitchSection(model, flag); + // 顺序代表优先级 + /** 宁波三号线 运行线显示状态 (前端自定义状态)*/ + // model.isRunLineShow && this.showRunLine(); + /** 道岔保护区段锁闭 */ + model.overlapLock && this.protectiveLock(model.lockRight); + /** 空闲锁闭或者叫进路锁闭 */ + model.routeLock && this.routeLock(model.lockRight); + /** 计轴故障 */ + model.invalid && this.invalid(); + /** 轨道封锁 */ + model.blockade && this.block(model.routeLock); + /** 非通信车占用状态 */ + model.nctOccupied && this.unCommunicationOccupied(); + /** 通信车占用状态 */ + model.ctOccupied && this.communicationOccupied(); + // 计轴预复位 + model.preReset && this.preReset(model.blockade); + /** 区段切除*/ + model.cutOff && this.sectionCutOff(); + /** 是否限速*/ + model.speedUpLimit > 0 && this.setSpeedUpperLimit(model.speedUpLimit); + // 区段计轴预复位状态 (未处理) + // 区段延时解锁 + model.delayUnlock && this.delayUnlock(); + // 区段故障锁闭 之前是fault 暂时设置为faultLock + model.faultLock && this.faultLock(); + // 设置灰显 + model.noStatus && this.setAshShow(); + /** 道岔区段更新岔心颜色 */ + if (model.type === '03' && model.switch) { + const sectionSwitch = this.mapDevice[model.switch.code]; + if (sectionSwitch && sectionSwitch.sectionACode === model.code) { + sectionSwitch.instance && sectionSwitch.instance.setState(sectionSwitch); + sectionSwitch.instance && sectionSwitch.instance.setLimitState(model.speedUpLimit > 0, model.speedUpLimit); + } + } + } } /** 计算提示位置*/ @@ -475,15 +493,18 @@ export default class Section extends Group { this.line.setOrignalCross(false); } } + drawBatchSelected(selected, type) { if (this.selectedType === type) { return; } + if (selected && type) { this.line && this.line.setStyle({ stroke: drawSectionStyle[type] }); } else { this.line && this.line.setStyle({ stroke: this.style.Section.line.spareColor }); } + this.selectedType = type; } @@ -529,7 +550,7 @@ export default class Section extends Group { } } - getAnchorPoint() { + getAnchorPoint() { const rect = this.getBoundingRect(); return { x:rect.x, diff --git a/src/jmapNew/shape/Station/index.js b/src/jmapNew/shape/Station/index.js index aaedb5791..3b48fb5ca 100644 --- a/src/jmapNew/shape/Station/index.js +++ b/src/jmapNew/shape/Station/index.js @@ -155,7 +155,10 @@ export default class Station extends Group { if (!this.style.Station.StationControl.disPlayNone) { if (this.style.Station.StationControl.special) { if (model.visible && model.createControlMode) { // model.createControlMode 控制模式 - this.createSpecialControlMode(); + this.createControlModeAU(); + this.createControlModeCC(); + this.createControlModeCL(); + this.createControlModeVA(); } } else { if (model.visible && model.createControlMode) { // model.createControlMode 控制模式 @@ -170,14 +173,34 @@ export default class Station extends Group { this.setState(model); } - createSpecialControlMode() { + createControlModeAU() { // 西安二 const model = this.model; - this.stationControlText = new Text({ + this.stationControlAU = new Text({ zlevel: this.zlevel, z: this.z, style: { - x: model.controlModePoint.x, - y: model.controlModePoint.y, + x: model.controlModePoint.x + this.style.Station.StationControl.text.offsetX*-1, + y: model.controlModePoint.y + this.style.Station.StationControl.text.offsetY, + fontWeight: this.style.Station.StationControl.text.fontWeight, + fontSize: this.style.Station.StationControl.text.fontSize, + fontFamily: this.style.fontFamily, + text: 'AU', + textFill: this.style.Station.StationControl.text.automaticRouteColor, + textAlign: this.style.Station.StationControl.text.textAlign, + textVerticalAlign: this.style.Station.StationControl.text.textVerticalAlign + } + }); + this.add(this.stationControlAU); + } + + createControlModeCC() { // 西安二 + const model = this.model; + this.stationControlCC = new Text({ + zlevel: this.zlevel, + z: this.z, + style: { + x: model.controlModePoint.x + this.style.Station.StationControl.text.offsetX*0, + y: model.controlModePoint.y + this.style.Station.StationControl.text.offsetY, fontWeight: this.style.Station.StationControl.text.fontWeight, fontSize: this.style.Station.StationControl.text.fontSize, fontFamily: this.style.fontFamily, @@ -187,7 +210,47 @@ export default class Station extends Group { textVerticalAlign: this.style.Station.StationControl.text.textVerticalAlign } }); - this.add(this.stationControlText); + this.add(this.stationControlCC); + } + + createControlModeCL() { // 西安二 + const model = this.model; + this.stationControlCL = new Text({ + zlevel: this.zlevel, + z: this.z, + style: { + x: model.controlModePoint.x + this.style.Station.StationControl.text.offsetX*1, + y: model.controlModePoint.y + this.style.Station.StationControl.text.offsetY, + fontWeight: this.style.Station.StationControl.text.fontWeight, + fontSize: this.style.Station.StationControl.text.fontSize, + fontFamily: this.style.fontFamily, + text: 'CL', + textFill: this.style.Station.StationControl.text.openCommunicationColor, + textAlign: this.style.Station.StationControl.text.textAlign, + textVerticalAlign: this.style.Station.StationControl.text.textVerticalAlign + } + }); + this.add(this.stationControlCL); + } + + createControlModeVA() { // 西安二 + const model = this.model; + this.stationControlVA = new Text({ + zlevel: this.zlevel, + z: this.z, + style: { + x: model.controlModePoint.x + this.style.Station.StationControl.text.offsetX*2, + y: model.controlModePoint.y + this.style.Station.StationControl.text.offsetY, + fontWeight: this.style.Station.StationControl.text.fontWeight, + fontSize: this.style.Station.StationControl.text.fontSize, + fontFamily: this.style.fontFamily, + text: 'VA', + textFill: this.style.Station.StationControl.text.testValidColor, + textAlign: this.style.Station.StationControl.text.textAlign, + textVerticalAlign: this.style.Station.StationControl.text.textVerticalAlign + } + }); + this.add(this.stationControlVA); } createEmergencyControl() { // 紧急站控 @@ -270,7 +333,7 @@ export default class Station extends Group { _subType: 'button', style: this.style, zlevel: this.zlevel, - z: this.z, + z: this.z+1, point: { x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.lamp.offset.x, y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y @@ -298,7 +361,7 @@ export default class Station extends Group { _subType: 'light', style: this.style, zlevel: this.zlevel, - z: this.z, + z: this.z+1, point: { x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 9 / 2 + this.style.Station.StationControl.lamp.offset.x, y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y @@ -326,7 +389,7 @@ export default class Station extends Group { _subType: 'preReset', style: this.style, zlevel: this.zlevel, - z: this.z, + z: this.z+1, point: { x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 + this.style.Station.StationControl.lamp.offset.x, y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y @@ -418,7 +481,7 @@ export default class Station extends Group { this.stationText.setColor('#1fdc1f'); } - this.stationControlText && this.stationControlText.setStyle({text:'CC', textFill:this.style.Station.StationControl.text.centerControlColor}); + this.stationControlCC && this.stationControlCC.setStyle({text:'CC', textFill:this.style.Station.StationControl.text.centerControlColor}); // // // if (this.style.Station.StationControl.disPlayNone) { @@ -436,7 +499,7 @@ export default class Station extends Group { this.substationControl && this.substationControl.setTextColor(this.style.Station.StationControl.lamp.yellowColor); // 文字颜色 this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor); - this.stationControlText && this.stationControlText.setStyle({text:'LC', textFill:this.style.Station.StationControl.text.stationControlColor}); + this.stationControlCC && this.stationControlCC.setStyle({text:'LC', textFill:this.style.Station.StationControl.text.stationControlColor}); // if (this.style.Station.StationControl.disPlayNone) { // this.stationText && this.stationText.setStyle('textFill', '#fff'); // if (this.model.subheadDisplay) { // 副标题 @@ -454,7 +517,7 @@ export default class Station extends Group { this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.emergencyArrowsControl && this.emergencyArrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor); - this.stationControlText && this.stationControlText.setStyle({text:'EL', textFill:this.style.Station.StationControl.text.emergencyControlColor}); + this.stationControlCC && this.stationControlCC.setStyle({text:'EL', textFill:this.style.Station.StationControl.text.emergencyControlColor}); // if (this.style.Station.StationControl.disPlayNone) { // this.stationText && this.stationText.setStyle('textFill', '#fff'); // if (this.model.subheadDisplay) { // 副标题 @@ -640,13 +703,19 @@ export default class Station extends Group { case 'interconnected': rect = this.interconnectedControl.getArcBoundingRect(); break; + case 'light': + rect = this.controlLight.getBoundingRect(); + break; + case 'preReset': + rect = this.controlPreReset.getBoundingRect(); + break; default: rect = this.stationText.getBoundingRect(); break; } return { - x: rect.x + rect.width, + x: rect.x + rect.width/2, y: rect.y }; } diff --git a/src/jmapNew/shape/Train/TrainBody.js b/src/jmapNew/shape/Train/TrainBody.js index 17875fbb7..dd8be5b04 100644 --- a/src/jmapNew/shape/Train/TrainBody.js +++ b/src/jmapNew/shape/Train/TrainBody.js @@ -534,4 +534,11 @@ export default class TrainBody extends Group { this.textTrainGroup.dirty(); } } + + trainBodyFault() { + this.trainBodyBox && this.trainBodyBox.trainBodyFault(); + } + untrainBodyFault() { + this.trainBodyBox && this.trainBodyBox.untrainBodyFault(); + } } diff --git a/src/jmapNew/shape/Train/TrainBodyBox.js b/src/jmapNew/shape/Train/TrainBodyBox.js index 20e1108c8..819fc9c98 100644 --- a/src/jmapNew/shape/Train/TrainBodyBox.js +++ b/src/jmapNew/shape/Train/TrainBodyBox.js @@ -57,4 +57,23 @@ export default class TrainBodyBox extends Group { this.trainBodyBox.stopAnimation(false); } } + // 西安二号线 列车停车状态 闪烁红色 + trainBodyFault() { + if (this.trainBodyBox) { + this.trainBodyBox.setStyle('fill', this.model.style.Train.trainBody.trainBodyFaultFlashColor); + this.trainBodyBox.animateStyle(true) + .when(0, { opacity: 1 }) + .when(1000, { opacity: 0 }) + .when(2000, { opacity: 1 }) + .start(); + } + + } + // 西安二号线 列车取消停车状态 + untrainBodyFault() { + if (this.trainBodyBox) { + this.trainBodyBox.setStyle('fill', this.model.style.Train.trainBody.trainBodyFillColor); + this.trainBodyBox.stopAnimation(false); + } + } } diff --git a/src/jmapNew/shape/Train/index.js b/src/jmapNew/shape/Train/index.js index 76df4de4b..f15a3da63 100644 --- a/src/jmapNew/shape/Train/index.js +++ b/src/jmapNew/shape/Train/index.js @@ -374,6 +374,10 @@ export default class Train extends Group { if (path.includes('/practiceDisplay')) { this.handlePassagerColor(model.num); } + if (style.Train.trainBody.trainBodyFaultFlashColor) { + // 西安二号线 列车停车状态 闪烁红色 + this.updateTrainBodyFault(model.orderStop); + } } } setTrainTypeColor(type) { @@ -386,6 +390,20 @@ export default class Train extends Group { this.trainB && this.trainB.removeTrainDetail(); } + updateTrainBodyFault(orderStop) { + if (orderStop) { + // 西安二号线 列车停车状态 闪烁红色 + if (this.trainB) { + this.trainB.trainBodyFault(); + } + } else { + // 西安二号线 列车取消停车状态 + if (this.trainB) { + this.trainB.untrainBodyFault(); + } + } + } + handlePassagerColor(num) { if (num) { // && num > 0 diff --git a/src/jmapNew/theme/chengdu_03/operationConfig.js b/src/jmapNew/theme/chengdu_03/operationConfig.js index d17c8559c..1a6e6e84d 100644 --- a/src/jmapNew/theme/chengdu_03/operationConfig.js +++ b/src/jmapNew/theme/chengdu_03/operationConfig.js @@ -200,7 +200,7 @@ export default { { maxDuration: 15, minDuration: 8, - operateType: CMD.Signal.CMD_SIGNAL_CLOSE_GUIDE.value, + operateType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE.value, skinCode: '04', trainingName: '取消引导({3})', trainingRemark: '取消引导进路功能(总取消)', diff --git a/src/jmapNew/theme/components/menus/childDialog/confirmControl.vue b/src/jmapNew/theme/components/menus/childDialog/confirmControl.vue index e693db6fd..7c1686b6c 100644 --- a/src/jmapNew/theme/components/menus/childDialog/confirmControl.vue +++ b/src/jmapNew/theme/components/menus/childDialog/confirmControl.vue @@ -276,6 +276,7 @@ export default { commitOperate(operate, {}, 2).then(({valid})=>{ this.loading = false; if (valid) { + this.$emit('close'); this.doClose(); } }).catch(() => { diff --git a/src/jmapNew/theme/components/menus/dialog/routeControl.vue b/src/jmapNew/theme/components/menus/dialog/routeControl.vue index ff19a9a30..3f659d704 100644 --- a/src/jmapNew/theme/components/menus/dialog/routeControl.vue +++ b/src/jmapNew/theme/components/menus/dialog/routeControl.vue @@ -36,10 +36,10 @@ {{ $t('menu.cancel') }} - - - + + + diff --git a/src/jmapNew/theme/components/menus/dialog/routeHandControl.vue b/src/jmapNew/theme/components/menus/dialog/routeHandControl.vue index 985bdc006..6eae3f4aa 100644 --- a/src/jmapNew/theme/components/menus/dialog/routeHandControl.vue +++ b/src/jmapNew/theme/components/menus/dialog/routeHandControl.vue @@ -158,7 +158,7 @@ export default { }, methods: { doShow(operate, selected, tempData) { - this.$root.$emit('dialogOpen', selected); + this.$root.$emit('dialogOpen', selected); this.selected = selected; this.allSelect = false; this.changeList = []; @@ -210,7 +210,7 @@ export default { doClose() { this.loading = false; this.dialogShow = false; - this.$root.$emit('dialogClose', this.selected); + this.$root.$emit('dialogClose', this.selected); this.$refs.tempTable.setCurrentRow(); this.$store.dispatch('training/emitTipFresh'); // mouseCancelState(this.selected); @@ -330,7 +330,7 @@ export default { this.$refs.noticeInfo.doShow(); }); } else { - commitOperate(menuOperate.Signal.humanControl, {routeCodeList:this.selection}, 2, val).then(({valid})=>{ + commitOperate(menuOperate.Signal.humanControl, {routeCodeList:this.selection}, 2, { val }).then(({valid})=>{ this.loading = false; if (valid) { this.doClose(); @@ -365,7 +365,7 @@ export default { this.$refs.noticeInfo.doShow(); }); } else { - commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList:this.selection}, 2, val).then(({valid})=>{ + commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList:this.selection}, 2, {val}).then(({valid})=>{ this.loading = false; if (valid) { this.doClose(); diff --git a/src/jmapNew/theme/components/menus/eachChildMenu.vue b/src/jmapNew/theme/components/menus/eachChildMenu.vue index 61fafac56..2a60fee0e 100644 --- a/src/jmapNew/theme/components/menus/eachChildMenu.vue +++ b/src/jmapNew/theme/components/menus/eachChildMenu.vue @@ -1,29 +1,37 @@ + diff --git a/src/jmapNew/theme/ningbo_03/menus/menuBar.vue b/src/jmapNew/theme/ningbo_03/menus/menuBar.vue index d934116c0..a806a15ad 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuBar.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuBar.vue @@ -1,151 +1,80 @@ + diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/cancelTransferLock.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/cancelTransferLock.vue new file mode 100644 index 000000000..ede5fb567 --- /dev/null +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/cancelTransferLock.vue @@ -0,0 +1,279 @@ + + + + diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initializeSignalGuide.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/cancleSignalGuide.vue similarity index 77% rename from src/jmapNew/theme/ningbo_03/menus/menuDialog/initializeSignalGuide.vue rename to src/jmapNew/theme/ningbo_03/menus/menuDialog/cancleSignalGuide.vue index bd871dca3..cf2eacc23 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initializeSignalGuide.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/cancleSignalGuide.vue @@ -3,11 +3,11 @@ @@ -21,20 +21,20 @@ {{ getCanGuide(scope.row.code) }} - + - 确定(O) + 确定(O) - 应用(A) + 应用(A) 关闭(C) @@ -45,7 +45,7 @@ - + @@ -53,25 +53,26 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; // import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; -import SignalGuide from './signalGuide'; +// import SignalGuide from './signalGuide'; import { mapGetters } from 'vuex'; +import CMD from '@/scripts/cmdPlugin/CommandEnum'; export default { - name: 'StandDetain', + name: 'CancleSignalGuide', components: { - SignalGuide, + // SignalGuide, NoticeInfo }, data() { return { - status: false, + status: true, standStatus: true, allChecked: false, dialogShow: false, loading: false, - operate: '', - initEle: null, - commandEleCode: null + operate: '' + // initEle: null, + // commandEleCode: null }; }, computed: { @@ -84,20 +85,20 @@ export default { selected() { return this.$store.state.menuOperation.selected; }, - domIdChoose() { - return this.dialogShow ? OperationEvent.Command.common.choose.domId : '' + domIdChoose() { + return this.dialogShow ? OperationEvent.Command.common.choose.domId : ''; }, domIdConfirm() { return this.dialogShow ? OperationEvent.Command.common.confirm.domId : ''; - }, - domIdClose() { + }, + domIdClose() { return this.dialogShow ? OperationEvent.Command.common.close.domId : ''; }, domIdApply() { return this.dialogShow ? OperationEvent.Command.common.apply.domId : ''; - }, + }, title() { - return '初始化引导'; + return '清除引导'; } }, watch: { @@ -105,12 +106,15 @@ export default { if (this.show) { this.commit(); } + }, + 'selected': function(val) { + this.status = !val || val.callOn; } }, methods: { doShow(operate) { - this.initEle = null; - this.commandEleCode = null; + // this.initEle = null; + // this.commandEleCode = null; this.operate = operate; // 如果不是断点激活,而是第一次显示,则需要设置初始值 this.dialogShow = true; @@ -147,26 +151,32 @@ export default { return '否'; } }, - getProcess(code) { - if (this.commandEleCode === code) { - return '完成'; - } else if (this.initEle && this.initEle.code === code) { - return '等待确认/取消'; - } else { - return ''; - } - }, + // getProcess(code) { + // if (this.commandEleCode === code) { + // return '完成'; + // } else if (this.initEle && this.initEle.code === code) { + // return '等待确认/取消'; + // } else { + // return ''; + // } + // }, commit(isClose = false) { + this.loading = true; + const val = this.selected || {}; const step = { operation: isClose - ? OperationEvent.Command.common.confirm.operation - : OperationEvent.Command.common.apply.operation, + ? OperationEvent.Command.common.confirm.operation + : OperationEvent.Command.common.apply.operation, + over: true, + param: {signalCode:[val.code]} }; + step.cmdType = CMD.Signal.CMD_SIGNAL_CLOSE_GUIDE; + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.signalGuide.doShow(step, this.selected); - this.initEle = this.selected; + + this.loading = false; isClose && this.doClose(); } }).catch(() => { @@ -176,15 +186,13 @@ export default { }, handleCurrentChange(val) { if (!val) { return; } - this.initEle = null; - this.commandEleCode = null; const step = { code: `${val.code}`, operation: OperationEvent.Command.common.choose.operation, - val: val.code, + val: val.code, param: { - signalCode: val.code - } + signalCode: val.code + } }; this.$store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { @@ -195,12 +203,12 @@ export default { this.$refs.noticeInfo.doShow(); }); }, - commandSuccess(code) { - this.commandEleCode = code; - }, - cancelCommand() { - this.initEle = null; - }, + // commandSuccess(code) { + // this.commandEleCode = code; + // }, + // cancelCommand() { + // this.initEle = null; + // }, cancel() { const operate = { operation: OperationEvent.Command.common.close.operation diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initSectionLimitSpeed.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/initSectionLimitSpeed.vue deleted file mode 100644 index 9fce8ae63..000000000 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initSectionLimitSpeed.vue +++ /dev/null @@ -1,306 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initSectionOpen.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/initSectionOpen.vue deleted file mode 100644 index 7d953c992..000000000 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initSectionOpen.vue +++ /dev/null @@ -1,233 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initSignalBlock.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/initSignalBlock.vue deleted file mode 100644 index d9a78d52d..000000000 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initSignalBlock.vue +++ /dev/null @@ -1,233 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initSignalMode.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/initSignalMode.vue deleted file mode 100644 index e40f64458..000000000 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initSignalMode.vue +++ /dev/null @@ -1,145 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initializeSignalCanBlock.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/initializeSignalCanBlock.vue deleted file mode 100644 index 9bf9ef641..000000000 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initializeSignalCanBlock.vue +++ /dev/null @@ -1,217 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initializeSwitchBlock.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/initializeSwitchBlock.vue deleted file mode 100644 index dbcbaa1b0..000000000 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initializeSwitchBlock.vue +++ /dev/null @@ -1,225 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/remoteResetFunc.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/remoteResetFunc.vue new file mode 100644 index 000000000..7d8067d86 --- /dev/null +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/remoteResetFunc.vue @@ -0,0 +1,262 @@ + + + + diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/routeCommand.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/routeCommand.vue index aac458c90..eddfc6fac 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/routeCommand.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/routeCommand.vue @@ -478,8 +478,8 @@ export default { }, getRouteDirection(route) { - const signalEle = this.$store.getters['map/getDeviceByCode'](route.startSignalCode); - if (signalEle.right) { + const elem = this.$store.getters['map/getDeviceByCode'](route.startSignalCode); + if (elem.right) { return '0'; } else { return '1'; diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/sectionLimitSpeed.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/sectionLimitSpeed.vue index 41f1ba52e..98c57656d 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/sectionLimitSpeed.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/sectionLimitSpeed.vue @@ -1,8 +1,8 @@ @@ -20,33 +20,33 @@ diff --git a/src/views/planMonitor/newEditTool/schedule.vue b/src/views/planMonitor/newEditTool/schedule.vue index b1063fe49..b9b7f9ef5 100644 --- a/src/views/planMonitor/newEditTool/schedule.vue +++ b/src/views/planMonitor/newEditTool/schedule.vue @@ -1,5 +1,5 @@ diff --git a/src/views/planMonitor/newEditTool/statusBar.vue b/src/views/planMonitor/newEditTool/statusBar.vue index ae6d359fb..962230572 100644 --- a/src/views/planMonitor/newEditTool/statusBar.vue +++ b/src/views/planMonitor/newEditTool/statusBar.vue @@ -1,11 +1,9 @@ diff --git a/src/views/planSchedule/schedule.vue b/src/views/planSchedule/schedule.vue index 37748fc68..901502d48 100644 --- a/src/views/planSchedule/schedule.vue +++ b/src/views/planSchedule/schedule.vue @@ -25,10 +25,10 @@