From 9f95af633a03accf4d89657def0976bc5b03a72b Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 2 Nov 2020 10:01:24 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/drts/scene/modify.vue | 1 + .../scriptDisplay/component/covertOperation.js | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/views/drts/scene/modify.vue b/src/views/drts/scene/modify.vue index b51fe9e90..f0001b56a 100644 --- a/src/views/drts/scene/modify.vue +++ b/src/views/drts/scene/modify.vue @@ -610,6 +610,7 @@ export default { }; }, objectSpanMethod({ row, column, rowIndex, columnIndex }) { + debugger; if (this.startArray.length > 0) { if (columnIndex === 0) { let rowspan = 1; diff --git a/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js b/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js index e21cca5a4..84c4c0ef3 100644 --- a/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js +++ b/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js @@ -205,13 +205,13 @@ export function covertOperate(operationType, operationParamMap) { if (operationType == 'Set_Fault' || operationType == 'Cancel_Fault') { let deviceName = ''; const device = store.getters['map/getDeviceByCode'](operationParamMap.code); - if (device._type == 'StationStand') { + if (device._type == 'StationStand' || device._type == 'Signal' || device._type == 'Switch') { const station = store.getters['map/getDeviceByCode'](device.stationCode); - deviceName += '【车站-' + station.name + '】/'; + deviceName += '【车站-' + station.name + '】 / ' + deviceType[device._type] + device.name; } else { deviceName = '' + device.name; } - let tip = '请找到' + deviceType[device._type] + deviceName + ','; + let tip = '请找到' + deviceName + ','; if (operationType == 'Set_Fault') { tip += '设置故障,'; } else { @@ -262,9 +262,9 @@ export function covertOperate(operationType, operationParamMap) { function covertDeviceName(deviceInfo, deviceType) { let deviceName = ''; const device = store.getters['map/getDeviceByCode'](deviceInfo); - if (device._type == 'StationStand') { + if (device._type == 'StationStand' || device._type == 'Signal' || device._type == 'Switch') { const station = store.getters['map/getDeviceByCode'](device.stationCode); - deviceName += '车站-' + station.name + '/'; + deviceName += '车站-' + station.name + ' / '; } if (device._type == 'Section') { if (device.parentCode && device.type == '02') { From 9ace3fc66ff76784b51fb345eff7311570ad780f Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Mon, 2 Nov 2020 14:03:13 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E7=BB=98=E5=9B=BE=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/deviceStyle.js | 1 + src/jmapNew/shape/AutomacticRoute/index.js | 4 ++-- src/jmapNew/shape/AxleReset/index.js | 4 ++-- src/jmapNew/shape/DirectionRod/index.js | 4 ++-- src/jmapNew/shape/FloodGate/index.js | 4 ++-- src/jmapNew/shape/GuideLock/index.js | 4 ++-- src/jmapNew/shape/SaidLamp/index.js | 4 ++-- src/jmapNew/shape/Section/ELimitLines.js | 2 +- src/jmapNew/shape/StationTurnBack/index.js | 2 +- 9 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/jmapNew/config/deviceStyle.js b/src/jmapNew/config/deviceStyle.js index 86604993b..0a866fe5c 100644 --- a/src/jmapNew/config/deviceStyle.js +++ b/src/jmapNew/config/deviceStyle.js @@ -3,6 +3,7 @@ const mapDeviceStyle = { '02': 'fuzhou_01', '03': 'bejing_01', '04': 'chengdu_03', + '05': 'fuzhou_01', '06': 'ningbo_01', '07': 'haerbin_01', '08': 'foshan_01', diff --git a/src/jmapNew/shape/AutomacticRoute/index.js b/src/jmapNew/shape/AutomacticRoute/index.js index 6463e7ae4..eac3df196 100644 --- a/src/jmapNew/shape/AutomacticRoute/index.js +++ b/src/jmapNew/shape/AutomacticRoute/index.js @@ -18,7 +18,7 @@ export default class AutomacticRoute extends Group { this.model = model; this.style = style; this.isShowShape = true; - if (isShowThePrdType(model.prdType, style.AutomaticRoute.displayCondition) || model.previewOrMapDraw) { + if (isShowThePrdType(model.prdType, (style.AutomaticRoute || {}).displayCondition) || model.previewOrMapDraw) { this.create(); this.createMouseEvent(); this.setState(model); @@ -134,7 +134,7 @@ export default class AutomacticRoute extends Group { setShowMode() { const showMode = this.model.showMode; - const showConditions = this.style.AutomaticRoute.displayCondition; + const showConditions = (this.style.AutomaticRoute || {}).displayCondition; if (!showConditions || showConditions === '01' || showMode === showConditions) { this.showMode(); } else { diff --git a/src/jmapNew/shape/AxleReset/index.js b/src/jmapNew/shape/AxleReset/index.js index 2b7ba7688..e4ae37973 100644 --- a/src/jmapNew/shape/AxleReset/index.js +++ b/src/jmapNew/shape/AxleReset/index.js @@ -18,7 +18,7 @@ export default class AxleReset extends Group { this.model = model; this.style = style; this.isShowShape = true; - if (isShowThePrdType(model.prdType, style.AxleReset.displayCondition) || model.previewOrMapDraw) { + if (isShowThePrdType(model.prdType, (style.AxleReset || {}).displayCondition) || model.previewOrMapDraw) { this.create(); this.createMouseEvent(); this.setState(model); @@ -129,7 +129,7 @@ export default class AxleReset extends Group { } setShowMode() { const showMode = this.model.showMode; - const showConditions = this.style.AxleReset.displayCondition; + const showConditions = (this.style.AxleReset || {}).displayCondition; if (!showConditions || showConditions === '01' || showMode === showConditions) { this.showMode(); } else { diff --git a/src/jmapNew/shape/DirectionRod/index.js b/src/jmapNew/shape/DirectionRod/index.js index 25fb310c1..63518ce31 100644 --- a/src/jmapNew/shape/DirectionRod/index.js +++ b/src/jmapNew/shape/DirectionRod/index.js @@ -13,7 +13,7 @@ export default class DirectionRod extends Group { this.model = model; this.style = style; this.isShowShape = true; - if (isShowThePrdType(model.prdType, style.DirectionRod.displayCondition) || model.previewOrMapDraw) { + if (isShowThePrdType(model.prdType, (style.DirectionRod || {}).displayCondition) || model.previewOrMapDraw) { this.create(); this.createMouseEvent(); this.setState(model); @@ -91,7 +91,7 @@ export default class DirectionRod extends Group { setShowMode() { const showMode = this.model.showMode; - const showConditions = this.style.DirectionRod.displayCondition; + const showConditions = (this.style.DirectionRod || {}).displayCondition; if (!showConditions || showConditions === '01' || showMode === showConditions) { this.showMode(); } else { diff --git a/src/jmapNew/shape/FloodGate/index.js b/src/jmapNew/shape/FloodGate/index.js index 9457a382d..8aec39cb2 100644 --- a/src/jmapNew/shape/FloodGate/index.js +++ b/src/jmapNew/shape/FloodGate/index.js @@ -16,7 +16,7 @@ export default class FloodGate extends Group { this.model = model; this.style = style; this.isShowShape = true; - if (isShowThePrdType(model.prdType, style.FloodGate.displayCondition) || model.previewOrMapDraw) { + if (isShowThePrdType(model.prdType, (style.FloodGate || {}).displayCondition) || model.previewOrMapDraw) { this.create(); this.createMouseEvent(); this.setState(model); @@ -58,7 +58,7 @@ export default class FloodGate extends Group { setShowMode() { const showMode = this.model.showMode; - const showConditions = this.style.FloodGate.displayCondition; + const showConditions = (this.style.FloodGate || {}).displayCondition; if (!showConditions || showConditions === '01' || showMode === showConditions) { this.showMode(); } else { diff --git a/src/jmapNew/shape/GuideLock/index.js b/src/jmapNew/shape/GuideLock/index.js index b95937551..0f7e0dcf7 100644 --- a/src/jmapNew/shape/GuideLock/index.js +++ b/src/jmapNew/shape/GuideLock/index.js @@ -18,7 +18,7 @@ export default class GuideLock extends Group { this.model = model; this.style = style; this.isShowShape = true; - if (isShowThePrdType(model.prdType, style.GuideLock.displayCondition) || model.previewOrMapDraw) { + if (isShowThePrdType(model.prdType, (style.GuideLock || {}).displayCondition) || model.previewOrMapDraw) { this.create(); this.createMouseEvent(); this.setState(model); @@ -134,7 +134,7 @@ export default class GuideLock extends Group { } setShowMode() { const showMode = this.model.showMode; - const showConditions = this.style.GuideLock.displayCondition; + const showConditions = (this.style.GuideLock || {}).displayCondition; if (!showConditions || showConditions === '01' || showMode === showConditions) { this.showMode(); } else { diff --git a/src/jmapNew/shape/SaidLamp/index.js b/src/jmapNew/shape/SaidLamp/index.js index 82e818890..a395e12e3 100644 --- a/src/jmapNew/shape/SaidLamp/index.js +++ b/src/jmapNew/shape/SaidLamp/index.js @@ -23,7 +23,7 @@ export default class SaidLamp extends Group { this.deviceStyle = style[model._type]; if (this.deviceStyle) { this.isShowShape = true; - if (isShowThePrdType(model.prdType, this.deviceStyle.displayCondition) || model.previewOrMapDraw) { + if (isShowThePrdType(model.prdType, (this.deviceStyle || {}).displayCondition) || model.previewOrMapDraw) { this.create(); this.createMouseEvent(); this.setState(model); @@ -206,7 +206,7 @@ export default class SaidLamp extends Group { setShowMode() { const showMode = this.model.showMode; if (this.deviceStyle) { - const showConditions = this.deviceStyle.displayCondition; + const showConditions = (this.deviceStyle || {}).displayCondition; if (showConditions === '01' || showMode === showConditions) { this.control && this.control.show(); } else { diff --git a/src/jmapNew/shape/Section/ELimitLines.js b/src/jmapNew/shape/Section/ELimitLines.js index c42947db7..6a5302730 100644 --- a/src/jmapNew/shape/Section/ELimitLines.js +++ b/src/jmapNew/shape/Section/ELimitLines.js @@ -89,7 +89,7 @@ export default class ELimitLines extends Group { const beg = Object.assign({}, model.points[0]); const end = Object.assign({}, model.points[model.points.length - 1]); if (model.isSwitchSection && beg.y !== end.y) { - const swch = Vue.prototype.$jlmap.mapDevice[model.switch.code]; // 获取道岔model 及状态数据 + const swch = Vue.prototype.$jlmap.mapDevice[model.relSwitchCode]; // 获取道岔model 及状态数据 if (swch && swch.instance) { const traingle = new JTriangle(swch.intersection, swch.skew); diff --git a/src/jmapNew/shape/StationTurnBack/index.js b/src/jmapNew/shape/StationTurnBack/index.js index 518949840..ab88a8ad8 100644 --- a/src/jmapNew/shape/StationTurnBack/index.js +++ b/src/jmapNew/shape/StationTurnBack/index.js @@ -160,7 +160,7 @@ export default class StationTurnBack extends Group { setShowMode() { const showMode = this.model.showMode; - const showConditions = this.style.StationTurnBack.displayCondition; + const showConditions = (this.style.StationTurnBack || {}).displayCondition; if (!showConditions || showConditions == '01' || showMode === showConditions) { this.eachChild(item => item.show() ); } else { From 50ffb2256664f8a2b2fe23f12ee4a8c2e389cd39 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 2 Nov 2020 16:12:10 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E8=80=83=E8=AF=95=E7=B3=BB=E7=BB=9F=20?= =?UTF-8?q?=E6=95=99=E5=AD=A6=E7=B3=BB=E7=BB=9F=20=E8=AF=95=E9=A2=98?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=A0=8F=20=E6=8B=96=E6=8B=BD=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/directive/quickMenuDrag/quickMenuDrag.js | 21 ++- src/jmapNew/config/skinCode/haerbin_01.js | 2 +- src/views/drts/scene/modify.vue | 1 - .../newMap/displayNew/exam/tipExamList.vue | 172 ++++++++++-------- .../displayNew/lesson/tipTrainingDetail.vue | 70 +++---- 5 files changed, 150 insertions(+), 116 deletions(-) diff --git a/src/directive/quickMenuDrag/quickMenuDrag.js b/src/directive/quickMenuDrag/quickMenuDrag.js index 32287ee15..c9f4d3aaa 100644 --- a/src/directive/quickMenuDrag/quickMenuDrag.js +++ b/src/directive/quickMenuDrag/quickMenuDrag.js @@ -17,10 +17,10 @@ export default { /** 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px*/ if (sty.left.includes('%')) { styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100); - styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100); + styT = +document.body.clientHeight * (+sty.bottom.replace(/\%/g, '') / 100); } else { styL = +sty.left.replace(/\px/g, ''); - styT = +sty.top.replace(/\px/g, ''); + styT = +sty.bottom.replace(/\px/g, ''); } document.onmousemove = function (e) { @@ -28,20 +28,23 @@ export default { const l = e.clientX - disX; const t = e.clientY - disY; + console.log(l, l + styL, dragDom.style.left); + /** 移动当前元素*/ if (l + styL < 0) { dragDom.style.left = `0px`; - } else if (l + styL > document.body.clientWidth - dragDom.clientWidth - 30) { - dragDom.style.left = `${document.body.clientWidth - dragDom.clientWidth - 30}px`; + } else if (l + styL > document.body.clientWidth - dragDom.clientWidth - 100) { + dragDom.style.left = `${document.body.clientWidth - dragDom.clientWidth - 100}px`; } else { dragDom.style.left = `${l + styL}px`; } - if (t + styT < 0) { - dragDom.style.top = `0px`; - } else if (t + styT > document.body.clientHeight - dragDom.clientHeight - 10) { - dragDom.style.top = `${document.body.clientHeight - dragDom.clientHeight - 10}px`; + + if (document.body.clientHeight - (styT - t) - dragDom.clientHeight < 0) { + dragDom.style.bottom = `${document.body.clientHeight - dragDom.clientHeight}px`; + } else if (document.body.clientHeight - (styT - t) - dragDom.clientHeight > document.body.clientHeight - dragDom.clientHeight) { + dragDom.style.bottom = `0px`; } else { - dragDom.style.top = `${t + styT}px`; + dragDom.style.bottom = `${styT - t}px`; } /** 将此时的位置传出去*/ diff --git a/src/jmapNew/config/skinCode/haerbin_01.js b/src/jmapNew/config/skinCode/haerbin_01.js index 06b65b9c1..258e96671 100644 --- a/src/jmapNew/config/skinCode/haerbin_01.js +++ b/src/jmapNew/config/skinCode/haerbin_01.js @@ -266,7 +266,7 @@ class SkinCode extends defaultStyle { z:1, position: 1, // 停跳方向 text: 'S', // 停跳显示内容 - offset: { x: 10, y: 20 }, + offset: { x: 20, y: 21 }, textColor: '#00FF00', // 停跳文字颜色 fontWeight: 'bold', // 文字居中 fontSize: 18 // 文字大小 diff --git a/src/views/drts/scene/modify.vue b/src/views/drts/scene/modify.vue index f0001b56a..b51fe9e90 100644 --- a/src/views/drts/scene/modify.vue +++ b/src/views/drts/scene/modify.vue @@ -610,7 +610,6 @@ export default { }; }, objectSpanMethod({ row, column, rowIndex, columnIndex }) { - debugger; if (this.startArray.length > 0) { if (columnIndex === 0) { let rowspan = 1; diff --git a/src/views/newMap/displayNew/exam/tipExamList.vue b/src/views/newMap/displayNew/exam/tipExamList.vue index 63af43bb4..ba6e09447 100644 --- a/src/views/newMap/displayNew/exam/tipExamList.vue +++ b/src/views/newMap/displayNew/exam/tipExamList.vue @@ -1,75 +1,78 @@