diff --git a/src/directive/dialogDrag/dialogDrag.js b/src/directive/dialogDrag/dialogDrag.js index 36af40898..473b2e953 100644 --- a/src/directive/dialogDrag/dialogDrag.js +++ b/src/directive/dialogDrag/dialogDrag.js @@ -10,10 +10,12 @@ export default { const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null); dialogHeaderEl.onmousedown = (e) => { - e.stopPropagation(); + e.stopPropagation(); /** 鼠标按下,计算当前元素距离可视区的距离*/ const disX = e.clientX - dialogHeaderEl.offsetLeft; const disY = e.clientY - dialogHeaderEl.offsetTop; + const oY = e.offsetY; + const bY = dialogHeaderEl.offsetHeight - e.offsetY; /** 获取到的值带px 正则匹配替换*/ let styL, styT; @@ -31,10 +33,17 @@ export default { } document.onmousemove = function (e) { - e.stopPropagation(); + e.stopPropagation(); + let cY = e.clientY; + if (cY < oY) { + cY = oY; + } + if (cY > document.body.clientHeight - bY) { + cY = document.body.clientHeight - bY; + } /** 通过事件委托,计算移动的距离*/ const l = e.clientX - disX; - const t = e.clientY - disY; + const t = cY - disY; /** 移动当前元素*/ dragDom.style.left = `${l + styL}px`; @@ -48,7 +57,7 @@ export default { }; document.onmouseup = function () { - e.stopPropagation(); + e.stopPropagation(); document.onmousemove = null; document.onmouseup = null; }; diff --git a/src/jmapNew/config/skinCode/datie_jd1a.js b/src/jmapNew/config/skinCode/datie_jd1a.js index b0ad9d229..e4244837c 100644 --- a/src/jmapNew/config/skinCode/datie_jd1a.js +++ b/src/jmapNew/config/skinCode/datie_jd1a.js @@ -88,8 +88,8 @@ class SkinCode extends defaultStyle { communicationOccupiedColor: '#FF0000', // 区段通信车占用颜色 (红色) unCommunicationOccupiedColor: '#FF0000', // 区段非通讯车占用颜色 (红色) - routeLockColor: '#FFFFFF', // 区段进路锁定颜色 (白色) - faultLockColor: '#006400', // 区段故障锁定颜色 + routeLockColor: '#FFFFFF', // 区段进路锁定颜色 (白色)<------ + faultLockColor: '#FF0000', // 区段故障锁定颜色 <---- undefinedColor: '#0071C1', // 区段未定义颜色 blockColor: '#00FF00', // 区段封锁颜色 @@ -533,7 +533,7 @@ class SkinCode extends defaultStyle { }, jointImg: { // 道岔 A B C D四元素属性配置 trapezoidLength: 8, // 直角梯形元素默认长度 - faultStatus: true, // 挤岔表示 + faultStatus: false, // 挤岔表示 fork: true, // 挤岔专用(如有挤岔操作 变为true) forKColor: 'red' // 挤岔颜色 配合挤岔专用 }, @@ -546,17 +546,22 @@ class SkinCode extends defaultStyle { rectLock: { // 矩形封锁框图形 rectWidth: 18, // 矩形框 宽高 rectBorderColor: '#fff', // 矩形边框颜色 - block: true, // 封锁显示 + block: false, // 封锁显示 blockColor: 'red', // 封锁颜色 followName: true // 位置跟随名称确定 }, arcBlcok: { // 圆形封锁图形 - show: true, // 显示 + show: false, // 显示 shapeR: 10, arcBorderColor: 'red', // 默认边框颜色 locationColor: 'red', // 定位封锁颜色 - inversionColor: 'red' // 反位封锁颜色 - } + inversionColor: 'red' // 反位封锁颜色 + }, + switchDot: { // 岔心小圆点 + show: true, + monoLockColor: '#ff0000', // 单锁 红色 + lockColor: '#0000ff' // 单封 蓝色 + }, }; this[deviceType.LcControl] = { diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index 956be2648..1820b57c6 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -406,6 +406,30 @@ class Jlmap { }); this.$painter.$transformHandle.revisibleAll(); } + updatePicture(list = []) { + list.forEach(item => { + const device = this.mapDevice[item.code]; + const type = device._type; + const pointsDevice = ['LINE', 'POWER', 'SECTION']; + const pointDevice = ['OVERAP', 'TRAINWINDOW']; + device._dispose = item.pictureHide; + if (pointsDevice.includes(type.toUpperCase())) { + const offsetX = item.position.x - device.points[0].x; + const offsetY = item.position.y - device.points[0].y; + device.points.forEach(point => { + point.x = point.x + offsetX; + point.y = point.y + offsetY; + }); + } else if (pointDevice.includes(type.toUpperCase())) { + device.point.x = item.position.x; + device.point.y = item.position.y; + } else if (type !== 'Switch') { + device.position.x = item.position.x; + device.position.y = item.position.y; + } + this.$painter.updatePicture(device); + }); + } update(list = [], fetch = true) { this.setUpdateMapDevice(list, fetch); // 增加一个 前数据 处理 为了在区段中 获取全部的 道岔信息 diff --git a/src/jmapNew/mouseController.js b/src/jmapNew/mouseController.js index d38195a0d..0dcb8ee96 100644 --- a/src/jmapNew/mouseController.js +++ b/src/jmapNew/mouseController.js @@ -106,7 +106,6 @@ class MouseController extends Eventful { 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 }); diff --git a/src/jmapNew/painter.js b/src/jmapNew/painter.js index a642e3474..9cb989851 100644 --- a/src/jmapNew/painter.js +++ b/src/jmapNew/painter.js @@ -162,7 +162,23 @@ class Painter { this.$transformHandleScreen.transformView(device.instance); } } - + /** 画面更新 */ + updatePicture(device) { + console.log(device, 'device'); + if (device) { + try { + if (device._dispose) { + this.delete(device); + } else { + device.instance && this.mapInstanceLevel[device._type].remove(device.instance); + device.instance = null; + this.add(device); + } + } catch (err) { + console.error(err); + } + } + } /** * 更新视图 * @param {*} device diff --git a/src/jmapNew/parser/parser-graph.js b/src/jmapNew/parser/parser-graph.js index ec111bc16..3c6060743 100644 --- a/src/jmapNew/parser/parser-graph.js +++ b/src/jmapNew/parser/parser-graph.js @@ -350,16 +350,16 @@ export function updateMapData(state, model) { case deviceType.Axle: updateForList(model, state, 'indicatorLightList'); break; case deviceType.SwitchFault: updateForList(model, state, 'indicatorLightList'); break; case deviceType.IndicatorLight: updateForList(model, state, 'indicatorLightList'); break; - case deviceType.PickArrow: updateForList(model, state, 'indicatorLightList');break; - case deviceType.DepartArrow: updateForList(model, state, 'indicatorLightList'); break; - case deviceType.Occlusion: updateForList(model, state, 'indicatorLightList'); break; - case deviceType.Accident: updateForList(model, state, 'indicatorLightList'); break; - case deviceType.Recovery: updateForList(model, state, 'indicatorLightList'); break; - case deviceType.PickAssist: updateForList(model, state, 'indicatorLightList'); break; - case deviceType.DepartAssist: updateForList(model, state, 'indicatorLightList'); break; - case deviceType.TotalAssist: updateForList(model, state, 'indicatorLightList'); break; - case deviceType.AssistStatus: updateForList(model, state, 'indicatorLightList'); break; - case deviceType.SectionOccupied: updateForList(model, state, 'indicatorLightList'); break; + case deviceType.PickArrow: updateForList(model, state, 'indicatorLightList'); break; + case deviceType.DepartArrow: updateForList(model, state, 'indicatorLightList'); break; + case deviceType.Occlusion: updateForList(model, state, 'indicatorLightList'); break; + case deviceType.Accident: updateForList(model, state, 'indicatorLightList'); break; + case deviceType.Recovery: updateForList(model, state, 'indicatorLightList'); break; + case deviceType.PickAssist: updateForList(model, state, 'indicatorLightList'); break; + case deviceType.DepartAssist: updateForList(model, state, 'indicatorLightList'); break; + case deviceType.TotalAssist: updateForList(model, state, 'indicatorLightList'); break; + case deviceType.AssistStatus: updateForList(model, state, 'indicatorLightList'); break; + case deviceType.SectionOccupied: updateForList(model, state, 'indicatorLightList'); break; case deviceType.SplitStation: updateForList(model, state, 'splitStationList'); break; case deviceType.Arrow: updateForList(model, state, 'arrowList'); break; case deviceType.Power: updateForList(model, state, 'powerLineList'); break; diff --git a/src/jmapNew/shape/graph/Switch/ESwDot.js b/src/jmapNew/shape/graph/Switch/ESwDot.js new file mode 100644 index 000000000..27714b7ae --- /dev/null +++ b/src/jmapNew/shape/graph/Switch/ESwDot.js @@ -0,0 +1,35 @@ +import Group from 'zrender/src/container/Group' +import Circle from 'zrender/src/graphic/shape/Circle' + +class ESwDot extends Group { + constructor(model, drictx, dricty) { + super() + this.model = model + this.dricty = dricty > 0 + this.drictx = drictx > 0 + this.create() + } + create() { + const { model } = this + this.dot = new Circle({ + zlevel: model.zlevel, + z: model.z || 0 + 12, + shape: { + cx: model.intersection.x + (this.drictx ? 12 : -12), + cy: model.intersection.y + (this.dricty ? 8 : -8), + r: 2 + }, + style: { + fill: '#FF0000' + } + }) + this.add(this.dot) + } + setColor(color) { + console.log(this.dot) + console.log(color) + this.dot.setStyle({ fill: color }) + } +} + +export default ESwDot diff --git a/src/jmapNew/shape/graph/Switch/index.js b/src/jmapNew/shape/graph/Switch/index.js index 8c7976b21..849eb8e53 100644 --- a/src/jmapNew/shape/graph/Switch/index.js +++ b/src/jmapNew/shape/graph/Switch/index.js @@ -13,6 +13,7 @@ import EMouse from './EMouse'; import EHighlight from '../element/EHighlight'; import ETriangle from './ETriangle'; import store from '@/store/index'; +import ESwDot from './ESwDot'; export default class Switch extends Group { constructor(model, {style, mapDevice}) { @@ -211,6 +212,12 @@ export default class Switch extends Group { textFill: 'yellow' } }); + + if (this.style.Switch.switchDot && this.style.Switch.switchDot.show) { + const { drictx, dricty } = this.triangle + this.dot = new ESwDot(model, drictx, dricty) + this.add(this.dot) + } this.add(this.shapeModelA); this.add(this.shapeModelB); @@ -218,6 +225,7 @@ export default class Switch extends Group { this.add(this.shapeBlockCover); this.add(this.name); this.add(this.enabledName); + style.Switch.text.show && model.nameShow ? this.name.show() : this.name.hide(); } @@ -343,6 +351,7 @@ export default class Switch extends Group { this.artificialArc && this.artificialArc.hide(); this.name && this.name.show(); this.limitName && this.limitName.show(); + this.dot && this.dot.hide() } /** 定位*/ @@ -434,28 +443,20 @@ export default class Switch extends Group { .start(); } // N-定位 R-反位 NO-无(失表) EX-挤叉 - setSwitchFault(fault, pos) { - if (this.style.Switch.jointImg.faultStatus && fault && (pos == 'NO' || pos == 'EX') ) { // 宁波线失表状态 - this.setForkAction(fault); // 道岔挤岔 - } else if (this.style.Switch.faultNoHandle ) { - this.shapeModelA.hide(); - this.shapeModelB.hide(); - this.shapeModelC.hide(); - } else { - const faultList = ['SPLIT', 'SQUEEZE', 'NORMAL_SPLIT', 'REVERSE_SPLIT', 'SPLIT_1']; - // (fault === 'SPLIT' || fault === 'SQUEEZE' || (fault === 'NORMAL_SPLIT' && !reversePosition) || (fault === 'REVERSE_SPLIT' && !normalPosition)) - if (this.model.switchFaultCode && fault && faultList.includes(fault) ) { - const switchFault = this.mapDevice[this.model.switchFaultCode]; - switchFault.instance.setControlColor('#F00', true); - } else if (this.model.switchFaultCode) { - const switchFault = this.mapDevice[this.model.switchFaultCode]; - switchFault.instance.setControlColor(this.style.backgroundColor, false); - } - // stopAnimation - this.shapeModelB.stopAnimation(false); - this.shapeModelC.stopAnimation(false); - this.shapeModelA.stopAnimation(false); + setSwitchFault(fault) { + const faultList = ['SPLIT', 'SQUEEZE', 'NORMAL_SPLIT', 'REVERSE_SPLIT', 'SPLIT_1']; + // (fault === 'SPLIT' || fault === 'SQUEEZE' || (fault === 'NORMAL_SPLIT' && !reversePosition) || (fault === 'REVERSE_SPLIT' && !normalPosition)) + if (this.model.switchFaultCode && fault && faultList.includes(fault) ) { + const switchFault = this.mapDevice[this.model.switchFaultCode]; + switchFault.instance.setControlColor('#F00', true); + } else if (this.model.switchFaultCode) { + const switchFault = this.mapDevice[this.model.switchFaultCode]; + switchFault.instance.setControlColor(this.style.backgroundColor, false); } + // stopAnimation + this.shapeModelB.stopAnimation(false); + this.shapeModelC.stopAnimation(false); + this.shapeModelA.stopAnimation(false); } /** 挤叉*/ setForkAction(fault) { @@ -514,6 +515,10 @@ export default class Switch extends Group { this.lockArc.setStyle({ stroke: this.style.Switch.arcBlcok.inversionColor }); } } + if (this.style.Switch.switchDot && this.style.Switch.switchDot.show) { + this.dot.show() + this.dot.setColor(this.style.Switch.switchDot.monoLockColor) + } this.setTextColor(this.style.Switch.text.monolockLocationColor); } @@ -567,6 +572,10 @@ export default class Switch extends Group { this.lockRect.setStyle({ stroke: this.style.Switch.rectLock.blockColor, fill: this.style.Switch.rectLock.blockFillColor }); } } + if (this.style.Switch.switchDot && this.style.Switch.switchDot.show) { + this.dot.show() + this.dot.setColor(this.style.Switch.switchDot.lockColor) + } // if (this.style.Switch.coverBlock && this.style.Switch.coverBlock.show) { // this.shapeBlockCover.show(); @@ -706,7 +715,7 @@ export default class Switch extends Group { this.setAshShow(); } } else { - this.setSwitchFault(model.fault, model.pos); + this.setSwitchFault(model.fault); // model.pos == 'NO' || model.pos == 'EX'; // N-定位 R-反位 NO-无(失表) EX-挤叉 @@ -718,7 +727,16 @@ export default class Switch extends Group { this.switchPosition = 'reverse'; this.setInversionAction(model); /** 反位*/ } else if (model.pos == 'NO') { - this.setLossAction(model.fault); // 失去 + //宁波线失表 + if (this.style.Switch.jointImg.faultStatus && model.fault) { + this.setForkAction(model.fault) + } else if (this.style.Switch.faultNoHandle) { + this.shapeModelA.hide(); + this.shapeModelB.hide(); + this.shapeModelC.hide(); + } else { + this.setLossAction(model.fault); // 失去 + } } else if (model.pos == 'EX') { this.setForkAction(model.fault); // 挤岔 } diff --git a/src/jmapNew/theme/datie_jd1a/menus/bottomTable.vue b/src/jmapNew/theme/datie_jd1a/menus/bottomTable.vue new file mode 100644 index 000000000..e5687c866 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/bottomTable.vue @@ -0,0 +1,292 @@ + + + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/addSpareTrain.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/addSpareTrain.vue new file mode 100644 index 000000000..f2964cbb2 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/addSpareTrain.vue @@ -0,0 +1,210 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/childDialog/confirmControl.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/childDialog/confirmControl.vue new file mode 100644 index 000000000..d298f8bc1 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/childDialog/confirmControl.vue @@ -0,0 +1,141 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/childDialog/confirmControlSpeed.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/childDialog/confirmControlSpeed.vue new file mode 100644 index 000000000..d49556383 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/childDialog/confirmControlSpeed.vue @@ -0,0 +1,156 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/childDialog/confirmTip.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/childDialog/confirmTip.vue new file mode 100644 index 000000000..6852074ca --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/childDialog/confirmTip.vue @@ -0,0 +1,74 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/childDialog/confirmTrain.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/childDialog/confirmTrain.vue new file mode 100644 index 000000000..494347b75 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/childDialog/confirmTrain.vue @@ -0,0 +1,173 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/childDialog/passwordInputBox.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/childDialog/passwordInputBox.vue new file mode 100644 index 000000000..eec77511b --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/childDialog/passwordInputBox.vue @@ -0,0 +1,193 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/childDialog/popupAlarm.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/childDialog/popupAlarm.vue new file mode 100644 index 000000000..b6b925622 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/childDialog/popupAlarm.vue @@ -0,0 +1,94 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/defectiveShunting.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/defectiveShunting.vue new file mode 100644 index 000000000..2d2491d3f --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/defectiveShunting.vue @@ -0,0 +1,137 @@ + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/deleteRunplan.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/deleteRunplan.vue new file mode 100644 index 000000000..0b9134b52 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/deleteRunplan.vue @@ -0,0 +1,99 @@ + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/drawSelect.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/drawSelect.vue new file mode 100644 index 000000000..10fb5b5cd --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/drawSelect.vue @@ -0,0 +1,163 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/mapVisual.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/mapVisual.vue new file mode 100644 index 000000000..f7e172930 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/mapVisual.vue @@ -0,0 +1,245 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/modifyAdjacentStation.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/modifyAdjacentStation.vue new file mode 100644 index 000000000..53bf85a71 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/modifyAdjacentStation.vue @@ -0,0 +1,154 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/modifyTripNumber.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/modifyTripNumber.vue new file mode 100644 index 000000000..dd92fc91d --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/modifyTripNumber.vue @@ -0,0 +1,224 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/recDep.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/recDep.vue new file mode 100644 index 000000000..1d99ffe15 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/recDep.vue @@ -0,0 +1,136 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/routeDetail.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/routeDetail.vue new file mode 100644 index 000000000..b7211c025 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/routeDetail.vue @@ -0,0 +1,196 @@ + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/routeGuide.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/routeGuide.vue new file mode 100644 index 000000000..11cba9131 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/routeGuide.vue @@ -0,0 +1,278 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/routeHandControl.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/routeHandControl.vue new file mode 100644 index 000000000..69ce0d572 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/routeHandControl.vue @@ -0,0 +1,267 @@ + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/routeSelection.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/routeSelection.vue new file mode 100644 index 000000000..12014afb3 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/routeSelection.vue @@ -0,0 +1,325 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/routeSelection1.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/routeSelection1.vue new file mode 100644 index 000000000..c34eb1e49 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/routeSelection1.vue @@ -0,0 +1,308 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/sectionDetail.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/sectionDetail.vue new file mode 100644 index 000000000..7e6a03371 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/sectionDetail.vue @@ -0,0 +1,114 @@ + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/sendRunplan.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/sendRunplan.vue new file mode 100644 index 000000000..26e4fb5dd --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/sendRunplan.vue @@ -0,0 +1,265 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/shuntRoute.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/shuntRoute.vue new file mode 100644 index 000000000..78727e7cc --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/shuntRoute.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/stageRunplan.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/stageRunplan.vue new file mode 100644 index 000000000..6a55e1b49 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/stageRunplan.vue @@ -0,0 +1,191 @@ + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/standControl.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/standControl.vue new file mode 100644 index 000000000..c6c29c830 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/standControl.vue @@ -0,0 +1,603 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/standDetail.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/standDetail.vue new file mode 100644 index 000000000..efe048e52 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/standDetail.vue @@ -0,0 +1,217 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/trainControl.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/trainControl.vue new file mode 100644 index 000000000..738d9509e --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/trainControl.vue @@ -0,0 +1,332 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/trainCreate.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/trainCreate.vue new file mode 100644 index 000000000..59f7935b6 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/trainCreate.vue @@ -0,0 +1,133 @@ + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/trainCreateNumber.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/trainCreateNumber.vue new file mode 100644 index 000000000..e56f2f80d --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/trainCreateNumber.vue @@ -0,0 +1,181 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/trainDelete.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/trainDelete.vue new file mode 100644 index 000000000..895d6024c --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/trainDelete.vue @@ -0,0 +1,150 @@ + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/trainDeleteNumber.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/trainDeleteNumber.vue new file mode 100644 index 000000000..210e2dc87 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/trainDeleteNumber.vue @@ -0,0 +1,176 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/trainDetailInfo.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/trainDetailInfo.vue new file mode 100644 index 000000000..907727139 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/trainDetailInfo.vue @@ -0,0 +1,378 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/trainEditNumber.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/trainEditNumber.vue new file mode 100644 index 000000000..570e22144 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/trainEditNumber.vue @@ -0,0 +1,174 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/trainMove.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/trainMove.vue new file mode 100644 index 000000000..82c84dc13 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/trainMove.vue @@ -0,0 +1,200 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/trainMoveNumber.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/trainMoveNumber.vue new file mode 100644 index 000000000..7e7635d23 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/trainMoveNumber.vue @@ -0,0 +1,193 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/trainRoute.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/trainRoute.vue new file mode 100644 index 000000000..98e3e4b46 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/trainRoute.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/trainSetPlan.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/trainSetPlan.vue new file mode 100644 index 000000000..17421e391 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/trainSetPlan.vue @@ -0,0 +1,181 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/trainSwitch.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/trainSwitch.vue new file mode 100644 index 000000000..583e53d8e --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/trainSwitch.vue @@ -0,0 +1,209 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/dialog/updateTrip.vue b/src/jmapNew/theme/datie_jd1a/menus/dialog/updateTrip.vue new file mode 100644 index 000000000..49a60e088 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/dialog/updateTrip.vue @@ -0,0 +1,155 @@ + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/index.vue b/src/jmapNew/theme/datie_jd1a/menus/index.vue index 76b4ba9b6..645d03ed7 100644 --- a/src/jmapNew/theme/datie_jd1a/menus/index.vue +++ b/src/jmapNew/theme/datie_jd1a/menus/index.vue @@ -1,19 +1,133 @@ + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuBar.vue b/src/jmapNew/theme/datie_jd1a/menus/menuBar.vue new file mode 100644 index 000000000..d16b8bc18 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/menuBar.vue @@ -0,0 +1,335 @@ + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuButton.vue b/src/jmapNew/theme/datie_jd1a/menus/menuButton.vue new file mode 100644 index 000000000..7e52408dc --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/menuButton.vue @@ -0,0 +1,878 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuButtonCtc.vue b/src/jmapNew/theme/datie_jd1a/menus/menuButtonCtc.vue new file mode 100644 index 000000000..da166116e --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/menuButtonCtc.vue @@ -0,0 +1,827 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuDialog/childDialog/twoConfirmation.vue b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/childDialog/twoConfirmation.vue new file mode 100644 index 000000000..c1f7b93a3 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/childDialog/twoConfirmation.vue @@ -0,0 +1,133 @@ + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuDialog/childDialog/userAdd.vue b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/childDialog/userAdd.vue new file mode 100644 index 000000000..6c98c5a53 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/childDialog/userAdd.vue @@ -0,0 +1,157 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuDialog/childDialog/userDelete.vue b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/childDialog/userDelete.vue new file mode 100644 index 000000000..e64aa49f3 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/childDialog/userDelete.vue @@ -0,0 +1,129 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuDialog/childDialog/userEdit.vue b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/childDialog/userEdit.vue new file mode 100644 index 000000000..b03165a1b --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/childDialog/userEdit.vue @@ -0,0 +1,173 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuDialog/helpAbout.vue b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/helpAbout.vue new file mode 100644 index 000000000..4dc26a4ce --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/helpAbout.vue @@ -0,0 +1,126 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuDialog/limitSpeed.vue b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/limitSpeed.vue new file mode 100644 index 000000000..e416e68e0 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/limitSpeed.vue @@ -0,0 +1,138 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuDialog/manageUser.vue b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/manageUser.vue new file mode 100644 index 000000000..deef68f43 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/manageUser.vue @@ -0,0 +1,285 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuDialog/passwordBox.vue b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/passwordBox.vue new file mode 100644 index 000000000..69fa03d70 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/passwordBox.vue @@ -0,0 +1,221 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuDialog/routeCancel.vue b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/routeCancel.vue new file mode 100644 index 000000000..8a403be7f --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/routeCancel.vue @@ -0,0 +1,154 @@ + + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuDialog/setLimitSpeed.vue b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/setLimitSpeed.vue new file mode 100644 index 000000000..dfb5821b3 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/setLimitSpeed.vue @@ -0,0 +1,286 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuDialog/stationControlConvert.vue b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/stationControlConvert.vue new file mode 100644 index 000000000..046b66327 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/stationControlConvert.vue @@ -0,0 +1,433 @@ + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuDialog/trainAdd.vue b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/trainAdd.vue new file mode 100644 index 000000000..fba049a10 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/trainAdd.vue @@ -0,0 +1,168 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuDialog/trainDelete.vue b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/trainDelete.vue new file mode 100644 index 000000000..b1139915a --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/trainDelete.vue @@ -0,0 +1,151 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuDialog/trainTranstalet.vue b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/trainTranstalet.vue new file mode 100644 index 000000000..97918ae44 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/trainTranstalet.vue @@ -0,0 +1,158 @@ + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuDialog/viewName.vue b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/viewName.vue new file mode 100644 index 000000000..4a32473d5 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/menuDialog/viewName.vue @@ -0,0 +1,256 @@ + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuPanel.vue b/src/jmapNew/theme/datie_jd1a/menus/menuPanel.vue new file mode 100644 index 000000000..bf2c9df6b --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/menuPanel.vue @@ -0,0 +1,302 @@ + + + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuSection.vue b/src/jmapNew/theme/datie_jd1a/menus/menuSection.vue new file mode 100644 index 000000000..d5d3702f8 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/menuSection.vue @@ -0,0 +1,260 @@ + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuSignal.vue b/src/jmapNew/theme/datie_jd1a/menus/menuSignal.vue index 28a3fa9fe..ed63959c9 100644 --- a/src/jmapNew/theme/datie_jd1a/menus/menuSignal.vue +++ b/src/jmapNew/theme/datie_jd1a/menus/menuSignal.vue @@ -1,20 +1,52 @@ + diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuStationStand.vue b/src/jmapNew/theme/datie_jd1a/menus/menuStationStand.vue new file mode 100644 index 000000000..8dafb5bef --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/menuStationStand.vue @@ -0,0 +1,220 @@ + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuSwitch.vue b/src/jmapNew/theme/datie_jd1a/menus/menuSwitch.vue index 54b30f0c8..013b098bb 100644 --- a/src/jmapNew/theme/datie_jd1a/menus/menuSwitch.vue +++ b/src/jmapNew/theme/datie_jd1a/menus/menuSwitch.vue @@ -1,26 +1,46 @@ + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuTrain.vue b/src/jmapNew/theme/datie_jd1a/menus/menuTrain.vue new file mode 100644 index 000000000..1df99fa4e --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/menuTrain.vue @@ -0,0 +1,614 @@ + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/passiveDialog/alarm.vue b/src/jmapNew/theme/datie_jd1a/menus/passiveDialog/alarm.vue new file mode 100644 index 000000000..afbff9ddc --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/passiveDialog/alarm.vue @@ -0,0 +1,216 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/passiveDialog/timeout.vue b/src/jmapNew/theme/datie_jd1a/menus/passiveDialog/timeout.vue new file mode 100644 index 000000000..e4ef062a6 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/passiveDialog/timeout.vue @@ -0,0 +1,109 @@ + + + diff --git a/src/jmapNew/theme/datie_jd1a/menus/runplanPane.vue b/src/jmapNew/theme/datie_jd1a/menus/runplanPane.vue new file mode 100644 index 000000000..036da1041 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/menus/runplanPane.vue @@ -0,0 +1,1125 @@ + + + + diff --git a/src/jmapNew/theme/datie_jd1a/planConfig.js b/src/jmapNew/theme/datie_jd1a/planConfig.js new file mode 100644 index 000000000..0cb8b8311 --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/planConfig.js @@ -0,0 +1,74 @@ +import { convertSheetToList } from '../parser/util'; + +export default { + /** 运行图解析方式*/ + type: 'Ratio', + + /** 边缘高度*/ + edge: 600, + + /** 间隔高度*/ + multiple: 1, + + /** 偏移时间*/ + translation: 60 * 60 * 2, + + /** excel解析配置*/ + excelConfig: { + beginRow: 1, + beginCol: 0, + fieldNum: 8, + sepField: '车次', + columns: { + '车站名称': { key: 'stationName', formatter: (val) => { return val; } }, + '到点': { key: 'arriveTime', formatter: (val) => { return val; } }, + '发点': { key: 'departureTime', formatter: (val) => { return val; } } + } + }, + + /** 解析excel数据转换为Json后台数据*/ + importData(Sheet, JsonData) { + var dataList = convertSheetToList(Sheet, false); + var needList = Object.keys(this.excelConfig.columns); + if (dataList && dataList.length) { + for (var rowIndex = this.excelConfig.beginRow; rowIndex < dataList.length; rowIndex += 1) { + for (var colIndex = this.excelConfig.beginCol; colIndex < dataList[this.excelConfig.beginCol].length; colIndex += this.excelConfig.fieldNum + 1) { + var tripNew, tripObj; + var stationObj = {}; + + tripNew = tripObj = { code: '', arrivalList: [] }; + for (var index = 0; index < this.excelConfig.fieldNum; index += 1) { + var title = dataList[0][colIndex + index]; + var value = dataList[rowIndex][colIndex + index]; + + if (title && value) { + var titleStr = `${title}`.trim(); + var valueStr = `${value}`.trim(); + + if (titleStr.includes(this.excelConfig.sepField)) { + tripObj.code = valueStr; + JsonData.forEach(elem => { + if (elem.code == valueStr) { + tripObj = elem; + return; + } + }); + } + + // 取需要的字段 + if (needList.findIndex(elem => { return elem == titleStr; }) >= 0) { + stationObj[this.excelConfig.columns[titleStr].key] = this.excelConfig.columns[titleStr].formatter(valueStr); + } + } + } + + tripObj.arrivalList.push(stationObj); + if (tripObj.code && tripObj == tripNew) { + JsonData.push(tripObj); + } + } + } + } + return JsonData; + } +}; diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 5532e1d3e..9e3d26e74 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -24,12 +24,12 @@ export function handlerUrl(data) { if (process.env.NODE_ENV === 'development') { // const data = null; // BASE_API = 'https://joylink.club/jlcloud'; - BASE_API = 'https://test.joylink.club/jlcloud'; + // BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.3.233/rtss-server'; // BASE_API = 'http://114.116.51.125/jlcloud'; // BASE_API = 'http://192.168.8.152:9000'; // 袁琪 // BASE_API = 'http://192.168.3.94:9000'; // 旭强 - // BASE_API = 'http://192.168.3.201:9000'; // 张赛 + BASE_API = 'http://192.168.3.15:9000'; // 张赛 // BASE_API = 'http://192.168.8.140:9000'; // 杜康 // BASE_API = 'http://192.168.3.37:9000'; // 卫志宏 // BASE_API = 'http://b29z135112.zicp.vip'; diff --git a/src/views/dispatcherStationManage/dispatchCmd.vue b/src/views/dispatcherStationManage/dispatchCmd.vue index 84c139929..85bdd476c 100644 --- a/src/views/dispatcherStationManage/dispatchCmd.vue +++ b/src/views/dispatcherStationManage/dispatchCmd.vue @@ -160,13 +160,13 @@
- - + + - - + + @@ -251,10 +251,10 @@ - +
- +
@@ -340,6 +340,16 @@ export default { content: '', allSigned: '' }, + rules: { + title: [ + { required: true, message: '命令标题不能为空', trigger: 'blur' }, + { min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur' } + ], + number: [ + { required: true, message: '命令号不能为空', trigger: 'blur' }, + { type: 'number', required: true, min: 1, max: 9999999999, message: '请输入最多10位数字', trigger: 'blur' } + ] + }, tableChecked: false, memberDataList: [], active1: true, @@ -356,6 +366,11 @@ export default { ...mapState('training', [ 'memberList', 'memberData', 'simulationUserList', 'initTime' ]), + getContentLable() { + const text = '命令正文'; + const fontLength = this.command.content.length; + return `${text} ${fontLength}字`; + }, typeOptions() { const list = []; Object.keys(this.typeObj).forEach(item => { @@ -541,6 +556,7 @@ export default { }; this.currentInfo = {}; this.$refs.table && this.$refs.table.clearSelection(); + this.$refs.form && this.$refs.form.resetFields(); this.setCurrentRow(); }, senderChange(memberId) { @@ -597,16 +613,28 @@ export default { cancelButtonText: '取消', type: 'warning' }).then(() => { - const data = { - command: this.command - }; - sendCommandNew(this.group, 'CTC_SEND_DISPATCH_COMMAND', data).then((res) => { - console.log(res, '---res'); - this.$message.success('发送调度命令成功!'); - this.searchCmd(); - this.initData(); - }).catch(error => { - this.$messageBox('发送调度命令失败:' + error.message); + this.$refs['form'].validate((valid) => { + if (valid) { + if (!this.command.content) { + this.$messageBox('请选择填写命令正文'); + return; + } + if (!this.command.receiverIds.length) { + this.$messageBox('请选择受令单位'); + return; + } + const data = { + command: this.command + }; + sendCommandNew(this.group, 'CTC_SEND_DISPATCH_COMMAND', data).then((res) => { + console.log(res, '---res'); + this.$message.success('发送调度命令成功!'); + this.searchCmd(); + this.initData(); + }).catch(error => { + this.$messageBox('发送调度命令失败:' + error.message); + }); + } }); }); }, @@ -667,6 +695,9 @@ export default { .middle { /deep/ .el-form-item { margin-bottom: 0px; + .el-form-item__error { + top: 30px; + } } .el-input { /deep/ .el-input__icon { diff --git a/src/views/newMap/displayCity/lineBoard.vue b/src/views/newMap/displayCity/lineBoard.vue index 4d7c5b224..3bec22354 100644 --- a/src/views/newMap/displayCity/lineBoard.vue +++ b/src/views/newMap/displayCity/lineBoard.vue @@ -359,6 +359,11 @@ export default { }); this.readOnlyMap[item.stationCode] = item.readOnly; } + if (item && item.routeSequence && item.routeSequence.deletedLineIds && item.routeSequence.deletedLineIds.length) { + item.routeSequence.deletedLineIds.forEach(elem => { + delete this.sequenceMap[elem]; + }); + } if (item && item.trackView && item.trackView.trackLineMap) { for (const key in item.trackView.trackLineMap) { if (this.standTrackSectionMap[key] && item.trackView.trackLineMap[key]) { diff --git a/src/views/newMap/jlmapNew/index.vue b/src/views/newMap/jlmapNew/index.vue index 2b69a55d4..88a2634fd 100644 --- a/src/views/newMap/jlmapNew/index.vue +++ b/src/views/newMap/jlmapNew/index.vue @@ -237,7 +237,7 @@ export default { const path = window.location.href; const mouseWheelFlag = true; this.previewOrMapDraw = false; - if (path.indexOf('map/draw') !== -1 || path.indexOf('mapPreviewNew') !== -1) { + if (path.indexOf('map/draw') !== -1 || path.indexOf('mapPreviewNew') !== -1 || path.indexOf('pictureDraw') !== -1) { this.previewOrMapDraw = true; } const prdType = this.$store.state.training.prdType; @@ -504,7 +504,7 @@ export default { setOffset(data, num, sum, obj) { this.$jlmap.switchScreen(data, num, sum, obj); }, - pictureChanged(picture) { + pictureChanged(picture) { } } diff --git a/src/views/newMap/mapDraftPicture/changePicture.vue b/src/views/newMap/mapDraftPicture/changePicture.vue index 7436ec4f5..991f59fea 100644 --- a/src/views/newMap/mapDraftPicture/changePicture.vue +++ b/src/views/newMap/mapDraftPicture/changePicture.vue @@ -10,9 +10,9 @@ @@ -37,7 +37,7 @@ export default { }, computed: { pictureList() { - return this.$store.state.map.map.pictureList; + return this.$store.state.map.map ? this.$store.state.map.map.pictureList : []; } }, methods: { @@ -45,6 +45,7 @@ export default { this.$refs.ruleForm.validate((valid) => { if (valid) { this.$emit('pictureChanged', this.ruleForm.picture); + this.doClose(); } }); }, diff --git a/src/views/newMap/mapDraftPicture/createPicture.vue b/src/views/newMap/mapDraftPicture/createPicture.vue index e4ca7d6fa..e187b08b4 100644 --- a/src/views/newMap/mapDraftPicture/createPicture.vue +++ b/src/views/newMap/mapDraftPicture/createPicture.vue @@ -39,7 +39,7 @@ export default { data() { return { centerDialogVisible: false, - ruleForm: { name: '', type: '', stationCode: '', deviceList: [] }, + ruleForm: { name: '', type: '', stationCode: '', deviceMap: {} }, rules: { name: [{ required: true, message: '请输入画面名称', trigger: 'blur' }], type: [{ required: true, message: '请选择画面类型', trigger: 'change' }], @@ -65,6 +65,7 @@ export default { if (map && parseInt(this.$route.params.mapId)) { saveMap(Object.assign(map, { mapId: this.$route.params.mapId })).then(() => { this.$message.success('创建画面成功!'); + this.doClose(); }).catch(() => { this.$message.error('创建画面失败!'); }); diff --git a/src/views/newMap/mapDraftPicture/mapoperate/device.vue b/src/views/newMap/mapDraftPicture/mapoperate/device.vue index 630f13081..2565f716d 100644 --- a/src/views/newMap/mapDraftPicture/mapoperate/device.vue +++ b/src/views/newMap/mapDraftPicture/mapoperate/device.vue @@ -15,12 +15,17 @@