From 47519b7040b3b11fd34d0439c2cbc49cc33a0480 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Fri, 27 Mar 2020 18:19:40 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=81=93=E5=B2=94?= =?UTF-8?q?=E7=94=9F=E6=88=90=E9=BB=98=E8=AE=A4=E7=8A=B6=E6=80=81=EF=BC=8C?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=81=93=E5=B2=94=E7=9A=AE=E8=82=A4=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .editorconfig | 2 +- src/jmapNew/config/skinCode/bejing_01.js | 57 ++-- src/jmapNew/config/skinCode/chengdu_01.js | 28 +- src/jmapNew/config/skinCode/chengdu_03.js | 28 +- src/jmapNew/config/skinCode/foshan_01.js | 25 +- src/jmapNew/config/skinCode/fuzhou_01.js | 49 +-- src/jmapNew/config/skinCode/haerbin_01.js | 55 ++-- src/jmapNew/config/skinCode/ningbo_01.js | 287 +++++++++--------- src/jmapNew/shape/Switch/ESwName.js | 6 +- src/jmapNew/shape/Switch/index.js | 93 +++--- src/utils/baseUrl.js | 4 +- src/views/lesson/trainingRule/addBatch.vue | 1 - .../newMapdraft/mapoperate/switch/create.vue | 6 +- 13 files changed, 338 insertions(+), 303 deletions(-) diff --git a/.editorconfig b/.editorconfig index f669cf1f7..cfd65abe8 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,7 +3,7 @@ root = true [*] charset = utf-8 -indent_style = space +indent_style = tab indent_size = 4 end_of_line = lf insert_final_newline = true diff --git a/src/jmapNew/config/skinCode/bejing_01.js b/src/jmapNew/config/skinCode/bejing_01.js index c9af34074..e9730155b 100644 --- a/src/jmapNew/config/skinCode/bejing_01.js +++ b/src/jmapNew/config/skinCode/bejing_01.js @@ -396,39 +396,46 @@ class SkinCode extends defaultStyle { this[deviceType.Switch] = { text: { - show: true, // 道岔名称显示 - position: 0, // 区段名称位置 1 上面 -1 下面 0 对称 - offset: { x: -15, y: -10 }, // 道岔名称与区段距离 - fontSize: 10, // 字体大小 - fontColor: '#C0C0C0', // 道岔名称颜色 - fontWeight: 'normal', // 字体粗细 - borderColor: '#FE0000', // 道岔边框颜色 - lossColor: '#FFFFFF', // 道岔失去颜色 - locateColor: '#00FF00', // 道岔定位颜色 - inversionColor: '#9C9D09', // 道岔反位颜色 - monolockColor: '#870E10' // 道岔单锁颜色 + show: true, // 道岔名称显示 + position: 0, // 区段名称位置 1 上面 -1 下面 0 对称 + offset: { x: -15, y: -10 }, // 道岔名称与区段距离 + fontSize: 10, // 字体大小 + fontColor: '#C0C0C0', // 道岔名称颜色 + fontWeight: 'normal', // 字体粗细 + borderColor: '#FE0000', // 道岔边框颜色 + lossColor: '#FFFFFF', // 道岔失去颜色 + locateColor: '#00FF00', // 道岔定位颜色 + inversionColor: '#9C9D09', // 道岔反位颜色 + monolockLocationColor: '#870E10', // 道岔单锁'定位'颜色 + monolockInversionColor: '#870E10', // 道岔单锁'反位'颜色 + block: true // 封锁名称 }, sectionAction: { - flag: false, // 道岔 关联区段显示 - spareColor: '#5b5b5b' // 区段显示颜色 + flag: false, // 道岔 关联区段显示 + spareColor: '#5b5b5b' // 区段显示颜色 }, core: { - length: 6 // 道岔单边长度 + length: 6 // 道岔单边长度 }, - monolock: { // 道岔单锁配置 - locationColor: '#870E10', // 道岔单锁定位颜色 (红色) - inversionColor: '#870E10', // 道岔单锁反位颜色 (红色) - rectShow: false // 道岔单锁 矩形框是否显示 + jointImg: { // 道岔 A B C D四元素属性配置 + trapezoidLength: 8 // 直角梯形元素默认长度 }, - block: { // 道岔封锁配置 - blockName: 'default', // 默认道岔封锁类型 - nameBorderShow: true, // 道岔名称是否有包围框 显示 - contentRectShow: false // 道岔封锁显示 + arcBlcok: { // 圆形封锁图形 + show: false, // 显示 + arcBorderColor: 'green', // 默认边框颜色 + locationColor: 'green', // 定位封锁颜色 + inversionColor: '#FFFF00' // 反位封锁颜色 + }, + rectLock: { // 矩形封锁框图形 + rectWidth: 18, // 矩形框 宽高 + rectBorderColor: '#fff', // 矩形边框颜色 + monolock: false, // 单锁显示 + block: false // 封锁显示 }, mouseOverStyle: { - borderBackgroundColor: '#22DFDF', // 边框背景色 - borderColor: '#fff', // 边框颜色 - textShadowColor: '#22DFDF' // 字体阴影颜色 + borderBackgroundColor: '#22DFDF', // 边框背景色 + borderColor: '#fff', // 边框颜色 + textShadowColor: '#22DFDF' // 字体阴影颜色 } }; diff --git a/src/jmapNew/config/skinCode/chengdu_01.js b/src/jmapNew/config/skinCode/chengdu_01.js index ea7c7dd31..adbd23269 100644 --- a/src/jmapNew/config/skinCode/chengdu_01.js +++ b/src/jmapNew/config/skinCode/chengdu_01.js @@ -377,7 +377,8 @@ class SkinCode extends defaultStyle { lossColor: 'lightgreen', // 道岔失去颜色 locateColor: 'lightgreen', // 道岔定位颜色 inversionColor: 'lightgreen', // 道岔反位颜色 - monolockColor: '#FFFFFF' // 道岔单锁颜色 + monolockLocationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色) + monolockInversionColor: '#FFFF00' // 道岔单锁'反位'颜色 (黄色) }, sectionAction: { flag: false, // 道岔 关联区段显示 @@ -386,18 +387,21 @@ class SkinCode extends defaultStyle { core: { length: 10 // 道岔单边长度 }, - monolock: { // 道岔单锁配置 - locationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色) - inversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色) - rectShow: true, // 道岔单锁 矩形框是否显示 - rectWidth: 18, // 矩形框 宽高 - rectBorderColor: '#fff' // 矩形边框颜色 + jointImg: { // 道岔 A B C D四元素属性配置 + trapezoidLength: 8 // 直角梯形元素默认长度 }, - block: { // 道岔封锁配置 - blockName: 'default', // 默认道岔封锁类型 - nameBorderShow: false, // 道岔名称是否有包围框 显示 - contentRectShow: true, // 道岔封锁显示 - contentRectColor: 'red' // 道岔封锁边框颜色 + arcBlcok: { // 圆形封锁图形 + show: false, // 显示 + arcBorderColor: 'green', // 默认边框颜色 + locationColor: 'green', // 定位封锁颜色 + inversionColor: '#FFFF00' // 反位封锁颜色 + }, + rectLock: { // 矩形封锁框图形 + rectWidth: 18, // 矩形框 宽高 + rectBorderColor: '#fff', // 矩形边框颜色 + monolock: true, // 单锁显示 + block: true, // 封锁显示 + blockColor: 'red' // 封锁颜色 } }; diff --git a/src/jmapNew/config/skinCode/chengdu_03.js b/src/jmapNew/config/skinCode/chengdu_03.js index 88e0082a6..ea08a7f4a 100644 --- a/src/jmapNew/config/skinCode/chengdu_03.js +++ b/src/jmapNew/config/skinCode/chengdu_03.js @@ -359,7 +359,8 @@ class SkinCode extends defaultStyle { lossColor: '#C00808', // 道岔失去颜色 locateColor: '#00FF00', // 道岔定位颜色 inversionColor: '#FFFF00', // 道岔反位颜色 - monolockColor: '#FFFFFF' // 道岔单锁颜色 + monolockLocationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色) + monolockInversionColor: '#FFFF00' // 道岔单锁'反位'颜色 (黄色) }, sectionAction: { flag: false, // 道岔 关联区段显示 @@ -368,18 +369,21 @@ class SkinCode extends defaultStyle { core: { length: 6 // 道岔单边长度 }, - monolock: { // 道岔单锁配置 - locationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色) - inversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色) - rectShow: true, // 道岔单锁 矩形框是否显示 - rectWidth: 18, // 矩形框 宽高 - rectBorderColor: '#fff' // 矩形边框颜色 + jointImg: { // 道岔 A B C D四元素属性配置 + trapezoidLength: 8 // 直角梯形元素默认长度 }, - block: { // 道岔封锁配置 - blockName: 'default', // 默认道岔封锁类型 - nameBorderShow: false, // 道岔名称是否有包围框 显示 - contentRectShow: true, // 道岔封锁显示 - contentRectColor: 'red' // 道岔封锁边框颜色 + arcBlcok: { // 圆形封锁图形 + show: false, // 显示 + arcBorderColor: 'green', // 默认边框颜色 + locationColor: 'green', // 定位封锁颜色 + inversionColor: '#FFFF00' // 反位封锁颜色 + }, + rectLock: { // 矩形封锁框图形 + rectWidth: 18, // 矩形框 宽高 + rectBorderColor: '#fff', // 矩形边框颜色 + monolock: true, // 单锁显示 + block: true, // 封锁显示 + blockColor: 'red' // 封锁颜色 } }; diff --git a/src/jmapNew/config/skinCode/foshan_01.js b/src/jmapNew/config/skinCode/foshan_01.js index d9b96adc3..fca3eab1a 100644 --- a/src/jmapNew/config/skinCode/foshan_01.js +++ b/src/jmapNew/config/skinCode/foshan_01.js @@ -397,7 +397,9 @@ class SkinCode extends defaultStyle { lossColor: '#FFFFFF', // 道岔失去颜色 locateColor: '#00FF00', // 道岔定位颜色 inversionColor: '#FFFF00', // 道岔反位颜色 - monolockColor: '#870E10' // 道岔单锁颜色 + monolockLocationColor: '#c00000', // 道岔单锁'定位'颜色 (红色) + monolockInversionColor: '#c00000', // 道岔单锁'反位'颜色 (红色) + block: true // 封锁名称 }, sectionAction: { flag: false, // 道岔 关联区段显示 @@ -406,15 +408,20 @@ class SkinCode extends defaultStyle { core: { length: 6 // 道岔单边长度 }, - block: { // 道岔封锁配置 - blockName: 'foshan_01', // 默认道岔封锁类型 - nameBorderShow: true, // 道岔名称是否有包围框 显示 - contentRectShow: false // 道岔封锁显示 + jointImg: { // 道岔 A B C D四元素属性配置 + trapezoidLength: 8 // 直角梯形元素默认长度 }, - monolock: { // 道岔单锁配置 - locationColor: '#c00000', // 道岔单锁定位颜色 (红色) - inversionColor: '#c00000', // 道岔单锁反位颜色 (红色) - rectShow: false // 道岔单锁 矩形框是否显示 + arcBlcok: { // 圆形封锁图形 + show: false, // 显示 + arcBorderColor: 'green', // 默认边框颜色 + locationColor: 'green', // 定位封锁颜色 + inversionColor: '#FFFF00' // 反位封锁颜色 + }, + rectLock: { // 矩形封锁框图形 + rectWidth: 22, // 矩形框 宽高 + rectBorderColor: '#fff', // 矩形边框颜色 + monolock: false, // 单锁显示 + block: false // 封锁显示 } }; diff --git a/src/jmapNew/config/skinCode/fuzhou_01.js b/src/jmapNew/config/skinCode/fuzhou_01.js index 00e880227..5d039fa98 100644 --- a/src/jmapNew/config/skinCode/fuzhou_01.js +++ b/src/jmapNew/config/skinCode/fuzhou_01.js @@ -373,34 +373,41 @@ class SkinCode extends defaultStyle { this[deviceType.Switch] = { text: { - show: true, // 道岔名称显示 - position: 0, // 区段名称位置 1 上面 -1 下面 0 对称 - offset: {x: 0, y: 8}, // 道岔名称与区段距离 - fontSize: 11, // 字体大小 - fontColor: '#C0C0C0', // 道岔名称颜色 + show: true, // 道岔名称显示 + position: 0, // 区段名称位置 1 上面 -1 下面 0 对称 + offset: {x: 0, y: 8}, // 道岔名称与区段距离 + fontSize: 11, // 字体大小 + fontColor: '#C0C0C0', // 道岔名称颜色 fontWeight: 'bold', // 字体粗细 - borderColor: '#FE0000', // 道岔边框颜色 - lossColor: '#FFFFFF', // 道岔失去颜色 - locateColor: '#00FF00', // 道岔定位颜色 - inversionColor: '#9C9D09', // 道岔反位颜色 - monolockColor: '#870E10' // 道岔单锁颜色 + borderColor: '#FE0000', // 道岔边框颜色 + lossColor: '#FFFFFF', // 道岔失去颜色 + locateColor: '#00FF00', // 道岔定位颜色 + inversionColor: '#9C9D09', // 道岔反位颜色 + monolockLocationColor: '#ea282c', // 道岔单锁'定位'颜色 + monolockInversionColor: '#ea282c', // 道岔单锁'反位'颜色 + block: true // 封锁名称 }, sectionAction: { - flag: false, // 道岔 关联区段显示 - spareColor: '#5b5b5b' // 区段显示颜色 + flag: false, // 道岔 关联区段显示 + spareColor: '#5b5b5b' // 区段显示颜色 }, core: { - length: 6 // 道岔单边长度 + length: 6 // 道岔单边长度 }, - block: { // 道岔封锁配置 - blockName: 'default', // 默认道岔封锁类型 - nameBorderShow: true, // 道岔名称是否有包围框 显示 - contentRectShow: false // 道岔封锁显示 + block: { // 道岔封锁配置 + blockName: 'default' // 默认道岔封锁类型 }, - monolock: { // 道岔单锁配置 - locationColor: '#ea282c', // 道岔单锁定位颜色 (红色) - inversionColor: '#ea282c', // 道岔单锁反位颜色 (红色) - rectShow: false // 道岔单锁 矩形框是否显示 + arcBlcok: { // 圆形封锁图形 + show: false, // 显示 + arcBorderColor: 'green', // 默认边框颜色 + locationColor: 'green', // 定位封锁颜色 + inversionColor: '#FFFF00' // 反位封锁颜色 + }, + rectLock: { // 矩形封锁框图形 + rectWidth: 18, // 矩形框 宽高 + rectBorderColor: '#fff', // 矩形边框颜色 + monolock: false, // 单锁显示 + block: false // 封锁显示 } }; diff --git a/src/jmapNew/config/skinCode/haerbin_01.js b/src/jmapNew/config/skinCode/haerbin_01.js index 7ad30dda3..cf6c1cef2 100644 --- a/src/jmapNew/config/skinCode/haerbin_01.js +++ b/src/jmapNew/config/skinCode/haerbin_01.js @@ -386,40 +386,49 @@ class SkinCode extends defaultStyle { this[deviceType.Switch] = { text: { - show: true, // 道岔名称显示 - position: 0, // 区段名称位置 1 上面 -1 下面 0 对称 - offset: { x: 0, y: 8 }, // 道岔名称与区段距离 - fontSize: 11, // 字体大小 + show: true, // 道岔名称显示 + position: 0, // 区段名称位置 1 上面 -1 下面 0 对称 + offset: { x: 0, y: 8 }, // 道岔名称与区段距离 + fontSize: 11, // 字体大小 fontColor: '#fff', // 道岔名称颜色 fontWeight: 'bold', // 字体粗细 borderColor: 'red', // 道岔边框颜色 - lossColor: '#FFFFFF', // 道岔失去颜色 - locateColor: '#fff', // 道岔定位颜色 + lossColor: '#FFFFFF', // 道岔失去颜色 + locateColor: '#fff', // 道岔定位颜色 inversionColor: '#fff', // 道岔反位颜色 - monolockColor: '#fff' // 道岔单锁颜色 + monolock: true, // 名称单锁显示包围框 + monolockLocationColor: '#fff', // 道岔单锁'定位'颜色 + monolockInversionColor: '#fff' // 道岔单锁'反位'颜色 }, sectionAction: { - flag: true, // 道岔 关联区段显示 - spareColor: '#5b5b5b' // 区段显示颜色 (灰色) + flag: true, // 道岔 关联区段显示 + spareColor: '#5b5b5b' // 区段显示颜色 (灰色) }, core: { - splice: true, // 哈尔滨特殊显示 - length: 6 // 道岔单边长度 + splice: true, // 哈尔滨特殊显示 + length: 6 // 道岔单边长度 }, - block: { // 道岔封锁配置 - blockName: 'default', // 默认道岔封锁类型 - nameBorderShow: false, // 道岔名称是否有包围框 显示 - contentRectShow: false, // 道岔封锁显示 - contentRectColor: '#fff', // 道岔封锁名称颜色 - rhomboidShow: true // 道岔单独显示 + trapezoid: { // 直角梯形元素 + length: 16, // 默认长度 + block: true // 封锁显示 }, - monolock: { // 道岔单锁配置 - locationColor: '#fff', // 道岔单锁定位颜色 (红色) - inversionColor: '#fff', // 道岔单锁反位颜色 (红色) - nameBorderShow: true, // 道岔名称是否有包围框 显示 - rectShow: false, // 道岔单锁 矩形框是否显示 + jointImg: { // 道岔 A B C D四元素属性配置 + trapezoidLength: 8, // 直角梯形元素默认长度 + trapezoidBlock: true, // 梯形封锁显示 + fork: true, // 挤岔专用(如有挤岔操作 变为true) + forKColor: 'red' // 挤岔颜色 配合挤岔专用 + }, + arcBlcok: { // 圆形封锁图形 + show: false, // 显示 + arcBorderColor: 'green', // 默认边框颜色 + locationColor: 'green', // 定位封锁颜色 + inversionColor: '#FFFF00' // 反位封锁颜色 + }, + rectLock: { // 矩形封锁框图形 rectWidth: 18, // 矩形框 宽高 - rectBorderColor: 'red' // 矩形边框颜色 + rectBorderColor: 'red', // 矩形边框颜色 + monolock: false, // 单锁显示 + block: false // 封锁显示 } }; diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index 92de804a3..65ab3e1d0 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -200,125 +200,6 @@ class SkinCode extends defaultStyle { } }; - this[deviceType.AutoTurnBack] = { - // 是否显示 - visibleConditions: '01', - text: { - fontSize: 11, // 字体大小 - fontWeight: 'normal', // 字体粗细 - distance: 5 // 灯跟文字距离 - }, - subtitleText: { - fontSize: 11, // 字体大小 - fontWeight: 'normal', // 字体粗细 - distance: 17 // 等于副标题距离 - }, - lamp: { - borderShow: true, // 是否显示边框 - lineDash: null, // 灯的包围框 - stroke: '#FFFFFF', // 框的颜色 - fill: 'rgba(0,0,0,0)', // 填充色 - radiusR: 6, // 控制灯大小 - controlColor: '#b5b3b3', // 控制灯颜色 (灰色) - lightUpColor: '#ffff00' // 点亮灯颜色 - }, - OutFrame: { - - } - }; - /** 引导总锁 */ - this[deviceType.GuideLock] = { - // 是否显示 - displayCondition: '03', // 显示条件 prdType - text: { - fontSize: 11, // 字体大小 - fontWeight: 'normal', // 字体粗细 - distance: 5 // 灯跟文字距离 - }, - lamp: { - fill: 'rgba(0,0,0,0)', // 填充色 - radiusR: 6, // 控制灯大小 - controlColor: '#b5b3b3', // 控制灯颜色 (灰色) - lightUpColor: '#FF0000' // 点亮灯颜色 - } - }; - this[deviceType.StationStand] = { - common: { // 通用属性 - textFontSize: 10, // 站台默认字体大小 - haveJumpShow: false, // 站台是否有列车停跳显示 - functionButtonShow: '03' // 功能灯按钮显示条件(01所有模式下显示 02 行调显示 03现地显示) - }, - safetyDoor: { // 屏蔽门 - height: 3, // 站台屏蔽门高度 - distance: 4, // 站台和屏蔽门之间的距离 - defaultColor: 'green', // 屏蔽门默认颜色 - splitDoorColor: 'green' // 屏蔽门切除颜色 - }, - stand: { // 站台 - headFontSize: 10, // 站台首端字体大小 - spareColor: 'white', // 站台空闲颜色 - stopColor: 'yellow', // 站台列车停站颜色 - jumpStopColor: '#6260f3', // 站台跳停颜色 - designatedJumpStopColor: 'lightSkyBlue' // 站台指定列车跳停颜色 - }, - standEmergent: { // 紧急关闭 - mergentR: 4, // 站台紧急关闭半径 - offset: { x: 0, y: 3 }, // 站台紧急关闭偏移量 - closeColor: 'red' // 站台紧急关闭颜色 - }, - reentry: { // 站台折返策略 - position: 0, // 折返方向 - offset: { x: -16, y: 20 }, // 折返偏移量 - noHumanColor: '#0F16DA', // 站台无人折返 - autoChangeEndsColor: '#0BF400' // 站台自动换端 - }, - detainCar: { // 扣车 - text: 'H', // 扣车显示内容 - offset: { x: -8, y: 0 }, // 扣车偏移量 - centerTrainColor: 'white', // 中心扣车颜色 - andCenterTrainColor: 'red', // 车站+中心扣车颜色 - detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色 - fontSize: 10, - fontWeight: 'normal' - }, - stopTime: { // 停站时间 - offset: { x: -8, y: -4 }, // 运行时间偏移量 - textColor: 'white', // 停站时间字体颜色 - textFontSize: 10 // 停站时间字体大小 - }, - jump: {}, - level: { // 运行等级 - position: -1, // 运行等级方向 - offset: { x: -8, y: 4 }, // 运行等级偏移量 - textColor: '#FFF000' // 停站等级字体颜色 - }, - text: { - fontSize: 11, // 字体大小 - fontWeight: 'normal', // 字体粗细 - distance: 5 // 灯跟文字距离 - }, - lamp: { - radiusR: 6, // 控制灯大小 - lampColor: '#5A5D5A' // 功能按钮颜色 - } - }; - - this[deviceType.StationCounter] = { - text: { - distance: 2, // 计数器名称和文字的距离 - fontColor: '#FFFFFF', // 计数器字体颜色 - borderColor: '#E4EF50' // 计数器边框颜色 - } - }; - - this[deviceType.StationDelayUnlock] = { - text: { - distance: 3, // 延迟解锁和设备之间的距离 - fontColor: '#FFFFFF', // 延时解锁字体颜色 - borderColor: '#FFFFFF' // 延迟解锁边框颜色 - } - }; - this[deviceType.Station] = { // text: { // show: true // 公里标名称显示 @@ -382,39 +263,163 @@ class SkinCode extends defaultStyle { text: { show: true, // 道岔名称显示 position: 0, // 区段名称位置 1 上面 -1 下面 0 对称 - offset: { x: 5, y: -10 }, // 道岔名称与区段距离 + offset: { x: 5, y: -10 }, // 道岔名称与区段距离 fontSize: 11, // 字体大小 fontColor: '#C0C0C0', // 道岔名称颜色 fontWeight: 'normal', // 字体粗细 - borderColor: '#FE0000', // 道岔边框颜色 - lossColor: 'lightgreen', // 道岔失去颜色 + borderColor: '#FE0000', // 道岔名称边框颜色 + lossColor: 'lightgreen', // 道岔名称失去颜色 locateColor: 'lightgreen', // 道岔定位颜色 - inversionColor: '#FFFF00', // 道岔反位颜色 - monolockColor: '#FFFFFF' // 道岔单锁颜色 + inversionColor: '#FFFF00', // 道岔反位颜色 + monolockLocationColor: 'lightgreen', // 道岔单锁'定位'颜色 (浅绿色) + monolockInversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色) + block: true // 封锁名称 }, sectionAction: { - flag: false, // 道岔 关联区段显示 - spareColor: '#5b5b5b' // 区段显示颜色 + flag: false, // 道岔 关联区段显示 + spareColor: '#5b5b5b' // 区段显示颜色 }, core: { length: 6 // 道岔单边长度 }, - monolock: { // 道岔单锁配置 - locationColor: 'lightgreen', // 道岔单锁'定位'颜色 (红色) - inversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (红色) - rectShow: false, // 道岔单锁 矩形框是否显示 - arcShow: true, // 道岔单锁 圆形显示 - locationArcColor: 'green', // 圆形单锁框边框颜色 定位 - inversionArcColor: '#FFFF00', // 圆形单锁框边框颜色 反位 - rectWidth: 22, // 矩形框 宽高 - rectBorderColor: '#fff' // 矩形边框颜色 + jointImg: { // 道岔 A B C D四元素属性配置 + trapezoidLength: 8, // 直角梯形元素默认长度 + block: true, // 联合图形封锁状态 + flashingColors: '#D600D5', // 联合图形封锁闪烁显示颜色 + fork: true, // 挤岔专用(如有挤岔操作 变为true) + forKColor: 'red' // 挤岔颜色 配合挤岔专用 }, - block: { // 道岔封锁配置 - blockName: 'ningbo_01', // 默认道岔封锁类型 - flashingColors: '#D600D5', // 闪烁显示颜色 - nameBorderShow: true, // 道岔名称是否有包围框 显示 - contentRectShow: false, // 道岔封锁显示 - contentRectColor: 'red' // 道岔封锁边框颜色 + arcBlcok: { // 圆形封锁图形 + show: true, // 显示 + arcBorderColor: 'green', // 默认边框颜色 + locationColor: 'green', // 定位封锁颜色 + inversionColor: '#FFFF00' // 反位封锁颜色 + }, + rectLock: { // 矩形封锁框图形 + rectWidth: 22, // 矩形框 宽高 + rectBorderColor: '#fff', // 矩形边框颜色 + monolock: false, // 单锁显示 + block: false // 封锁显示 + } + }; + this[deviceType.StationStand] = { + common: { // 通用属性 + textFontSize: 10, // 站台默认字体大小 + haveJumpShow: false, // 站台是否有列车停跳显示 + functionButtonShow: '03' // 功能灯按钮显示条件(01所有模式下显示 02 行调显示 03现地显示) + }, + safetyDoor: { // 屏蔽门 + height: 3, // 站台屏蔽门高度 + distance: 4, // 站台和屏蔽门之间的距离 + defaultColor: 'green', // 屏蔽门默认颜色 + splitDoorColor: 'green' // 屏蔽门切除颜色 + }, + stand: { // 站台 + headFontSize: 10, // 站台首端字体大小 + spareColor: 'white', // 站台空闲颜色 + stopColor: 'yellow', // 站台列车停站颜色 + jumpStopColor: '#6260f3', // 站台跳停颜色 + designatedJumpStopColor: 'lightSkyBlue' // 站台指定列车跳停颜色 + }, + standEmergent: { // 紧急关闭 + mergentR: 4, // 站台紧急关闭半径 + offset: { x: 0, y: 3 }, // 站台紧急关闭偏移量 + closeColor: 'red' // 站台紧急关闭颜色 + }, + reentry: { // 站台折返策略 + position: 0, // 折返方向 + offset: { x: -16, y: 20 }, // 折返偏移量 + noHumanColor: '#0F16DA', // 站台无人折返 + autoChangeEndsColor: '#0BF400' // 站台自动换端 + }, + detainCar: { // 扣车 + text: 'H', // 扣车显示内容 + offset: { x: -8, y: 0 }, // 扣车偏移量 + centerTrainColor: 'white', // 中心扣车颜色 + andCenterTrainColor: 'red', // 车站+中心扣车颜色 + detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色 + fontSize: 10, + fontWeight: 'normal' + }, + stopTime: { // 停站时间 + offset: { x: -8, y: -4 }, // 运行时间偏移量 + textColor: 'white', // 停站时间字体颜色 + textFontSize: 10 // 停站时间字体大小 + }, + jump: {}, + level: { // 运行等级 + position: -1, // 运行等级方向 + offset: { x: -8, y: 4 }, // 运行等级偏移量 + textColor: '#FFF000' // 停站等级字体颜色 + }, + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + lamp: { + radiusR: 6, // 控制灯大小 + lampColor: '#5A5D5A' // 功能按钮颜色 + } + }; + + this[deviceType.AutoTurnBack] = { + // 是否显示 + visibleConditions: '01', + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + subtitleText: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 17 // 等于副标题距离 + }, + lamp: { + borderShow: true, // 是否显示边框 + lineDash: null, // 灯的包围框 + stroke: '#FFFFFF', // 框的颜色 + fill: 'rgba(0,0,0,0)', // 填充色 + radiusR: 6, // 控制灯大小 + controlColor: '#b5b3b3', // 控制灯颜色 (灰色) + lightUpColor: '#ffff00' // 点亮灯颜色 + }, + OutFrame: { + + } + }; + + /** 引导总锁 */ + this[deviceType.GuideLock] = { + // 是否显示 + displayCondition: '03', // 显示条件 prdType + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + lamp: { + fill: 'rgba(0,0,0,0)', // 填充色 + radiusR: 6, // 控制灯大小 + controlColor: '#b5b3b3', // 控制灯颜色 (灰色) + lightUpColor: '#FF0000' // 点亮灯颜色 + } + }; + + this[deviceType.StationCounter] = { + text: { + distance: 2, // 计数器名称和文字的距离 + fontColor: '#FFFFFF', // 计数器字体颜色 + borderColor: '#E4EF50' // 计数器边框颜色 + } + }; + + this[deviceType.StationDelayUnlock] = { + text: { + distance: 3, // 延迟解锁和设备之间的距离 + fontColor: '#FFFFFF', // 延时解锁字体颜色 + borderColor: '#FFFFFF' // 延迟解锁边框颜色 } }; diff --git a/src/jmapNew/shape/Switch/ESwName.js b/src/jmapNew/shape/Switch/ESwName.js index 320d9777a..460385da0 100644 --- a/src/jmapNew/shape/Switch/ESwName.js +++ b/src/jmapNew/shape/Switch/ESwName.js @@ -24,7 +24,6 @@ class ESwName extends Group { fontSize: style.Switch.text.fontSize, fontFamily: style.fontFamily, text: model.name, - // textAlign: model.triangle.drictx === 1 ? 'left' : 'right', textAlign: 'center', textVerticalAlign: 'middle', textFill: style.Switch.text.fontColor @@ -33,9 +32,6 @@ class ESwName extends Group { const rect = this.nameText.getBoundingRect(); let textWidth = rect.width; - if (style.Switch.monolock.nameBorderShow) { - textWidth = rect.width; - } if (model.triangle.drictx !== 1) { rect.x += rect.width; textWidth = -textWidth; @@ -60,7 +56,7 @@ class ESwName extends Group { const data = LangStorage.getLang() == 'en' ? 'Turnout section' : '道岔区段名称'; - this.arrowText = new Text({ + this.arrowText = new Text({ // 移入道岔显示名称 zlevel: model.zlevel, z: model.z + 20, style: { diff --git a/src/jmapNew/shape/Switch/index.js b/src/jmapNew/shape/Switch/index.js index f88f24cc9..df3ebe68e 100644 --- a/src/jmapNew/shape/Switch/index.js +++ b/src/jmapNew/shape/Switch/index.js @@ -66,7 +66,7 @@ export default class Switch extends Group { const point2 = [model.intersection.x + directx * (width2 + width1) + directx * detailWidth, point1[1]]; const point3 = [point2[0] + directx * this.triangle.getCotRate() * swPadding, point2[1] + directy * swPadding]; const point4 = [point3[0] + direct * this.triangle.getSin(switchWidth) - directx * 2 * detailWidth, point3[1] - direct * this.triangle.getCos(switchWidth)]; - this.locShelter = new ESwLocal({ // 定位 覆盖形状 + this.locShelter = new ESwLocal({ // 定位 覆盖形状 A zlevel: this.zlevel, z: this.z, style: style, @@ -81,7 +81,7 @@ export default class Switch extends Group { const rpoint2 = [rpoint1[0] + directx * (width2 + width1) - directx * width3, model.intersection.y + directy * switchWidth1]; const rpoint3 = [rpoint2[0] + directx * 10, rpoint2[1]]; const rpoint4 = [rpoint2[0] + directx * 10, rpoint1[1]]; - this.relocShelter = new ESwLnversion({ // 反位覆盖形状 + this.relocShelter = new ESwLnversion({ // 反位覆盖形状 B zlevel: this.zlevel, z: this.z, style: style, @@ -95,7 +95,7 @@ export default class Switch extends Group { const spoint2 = [spoint1[0] - directx * (width2 + width1) - directx * width3, spoint1[1]]; const spoint3 = [model.intersection.x - directx * width3, model.intersection.y + directy * switchWidth1]; const spoint4 = [spoint1[0] + directx * (width2 + width1) - directx * width3, spoint3[1]]; - this.rhomboid = new ERhomboid({ // 岔芯 平行四边形 + this.rhomboid = new ERhomboid({ // 岔芯 平行四边形 C zlevel: this.zlevel, z: this.z, style: style, @@ -105,16 +105,13 @@ export default class Switch extends Group { onmouseout: () => { this.name.getArrowText().hide(); } }); - let spointLength1 = 8; + const trapezoidWidth = this.style.Switch.jointImg.trapezoidLength; const Tspoint1 = [model.intersection.x + directx * width3 + directx * (width2 + width1) - directx * width3, model.intersection.y + directy * switchWidth1]; - if (this.style.Switch.block.rhomboidShow) { - spointLength1 = 16; - } - const Tspoint2 = [Tspoint1[0] - directx * spointLength1, Tspoint1[1]]; - const Tspoint3 = [Tspoint1[0] - directx * spointLength1, model.intersection.y - directy * switchWidth1]; + const Tspoint2 = [Tspoint1[0] - directx * trapezoidWidth, Tspoint1[1]]; + const Tspoint3 = [Tspoint1[0] - directx * trapezoidWidth, model.intersection.y - directy * switchWidth1]; const Tspoint4 = [model.intersection.x + directx * width3, Tspoint3[1]]; const Tspoint5 = [Tspoint1[0], Tspoint1[1]]; - this.sheltertriangle = new ETriangle({ // 岔芯 直角梯形 (用于'挤岔') + this.sheltertriangle = new ETriangle({ // 岔芯 直角梯形 (用于'挤岔') D zlevel: this.zlevel, z: this.z, style: style, @@ -171,27 +168,28 @@ export default class Switch extends Group { this.lockRect = new ELockRect({ // 锁定矩形 zlevel: this.zlevel, z: this.z + 6, - x: this.model.intersection.x - this.style.Switch.monolock.rectWidth / 2 + offsetX, - y: this.model.intersection.y - this.style.Switch.monolock.rectWidth / 2, - width: this.style.Switch.monolock.rectWidth, + x: this.model.intersection.x - this.style.Switch.rectLock.rectWidth / 2 + offsetX, + y: this.model.intersection.y - this.style.Switch.rectLock.rectWidth / 2, + width: this.style.Switch.rectLock.rectWidth, lineWidth: 1.8, - stroke: this.style.Switch.monolock.rectBorderColor, + stroke: this.style.Switch.rectLock.rectBorderColor, fill: this.style.transparentColor }); - - this.lockArc = new ELockArc({ // 锁定矩形 - zlevel: this.zlevel, - z: this.z + 6, - x: this.model.intersection.x, - y: this.model.intersection.y, - lineWidth: 1.2, - stroke: this.style.Switch.monolock.arcBorderColor, - fill: this.style.transparentColor - }); - this.add(this.lockArc); this.add(this.lockRect); this.lockRect.hide(); - this.lockArc.hide(); + if (this.style.Switch.arcBlcok) { + this.lockArc = new ELockArc({ // 锁定矩形 + zlevel: this.zlevel, + z: this.z + 6, + x: this.model.intersection.x, + y: this.model.intersection.y, + lineWidth: 1.2, + stroke: this.style.Switch.arcBlcok.arcBorderColor, + fill: this.style.transparentColor + }); + this.add(this.lockArc); + this.lockArc.hide(); + } } /** 名称动画*/ @@ -277,7 +275,7 @@ export default class Switch extends Group { /** 挤叉*/ setForkAction() { this.rhomboid.hide(); // 平行四边形 - if (this.style.Switch.block.blockName == 'ningbo_01' || this.style.Switch.block.blockName == 'foshan_01') { + if (this.style.Switch.jointImg.fork) { this.recover(); this.relocShelter.show(); this.relocShelter.animateStyle(item => { @@ -308,41 +306,38 @@ export default class Switch extends Group { /** 单锁*/ setMonolock() { - if (this.style.Switch.monolock.rectShow) { // 判断单锁矩形是否显示 + if (this.style.Switch.rectLock.monolock) { // 判断单锁矩形是否显示 this.lockRect.show(); } - if (this.style.Switch.monolock.nameBorderShow) { // 单锁显示名称包围框 + if (this.style.Switch.text.monolock) { // 单锁显示名称包围框 this.setHasTextBorder(1); } - if (this.style.Switch.monolock.arcShow) { // 圆形单锁是否显示 + if (this.style.Switch.arcBlcok.show) { // 圆形单锁是否显示 this.lockArc.show(); - this.model.normalPosition && this.lockArc.setStyle({ stroke: this.style.Switch.monolock.locationArcColor }); - !this.model.normalPosition && this.lockArc.setStyle({ stroke: this.style.Switch.monolock.inversionArcColor }); - } - if (this.model.normalPosition) { - this.setTextColor(this.style.Switch.monolock.locationColor); // 定位 设置道岔名称颜色 - } else if (this.model.reversePosition) { - this.setTextColor(this.style.Switch.monolock.inversionColor); // 反位 设置道岔名称颜色 + this.model.normalPosition && this.lockArc.setStyle({ stroke: this.style.Switch.arcBlcok.locationColor }); + !this.model.normalPosition && this.lockArc.setStyle({ stroke: this.style.Switch.aBrclcok.inversionColor }); } + this.model.normalPosition && this.setTextColor(this.style.Switch.text.monolockLocationColor); // 定位 设置道岔名称颜色 + this.model.reversePosition && this.setTextColor(this.style.Switch.text.monolockInversionColor); // 反位 设置道岔名称颜色 } /** 封锁 */ block() { - if (this.style.Switch.block.blockName == 'ningbo_01') { + if (this.style.Switch.jointImg.block) { this.recover(); this.relocShelter.show(); this.relocShelter.animateStyle(item => { item.animateStyle(true) .when(0, { fill: this.style.backgroundColor }) - .when(1000, { fill: this.style.Switch.block.flashingColors }) + .when(1000, { fill: this.style.Switch.jointImg.flashingColors }) .when(2000, { fill: this.style.backgroundColor }) .start(); }); - this.sheltertriangle.show(); // 宁波线路挤叉特殊显示 + this.sheltertriangle.show(); this.sheltertriangle.animateStyle(item => { item.animateStyle(true) .when(0, { fill: this.style.backgroundColor }) - .when(1000, { fill: this.style.Switch.block.flashingColors }) + .when(1000, { fill: this.style.Switch.jointImg.flashingColors }) .when(2000, { fill: this.style.backgroundColor }) .start(); }); @@ -350,20 +345,22 @@ export default class Switch extends Group { this.locShelter.animateStyle(item => { item.animateStyle(true) .when(0, { fill: this.style.backgroundColor }) - .when(1000, { fill: this.style.Switch.block.flashingColors }) + .when(1000, { fill: this.style.Switch.jointImg.flashingColors }) .when(2000, { fill: this.style.backgroundColor }) .start(); }); } - if (this.style.Switch.block.nameBorderShow) { + if (this.style.Switch.text.block) { this.setHasTextBorder(1); - } else if (this.style.Switch.block.contentRectShow) { - this.lockRect.show(); - this.lockRect.setStyle({ stroke: this.style.Switch.block.contentRectColor }); - } else if (this.style.Switch.block.rhomboidShow && this.model.reversePosition) { // 范围且封锁时显示 + } + if (this.style.Switch.jointImg.trapezoidBlock && this.model.reversePosition) { // 范围且封锁时显示 this.sheltertriangle.show(); this.sheltertriangle.getSection().setStyle('fill', '#000080'); } + if (this.style.Switch.rectLock.block) { + this.lockRect.show(); + this.lockRect.setStyle({ stroke: this.style.Switch.rectLock.blockColor }); + } } /** 延时释放*/ @@ -425,8 +422,6 @@ export default class Switch extends Group { setState(model) { if (!this.isShowShape) return; - // model.normalPosition = 0; - // model.reversePosition = 1; if (model.normalPosition) { this.setLocationAction(model); /** 定位*/ } else if (model.reversePosition) { diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 4a0fe9bcf..506eafc22 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -3,11 +3,11 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // 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.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.41:9000'; // 张赛 - BASE_API = 'http://192.168.3.82:9000'; // 杜康 + // BASE_API = 'http://192.168.3.82:9000'; // 杜康 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 diff --git a/src/views/lesson/trainingRule/addBatch.vue b/src/views/lesson/trainingRule/addBatch.vue index bd5278040..aac925def 100644 --- a/src/views/lesson/trainingRule/addBatch.vue +++ b/src/views/lesson/trainingRule/addBatch.vue @@ -125,7 +125,6 @@ export default { this.handleClose(); this.$emit('reloadTable'); // 刷新列表 } catch (error) { - console.log(error); this.loading = false; this.$message.error(this.$t('error.batchCreateFailed')); } diff --git a/src/views/newMap/newMapdraft/mapoperate/switch/create.vue b/src/views/newMap/newMapdraft/mapoperate/switch/create.vue index 3ea0d81e3..75e67080c 100644 --- a/src/views/newMap/newMapdraft/mapoperate/switch/create.vue +++ b/src/views/newMap/newMapdraft/mapoperate/switch/create.vue @@ -64,7 +64,8 @@ export default { skew: { x: sectionC.points[1].x, y: sectionC.points[1].y - } + }, + normalPosition: 1 // 默认状态定位 }; const swch = this.findSwitchData(model.sectionACode, model.sectionBCode, model.sectionCCode); !swch && createArr.push(model); // 已有的道岔不在创建 @@ -104,7 +105,8 @@ export default { skew: { x: sectionC.points[sectionC.points.length - 2].x, y: sectionC.points[sectionC.points.length - 2].y - } + }, + normalPosition: 1 // 默认状态定位 }; const swch = this.findSwitchData(model.sectionACode, model.sectionBCode, model.sectionCCode); !swch && createArr.push(model); // 已有的道岔不在创建 From f51bad9c3a2ace2e5b5db223024e04334fd90dd2 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 27 Mar 2020 18:45:48 +0800 Subject: [PATCH 02/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 --- .../beijing_01/menus/utils/menuOperate.js | 4 + .../foshan_01/menus/utils/menuOperate.js | 112 ++++++++---------- .../ningbo_01/menus/utils/menuOperate.js | 4 + 3 files changed, 56 insertions(+), 64 deletions(-) diff --git a/src/jmapNew/theme/beijing_01/menus/utils/menuOperate.js b/src/jmapNew/theme/beijing_01/menus/utils/menuOperate.js index 774f84e62..4ba5f4462 100644 --- a/src/jmapNew/theme/beijing_01/menus/utils/menuOperate.js +++ b/src/jmapNew/theme/beijing_01/menus/utils/menuOperate.js @@ -208,6 +208,10 @@ export function commitOperate(operate, paramList, over) { }; step.param = paramList; // over 0为首次操作,1为中间操作,2为最后操作,3为直接一次性操作 + if (over == 0 || over == 3) { + const codeList = Object.values(paramList); + step.code = codeList[0]; + } if (over != 0 && over != 3) { delete step.start; } diff --git a/src/jmapNew/theme/foshan_01/menus/utils/menuOperate.js b/src/jmapNew/theme/foshan_01/menus/utils/menuOperate.js index 12b652173..1572e9b73 100644 --- a/src/jmapNew/theme/foshan_01/menus/utils/menuOperate.js +++ b/src/jmapNew/theme/foshan_01/menus/utils/menuOperate.js @@ -151,70 +151,50 @@ export const menuOperate = { } }, StationStand:{ - // setDetainTrain:{ - // // 设置扣车 - // operation: OperationEvent.StationStand.setDetainTrain.menu.operation, - // cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN - // }, - // cancelDetainTrain:{ - // // 取消扣车 - // operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation, - // cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN - // }, - // setDetainTrainAuto:{ - // // 区间列车数量限制 - // operation: OperationEvent.StationStand.setDetainTrainAuto.menu.operation, - // cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_AUTO - // }, - // cancelDetainTrainAuto:{ - // // 取消区间列车数量限制 - // operation: OperationEvent.StationStand.cancelDetainTrainAuto.menu.operation, - // cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_AUTO - // }, - // setBulkBuckleTrain:{ - // // 批量扣车 - // operation: OperationEvent.StationStand.setBulkBuckleTrain.menu.operation, - // cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_ALL - // }, - // cancelBulkBuckleTrain:{ - // // 批量取消扣车 - // operation: OperationEvent.StationStand.cancelBulkBuckleTrain.menu.operation, - // cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_ALL - // }, - // setJumpStop:{ - // // 设置跳停 - // operation: OperationEvent.StationStand.setJumpStop.menu.operation, - // cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP - // }, - // cancelJumpStop:{ - // // 取消跳停 - // operation: OperationEvent.StationStand.cancelJumpStop.menu.operation, - // cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP - // }, - // setStopTime:{ - // // 停站时间控制 - // operation: OperationEvent.StationStand.setStopTime.menu.operation, - // cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME - // }, - // setRunLevel:{ - // // 运行时间控制 - // operation: OperationEvent.StationStand.setRunLevel.menu.operation, - // cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME - // }, - // earlyDeparture:{ - // // 设置提前发车 - // operation: OperationEvent.StationStand.earlyDeparture.menu.operation, - // cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART - // }, - // setBackStrategy:{ - // // 设置折返策略 - // operation: OperationEvent.StationStand.setBackStrategy.menu.operation, - // cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY - // }, - // detail:{ - // // 查询站台状态 - // operation: OperationEvent.StationStand.detail.menu.operation - // } + setDetainTrain:{ + // 设置扣车 + operation: OperationEvent.StationStand.setDetainTrain.menu.operation, + cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN + }, + cancelDetainTrain:{ + // 取消扣车 + operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation, + cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN + }, + cancelDetainTrainAll:{ + // 全线取消扣车 + operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation, + cmdType:CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN + }, + setJumpStop:{ + // 设置跳停 + operation: OperationEvent.StationStand.setJumpStop.menu.operation, + cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP + }, + cancelJumpStop:{ + // 取消跳停 + operation: OperationEvent.StationStand.cancelJumpStop.menu.operation, + cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP + }, + setStopTime:{ + // 停站时间控制 + operation: OperationEvent.StationStand.setStopTime.menu.operation, + cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME + }, + setRunLevel:{ + // 运行时间控制 + operation: OperationEvent.StationStand.setRunLevel.menu.operation, + cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME + }, + earlyDeparture:{ + // 设置提前发车 + operation: OperationEvent.StationStand.earlyDeparture.menu.operation, + cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART + }, + detail:{ + // 查询站台状态 + operation: OperationEvent.StationStand.detail.menu.operation + } }, StationControl:{ // requestCentralControl:{ @@ -243,6 +223,10 @@ export function commitOperate(operate, paramList, over) { }; step.param = paramList; // over 0为首次操作,1为中间操作,2为最后操作,3为直接一次性操作 + if (over == 0 || over == 3) { + const codeList = Object.values(paramList); + step.code = codeList[0]; + } if (over != 0 && over != 3) { delete step.start; } diff --git a/src/jmapNew/theme/ningbo_01/menus/utils/menuOperate.js b/src/jmapNew/theme/ningbo_01/menus/utils/menuOperate.js index 51a52efd2..a81ca63a6 100644 --- a/src/jmapNew/theme/ningbo_01/menus/utils/menuOperate.js +++ b/src/jmapNew/theme/ningbo_01/menus/utils/menuOperate.js @@ -268,6 +268,10 @@ export function commitOperate(operate, paramList, over) { }; step.param = paramList; // over 0为首次操作,1为中间操作,2为最后操作,3为直接一次性操作 + if (over == 0 || over == 3) { + const codeList = Object.values(paramList); + step.code = codeList[0]; + } if (over != 0 && over != 3) { delete step.start; } From ba57262d2a67614d46eff38154fefc9f78d6d412 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Fri, 27 Mar 2020 18:53:28 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AE=9E=E8=AE=AD?= =?UTF-8?q?=E6=AD=A5=E9=AA=A4=E6=A0=A1=E9=AA=8C=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scripts/cmdPlugin/ValidateHandler.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/scripts/cmdPlugin/ValidateHandler.js b/src/scripts/cmdPlugin/ValidateHandler.js index 7a1aeedd8..a5010d31b 100644 --- a/src/scripts/cmdPlugin/ValidateHandler.js +++ b/src/scripts/cmdPlugin/ValidateHandler.js @@ -52,17 +52,21 @@ class ValidateHandler { const order = Handler.getOrder(); let valid = false; - if (operate.over) { // 最后一步不用校验 只校验之前的步骤信息 最后直接发送就可以 + if (operate.over && steps.length == 1) { + if (operate && steps[0] && + operate.code == steps[0].code && + operate.operation == steps[0].operation) { + valid = true; + } + } else if (operate.over) { // 最后一步不用校验 只校验之前的步骤信息 最后直接发送就可以 valid = true; - } else { - if (order < steps.length) { - const standard = steps[order]; - if (operate && standard && + } else if (order < steps.length) { + const standard = steps[order]; + if (operate && standard && operate.code == standard.code && operate.operation == standard.operation && operate.val == standard.val) { - valid = true; - } + valid = true; } } From 1a998f405a72a1a6e41585c8e5ae181bab5d8da1 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 30 Mar 2020 09:45:23 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E4=BD=9B=E5=B1=B1=E4=B8=80=E5=8F=B7?= =?UTF-8?q?=E7=BA=BF=20=E6=93=8D=E4=BD=9C=E4=BB=A3=E7=A0=81=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/chengdu_03/menus/menuSignal.vue | 2 +- .../foshan_01/menus/menuStationStand.vue | 153 +++--------------- 2 files changed, 20 insertions(+), 135 deletions(-) diff --git a/src/jmapNew/theme/chengdu_03/menus/menuSignal.vue b/src/jmapNew/theme/chengdu_03/menus/menuSignal.vue index 5fd587718..9e5ff2028 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuSignal.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuSignal.vue @@ -7,7 +7,7 @@ - + diff --git a/src/jmapNew/theme/foshan_01/menus/menuStationStand.vue b/src/jmapNew/theme/foshan_01/menus/menuStationStand.vue index 1f8f107ce..97499ce3f 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuStationStand.vue @@ -28,6 +28,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; +import {menuOperate, commitOperate} from './utils/menuOperate'; export default { name: 'StationStandMenu', @@ -236,172 +237,56 @@ export default { }, // 设置扣车 setDetainTrain() { - const step = { - start: true, - code: `${this.selected.code}`, - operation: OperationEvent.StationStand.setDetainTrain.menu.operation, - param: { - standCode: `${this.selected.code}` - } - }; - - this.$store.dispatch('training/nextNew', step).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.standControl.doShow(step, this.selected); - } + commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:this.selected.code}, 0).then((data)=>{ + this.$refs.standControl.doShow(data.operate, this.selected); }); }, // 取消扣车 cancelDetainTrain() { - const step = { - start: true, - code: `${this.selected.code}`, - operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation, - param: { - standCode: `${this.selected.code}` - } - }; - this.$store.dispatch('training/nextNew', step).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.standControl.doShow(step, this.selected); - } + commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:this.selected.code}, 0).then((data)=>{ + this.$refs.standControl.doShow(data.operate, this.selected); }); }, // 设置跳停 setJumpStop() { - const step = { - start: true, - code: this.selected.code, - operation: OperationEvent.StationStand.setJumpStop.menu.operation, - param: { - standCode: this.selected.code - } - }; - this.$store.dispatch('training/nextNew', step).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.standJumpStopControl.doShow(step, this.selected); - } + commitOperate(menuOperate.StationStand.setJumpStop, {standCode:this.selected.code}, 0).then((data)=>{ + this.$refs.standJumpStopControl.doShow(data.operate, this.selected); }); }, // 取消跳停 cancelJumpStop() { - const step = { - start: true, - code: this.selected.code, - operation: OperationEvent.StationStand.cancelJumpStop.menu.operation, - param: { - standCode: this.selected.code - } - }; - this.$store.dispatch('training/nextNew', step).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.standJumpStopControl.doShow(step, this.selected); - } + commitOperate(menuOperate.StationStand.cancelJumpStop, {standCode:this.selected.code}, 0).then((data)=>{ + this.$refs.standJumpStopControl.doShow(data.operate, this.selected); }); }, // 设置停站时间 setStopTime() { - const step = { - start: true, - code: this.selected.code, - operation: OperationEvent.StationStand.setStopTime.menu.operation, - param: { - standCode: this.selected.code - } - }; - this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - // Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {standCode: `${this.selected.code}`}).then(resp => { - // const tempData = resp.data; - const tempData = []; - this.$refs.standStopTime.doShow(step, this.selected, tempData); - // }); - } - }).catch(() => { - this.$refs.noticeInfo.doShow(step); + commitOperate(menuOperate.StationStand.setStopTime, {standCode:this.selected.code}, 0).then((data)=>{ + this.$refs.standStopTime.doShow(data.operate, this.selected, []); }); }, // 设置运行等级 setRunLevel() { - const step = { - start: true, - code: this.selected.code, - operation: OperationEvent.StationStand.setRunLevel.menu.operation, - param: { - standCode: this.selected.code - } - }; - this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - // Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {standCode: `${this.selected.code}`}).then(resp => { - // const tempData = resp.data; - const tempData = []; - this.$refs.standRunLevel.doShow(step, this.selected, tempData); - // }); - } - }).catch(() => { - this.$refs.noticeInfo.doShow(step); + commitOperate(menuOperate.StationStand.setRunLevel, {standCode:this.selected.code}, 0).then((data)=>{ + this.$refs.standRunLevel.doShow(data.operate, this.selected, []); }); }, // 设置提前发车 earlyDeparture() { - const step = { - start: true, - code: this.selected.code, - operation: OperationEvent.StationStand.earlyDeparture.menu.operation, - param: { - standCode: this.selected.code - } - }; - this.$store.dispatch('training/nextNew', step).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.standControl.doShow(step, this.selected); - } + commitOperate(menuOperate.StationStand.earlyDeparture, {standCode:this.selected.code}, 0).then((data)=>{ + this.$refs.standControl.doShow(data.operate, this.selected); }); }, // 全线取消扣车 cancelDetainTrainAll() { - const step = { - start: true, - code: `${this.selected.code}`, - operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation, - param: { - standCode: `${this.selected.code}` - } - }; - this.$store.dispatch('training/next', step).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.standDetainTrainAll.doShow(step, this.selected); - } + commitOperate(menuOperate.StationStand.cancelDetainTrainAll, {standCode:this.selected.code}, 0).then((data)=>{ + this.$refs.standDetainTrainAll.doShow(data.operate, this.selected); }); }, // 查询站台状态 detail() { - const step = { - start: true, - code: this.selected.code, - operation: OperationEvent.StationStand.detail.menu.operation, - param: {} - }; - this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - // Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {standCode: `${this.selected.code}`}).then(resp => { - // const tempData = resp.data; - const tempData = []; - this.$refs.standDetail.doShow(step, this.selected, tempData); - // }); - } - }).catch(() => { - this.$refs.noticeInfo.doShow(step); + commitOperate(menuOperate.StationStand.detail, {standCode:this.selected.code}, 0).then((data)=>{ + this.$refs.standDetail.doShow(data.operate, this.selected, []); }); } } From 0321340863396659b5587f7009ce0d476acaf501 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Mon, 30 Mar 2020 10:28:08 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=AD=A5=E9=AA=A4?= =?UTF-8?q?=E8=BF=90=E8=A1=8C=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../beijing_01/menus/dialog/standRunLevel.vue | 10 ++++--- .../beijing_01/menus/dialog/standStopTime.vue | 6 +++-- .../beijing_01/menus/menuStationStand.vue | 12 ++++++--- .../beijing_01/menus/utils/menuOperate.js | 2 +- src/scripts/OperationConfig.js | 26 +++++++++---------- src/scripts/cmdPlugin/Handler.js | 2 +- src/scripts/cmdPlugin/ValidateHandler.js | 13 +++++++--- src/utils/baseUrl.js | 4 +-- 8 files changed, 44 insertions(+), 31 deletions(-) diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/standRunLevel.vue b/src/jmapNew/theme/beijing_01/menus/dialog/standRunLevel.vue index 124cddae0..0c321af96 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/standRunLevel.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/standRunLevel.vue @@ -214,14 +214,14 @@ export default { if (index != 0) { const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code); const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode); - this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: opts.intervalRunTime ? this.getLevelByTime(opts.intervalRunTime) : '0', time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus }); + this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: opts.intervalRunTime ? this.getLevelByTime(opts.intervalRunTime) : '0', time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus ? opts.intervalRunTimeValidStatus : true }); } } else { // 上行时,此站不是最后一站 if (index != this.stationList.length) { const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code); const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode); - this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: opts.intervalRunTime ? this.getLevelByTime(opts.intervalRunTime) : '0', time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus }); + this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: opts.intervalRunTime ? this.getLevelByTime(opts.intervalRunTime) : '0', time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus ? opts.intervalRunTimeValidStatus : true }); } } }, @@ -312,9 +312,11 @@ export default { commit() { if (this.isConfirm) { this.loading = true; - commitOperate(menuOperate.StationStand.setRunLevel, {runLevelTime: this.time, runLevelTimeForever: !!this.tempData[0].check}, 2).then((data)=>{ + commitOperate(menuOperate.StationStand.setRunLevel, {runLevelTime: Number(this.time), runLevelTimeForever: !!this.tempData[0].check}, 2).then(({ valid })=>{ this.loading = false; - this.doClose(); + if (valid) { + this.doClose(); + } }).catch((error) => { this.loading = false; this.doClose(); diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/standStopTime.vue b/src/jmapNew/theme/beijing_01/menus/dialog/standStopTime.vue index feef06d13..11f808584 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/standStopTime.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/standStopTime.vue @@ -211,9 +211,11 @@ export default { // }, commit() { this.loading = true; - commitOperate(menuOperate.StationStand.setStopTime, {parkingTime: this.control == '01' ? -1 : 1, parkingAlwaysValid: this.effective == '1'}, 2).then((data)=>{ + commitOperate(menuOperate.StationStand.setStopTime, {parkingTime: this.control == '01' ? -1 : 1, parkingAlwaysValid: this.effective == '1'}, 2).then(({ valid })=>{ this.loading = false; - this.doClose(); + if (valid) { + this.doClose(); + } }).catch((error) => { this.loading = false; this.doClose(); diff --git a/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue b/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue index 2d4a13385..eb2ae1654 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue @@ -285,8 +285,10 @@ export default { // }, // 设置跳停 setJumpStop() { - commitOperate(menuOperate.StationStand.setJumpStop, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standJumpStopControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.StationStand.setJumpStop, {standCode:this.selected.code}, 0).then(({ valid, operate })=>{ + if (valid) { + this.$refs.standJumpStopControl.doShow(operate, this.selected); + } }); }, // 取消跳停 @@ -303,8 +305,10 @@ export default { }, // 运行时间控制 setRunLevel() { - commitOperate(menuOperate.StationStand.setRunLevel, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standRunLevel.doShow(data.operate, this.selected, []); + commitOperate(menuOperate.StationStand.setRunLevel, {standCode:this.selected.code}, 0).then(({ valid, operate })=>{ + if (valid) { + this.$refs.standRunLevel.doShow(operate, this.selected, []); + } }); }, // 设置提前发车 diff --git a/src/jmapNew/theme/beijing_01/menus/utils/menuOperate.js b/src/jmapNew/theme/beijing_01/menus/utils/menuOperate.js index 4ba5f4462..a4f519a67 100644 --- a/src/jmapNew/theme/beijing_01/menus/utils/menuOperate.js +++ b/src/jmapNew/theme/beijing_01/menus/utils/menuOperate.js @@ -223,8 +223,8 @@ export function commitOperate(operate, paramList, over) { store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { store.dispatch('menuOperation/handleBreakFlag', { break: true }); - resolve({operate:step}); } + resolve({ valid: valid, operate: step }); }).catch(error=>{ reject(error); }); diff --git a/src/scripts/OperationConfig.js b/src/scripts/OperationConfig.js index 873560a3e..6fb11d1a3 100644 --- a/src/scripts/OperationConfig.js +++ b/src/scripts/OperationConfig.js @@ -882,7 +882,7 @@ export const OperationList = { productTypes: ['01', '02'], // 产品类型 01 现地 02 行调 stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【设置跳停】' }, - { deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}' } + { deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮' } ] }, { @@ -898,7 +898,7 @@ export const OperationList = { { deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【设置跳停】' }, { deviceType: '06', orderNum: 2, operateCode: '5024', tip: '鼠标左键点击' }, { deviceType: '06', orderNum: 2, operateCode: '5022', tip: '请选择001号车', val: '001' }, - { deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}::001' } + { deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮' } ] }, { @@ -912,7 +912,7 @@ export const OperationList = { productTypes: ['01', '02'], // 产品类型 01 现地 02 行调 stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' }, - { deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}' } + { deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮' } ] }, { @@ -928,7 +928,7 @@ export const OperationList = { { deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' }, { deviceType: '06', orderNum: 2, operateCode: '5034', tip: '鼠标左键点击' }, { deviceType: '06', orderNum: 2, operateCode: '5032', tip: '请选择001号车', val: '001' }, - { deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}::001' } + { deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮' } ] }, { @@ -957,7 +957,7 @@ export const OperationList = { stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【停站时间控制】' }, { deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【自动】', val: '01' }, - { deviceType: '06', orderNum: 3, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '01::20::true' } + { deviceType: '06', orderNum: 3, operateCode: '509', tip: '鼠标左键点击【确认】按钮' } ] }, { @@ -973,7 +973,7 @@ export const OperationList = { { deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【停站时间控制】' }, { deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' }, { deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' }, - { deviceType: '06', orderNum: 4, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::true' } + { deviceType: '06', orderNum: 4, operateCode: '509', tip: '鼠标左键点击【确认】按钮' } ] }, { @@ -990,7 +990,7 @@ export const OperationList = { { deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' }, { deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' }, { deviceType: '06', orderNum: 4, operateCode: '5093', tip: '鼠标左键点击,选择【一次有效】', val: 'false' }, - { deviceType: '06', orderNum: 5, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::false' } + { deviceType: '06', orderNum: 5, operateCode: '509', tip: '鼠标左键点击【确认】按钮' } ] }, { @@ -1006,7 +1006,7 @@ export const OperationList = { { deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【运行时间控制】' }, { deviceType: '06', orderNum: 2, operateCode: '5104', tip: '鼠标左键点击,选择【1】', val: '1' }, { deviceType: '06', orderNum: 3, operateCode: '5101', tip: '鼠标左键点击,选择【115】', val: '115' }, - { deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '115::true' } + { deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮' } ] }, { @@ -1023,7 +1023,7 @@ export const OperationList = { { deviceType: '06', orderNum: 2, operateCode: '5104', tip: '鼠标左键点击,选择【1】', val: '1' }, { deviceType: '06', orderNum: 3, operateCode: '5101', tip: '鼠标左键点击,选择【115】', val: '115' }, { deviceType: '06', orderNum: 4, operateCode: '5103', tip: '鼠标左键点击,取消选择【一直有效】', val: 'false' }, - { deviceType: '06', orderNum: 5, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '115::false' } + { deviceType: '06', orderNum: 5, operateCode: '510', tip: '鼠标左键点击【确认】按钮' } ] }, { @@ -1052,7 +1052,7 @@ export const OperationList = { stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '511', tip: '鼠标右键菜单选择【变通策略管理】' }, { deviceType: '06', orderNum: 2, operateCode: '5111', tip: '鼠标左键点击,选择【无折返】', val: '01' }, - { deviceType: '06', orderNum: 3, operateCode: '511', tip: '鼠标左键点击【确定】按钮', val: '01' } + { deviceType: '06', orderNum: 3, operateCode: '511', tip: '鼠标左键点击【确定】按钮' } ] }, @@ -1099,7 +1099,7 @@ export const OperationList = { { deviceType: '03', orderNum: 3, operateCode: '4071', tip: '鼠标左键点击【下达】按钮' }, { deviceType: '03', orderNum: 4, operateCode: '4072', tip: '鼠标左键点击【确认】按钮' }, { deviceType: '03', orderNum: 5, operateCode: '4073', tip: '鼠标左键点击【确认1】按钮' }, - { deviceType: '03', orderNum: 6, operateCode: '4074', tip: '鼠标左键点击【确认2】按钮', val: '15' }, + { deviceType: '03', orderNum: 6, operateCode: '4074', tip: '鼠标左键点击【确认2】按钮' }, { deviceType: '03', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } ] }, @@ -1167,7 +1167,7 @@ export const OperationList = { { deviceType: '02', orderNum: 3, operateCode: '1131', tip: '鼠标左键点击【下达】按钮' }, { deviceType: '02', orderNum: 4, operateCode: '1132', tip: '鼠标左键点击【确认】按钮' }, { deviceType: '02', orderNum: 5, operateCode: '1133', tip: '鼠标左键点击【确认1】按钮' }, - { deviceType: '02', orderNum: 6, operateCode: '1134', tip: '鼠标左键点击【确认2】按钮', val: '35' }, + { deviceType: '02', orderNum: 6, operateCode: '1134', tip: '鼠标左键点击【确认2】按钮' }, { deviceType: '02', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } ] }, @@ -2799,7 +2799,7 @@ export const OperationList = { { deviceType: '06', orderNum: 2, operateCode: '5104', tip: '鼠标左键点击,选择【1】', val: '1' }, { deviceType: '06', orderNum: 3, operateCode: '5101', tip: '鼠标左键点击,选择【115】', val: '115' }, { deviceType: '06', orderNum: 4, operateCode: '5103', tip: '鼠标左键点击,选择【一直有效】', val: 'true' }, - { deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '115::true' } + { deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮' } ] } ] diff --git a/src/scripts/cmdPlugin/Handler.js b/src/scripts/cmdPlugin/Handler.js index 500c3f4b7..6c6c01abc 100644 --- a/src/scripts/cmdPlugin/Handler.js +++ b/src/scripts/cmdPlugin/Handler.js @@ -99,7 +99,7 @@ class Handler { this.afterValid(operation, valid); rtn.valid = valid; - if (operation.cmdType) { + if (operation.cmdType && valid) { const command = this.getCommand(operation); if (command) { CommandHandler.execute(command.id, command.get()).then(response => { diff --git a/src/scripts/cmdPlugin/ValidateHandler.js b/src/scripts/cmdPlugin/ValidateHandler.js index a5010d31b..3bed8730e 100644 --- a/src/scripts/cmdPlugin/ValidateHandler.js +++ b/src/scripts/cmdPlugin/ValidateHandler.js @@ -52,15 +52,20 @@ class ValidateHandler { const order = Handler.getOrder(); let valid = false; - if (operate.over && steps.length == 1) { + if (operate.over && steps.length == 1) { // 右键菜单直接发送校验 if (operate && steps[0] && operate.code == steps[0].code && operate.operation == steps[0].operation) { valid = true; } - } else if (operate.over) { // 最后一步不用校验 只校验之前的步骤信息 最后直接发送就可以 - valid = true; - } else if (order < steps.length) { + } else if (operate.over) { // 最后一步校验 + const standard = steps[order]; + if (operate && standard && + operate.operation == standard.operation && + operate.val == standard.val) { + valid = true; + } + } else if (order < steps.length) { // 普通步骤信息校验 const standard = steps[order]; if (operate && standard && operate.code == standard.code && diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 506eafc22..4a0fe9bcf 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -3,11 +3,11 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // 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.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.41:9000'; // 张赛 - // BASE_API = 'http://192.168.3.82:9000'; // 杜康 + BASE_API = 'http://192.168.3.82:9000'; // 杜康 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 From 08dc9befc446dcd154fd2adbd94b1165031075c1 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 30 Mar 2020 11:03:35 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E5=8C=97=E4=BA=AC=E4=B8=80=E5=8F=B7?= =?UTF-8?q?=E7=BA=BF=20=E5=AE=81=E6=B3=A2=E4=B8=80=E5=8F=B7=E7=BA=BF=20?= =?UTF-8?q?=E6=AD=A5=E9=AA=A4=E6=93=8D=E4=BD=9C=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/beijing_01/menus/menuSection.vue | 30 ++++--- .../theme/beijing_01/menus/menuSignal.vue | 63 +++++++++------ .../beijing_01/menus/menuStationStand.vue | 46 +++++++---- .../theme/beijing_01/menus/menuSwitch.vue | 43 ++++++---- .../theme/ningbo_01/menus/menuSection.vue | 44 +++++++---- .../theme/ningbo_01/menus/menuSignal.vue | 78 ++++++++++++------- 6 files changed, 198 insertions(+), 106 deletions(-) diff --git a/src/jmapNew/theme/beijing_01/menus/menuSection.vue b/src/jmapNew/theme/beijing_01/menus/menuSection.vue index 7afc3d543..5a67c454b 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSection.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSection.vue @@ -187,25 +187,33 @@ export default { }, // 切除 split() { - commitOperate(menuOperate.Section.split, {sectionCode:this.selected.code}, 0).then((data)=>{ - this.$refs.sectionControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Section.split, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.sectionControl.doShow(operate, this.selected); + } }); }, alxeEffective() { - commitOperate(menuOperate.Section.alxeEffective, {sectionCode:this.selected.code}, 0).then((data)=>{ - this.$refs.alxeEffective.doShow(data.operate, this.selected); + commitOperate(menuOperate.Section.alxeEffective, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.alxeEffective.doShow(operate, this.selected); + } }); }, // 激活 active() { - commitOperate(menuOperate.Section.active, {sectionCode:this.selected.code}, 0).then((data)=>{ - this.$refs.sectionControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Section.active, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.sectionControl.doShow(operate, this.selected); + } }); }, // 区段计轴预复位 axlePreReset(selectType) { - commitOperate(menuOperate.Section.axlePreReset, {sectionCode:selectType.code}, 0).then((data)=>{ - this.$refs.sectionControl.doShow(data.operate, selectType); + commitOperate(menuOperate.Section.axlePreReset, {sectionCode:selectType.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.sectionControl.doShow(operate, selectType); + } }); }, // 区段计轴预复位 @@ -216,8 +224,10 @@ export default { // }, // 设置速度 setSpeed() { - commitOperate(menuOperate.Section.setSpeed, {sectionCode:this.selected.code}, 0).then((data)=>{ - this.$refs.speedLimitControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Section.setSpeed, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.speedLimitControl.doShow(operate, this.selected); + } }); } } diff --git a/src/jmapNew/theme/beijing_01/menus/menuSignal.vue b/src/jmapNew/theme/beijing_01/menus/menuSignal.vue index b15abc755..51be75079 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSignal.vue @@ -332,94 +332,109 @@ export default { }, // 设置进路 arrangementRoute() { - commitOperate(menuOperate.Signal.arrangementRoute, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routeSelection.doShow(data.operate, this.selected, this.getRouteList(this.selected)); + commitOperate(menuOperate.Signal.arrangementRoute, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routeSelection.doShow(operate, this.selected, this.getRouteList(this.selected)); + } }); }, // 现地设置进路 setRoute(route) { - commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:route.code}, [], 3).then((data)=>{ + commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:route.code}, [], 3).then(({valid, operate})=>{ }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); }); }, // 取消进路 cancelTrainRoute() { - commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routeControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routeControl.doShow(operate, this.selected); + } }); }, // 现地取消进路 cancelTrainRouteByLow(selectType) { - commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:selectType.code}, 3).then((data)=>{ + commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:selectType.code}, 3).then(({valid, operate})=>{ }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); }); }, // 现地总人解 humanTrainRoute(selectType) { - commitOperate(menuOperate.Signal.humanTrainRoute, {signalCode:selectType.code}, 0).then((data)=>{ - data.operate.cmdType = CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE; - this.$refs.password.doShow(data.operate); + commitOperate(menuOperate.Signal.humanTrainRoute, {signalCode:selectType.code}, 0).then(({valid, operate})=>{ + if (valid) { + operate.cmdType = CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE; + this.$refs.password.doShow(operate); + } }); }, // 现地信号重开操作 reopenSignalByRoute(selectType) { - commitOperate(menuOperate.Signal.reopenSignal, {signalCode:selectType.code}, 3).then((data)=>{ + commitOperate(menuOperate.Signal.reopenSignal, {signalCode:selectType.code}, 3).then(({valid, operate})=>{ }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); }); }, - // 信号重开 reopenSignal() { - commitOperate(menuOperate.Signal.reopenSignal, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routeControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Signal.reopenSignal, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routeControl.doShow(operate, this.selected); + } }); }, // 信号关灯 signalClose() { - commitOperate(menuOperate.Signal.signalClose, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routeControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Signal.signalClose, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routeControl.doShow(operate, this.selected); + } }); }, // 现地信号关灯 signalCloseByLow(selectType) { - commitOperate(menuOperate.Signal.signalClose, {signalCode:selectType.code}, 3).then((data)=>{ + commitOperate(menuOperate.Signal.signalClose, {signalCode:selectType.code}, 3).then(({valid, operate})=>{ }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); }); }, // 进路交人工控 humanControl() { - commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routeHandControl.doShow(data.operate, this.selected, this.getRouteList(this.selected)); + commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected)); + } }); }, // 进路交自动控 atsAutoControl() { - commitOperate(menuOperate.Signal.atsAutoControl, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routeHandControl.doShow(data.operate, this.selected, this.getRouteList(this.selected)); + commitOperate(menuOperate.Signal.atsAutoControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected)); + } }); }, // 设置通过模式 singalPassModel(selectType) { - commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:selectType.code}, 3).then((data)=>{ + commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:selectType.code}, 3).then(({valid, operate})=>{ }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); }); }, // 取消通过模式 singalCancelPassModel(selectType) { - commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:selectType.code}, 3).then((data)=>{ + commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:selectType.code}, 3).then(({valid, operate})=>{ }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); }); }, // 查询进路状态 detail() { - commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routeDetail.doShow(data.operate, this.selected, this.getRouteList(this.selected)); + commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routeDetail.doShow(operate, this.selected, this.getRouteList(this.selected)); + } }); }, // 获取进路列表 diff --git a/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue b/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue index eb2ae1654..ca351c25e 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue @@ -243,28 +243,32 @@ export default { }, // 现地设置扣车 setDetainTrainByLow(selectType) { - commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:selectType.code}, 3).then((data)=>{ + commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:selectType.code}, 3).then(({valid, operate})=>{ }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); }); }, /** 取消扣车 */ cancleDetainTrainByLow(selectType) { - commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:selectType.code}, 3).then((data)=>{ + commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:selectType.code}, 3).then(({valid, operate})=>{ }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); }); }, // 设置扣车 setDetainTrain() { - commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standControl.doShow(operate, this.selected); + } }); }, // 取消扣车 cancelDetainTrain() { - commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standControl.doShow(operate, this.selected); + } }); }, // 强制取消扣车 @@ -293,14 +297,18 @@ export default { }, // 取消跳停 cancelJumpStop() { - commitOperate(menuOperate.StationStand.cancelJumpStop, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standJumpStopControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.StationStand.cancelJumpStop, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standJumpStopControl.doShow(operate, this.selected); + } }); }, // 停站时间控制 setStopTime() { - commitOperate(menuOperate.StationStand.setStopTime, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standStopTime.doShow(data.operate, this.selected, []); + commitOperate(menuOperate.StationStand.setStopTime, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standStopTime.doShow(operate, this.selected, []); + } }); }, // 运行时间控制 @@ -313,20 +321,26 @@ export default { }, // 设置提前发车 earlyDeparture() { - commitOperate(menuOperate.StationStand.earlyDeparture, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.StationStand.earlyDeparture, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standControl.doShow(operate, this.selected); + } }); }, // 设置折返策略 setBackStrategy() { - commitOperate(menuOperate.StationStand.setBackStrategy, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standBackStrategy.doShow(data.operate, this.selected); + commitOperate(menuOperate.StationStand.setBackStrategy, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standBackStrategy.doShow(operate, this.selected); + } }); }, // 查询站台状态 detail() { - commitOperate(menuOperate.StationStand.detail, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standDetail.doShow(data.operate, this.selected, []); + commitOperate(menuOperate.StationStand.detail, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standDetail.doShow(operate, this.selected, []); + } }); } } diff --git a/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue b/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue index ae5053bd7..d9d87027e 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue @@ -238,63 +238,76 @@ export default { }, // 道岔单锁 lock(selectType) { - commitOperate(menuOperate.Switch.lock, {switchCode:selectType.code}, 3).then((data)=>{ + commitOperate(menuOperate.Switch.lock, {switchCode:selectType.code}, 3).then(({valid, operate})=>{ }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); }); }, // 道岔解锁 unlock(selectType) { - commitOperate(menuOperate.Switch.unlock, {switchCode:selectType.code}, 0).then((data)=>{ - this.$refs.switchControl.doShow(data.operate, selectType); + commitOperate(menuOperate.Switch.unlock, {switchCode:selectType.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.switchControl.doShow(operate, selectType); + } }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); }); }, // 现地道岔强扳 switchTurnoutForce(selectType) { - commitOperate(menuOperate.Switch.turnoutForce, {switchCode:selectType.code}, 0).then((data)=>{ - this.$refs.switchControl.doShow(data.operate, selectType); + commitOperate(menuOperate.Switch.turnoutForce, {switchCode:selectType.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.switchControl.doShow(operate, selectType); + } + }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); }); }, // 单操到定位 locate(selectType) { - commitOperate(menuOperate.Switch.locate, {switchCode:selectType.code}, 3).then((data)=>{ + commitOperate(menuOperate.Switch.locate, {switchCode:selectType.code}, 3).then(({valid, operate})=>{ }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); }); }, // 单操到反位 reverse(selectType) { - commitOperate(menuOperate.Switch.reverse, {switchCode:selectType.code}, 3).then((data)=>{ + commitOperate(menuOperate.Switch.reverse, {switchCode:selectType.code}, 3).then(({valid, operate})=>{ }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); }); }, // 区段切除 split() { - commitOperate(menuOperate.Switch.split, {switchCode:this.selected.code}, 0).then((data)=>{ - this.$refs.switchControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Switch.split, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.switchControl.doShow(operate, this.selected); + } }); }, // 区段激活 active() { - commitOperate(menuOperate.Switch.active, {switchCode:this.selected.code}, 0).then((data)=>{ - this.$refs.switchControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Switch.active, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.switchControl.doShow(operate, this.selected); + } }); }, // 设置临时限速 setSpeed() { - commitOperate(menuOperate.Switch.setSpeed, {switchCode:this.selected.code}, 0).then((data)=>{ - this.$refs.speedLimitControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Switch.setSpeed, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.speedLimitControl.doShow(operate, this.selected); + } }); }, // 确认计轴有效 alxeEffective() { - commitOperate(menuOperate.Switch.alxeEffective, {switchCode:this.selected.code}, 0).then((data)=>{ - this.$refs.alxeEffective.doShow(data.operate, this.selected); + commitOperate(menuOperate.Switch.alxeEffective, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.alxeEffective.doShow(operate, this.selected); + } }); }, undeveloped() { diff --git a/src/jmapNew/theme/ningbo_01/menus/menuSection.vue b/src/jmapNew/theme/ningbo_01/menus/menuSection.vue index da8eaf525..ce1d7d9be 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuSection.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuSection.vue @@ -151,51 +151,65 @@ export default { // 设置计轴失效 alxeFailure() { this.mouseCancelState(this.selected); - commitOperate(menuOperate.Section.alxeFailure, {sectionCode:this.selected.code}, 3).then((data)=>{ + commitOperate(menuOperate.Section.alxeFailure, {sectionCode:this.selected.code}, 3).then(({valid, operate})=>{ }).catch((error)=>{ this.$refs.noticeInfo.doShow({}, error.message); }); }, // 故障解锁 fault() { - commitOperate(menuOperate.Section.fault, {sectionCode:this.selected.code}, 0).then((data)=>{ - this.$refs.sectionUnLock.doShow(data.operate, this.selected); + commitOperate(menuOperate.Section.fault, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.sectionUnLock.doShow(operate, this.selected); + } }); }, // 切除 split() { - commitOperate(menuOperate.Section.split, {sectionCode:this.selected.code}, 0).then((data)=>{ - this.$refs.sectionControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Section.split, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.sectionControl.doShow(operate, this.selected); + } }); }, // 确认计轴有效 alxeEffective() { - commitOperate(menuOperate.Section.alxeEffective, {sectionCode:this.selected.code}, 0).then((data)=>{ - this.$refs.alxeEffective.doShow(data.operate, this.selected); + commitOperate(menuOperate.Section.alxeEffective, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.alxeEffective.doShow(operate, this.selected); + } }); }, // 区段激活 active() { - commitOperate(menuOperate.Section.active, {sectionCode:this.selected.code}, 0).then((data)=>{ - this.$refs.sectionControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Section.active, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.sectionControl.doShow(operate, this.selected); + } }); }, // 区段封锁 lock() { - commitOperate(menuOperate.Section.lock, {sectionCode:this.selected.code}, 0).then((data)=>{ - this.$refs.sectionControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Section.lock, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.sectionControl.doShow(operate, this.selected); + } }); }, // 区段解锁 unlock() { - commitOperate(menuOperate.Section.unlock, {sectionCode:this.selected.code}, 0).then((data)=>{ - this.$refs.sectionUnLock.doShow(data.operate, this.selected); + commitOperate(menuOperate.Section.unlock, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.sectionUnLock.doShow(operate, this.selected); + } }); }, // 设置速度 setSpeed() { - commitOperate(menuOperate.Section.setSpeed, {sectionCode:this.selected.code}, 0).then((data)=>{ - this.$refs.speedLimitControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Section.setSpeed, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.speedLimitControl.doShow(operate, this.selected); + } }); } } diff --git a/src/jmapNew/theme/ningbo_01/menus/menuSignal.vue b/src/jmapNew/theme/ningbo_01/menus/menuSignal.vue index 26a013c95..a3c0cb378 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuSignal.vue @@ -291,80 +291,106 @@ export default { }, // 排列进路 arrangementRoute() { - commitOperate(menuOperate.Signal.arrangementRoute, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routeSelection.doShow(data.operate, this.selected, this.getRouteList(this.selected)); + commitOperate(menuOperate.Signal.arrangementRoute, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routeSelection.doShow(operate, this.selected, this.getRouteList(this.selected)); + } }); }, // 取消进路 cancelTrainRoute() { - commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routeControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routeControl.doShow(operate, this.selected); + } }); }, // 信号封锁 lock() { - commitOperate(menuOperate.Signal.lock, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routeLock.doShow(data.operate, this.selected); + commitOperate(menuOperate.Signal.lock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routeLock.doShow(operate, this.selected); + } }); }, // 信号解封 unlock() { - commitOperate(menuOperate.Signal.unlock, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routeUnLock.doShow(data.operate, this.selected); + commitOperate(menuOperate.Signal.unlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routeUnLock.doShow(operate, this.selected); + } }); }, // 信号重开 reopenSignal() { - commitOperate(menuOperate.Signal.reopenSignal, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routeControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Signal.reopenSignal, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routeControl.doShow(operate, this.selected); + } }); }, // 信号关灯 signalClose() { - commitOperate(menuOperate.Signal.signalClose, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routeControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Signal.signalClose, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routeControl.doShow(operate, this.selected); + } }); }, // 进路交人工控 humanControl() { - commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routeHandControl.doShow(data.operate, this.selected, this.getRouteList(this.selected)); + commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected)); + } }); }, // 进路交自动控 atsAutoControl() { - commitOperate(menuOperate.Signal.atsAutoControl, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routeHandControl.doShow(data.operate, this.selected, this.getRouteList(this.selected)); + commitOperate(menuOperate.Signal.atsAutoControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected)); + } }); }, // 设置通过模式 singalPassModel() { - commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routeControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routeControl.doShow(operate, this.selected); + } }); }, // 取消通过模式 singalCancelPassModel() { - commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routeControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routeControl.doShow(operate, this.selected); + } }); }, // 查询进路状态 detail() { - commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routeDetail.doShow(data.operate, this.selected, this.getRouteList(this.selected)); + commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routeDetail.doShow(operate, this.selected, this.getRouteList(this.selected)); + } }); }, // 人工解锁进路(信号机取消引导) humanTrainRoute() { - commitOperate(menuOperate.Signal.cancelGuide, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routerCommand.doShow(data.operate, this.selected, '是否执行人解列车进路命令?'); + commitOperate(menuOperate.Signal.cancelGuide, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routerCommand.doShow(operate, this.selected, '是否执行人解列车进路命令?'); + } }); }, // 进路引导 guide() { - commitOperate(menuOperate.Signal.guide, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routerCommand.doShow(data.operate, this.selected, '是否执行引导命令?'); + commitOperate(menuOperate.Signal.guide, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routerCommand.doShow(operate, this.selected, '是否执行引导命令?'); + } }); } } From 17c26e26a29d29c90ddaeac7a1b2e3cb5b44ba29 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 30 Mar 2020 11:27:34 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E4=BD=9B=E5=B1=B1=E4=B8=80=E5=8F=B7?= =?UTF-8?q?=E7=BA=BF=20=E5=AE=81=E6=B3=A2=E4=B8=80=E5=8F=B7=E7=BA=BF=20?= =?UTF-8?q?=E6=AD=A5=E9=AA=A4=E6=93=8D=E4=BD=9C=E4=BB=A3=E7=A0=81=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/foshan_01/menus/menuSection.vue | 26 ++++--- .../theme/foshan_01/menus/menuSignal.vue | 62 ++++++++++------ .../foshan_01/menus/menuStationStand.vue | 54 +++++++++----- .../theme/foshan_01/menus/menuSwitch.vue | 14 ++-- .../ningbo_01/menus/menuStationControl.vue | 12 ++-- .../ningbo_01/menus/menuStationStand.vue | 72 ++++++++++++------- .../theme/ningbo_01/menus/menuSwitch.vue | 60 ++++++++++------ 7 files changed, 196 insertions(+), 104 deletions(-) diff --git a/src/jmapNew/theme/foshan_01/menus/menuSection.vue b/src/jmapNew/theme/foshan_01/menus/menuSection.vue index e4a066f87..1da696f0f 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuSection.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuSection.vue @@ -133,33 +133,41 @@ export default { }, // 设置计轴失效 alxeFailure() { - commitOperate(menuOperate.Section.alxeFailure, {sectionCode:this.selected.code}, 3).then((data)=>{ + commitOperate(menuOperate.Section.alxeFailure, {sectionCode:this.selected.code}, 3).then(({valid, operate})=>{ }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); }); }, // 故障解锁 fault() { - commitOperate(menuOperate.Section.fault, {sectionCode:this.selected.code}, 0).then((data)=>{ - this.$refs.sectionUnLock.doShow(data.operate, this.selected); + commitOperate(menuOperate.Section.fault, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.sectionUnLock.doShow(operate, this.selected); + } }); }, // 切除 split() { - commitOperate(menuOperate.Section.split, {sectionCode:this.selected.code}, 0).then((data)=>{ - this.$refs.sectionControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Section.split, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.sectionControl.doShow(operate, this.selected); + } }); }, // 区段激活 active() { - commitOperate(menuOperate.Section.active, {sectionCode:this.selected.code}, 0).then((data)=>{ - this.$refs.sectionControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Section.active, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.sectionControl.doShow(operate, this.selected); + } }); } // // 设置速度 // setSpeed() { - // commitOperate(menuOperate.Section.setSpeed, {sectionCode:this.selected.code}, 0).then((data)=>{ - // this.$refs.speedLimitControl.doShow(data.operate, this.selected); + // commitOperate(menuOperate.Section.setSpeed, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ + // if (valid) { + // this.$refs.speedLimitControl.doShow(operate, this.selected); + // } // }); // } } diff --git a/src/jmapNew/theme/foshan_01/menus/menuSignal.vue b/src/jmapNew/theme/foshan_01/menus/menuSignal.vue index 4075a51ca..360080e9a 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuSignal.vue @@ -283,19 +283,23 @@ export default { }, // 排列进路 arrangementRoute() { - commitOperate(menuOperate.Signal.arrangementRoute, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routeSelection.doShow(data.operate, this.selected, this.getRouteList(this.selected)); + commitOperate(menuOperate.Signal.arrangementRoute, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routeSelection.doShow(operate, this.selected, this.getRouteList(this.selected)); + } }); }, // 取消进路 cancelTrainRoute() { - commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routeControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routeControl.doShow(operate, this.selected); + } }); }, // 信号封锁 lock(selectType) { - commitOperate(menuOperate.Signal.lock, {signalCode:selectType.code}, 3).then((data)=>{ + commitOperate(menuOperate.Signal.lock, {signalCode:selectType.code}, 3).then(({valid, operate})=>{ // this.$refs.routeLock.doShow(data.operation, this.selected); }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); @@ -303,7 +307,7 @@ export default { }, // 信号解封 unlock(selectType) { - commitOperate(menuOperate.Signal.unlock, {signalCode:selectType.code}, 3).then((data)=>{ + commitOperate(menuOperate.Signal.unlock, {signalCode:selectType.code}, 3).then(({valid, operate})=>{ // this.$refs.routeUnLock.doShow(data.operation, this.selected); }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); @@ -311,31 +315,39 @@ export default { }, // 信号重开 reopenSignal() { - commitOperate(menuOperate.Signal.reopenSignal, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routeControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Signal.reopenSignal, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routeControl.doShow(operate, this.selected); + } }); }, // 信号关灯 signalClose() { - commitOperate(menuOperate.Signal.signalClose, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routeControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Signal.signalClose, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routeControl.doShow(operate, this.selected); + } }); }, // 进路交人工控 humanControl() { - commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routeHandControl.doShow(data.operate, this.selected, this.getRouteList(this.selected)); + commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected)); + } }); }, // 进路交自动控 atsAutoControl() { - commitOperate(menuOperate.Signal.atsAutoControl, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routeHandControl.doShow(data.operate, this.selected, this.getRouteList(this.selected)); + commitOperate(menuOperate.Signal.atsAutoControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected)); + } }); }, // 设置通过模式 singalPassModel(selectType) { - commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:selectType.code}, 3).then((data)=>{ + commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:selectType.code}, 3).then(({valid, operate})=>{ // this.$refs.routeControl.doShow(data.operation, this.selected); }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); @@ -343,7 +355,7 @@ export default { }, // 取消通过模式 singalCancelPassModel(selectType) { - commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:selectType.code}, 3).then((data)=>{ + commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:selectType.code}, 3).then(({valid, operate})=>{ // this.$refs.routeControl.doShow(data.operation, this.selected); }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); @@ -351,20 +363,26 @@ export default { }, // 查询进路状态 detail() { - commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routeDetail.doShow(data.operate, this.selected, this.getRouteList(this.selected)); + commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routeDetail.doShow(operate, this.selected, this.getRouteList(this.selected)); + } }); }, // 人工解锁进路(信号机取消引导) humanTrainRoute() { - commitOperate(menuOperate.Signal.cancelGuide, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routerCommand.doShow(data.operate, this.selected, '是否执行人解列车进路命令?'); + commitOperate(menuOperate.Signal.cancelGuide, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routerCommand.doShow(operate, this.selected, '是否执行人解列车进路命令?'); + } }); }, // 进路引导 guide() { - commitOperate(menuOperate.Signal.guide, {signalCode:this.selected.code}, 0).then((data)=>{ - this.$refs.routerCommand.doShow(data.operate, this.selected, '是否执行引导命令'); + commitOperate(menuOperate.Signal.guide, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.routerCommand.doShow(operate, this.selected, '是否执行引导命令'); + } }); }, // 获取进路列表 diff --git a/src/jmapNew/theme/foshan_01/menus/menuStationStand.vue b/src/jmapNew/theme/foshan_01/menus/menuStationStand.vue index 97499ce3f..f0e819add 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuStationStand.vue @@ -237,56 +237,74 @@ export default { }, // 设置扣车 setDetainTrain() { - commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standControl.doShow(operate, this.selected); + } }); }, // 取消扣车 cancelDetainTrain() { - commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standControl.doShow(operate, this.selected); + } }); }, // 设置跳停 setJumpStop() { - commitOperate(menuOperate.StationStand.setJumpStop, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standJumpStopControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.StationStand.setJumpStop, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standJumpStopControl.doShow(operate, this.selected); + } }); }, // 取消跳停 cancelJumpStop() { - commitOperate(menuOperate.StationStand.cancelJumpStop, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standJumpStopControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.StationStand.cancelJumpStop, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standJumpStopControl.doShow(operate, this.selected); + } }); }, // 设置停站时间 setStopTime() { - commitOperate(menuOperate.StationStand.setStopTime, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standStopTime.doShow(data.operate, this.selected, []); + commitOperate(menuOperate.StationStand.setStopTime, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standStopTime.doShow(operate, this.selected, []); + } }); }, // 设置运行等级 setRunLevel() { - commitOperate(menuOperate.StationStand.setRunLevel, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standRunLevel.doShow(data.operate, this.selected, []); + commitOperate(menuOperate.StationStand.setRunLevel, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standRunLevel.doShow(operate, this.selected, []); + } }); }, // 设置提前发车 earlyDeparture() { - commitOperate(menuOperate.StationStand.earlyDeparture, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.StationStand.earlyDeparture, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standControl.doShow(operate, this.selected); + } }); }, // 全线取消扣车 cancelDetainTrainAll() { - commitOperate(menuOperate.StationStand.cancelDetainTrainAll, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standDetainTrainAll.doShow(data.operate, this.selected); + commitOperate(menuOperate.StationStand.cancelDetainTrainAll, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standDetainTrainAll.doShow(operate, this.selected); + } }); }, // 查询站台状态 detail() { - commitOperate(menuOperate.StationStand.detail, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standDetail.doShow(data.operate, this.selected, []); + commitOperate(menuOperate.StationStand.detail, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standDetail.doShow(operate, this.selected, []); + } }); } } diff --git a/src/jmapNew/theme/foshan_01/menus/menuSwitch.vue b/src/jmapNew/theme/foshan_01/menus/menuSwitch.vue index 3af194a83..f13e3354b 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuSwitch.vue @@ -213,7 +213,7 @@ export default { }, // 单操到定位 locate(selectType) { - commitOperate(menuOperate.Switch.locate, {switchCode:selectType.code}, 3).then((data)=>{ + commitOperate(menuOperate.Switch.locate, {switchCode:selectType.code}, 3).then(({valid, operate})=>{ // this.$refs.switchControl.doShow(data.operate, this.selected); }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); @@ -221,7 +221,7 @@ export default { }, // 单操到反位 reverse(selectType) { - commitOperate(menuOperate.Switch.reverse, {switchCode:selectType.code}, 3).then((data)=>{ + commitOperate(menuOperate.Switch.reverse, {switchCode:selectType.code}, 3).then(({valid, operate})=>{ // this.$refs.switchControl.doShow(data.operate, this.selected); }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); @@ -229,7 +229,7 @@ export default { }, // 道岔单锁 lock(selectType) { - commitOperate(menuOperate.Switch.lock, {switchCode:selectType.code}, 3).then((data)=>{ + commitOperate(menuOperate.Switch.lock, {switchCode:selectType.code}, 3).then(({valid, operate})=>{ // this.$refs.switchControl.doShow(data.operate, this.selected); }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); @@ -237,7 +237,7 @@ export default { }, // 道岔解锁 unlock(selectType) { - commitOperate(menuOperate.Switch.unlock, {switchCode:selectType.code}, 3).then((data)=>{ + commitOperate(menuOperate.Switch.unlock, {switchCode:selectType.code}, 3).then(({valid, operate})=>{ // this.$refs.switchUnLock.doShow(data.operate, this.selected); }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); @@ -245,7 +245,7 @@ export default { }, // 道岔封锁 block(selectType) { - commitOperate(menuOperate.Switch.block, {switchCode:selectType.code}, 3).then((data)=>{ + commitOperate(menuOperate.Switch.block, {switchCode:selectType.code}, 3).then(({valid, operate})=>{ // this.$refs.switchControl.doShow(data.operate, this.selected); }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); @@ -253,7 +253,7 @@ export default { }, // 道岔解封 unblock(selectType) { - commitOperate(menuOperate.Switch.unblock, {switchCode:selectType.code}, 3).then((data)=>{ + commitOperate(menuOperate.Switch.unblock, {switchCode:selectType.code}, 3).then(({valid, operate})=>{ // this.$refs.switchUnLock.doShow(data.operate, this.selected); }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); @@ -261,7 +261,7 @@ export default { }, // 道岔强扳 switchTurnoutForce(selectType) { - commitOperate(menuOperate.Switch.turnoutForce, {switchCode:selectType.code}, 3).then((data)=>{ + commitOperate(menuOperate.Switch.turnoutForce, {switchCode:selectType.code}, 3).then(({valid, operate})=>{ }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); }); diff --git a/src/jmapNew/theme/ningbo_01/menus/menuStationControl.vue b/src/jmapNew/theme/ningbo_01/menus/menuStationControl.vue index 1ede3304d..283eaca05 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuStationControl.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuStationControl.vue @@ -112,14 +112,18 @@ export default { }, setCenterControl() { // 请求中控(遥控) - commitOperate(menuOperate.StationControl.requestCentralControl, {}, 0).then((data)=>{ - this.$refs.stationControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.StationControl.requestCentralControl, {}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.stationControl.doShow(operate, this.selected); + } }); }, setStationControl() { // 请求站控 - commitOperate(menuOperate.StationControl.requestStationControl, {}, 0).then((data)=>{ - this.$refs.stationControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.StationControl.requestStationControl, {}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.stationControl.doShow(operate, this.selected); + } }); } } diff --git a/src/jmapNew/theme/ningbo_01/menus/menuStationStand.vue b/src/jmapNew/theme/ningbo_01/menus/menuStationStand.vue index 90fde8454..5c8c27497 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuStationStand.vue @@ -243,74 +243,98 @@ export default { }, // 设置扣车 setDetainTrain() { - commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standControl.doShow(operate, this.selected); + } }); }, // 取消扣车 cancelDetainTrain() { - commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standControl.doShow(operate, this.selected); + } }); }, // 区间列车数量限制 setDetainTrainAll() { - commitOperate(menuOperate.StationStand.setDetainTrainAuto, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.StationStand.setDetainTrainAuto, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standControl.doShow(operate, this.selected); + } }); }, // 取消区间列车数量限制 cancelDetainTrainAll() { - commitOperate(menuOperate.StationStand.cancelDetainTrainAuto, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.StationStand.cancelDetainTrainAuto, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standControl.doShow(operate, this.selected); + } }); }, // 批量扣车 setBulkBuckleTrain() { - commitOperate(menuOperate.StationStand.setBulkBuckleTrain, {}, 0).then((data)=>{ - this.$refs.standBulkBuckleTrain.doShow(data.operate, this.selected); + commitOperate(menuOperate.StationStand.setBulkBuckleTrain, {}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standBulkBuckleTrain.doShow(operate, this.selected); + } }); }, // 批量取消扣车 cancelBulkBuckleTrain() { - commitOperate(menuOperate.StationStand.cancelBulkBuckleTrain, {}, 0).then((data)=>{ - this.$refs.standBulkBuckleTrain.doShow(data.operate, this.selected); + commitOperate(menuOperate.StationStand.cancelBulkBuckleTrain, {}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standBulkBuckleTrain.doShow(operate, this.selected); + } }); }, // 设置跳停 setJumpStop() { - commitOperate(menuOperate.StationStand.setJumpStop, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standJumpStopControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.StationStand.setJumpStop, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standJumpStopControl.doShow(operate, this.selected); + } }); }, // 取消跳停 cancelJumpStop() { - commitOperate(menuOperate.StationStand.cancelJumpStop, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standJumpStopControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.StationStand.cancelJumpStop, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standJumpStopControl.doShow(operate, this.selected); + } }); }, // 设置停站时间 setStopTime() { - commitOperate(menuOperate.StationStand.setStopTime, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standStopTime.doShow(data.operate, this.selected, []); + commitOperate(menuOperate.StationStand.setStopTime, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standStopTime.doShow(operate, this.selected, []); + } }); }, // 设置运行等级 setRunLevel() { - commitOperate(menuOperate.StationStand.setRunLevel, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standRunLevel.doShow(data.operate, this.selected, []); + commitOperate(menuOperate.StationStand.setRunLevel, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standRunLevel.doShow(operate, this.selected, []); + } }); }, // 设置提前发车 earlyDeparture() { - commitOperate(menuOperate.StationStand.earlyDeparture, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standControl.doShow(data.operate, this.selected, []); + commitOperate(menuOperate.StationStand.earlyDeparture, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standControl.doShow(operate, this.selected, []); + } }); }, // 查询站台状态 detail() { - commitOperate(menuOperate.StationStand.detail, {standCode:this.selected.code}, 0).then((data)=>{ - this.$refs.standDetail.doShow(data.operate, this.selected, []); + commitOperate(menuOperate.StationStand.detail, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.standDetail.doShow(operate, this.selected, []); + } }); } } diff --git a/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue b/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue index 61a60cf34..051105eaf 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue @@ -230,62 +230,82 @@ export default { }, // 单操到定位 locate() { - commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 0).then((data)=>{ - this.$refs.switchControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.switchControl.doShow(operate, this.selected); + } }); }, // 单操到反位 reverse() { - commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 0).then((data)=>{ - this.$refs.switchControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.switchControl.doShow(operate, this.selected); + } }); }, // 道岔单锁 lock() { - commitOperate(menuOperate.Switch.lock, {switchCode:this.selected.code}, 0).then((data)=>{ - this.$refs.switchControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Switch.lock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.switchControl.doShow(operate, this.selected); + } }); }, // 道岔解锁 unlock() { - commitOperate(menuOperate.Switch.unlock, {switchCode:this.selected.code}, 0).then((data)=>{ - this.$refs.switchUnLock.doShow(data.operate, this.selected); + commitOperate(menuOperate.Switch.unlock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.switchUnLock.doShow(operate, this.selected); + } }); }, // 道岔封锁 block() { - commitOperate(menuOperate.Switch.block, {switchCode:this.selected.code}, 0).then((data)=>{ - this.$refs.switchControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Switch.block, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.switchControl.doShow(operate, this.selected); + } }); }, // 道岔解封 unblock() { - commitOperate(menuOperate.Switch.unblock, {switchCode:this.selected.code}, 0).then((data)=>{ - this.$refs.switchUnLock.doShow(data.operate, this.selected); + commitOperate(menuOperate.Switch.unblock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.switchUnLock.doShow(operate, this.selected); + } }); }, // 区段切除 split() { - commitOperate(menuOperate.Switch.split, {switchCode:this.selected.code}, 0).then((data)=>{ - this.$refs.switchControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Switch.split, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.switchControl.doShow(operate, this.selected); + } }); }, // 区段激活 active() { - commitOperate(menuOperate.Switch.active, {switchCode:this.selected.code}, 0).then((data)=>{ - this.$refs.switchControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Switch.active, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.switchControl.doShow(operate, this.selected); + } }); }, // 设置临时限速 setSpeed() { - commitOperate(menuOperate.Switch.setSpeed, {switchCode:this.selected.code}, 0).then((data)=>{ - this.$refs.speedLimitControl.doShow(data.operate, this.selected); + commitOperate(menuOperate.Switch.setSpeed, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.speedLimitControl.doShow(operate, this.selected); + } }); }, // 确认计轴有效 alxeEffective() { - commitOperate(menuOperate.Switch.alxeEffective, {switchCode:this.selected.code}, 0).then((data)=>{ - this.$refs.alxeEffective.doShow(data.operate, this.selected); + commitOperate(menuOperate.Switch.alxeEffective, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.alxeEffective.doShow(operate, this.selected); + } }); }, undeveloped() { From ab4928d924f427b7802076ebbd0e37ae40b8ddff Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Mon, 30 Mar 2020 13:07:11 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E5=B7=AE=E5=BC=82=E5=8C=96=E6=89=93?= =?UTF-8?q?=E5=8C=85=E8=B0=83=E6=95=B4&=E5=93=88=E5=B0=94=E6=BB=A8?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + .../jl3ddrive/moveupdate/DrivingConnect.js | 1725 ++++++++--------- .../connect/TrainingConnectTest.js | 2 +- .../menus/dialog/speedCmdControl.vue | 2 +- .../menus/dialog/speedCmdControl.vue | 2 +- src/layout/components/Logout.vue | 2 +- src/main.js | 2 +- src/permission.js | 4 +- src/router/{index.js => index_Common.js} | 96 - src/router/index_HYD.js | 890 +++++++++ src/scripts/ConstDic.js | 95 + src/scripts/cmdPlugin/CommandHandler.js | 2 +- src/scripts/cmdPlugin/Handler.js | 2 +- src/scripts/plugin/OperateConvert2Command.js | 2 +- src/scripts/plugin/OperateHandler.js | 2 +- src/store/modules/permission.js | 4 +- src/views/approval/runPlan/index.vue | 2 +- src/views/approval/script/index.vue | 2 +- src/views/components/pay/index.vue | 2 +- src/views/demonstration/detail/index.vue | 4 +- src/views/designPlatform/demonList.vue | 4 +- src/views/designUser/demonList.vue | 2 +- .../designUser/mapmanage/operateMenu.vue | 2 +- src/views/display/menuLesson.vue | 2 +- src/views/exam/detail/courseDetail.vue | 2 +- src/views/exam/detail/examDetail.vue | 2 +- src/views/exam/index.vue | 2 +- src/views/exam/result.vue | 2 +- src/views/jlmap3d/drive/jl3ddrive.vue | 2 +- src/views/jlmap3d/edit/jlmap3dedit.vue | 2 +- .../jlmap3d/simulation/jl3dsimulation.vue | 2 +- src/views/lesson/home.vue | 2 +- .../lessoncategory/edit/chapter/index.vue | 2 +- .../lessoncategory/edit/lesson/index.vue | 2 +- src/views/lesson/trainingRule/list.vue | 2 +- src/views/lesson/trainingmanage/index.vue | 2 +- src/views/login/hydLogin.vue | 437 +++++ src/views/login/index.vue | 3 +- src/views/newMap/displayNew/LeftSlider.vue | 2 +- src/views/newMap/displayNew/menuLesson.vue | 2 +- src/views/newMap/newDesignUser/demonList.vue | 2 +- .../newDesignUser/mapmanage/operateMenu.vue | 2 +- src/views/orderauthor/commodity/index.vue | 1 - src/views/orderauthor/order/list.vue | 2 +- src/views/orderauthor/permission/index.vue | 4 +- src/views/package/index.vue | 2 +- src/views/planMonitor/detail.vue | 2 +- src/views/planMonitor/editTool/menuBar.vue | 2 +- .../editTool/menus/openRunPlan.vue | 2 +- src/views/planMonitor/editTool/statusBar.vue | 2 +- src/views/planMonitor/editTool/titleBar.vue | 2 +- src/views/publish/examRule/draft/rule.vue | 2 +- src/views/publish/examRule/index.vue | 2 +- src/views/publish/runPlanCommon/index.vue | 4 +- src/views/publish/runPlanEveryDay/index.vue | 4 +- .../publish/runPlanEveryDay/runPlanView.vue | 2 +- src/views/publish/runPlanTemplate/index.vue | 4 +- src/views/scriptManage/home.vue | 4 +- src/views/teach/detail/index.vue | 2 +- src/views/teach/index.vue | 2 +- src/views/trainingPlatform/demonList.vue | 2 +- tests/unit/utils/formatTime.spec.js | 2 +- tests/unit/utils/parseTime.spec.js | 2 +- vue.config.js | 10 +- 64 files changed, 2353 insertions(+), 1033 deletions(-) rename src/router/{index.js => index_Common.js} (89%) create mode 100644 src/router/index_HYD.js create mode 100644 src/views/login/hydLogin.vue diff --git a/package.json b/package.json index bd4521b4a..ca598995f 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "compression-webpack-plugin": "^3.0.0", "connect": "3.6.6", "copy-webpack-plugin": "^4.5.2", + "eslint": "5.15.3", "eslint-plugin-vue": "5.2.2", "file-loader": "^3.0.1", diff --git a/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnect.js b/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnect.js index 65802534c..8ddb3f7ba 100644 --- a/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnect.js +++ b/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnect.js @@ -4,894 +4,881 @@ import { getTrainingCbtcDemon, runDiagramStart, runDiagramOver, setTrainingCbtcI import { creatSubscribe, clearSubscribe, displayTopic, screenTopic } from '@/utils/stomp'; import { getToken } from '@/utils/auth'; -import router from '@/router'; +import router from '@/router/index_APP_TARGET'; // 定于仿真socket接口 -export function Jl3dDriving(mixers,updatemmi,sound,translation,routegroup) { +export function Jl3dDriving(mixers, updatemmi, sound, translation, routegroup) { - let scope = this; - this.map = null; - let toppic = '/app/topic/simulation/client/'+routegroup+'/drive'; - var trainlisttest = null; - var sectionlist = null; - var signallist = null; - var stationstandlist = null; - var sectionlist = null; - var materials = null; - var actions = null; - var rails = null; - var links = null; + const scope = this; + this.map = null; + const toppic = '/app/topic/simulation/client/' + routegroup + '/drive'; + var trainlisttest = null; + var sectionlist = null; + var signallist = null; + var stationstandlist = null; + var sectionlist = null; + var materials = null; + var actions = null; + var rails = null; + var links = null; - var scenes = null; + var scenes = null; - var code = null; + var code = null; - var drivingcode = null; - var drivingspeed = null; - var drivingaptspeed = null; + var drivingcode = null; + var drivingspeed = null; + var drivingaptspeed = null; - let driverswitch = false; + let driverswitch = false; - let stoptimer = null; - let num = 30; - let pointstand = null; - // run as plane = 01; - // reset = 02; - var datatype = '00'; - this.teststomp = new StompClient(); - this.topic = '/user/queue/simulation/jl3d/'+routegroup; - let header = {'X-Token': getToken() }; + const stoptimer = null; + const num = 30; + const pointstand = null; + // run as plane = 01; + // reset = 02; + var datatype = '00'; + this.teststomp = new StompClient(); + this.topic = '/user/queue/simulation/jl3d/' + routegroup; + const header = {'X-Token': getToken() }; - this.updatamap = function(newsectionlist,newlinklist,newsignallist,newstationstandlist,newtrainlisttest,newrealsectionlist,newrails, materiallist, nowaction, scene) { - // console.log(mapdata); - // console.log(newtrainlisttest); - trainlisttest = newtrainlisttest; - sectionlist = newsectionlist; - signallist = newsignallist; - stationstandlist = newstationstandlist; - materials = materiallist; - scenes = scene; - actions = nowaction; - links = newlinklist; - rails = newrails; - }; + this.updatamap = function(newsectionlist, newlinklist, newsignallist, newstationstandlist, newtrainlisttest, newrealsectionlist, newrails, materiallist, nowaction, scene) { + // console.log(mapdata); + // console.log(newtrainlisttest); + trainlisttest = newtrainlisttest; + sectionlist = newsectionlist; + signallist = newsignallist; + stationstandlist = newstationstandlist; + materials = materiallist; + scenes = scene; + actions = nowaction; + links = newlinklist; + rails = newrails; + }; - this.initdrivercode = function(code) { - drivingcode = code; - }; + this.initdrivercode = function(code) { + drivingcode = code; + }; - this.socketon = function(topic) { - try { - // console.log("teststomp"); - scope.teststomp.subscribe(topic, callback, header); - } catch (error) { - console.error('websocket订阅失败'); - } + this.socketon = function(topic) { + try { + // console.log("teststomp"); + scope.teststomp.subscribe(topic, callback, header); + } catch (error) { + console.error('websocket订阅失败'); + } - }; + }; - this.socketoff = function(topic) { - scope.teststomp.unsubscribe(topic); - for (let i=0; i0) { - // updatemmi.updatenowspeed(data.body[tl].v); - // } else { - - updatemmi.updatenowspeed(Math.abs(data.body[tl].v)); - // console.log(data.body[i]); - - // } - } - } - - - - if (code == drivingcode) { - // if(sound.volswitch == true){ - // sound.setVolume( data.body[tl].v/100 ); - // } - if (data.body[tl].atpv) { - updatemmi.updateatpspeed(data.body[tl].atpv); - } else { - updatemmi.updateatpspeed(-1); - } - if (data.body[tl].atov) { - updatemmi.updateatospeed(data.body[tl].atov); - } else { - updatemmi.updateatospeed(-1); - } - if(trainlisttest.list[code].progress<1){ - let syncdata = { - type: 'Train', - code: code, - linkCode: trainlisttest.list[code].nowcode, - percent: 0 - }; - if (trainlisttest.list[code].status == '02') { - if(trainlisttest.list[code].targetLink == trainlisttest.list[code].nowcode){ - if((trainlisttest.list[code].linkOffsetPercent/trainlisttest.list[code].pc)>=trainlisttest.list[code].targetpercent){ - syncdata.percent = trainlisttest.list[code].progress; - }else{ - syncdata.percent = trainlisttest.list[code].progress*trainlisttest.list[code].pc; - } - }else{ - syncdata.percent = trainlisttest.list[code].progress; - } - - } else { - if(trainlisttest.list[code].targetLink == trainlisttest.list[code].nowcode){ - if((trainlisttest.list[code].linkOffsetPercent/trainlisttest.list[code].pc)<=trainlisttest.list[code].targetpercent){ - syncdata.percent = (1 - trainlisttest.list[code].progress); - }else{ - syncdata.percent = (1 - trainlisttest.list[code].progress)*trainlisttest.list[code].pc; - } - }else{ - syncdata.percent = (1 - trainlisttest.list[code].progress); - } - } - // console.log("send"); - // console.log(trainlisttest.list[code]); - // - // console.log(syncdata); - // console.log("============="); - scope.teststomp.send(toppic, syncdata); - } - - } - } - } - } - - function trainstatus(data){ - // console.log(data.body); - for (let i=data.body.length-1; i>=0; i--) { - // 遍历列车对象组 - // console.log(trainlisttest); - if (trainlisttest) { - - code = data.body[i].code; - // 剔除不显示的车 - // 找到对应列车 - - if (code == drivingcode) { - - driverswitch = data.body[i].runMode; - //更新车组号 - updatemmi.updatetrainnum(data.body[i].groupNumber); - //更新列车 - if (data.body[i].parkRemainTime>0) { - updatemmi.updatestoptime(translation.stopTime+parseInt(data.body[i].parkRemainTime)); - } else { - if (data.body[i].runMode == '02') { - updatemmi.updatestoptime(translation.trainAtoOn); - } else { - if (trainlisttest.list[code].isStandTrack == true && trainlisttest.list[code].progress>0.95 && trainlisttest.list[code].speed<=0) { - // if(stoptimer){ - // - // }else{ - // stoptimer = setInterval(function(){ - // if(num >=0){ - // updatemmi.updatestoptime("停站时间:"+num); - // num --; - // } - // },1000); - // } - - } else { - updatemmi.updatestoptime(translation.trainAtoOff); - } - } - } - } - trainlisttest.list[code].runMode = data.body[i].runMode; - - // 车门开关验证 - if (trainlisttest.list[code].doorStatus != data.body[i].doorStatus && data.body[i].doorStatus == '01') { - // console.log("close"); - trainlisttest.list[code].doorStatus = '01'; - for (let an=actions[code].top.length-1; an>=0; an--) { - actions[code].top[an].reset(); - actions[code].top[an].time = actions[code].top[an]._clip.duration; - actions[code].top[an].timeScale = -1; - actions[code].top[an].play(); - } - } else if (trainlisttest.list[code].doorStatus != data.body[i].doorStatus && data.body[i].doorStatus == '02') { - // console.log("open"); - trainlisttest.list[code].doorStatus = '02'; - for (let an=actions[code].top.length-1; an>=0; an--) { - actions[code].top[an].reset(); - actions[code].top[an].time = 0; - actions[code].top[an].timeScale = 1; - actions[code].top[an].play(); - } - } - // if (data.body[i].directionType == '02') { - // - // } else { - // if (trainlisttest.list[code].doorStatus != data.body[i].doorStatus && data.body[i].doorStatus == '01') { - // // console.log("close"); - // trainlisttest.list[code].doorStatus = '01'; - // for (let an=actions[code].down.length-1; an>=0; an--) { - // actions[code].down[an].reset(); - // actions[code].down[an].time = actions[code].top[an]._clip.duration; - // actions[code].down[an].timeScale = -1; - // actions[code].down[an].play(); - // } - // } else if (trainlisttest.list[code].doorStatus != data.body[i].doorStatus && data.body[i].doorStatus == '02') { - // // console.log("open"); - // trainlisttest.list[code].doorStatus = '02'; - // for (let an=actions[code].down.length-1; an>=0; an--) { - // actions[code].down[an].reset(); - // actions[code].down[an].time = 0; - // actions[code].down[an].timeScale = 1; - // actions[code].down[an].play(); - // } - // } - // } - // 遍历获取所在轨道 - - if (trainlisttest.list[code].dispose != data.body[i].dispose && data.body[i].dispose == false) { - - if (rails.linkrail[data.body[i].linkCode]) { - // console.log(trainlisttest.group); - if(trainlisttest.group.children.length<1){ - trainlisttest.group.add(trainlisttest.list[code]); - drivingcode = code; - updatemmi.updatedrivingcode(drivingcode); - } - if(trainlisttest.list[code].mixerpush == false){ - for(let mi=0,lenmi=trainlisttest.list[code].mixer.length;mi=0; i--) { - // 0xFFFFFF - // 0xCD0000 红 - // 0xEEEE00 黄 - // 0x32CD32 绿 - if (data.body[i]._type == 'Signal') { - if (signallist) { - signalupdate(data.body[i]); - } - } - - if (data.body[i]._type == 'StationStand' ) { - if (actions) { - standupdate(data.body[i]); - } - } - - if (data.body[i]._type == 'Switch') { - if (sectionlist) { - switchupdate(data.body[i]); - } - } - - } - } - - function standupdate(data) { - code = data.code; - if ( actions[code]) { - if (data.screenDoorOpenStatus == '02' && actions[code].status == '01') { - actions[code].status = '00'; - } - if (data.screenDoorOpenStatus == '02' && actions[code].status == '00') { - actions[code].status = '02'; - actions[code].action.reset(); - actions[code].action.time = 0; - actions[code].action.timeScale = 1; - actions[code].action.play(); - } - - if (data.screenDoorOpenStatus == '01' && actions[code].status == '02') { - actions[code].status = '00'; - } - if (data.screenDoorOpenStatus == '01' && actions[code].status == '00') { - actions[code].status = '01'; - actions[code].action.reset(); - actions[code].action.time = actions[code].action._clip.duration; - actions[code].action.timeScale = -1; - actions[code].action.play(); - } - } - - } - - function signalupdate(data) { - code = data.code; - if (data.lightType == '01') { - if (signallist.list[code].mesh.code) { - signallist.list[code].mesh.status = data.status; - - // 55 - // 33 - // 77 - // 关闭 - if (data.status == '01') { - signallist.list[code].mesh.getObjectByName("red").material.map = materials[0]; - signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true; - signallist.list[code].mesh.getObjectByName("yellow").material.map = materials[3]; - signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true; - signallist.list[code].mesh.getObjectByName("green").material.map = materials[3]; - signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true; - - } - // 开放 - if (data.status == '02') { - signallist.list[code].mesh.getObjectByName("red").material.map = materials[3]; - signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true; - signallist.list[code].mesh.getObjectByName("yellow").material.map = materials[3]; - signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true; - signallist.list[code].mesh.getObjectByName("green").material.map = materials[2]; - signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true; - } - if (data.status == '03') { - signallist.list[code].mesh.getObjectByName("red").material.map = materials[3]; - signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true; - signallist.list[code].mesh.getObjectByName("yellow").material.map = materials[1]; - signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true; - signallist.list[code].mesh.getObjectByName("green").material.map = materials[3]; - signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true; - - } - // 引导 - if (data.status == '03') { - signallist.list[code].mesh.getObjectByName("red").material.map = materials[0]; - signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true; - signallist.list[code].mesh.getObjectByName("yellow").material.map = materials[1]; - signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true; - signallist.list[code].mesh.getObjectByName("green").material.map = materials[3]; - signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true; - - } - // 封锁 - if (data.status == '04') { - signallist.list[code].mesh.getObjectByName("red").material.map = materials[3]; - signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true; - signallist.list[code].mesh.getObjectByName("yellow").material.map = materials[3]; - signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true; - signallist.list[code].mesh.getObjectByName("green").material.map = materials[3]; - signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true; - - } - // 故障 - if (data.status == '05') { - signallist.list[code].mesh.getObjectByName("red").material.map = materials[3]; - signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true; - signallist.list[code].mesh.getObjectByName("yellow").material.map = materials[3]; - signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true; - signallist.list[code].mesh.getObjectByName("green").material.map = materials[3]; - signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true; - - } - - } - - } else if (data.lightType == '02') { - if (signallist.list[code].mesh.code) { - signallist.list[code].mesh.getObjectByName("red").material.map = materials[3]; - signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true; - signallist.list[code].mesh.getObjectByName("yellow").material.map = materials[3]; - signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true; - signallist.list[code].mesh.getObjectByName("green").material.map = materials[3]; - signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true; - - } - - } - - } - - function switchupdate(data) { - code = data.code; - for (let j=sectionlist.switchs.modellist.length-1; j>=0; j--) { - if (rails.switchrail[code]) { - if (rails.switchrail[code].locateType != data.locateType) { - // console.log("道岔变化:"+code); - if (data.locateType == '02') { - // console.log("02 反位"); - if (actions[sectionlist.switchs.modellist[j].code]) { - sectionlist.switchs.modellist[j].locateType = data.locateType; - actions[sectionlist.switchs.modellist[j].code].reset(); - actions[sectionlist.switchs.modellist[j].code].time = 0; - actions[sectionlist.switchs.modellist[j].code].timeScale = 1; - actions[sectionlist.switchs.modellist[j].code].play(); - } - - rails.switchrail[code].locateType = "02"; - - let testswitch = rails.switchrail[code]; - if(rails.switchrail[code].directtype == "1"){ - // console.log("道岔朝向1向左"); - // console.log("aleft:"+testswitch.clink); - // console.log("cright:"+testswitch.alink); - rails.linkrail[testswitch.alink].lconnect = testswitch.clink; - rails.linkrail[testswitch.clink].rconnect = testswitch.alink; - }else if(rails.switchrail[code].directtype == "2"){ - // console.log("道岔朝向2向右"); - // console.log("aright:"+testswitch.clink); - // console.log("cleft:"+testswitch.alink); - rails.linkrail[testswitch.alink].rconnect = testswitch.clink; - rails.linkrail[testswitch.clink].lconnect = testswitch.alink; - } - - } else if (data.locateType == '01') { - // console.log("01 定位"); - if (actions[sectionlist.switchs.modellist[j].code]) { - sectionlist.switchs.modellist[j].locateType = data.locateType; - actions[sectionlist.switchs.modellist[j].code].reset(); - actions[sectionlist.switchs.modellist[j].code].time = actions[sectionlist.switchs.modellist[j].code]._clip.duration; - actions[sectionlist.switchs.modellist[j].code].timeScale = -1; - actions[sectionlist.switchs.modellist[j].code].play(); - } - - rails.switchrail[code].locateType = "01"; - let testswitch = rails.switchrail[code]; - if(rails.switchrail[code].directtype == "1"){ - // console.log("道岔朝向1向左"); - // console.log("aleft"+testswitch.blink); - // console.log("cright:"+testswitch.alink); - rails.linkrail[testswitch.alink].lconnect = testswitch.blink; - rails.linkrail[testswitch.blink].rconnect = testswitch.alink; - }else if(rails.switchrail[code].directtype == "2"){ - // console.log("道岔朝向2向右"); - // console.log("aright:"+testswitch.blink); - // console.log("cleft:"+testswitch.alink); - rails.linkrail[testswitch.alink].rconnect = testswitch.blink; - rails.linkrail[testswitch.blink].lconnect = testswitch.alink; - } - - } - } - j = 0; - } - } - } + function trainspeed(data) { + // console.log(data); + if (trainlisttest) { + for (let tl = 0; tl < data.body.length; tl++) { + code = data.body[tl].id; + if (trainlisttest.list[code].speed != data.body[tl].v) { + trainlisttest.list[code].speed = data.body[tl].v; + + if (trainlisttest.list[code].runMode == '02') { + + if (trainlisttest.list[code].isStandTrack == true) { + trainlisttest.list[code].speeds = parseFloat(data.body[tl].v * 10 / 36 / 25 / trainlisttest.list[code].len); + } else { + trainlisttest.list[code].speeds = parseFloat(data.body[tl].v * 10 / 36 / 25 / trainlisttest.list[code].len); + } + } else { + + trainlisttest.list[code].speeds = parseFloat(data.body[tl].v * 10 / 36 / 25 / trainlisttest.list[code].len); + } + + if (code == drivingcode) { + // if (data.body[tl].v >0) { + // updatemmi.updatenowspeed(data.body[tl].v); + // } else { + + updatemmi.updatenowspeed(Math.abs(data.body[tl].v)); + // console.log(data.body[i]); + + // } + } + } + + if (code == drivingcode) { + // if(sound.volswitch == true){ + // sound.setVolume( data.body[tl].v/100 ); + // } + if (data.body[tl].atpv) { + updatemmi.updateatpspeed(data.body[tl].atpv); + } else { + updatemmi.updateatpspeed(-1); + } + if (data.body[tl].atov) { + updatemmi.updateatospeed(data.body[tl].atov); + } else { + updatemmi.updateatospeed(-1); + } + if (trainlisttest.list[code].progress < 1) { + const syncdata = { + type: 'Train', + code: code, + linkCode: trainlisttest.list[code].nowcode, + percent: 0 + }; + if (trainlisttest.list[code].status == '02') { + if (trainlisttest.list[code].targetLink == trainlisttest.list[code].nowcode) { + if ((trainlisttest.list[code].linkOffsetPercent / trainlisttest.list[code].pc) >= trainlisttest.list[code].targetpercent) { + syncdata.percent = trainlisttest.list[code].progress; + } else { + syncdata.percent = trainlisttest.list[code].progress * trainlisttest.list[code].pc; + } + } else { + syncdata.percent = trainlisttest.list[code].progress; + } + + } else { + if (trainlisttest.list[code].targetLink == trainlisttest.list[code].nowcode) { + if ((trainlisttest.list[code].linkOffsetPercent / trainlisttest.list[code].pc) <= trainlisttest.list[code].targetpercent) { + syncdata.percent = (1 - trainlisttest.list[code].progress); + } else { + syncdata.percent = (1 - trainlisttest.list[code].progress) * trainlisttest.list[code].pc; + } + } else { + syncdata.percent = (1 - trainlisttest.list[code].progress); + } + } + // console.log("send"); + // console.log(trainlisttest.list[code]); + // + // console.log(syncdata); + // console.log("============="); + scope.teststomp.send(toppic, syncdata); + } + + } + } + } + } + + function trainstatus(data) { + // console.log(data.body); + for (let i = data.body.length - 1; i >= 0; i--) { + // 遍历列车对象组 + // console.log(trainlisttest); + if (trainlisttest) { + + code = data.body[i].code; + // 剔除不显示的车 + // 找到对应列车 + + if (code == drivingcode) { + + driverswitch = data.body[i].runMode; + // 更新车组号 + updatemmi.updatetrainnum(data.body[i].groupNumber); + // 更新列车 + if (data.body[i].parkRemainTime > 0) { + updatemmi.updatestoptime(translation.stopTime + parseInt(data.body[i].parkRemainTime)); + } else { + if (data.body[i].runMode == '02') { + updatemmi.updatestoptime(translation.trainAtoOn); + } else { + if (trainlisttest.list[code].isStandTrack == true && trainlisttest.list[code].progress > 0.95 && trainlisttest.list[code].speed <= 0) { + // if(stoptimer){ + // + // }else{ + // stoptimer = setInterval(function(){ + // if(num >=0){ + // updatemmi.updatestoptime("停站时间:"+num); + // num --; + // } + // },1000); + // } + + } else { + updatemmi.updatestoptime(translation.trainAtoOff); + } + } + } + } + trainlisttest.list[code].runMode = data.body[i].runMode; + + // 车门开关验证 + if (trainlisttest.list[code].doorStatus != data.body[i].doorStatus && data.body[i].doorStatus == '01') { + // console.log("close"); + trainlisttest.list[code].doorStatus = '01'; + for (let an = actions[code].top.length - 1; an >= 0; an--) { + actions[code].top[an].reset(); + actions[code].top[an].time = actions[code].top[an]._clip.duration; + actions[code].top[an].timeScale = -1; + actions[code].top[an].play(); + } + } else if (trainlisttest.list[code].doorStatus != data.body[i].doorStatus && data.body[i].doorStatus == '02') { + // console.log("open"); + trainlisttest.list[code].doorStatus = '02'; + for (let an = actions[code].top.length - 1; an >= 0; an--) { + actions[code].top[an].reset(); + actions[code].top[an].time = 0; + actions[code].top[an].timeScale = 1; + actions[code].top[an].play(); + } + } + // if (data.body[i].directionType == '02') { + // + // } else { + // if (trainlisttest.list[code].doorStatus != data.body[i].doorStatus && data.body[i].doorStatus == '01') { + // // console.log("close"); + // trainlisttest.list[code].doorStatus = '01'; + // for (let an=actions[code].down.length-1; an>=0; an--) { + // actions[code].down[an].reset(); + // actions[code].down[an].time = actions[code].top[an]._clip.duration; + // actions[code].down[an].timeScale = -1; + // actions[code].down[an].play(); + // } + // } else if (trainlisttest.list[code].doorStatus != data.body[i].doorStatus && data.body[i].doorStatus == '02') { + // // console.log("open"); + // trainlisttest.list[code].doorStatus = '02'; + // for (let an=actions[code].down.length-1; an>=0; an--) { + // actions[code].down[an].reset(); + // actions[code].down[an].time = 0; + // actions[code].down[an].timeScale = 1; + // actions[code].down[an].play(); + // } + // } + // } + // 遍历获取所在轨道 + + if (trainlisttest.list[code].dispose != data.body[i].dispose && data.body[i].dispose == false) { + + if (rails.linkrail[data.body[i].linkCode]) { + // console.log(trainlisttest.group); + if (trainlisttest.group.children.length < 1) { + trainlisttest.group.add(trainlisttest.list[code]); + drivingcode = code; + updatemmi.updatedrivingcode(drivingcode); + } + if (trainlisttest.list[code].mixerpush == false) { + for (let mi = 0, lenmi = trainlisttest.list[code].mixer.length; mi < lenmi; mi++) { + mixers.push(trainlisttest.list[code].mixer[mi]); + } + trainlisttest.list[code].mixerpush = true; + } + // trainlisttest.group.add(trainlisttest.list[code]); + trainlisttest.list[code].position.y = 0; + trainlisttest.list[code].progress = 0; + // trainlisttest.list[code].oldoffset = data.body[i].sectionOffsetPercent; + trainlisttest.list[code].dispose = false; + trainlisttest.list[code].nowcode = data.body[i].linkCode; + + trainlisttest.list[code].pc = 1; + // console.log(data.body[i]); + if (data.body[i].directionType == '02') { // 向右 + + if (data.body[i].targetStation) { + + trainlisttest.list[code].stopstation = data.body[i].targetStation; + // console.log(rails.stops[data.body[i].targetStation].direct2.percent); + trainlisttest.list[code].pc = data.body[i].targetLinkPercent / rails.stops[data.body[i].targetStation].direct2.percent; + trainlisttest.list[code].targetpercent = rails.stops[data.body[i].targetStation].direct2.percent; + trainlisttest.list[code].progress = data.body[i].linkOffsetPercent / trainlisttest.list[code].pc; + trainlisttest.list[code].linkOffsetPercent = data.body[i].linkOffsetPercent; + trainlisttest.list[code].targetLink = data.body[i].targetLink; + } else { + trainlisttest.list[code].progress = data.body[i].linkOffsetPercent; + trainlisttest.list[code].linkOffsetPercent = data.body[i].linkOffsetPercent; + } + + trainlisttest.list[code].status = '02'; + + trainlisttest.list[code].curve = rails.linkrail[data.body[i].linkCode].lineleft; + const point = rails.linkrail[data.body[i].linkCode].lineleft.getPointAt(trainlisttest.list[code].progress); + trainlisttest.list[code].rotation.y = 0; + trainlisttest.list[code].position.x = point.x; + trainlisttest.list[code].position.y = 0; + for (let tl = 0; tl < 6; tl++) { + trainlisttest.list[code].children[tl].position.z = point.z; + } + } else if (data.body[i].directionType == '03') { // 向左 + + // if(trainlisttest.list[code].rname == "006"){ + // console.log("0000000000000000"); + // console.log(data.body[i].linkOffsetPercent); + // } + if (data.body[i].targetStation) { + + trainlisttest.list[code].stopstation = data.body[i].targetStation; + trainlisttest.list[code].pc = data.body[i].targetLinkPercent / rails.stops[data.body[i].targetStation].direct1.percent; + // console.log(data.body[i].targetLinkPercent); + // console.log(rails.stops[data.body[i].targetStation].direct1.percent); + // console.log(trainlisttest.list[code].pc); + trainlisttest.list[code].targetpercent = rails.stops[data.body[i].targetStation].direct1.percent; + trainlisttest.list[code].progress = 1 - data.body[i].linkOffsetPercent / trainlisttest.list[code].pc; + trainlisttest.list[code].linkOffsetPercent = data.body[i].linkOffsetPercent; + trainlisttest.list[code].targetLink = data.body[i].targetLink; + } else { + trainlisttest.list[code].progress = 1 - data.body[i].linkOffsetPercent; + trainlisttest.list[code].linkOffsetPercent = data.body[i].linkOffsetPercent; + } + // console.log("progress:"+trainlisttest.list[code].progress); + // console.log("linkOffsetPercent:"+trainlisttest.list[code].linkOffsetPercent); + // console.log("datatarget:"+ data.body[i].targetLinkPercent); + // console.log("directpercent:"+trainlisttest.list[code].targetpercent); + // console.log("===================="); + trainlisttest.list[code].status = '03'; + + trainlisttest.list[code].curve = rails.linkrail[data.body[i].linkCode].lineright; + const point = rails.linkrail[data.body[i].linkCode].lineright.getPointAt(trainlisttest.list[code].progress); + trainlisttest.list[code].rotation.y = Math.PI; + trainlisttest.list[code].position.x = point.x; + trainlisttest.list[code].position.y = 0; + for (let tl = 0; tl < 6; tl++) { + trainlisttest.list[code].children[tl].position.z = -point.z; + } + } + trainlisttest.list[code].len = rails.linkrail[data.body[i].linkCode].lengthfact; + // trainlisttest.list[code].isStandTrack = sectionlist.sections.datalist[data.body[i].sectionCode].isStandTrack; + + // trainlisttest.list[code].len = sectionlist.sections.datalist[data.body[i].sectionCode].distance; + + if (data.body[i].speed == 0) { + trainlisttest.list[code].speeds = data.body[i].speed; + trainlisttest.list[code].speeds = 0; + // trainlisttest.list[code].startmark = 1; + } else { + trainlisttest.list[code].speeds = data.body[i].speed; + trainlisttest.list[code].speeds = parseFloat(data.body[i].speed * 10 / 36 / 25 / trainlisttest.list[code].len); + } + + } + + } else if (trainlisttest.list[code].dispose != data.body[i].dispose && data.body[i].dispose == true) { + trainlisttest.group.remove(trainlisttest.list[code]); + trainlisttest.list[code].progress = null; + trainlisttest.list[code].dispose = true; + code = trainlisttest.group.children[i].name; + trainlisttest.list[code].rotation.y = 0; + trainlisttest.list[code].doorStatus = '01'; + trainlisttest.list[code].speed = 0; + trainlisttest.list[code].position.x = -50000; + trainlisttest.list[code].position.y = -50000; + trainlisttest.list[code].pc = 1; + } else if (trainlisttest.list[code].dispose == data.body[i].dispose && data.body[i].dispose == false) { + + if (rails.linkrail[data.body[i].linkCode]) { + if (driverswitch == '02' && code == drivingcode) { + updatemmi.updatenowspeed(data.body[i].speed); + if (data.body[i].atpSpeed) { + updatemmi.updateatpspeed(data.body[i].atpSpeed); + } else { + updatemmi.updateatpspeed(-1); + } + if (data.body[i].targetSpeed) { + updatemmi.updateatospeed(data.body[i].targetSpeed); + } else { + updatemmi.updateatospeed(-1); + } + if (data.body[i].maLen) { + updatemmi.updatenowlen(data.body[i].maLen); + } else { + updatemmi.updatenowlen(0); + } + // if(trainlisttest.list[code].isStandTrack == true){ + // pointstand = null; + // if(data.body[i].directionType == "02"){ + // pointstand = trainlisttest.list[code].curve.getPointAt(data.body[i].sectionOffsetPercent); + // }else{ + // pointstand = trainlisttest.list[code].curve.getPointAt(1-data.body[i].sectionOffsetPercent); + // } + // console.log(data.body[i].sectionOffsetPercent) + // console.log(pointstand.x); + // + // trainlisttest.list[code].position.x = pointstand.x; + // } + } + if (driverswitch == '05' && code == drivingcode) { + if (data.body[i].maLen) { + updatemmi.updatenowlen(data.body[i].maLen); + } else { + updatemmi.updatenowlen(0); + } + } + if (trainlisttest.list[code].status != data.body[i].directionType) { + if (data.body[i].directionType == '02') { // 向右 + + trainlisttest.list[code].progress = 0; + const rotaposx = trainlisttest.list[code].children[5].matrixWorld.elements[12]; + const rotaposz = trainlisttest.list[code].children[0].matrixWorld.elements[14]; + trainlisttest.list[code].rotation.y = 0; + trainlisttest.list[code].position.x = rotaposx; + for (let tl = 0; tl < 6; tl++) { + trainlisttest.list[code].children[tl].position.z = rotaposz; + } + + trainlisttest.list[code].progress = (rotaposx - rails.linkrail[data.body[i].linkCode].lp.x) / rails.linkrail[data.body[i].linkCode].lengthfact; + trainlisttest.list[code].status = '02'; + trainlisttest.list[code].curve = rails.linkrail[data.body[i].linkCode].lineleft; + trainlisttest.list[code].nextcurve = null; + + trainlisttest.list[code].len = rails.linkrail[data.body[i].linkCode].lengthfact; + + } else if (data.body[i].directionType == '03') { // 向左 + trainlisttest.list[code].progress = 0; + const rotaposx = trainlisttest.list[code].children[5].matrixWorld.elements[12]; + const rotaposz = Math.abs(trainlisttest.list[code].children[0].matrixWorld.elements[14]); + trainlisttest.list[code].rotation.y = Math.PI; + trainlisttest.list[code].position.x = rotaposx; + for (let tl = 0; tl < 6; tl++) { + trainlisttest.list[code].children[tl].position.z = -rotaposz; + } + trainlisttest.list[code].progress = 1 - (rotaposx - rails.linkrail[data.body[i].linkCode].lp.x) / rails.linkrail[data.body[i].linkCode].lengthfact; + trainlisttest.list[code].status = '03'; + trainlisttest.list[code].curve = rails.linkrail[data.body[i].linkCode].lineright; + trainlisttest.list[code].nextcurve = null; + + trainlisttest.list[code].len = rails.linkrail[data.body[i].linkCode].lengthfact; + + } + } + let nextcode; + + if (code == drivingcode) { + // console.log(data.body[i].targetStation); + // console.log("netpercent"); + // console.log(data.body[i].targetLinkPercent); + // console.log(data.body[i].linkOffsetPercent); + // console.log("3dpercent"); + // if(rails.stops[data.body[i].targetStation]){ + // console.log(rails.stops[data.body[i].targetStation].direct2.percent); + // } + // + // console.log(trainlisttest.list[code].progress); + // console.log(trainlisttest.list[code].pc); + // console.log("==============="); + // console.log(data.body[i]); + if (data.body[i].directionType == '02') { + if (trainlisttest.list[code].stopstation != data.body[i].targetStation) { + trainlisttest.list[code].stopstation = data.body[i].targetStation; + if (data.body[i].targetStation) { + trainlisttest.list[code].pc = data.body[i].targetLinkPercent / rails.stops[data.body[i].targetStation].direct2.percent; + trainlisttest.list[code].targetpercent = rails.stops[data.body[i].targetStation].direct2.percent; + trainlisttest.list[code].linkOffsetPercent = data.body[i].linkOffsetPercent; + trainlisttest.list[code].targetLink = data.body[i].targetLink; + + // trainlisttest.list[code].progress = trainlisttest.list[code].linkOffsetPercent*trainlisttest.list[code].pc; + } + } + + trainlisttest.list[code].status = '02'; + nextcode = rails.linkrail[data.body[i].linkCode].rconnect; + if (nextcode) { + // console.log(rails.linkrail[nextcode].lineleft.points); + trainlisttest.list[code].nextcurve = rails.linkrail[nextcode].lineleft; + trainlisttest.list[code].nextlen = rails.linkrail[nextcode].lengthfact; + } else { + + trainlisttest.list[code].nextlen = 0; + } + } else if (data.body[i].directionType == '03') { + if (trainlisttest.list[code].stopstation != data.body[i].targetStation) { + trainlisttest.list[code].stopstation = data.body[i].targetStation; + if (data.body[i].targetStation) { + trainlisttest.list[code].pc = data.body[i].targetLinkPercent / rails.stops[data.body[i].targetStation].direct1.percent; + trainlisttest.list[code].targetpercent = rails.stops[data.body[i].targetStation].direct1.percent; + trainlisttest.list[code].linkOffsetPercent = data.body[i].linkOffsetPercent; + trainlisttest.list[code].targetLink = data.body[i].targetLink; + // trainlisttest.list[code].progress = (1-trainlisttest.list[code].linkOffsetPercent)*trainlisttest.list[code].pc; + } + } + trainlisttest.list[code].status = '03'; + nextcode = rails.linkrail[data.body[i].linkCode].lconnect; + if (nextcode) { + trainlisttest.list[code].nextcurve = rails.linkrail[nextcode].lineright; + trainlisttest.list[code].nextlen = rails.linkrail[nextcode].lengthfact; + } else { + + trainlisttest.list[code].nextlen = 0; + } + } + trainlisttest.list[code].nextcode = nextcode; + + // console.log(trainlisttest.list[code].nowcode); + // console.log(trainlisttest.list[code].nextcode); + // console.log(trainlisttest.list[code].curve.points); + // console.log(trainlisttest.list[code].nextcurve.points); + // console.log("========================="); + + } else { + + // trainlisttest.list[code].stopstation = data.body[i].targetStation; + // // console.log(rails.stops[data.body[i].targetStation].direct2.percent); + // trainlisttest.list[code].pc = data.body[i].targetLinkPercent/rails.stops[data.body[i].targetStation].direct2.percent; + // trainlisttest.list[code].targetpercent = rails.stops[data.body[i].targetStation].direct2.percent; + // trainlisttest.list[code].progress = data.body[i].linkOffsetPercent*trainlisttest.list[code].pc; + // trainlisttest.list[code].linkOffsetPercent = data.body[i].linkOffsetPercent; + // trainlisttest.list[code].targetLink = data.body[i].targetLink; + + let nextcode; + if (data.body[i].directionType == '02') { + if (rails.linkrail[data.body[i].linkCode].lineleft) { + nextcode = rails.linkrail[data.body[i].linkCode].rconnect; + trainlisttest.list[code].status = '02'; + if (nextcode) { + trainlisttest.list[code].nextcurve = rails.linkrail[nextcode].lineleft; + trainlisttest.list[code].nextlen = rails.linkrail[nextcode].lengthfact; + } + trainlisttest.list[code].nowcode = data.body[i].linkCode; + trainlisttest.list[code].curve = rails.linkrail[data.body[i].linkCode].lineleft; + trainlisttest.list[code].len = rails.linkrail[data.body[i].linkCode].lengthfact; + trainlisttest.list[code].progress = data.body[i].linkOffsetPercent; + trainlisttest.list[code].linkOffsetPercent = data.body[i].linkOffsetPercent; + if (data.body[i].targetStation) { + trainlisttest.list[code].pc = data.body[i].targetLinkPercent / rails.stops[data.body[i].targetStation].direct2.percent; + trainlisttest.list[code].targetpercent = rails.stops[data.body[i].targetStation].direct2.percent; + trainlisttest.list[code].targetLink = data.body[i].targetLink; + trainlisttest.list[code].progress = data.body[i].linkOffsetPercent / trainlisttest.list[code].pc; + } + trainlisttest.list[code].speeds = parseFloat(trainlisttest.list[code].speed * 10 / 36 / 25 / trainlisttest.list[code].len); + } + } else if (data.body[i].directionType == '03') { + if (rails.linkrail[data.body[i].linkCode].lineright) { + nextcode = rails.linkrail[data.body[i].linkCode].lconnect; + trainlisttest.list[code].status = '03'; + + if (nextcode) { + trainlisttest.list[code].nextcurve = rails.linkrail[nextcode].lineright; + trainlisttest.list[code].nextlen = rails.linkrail[nextcode].lengthfact; + } + trainlisttest.list[code].nowcode = data.body[i].linkCode; + trainlisttest.list[code].curve = rails.linkrail[data.body[i].linkCode].lineright; + trainlisttest.list[code].len = rails.linkrail[data.body[i].linkCode].lengthfact; + trainlisttest.list[code].progress = 1 - data.body[i].linkOffsetPercent; + trainlisttest.list[code].linkOffsetPercent = data.body[i].linkOffsetPercent; + if (data.body[i].targetStation) { + trainlisttest.list[code].pc = data.body[i].targetLinkPercent / rails.stops[data.body[i].targetStation].direct1.percent; + trainlisttest.list[code].targetpercent = rails.stops[data.body[i].targetStation].direct1.percent; + trainlisttest.list[code].targetLink = data.body[i].targetLink; + trainlisttest.list[code].progress = (1 - data.body[i].linkOffsetPercent) / trainlisttest.list[code].pc; + } + trainlisttest.list[code].speeds = parseFloat(trainlisttest.list[code].speed * 10 / 36 / 25 / trainlisttest.list[code].len); + } + } + trainlisttest.list[code].nextcode = nextcode; + } + + // console.log(data.body[i].linkOffsetPercent); + // console.log(trainlisttest.list[code].progress); + // console.log(trainlisttest.list[code].curve.points); + // console.log(trainlisttest.list[code].nextcurve.points); + // console.log(trainlisttest.list[code].len); + // console.log(trainlisttest.list[code].nextlen); + // console.log("=========================================="); + } + } + + } + } + } + + function simulationreset(data) { + // console.log(data); + for (const k in trainlisttest.list) { + trainlisttest.list[k].dispose = true; + trainlisttest.group.remove(trainlisttest.list[k]); + trainlisttest.list[k].stopstation = null; + trainlisttest.list[k].pc = null; + trainlisttest.list[k].targetpercent = null; + trainlisttest.list[k].progress = null; + trainlisttest.list[k].linkOffsetPercent = null; + trainlisttest.list[k].targetLink = null; + drivingcode = null; + } + } + + function devicestatus(data) { + for (let i = data.body.length - 1; i >= 0; i--) { + // 0xFFFFFF + // 0xCD0000 红 + // 0xEEEE00 黄 + // 0x32CD32 绿 + if (data.body[i]._type == 'Signal') { + if (signallist) { + signalupdate(data.body[i]); + } + } + + if (data.body[i]._type == 'StationStand' ) { + if (actions) { + standupdate(data.body[i]); + } + } + + if (data.body[i]._type == 'Switch') { + if (sectionlist) { + switchupdate(data.body[i]); + } + } + + } + } + + function standupdate(data) { + code = data.code; + if ( actions[code]) { + if (data.screenDoorOpenStatus == '02' && actions[code].status == '01') { + actions[code].status = '00'; + } + if (data.screenDoorOpenStatus == '02' && actions[code].status == '00') { + actions[code].status = '02'; + actions[code].action.reset(); + actions[code].action.time = 0; + actions[code].action.timeScale = 1; + actions[code].action.play(); + } + + if (data.screenDoorOpenStatus == '01' && actions[code].status == '02') { + actions[code].status = '00'; + } + if (data.screenDoorOpenStatus == '01' && actions[code].status == '00') { + actions[code].status = '01'; + actions[code].action.reset(); + actions[code].action.time = actions[code].action._clip.duration; + actions[code].action.timeScale = -1; + actions[code].action.play(); + } + } + + } + + function signalupdate(data) { + code = data.code; + if (data.lightType == '01') { + if (signallist.list[code].mesh.code) { + signallist.list[code].mesh.status = data.status; + + // 55 + // 33 + // 77 + // 关闭 + if (data.status == '01') { + signallist.list[code].mesh.getObjectByName('red').material.map = materials[0]; + signallist.list[code].mesh.getObjectByName('red').material.map.needsUpdate = true; + signallist.list[code].mesh.getObjectByName('yellow').material.map = materials[3]; + signallist.list[code].mesh.getObjectByName('yellow').material.map.needsUpdate = true; + signallist.list[code].mesh.getObjectByName('green').material.map = materials[3]; + signallist.list[code].mesh.getObjectByName('green').material.map.needsUpdate = true; + + } + // 开放 + if (data.status == '02') { + signallist.list[code].mesh.getObjectByName('red').material.map = materials[3]; + signallist.list[code].mesh.getObjectByName('red').material.map.needsUpdate = true; + signallist.list[code].mesh.getObjectByName('yellow').material.map = materials[3]; + signallist.list[code].mesh.getObjectByName('yellow').material.map.needsUpdate = true; + signallist.list[code].mesh.getObjectByName('green').material.map = materials[2]; + signallist.list[code].mesh.getObjectByName('green').material.map.needsUpdate = true; + } + if (data.status == '03') { + signallist.list[code].mesh.getObjectByName('red').material.map = materials[3]; + signallist.list[code].mesh.getObjectByName('red').material.map.needsUpdate = true; + signallist.list[code].mesh.getObjectByName('yellow').material.map = materials[1]; + signallist.list[code].mesh.getObjectByName('yellow').material.map.needsUpdate = true; + signallist.list[code].mesh.getObjectByName('green').material.map = materials[3]; + signallist.list[code].mesh.getObjectByName('green').material.map.needsUpdate = true; + + } + // 引导 + if (data.status == '03') { + signallist.list[code].mesh.getObjectByName('red').material.map = materials[0]; + signallist.list[code].mesh.getObjectByName('red').material.map.needsUpdate = true; + signallist.list[code].mesh.getObjectByName('yellow').material.map = materials[1]; + signallist.list[code].mesh.getObjectByName('yellow').material.map.needsUpdate = true; + signallist.list[code].mesh.getObjectByName('green').material.map = materials[3]; + signallist.list[code].mesh.getObjectByName('green').material.map.needsUpdate = true; + + } + // 封锁 + if (data.status == '04') { + signallist.list[code].mesh.getObjectByName('red').material.map = materials[3]; + signallist.list[code].mesh.getObjectByName('red').material.map.needsUpdate = true; + signallist.list[code].mesh.getObjectByName('yellow').material.map = materials[3]; + signallist.list[code].mesh.getObjectByName('yellow').material.map.needsUpdate = true; + signallist.list[code].mesh.getObjectByName('green').material.map = materials[3]; + signallist.list[code].mesh.getObjectByName('green').material.map.needsUpdate = true; + + } + // 故障 + if (data.status == '05') { + signallist.list[code].mesh.getObjectByName('red').material.map = materials[3]; + signallist.list[code].mesh.getObjectByName('red').material.map.needsUpdate = true; + signallist.list[code].mesh.getObjectByName('yellow').material.map = materials[3]; + signallist.list[code].mesh.getObjectByName('yellow').material.map.needsUpdate = true; + signallist.list[code].mesh.getObjectByName('green').material.map = materials[3]; + signallist.list[code].mesh.getObjectByName('green').material.map.needsUpdate = true; + + } + + } + + } else if (data.lightType == '02') { + if (signallist.list[code].mesh.code) { + signallist.list[code].mesh.getObjectByName('red').material.map = materials[3]; + signallist.list[code].mesh.getObjectByName('red').material.map.needsUpdate = true; + signallist.list[code].mesh.getObjectByName('yellow').material.map = materials[3]; + signallist.list[code].mesh.getObjectByName('yellow').material.map.needsUpdate = true; + signallist.list[code].mesh.getObjectByName('green').material.map = materials[3]; + signallist.list[code].mesh.getObjectByName('green').material.map.needsUpdate = true; + + } + + } + + } + + function switchupdate(data) { + code = data.code; + for (let j = sectionlist.switchs.modellist.length - 1; j >= 0; j--) { + if (rails.switchrail[code]) { + if (rails.switchrail[code].locateType != data.locateType) { + // console.log("道岔变化:"+code); + if (data.locateType == '02') { + // console.log("02 反位"); + if (actions[sectionlist.switchs.modellist[j].code]) { + sectionlist.switchs.modellist[j].locateType = data.locateType; + actions[sectionlist.switchs.modellist[j].code].reset(); + actions[sectionlist.switchs.modellist[j].code].time = 0; + actions[sectionlist.switchs.modellist[j].code].timeScale = 1; + actions[sectionlist.switchs.modellist[j].code].play(); + } + + rails.switchrail[code].locateType = '02'; + + const testswitch = rails.switchrail[code]; + if (rails.switchrail[code].directtype == '1') { + // console.log("道岔朝向1向左"); + // console.log("aleft:"+testswitch.clink); + // console.log("cright:"+testswitch.alink); + rails.linkrail[testswitch.alink].lconnect = testswitch.clink; + rails.linkrail[testswitch.clink].rconnect = testswitch.alink; + } else if (rails.switchrail[code].directtype == '2') { + // console.log("道岔朝向2向右"); + // console.log("aright:"+testswitch.clink); + // console.log("cleft:"+testswitch.alink); + rails.linkrail[testswitch.alink].rconnect = testswitch.clink; + rails.linkrail[testswitch.clink].lconnect = testswitch.alink; + } + + } else if (data.locateType == '01') { + // console.log("01 定位"); + if (actions[sectionlist.switchs.modellist[j].code]) { + sectionlist.switchs.modellist[j].locateType = data.locateType; + actions[sectionlist.switchs.modellist[j].code].reset(); + actions[sectionlist.switchs.modellist[j].code].time = actions[sectionlist.switchs.modellist[j].code]._clip.duration; + actions[sectionlist.switchs.modellist[j].code].timeScale = -1; + actions[sectionlist.switchs.modellist[j].code].play(); + } + + rails.switchrail[code].locateType = '01'; + const testswitch = rails.switchrail[code]; + if (rails.switchrail[code].directtype == '1') { + // console.log("道岔朝向1向左"); + // console.log("aleft"+testswitch.blink); + // console.log("cright:"+testswitch.alink); + rails.linkrail[testswitch.alink].lconnect = testswitch.blink; + rails.linkrail[testswitch.blink].rconnect = testswitch.alink; + } else if (rails.switchrail[code].directtype == '2') { + // console.log("道岔朝向2向右"); + // console.log("aright:"+testswitch.blink); + // console.log("cleft:"+testswitch.alink); + rails.linkrail[testswitch.alink].rconnect = testswitch.blink; + rails.linkrail[testswitch.blink].lconnect = testswitch.alink; + } + + } + } + j = 0; + } + } + } } diff --git a/src/jlmap3d/jl3dsimulation/connect/TrainingConnectTest.js b/src/jlmap3d/jl3dsimulation/connect/TrainingConnectTest.js index 049c23a3e..616ac18be 100644 --- a/src/jlmap3d/jl3dsimulation/connect/TrainingConnectTest.js +++ b/src/jlmap3d/jl3dsimulation/connect/TrainingConnectTest.js @@ -1,7 +1,7 @@ import StompClient from '@/utils/sock'; import { displayTopic } from '@/utils/stomp'; import { getToken } from '@/utils/auth'; -import router from '@/router'; +import router from '@/router/index_APP_TARGET'; // 定于仿真socket接口 export function Jlmap3dSubscribe(worker,routegroup) { diff --git a/src/jmap/theme/beijing_01/menus/dialog/speedCmdControl.vue b/src/jmap/theme/beijing_01/menus/dialog/speedCmdControl.vue index 7f4caa8e5..ce4cec576 100644 --- a/src/jmap/theme/beijing_01/menus/dialog/speedCmdControl.vue +++ b/src/jmap/theme/beijing_01/menus/dialog/speedCmdControl.vue @@ -311,7 +311,7 @@ import { OperationEvent } from '@/scripts/ConstDic'; // import { now } from '@/utils/date'; import ConfirmTip from './childDialog/confirmTip'; import { sendCommand } from '@/api/jmap/training'; -import router from '@/router'; +import router from '@/router/index_APP_TARGET'; export default { name: 'SectionCmdSpeed', diff --git a/src/jmap/theme/chengdu_04/menus/dialog/speedCmdControl.vue b/src/jmap/theme/chengdu_04/menus/dialog/speedCmdControl.vue index 46caafc6b..51ef2250f 100644 --- a/src/jmap/theme/chengdu_04/menus/dialog/speedCmdControl.vue +++ b/src/jmap/theme/chengdu_04/menus/dialog/speedCmdControl.vue @@ -311,7 +311,7 @@ import { OperationEvent } from '@/scripts/ConstDic'; // import { now } from '@/utils/date'; import ConfirmTip from './childDialog/confirmTip'; import { sendCommand } from '@/api/jmap/training'; -import router from '@/router'; +import router from '@/router/index_APP_TARGET'; export default { name: 'SectionCmdSpeed', diff --git a/src/layout/components/Logout.vue b/src/layout/components/Logout.vue index 88403ea4d..ab699a9eb 100644 --- a/src/layout/components/Logout.vue +++ b/src/layout/components/Logout.vue @@ -20,7 +20,7 @@ + + + + + diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 4e90ba429..fe927965e 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -102,10 +102,9 @@ import QrcodeVue from 'qrcode.vue'; import { getLoginWmurl, checkLoginStatus } from '@/api/login'; import { LoginParams } from '@/utils/login'; import bgImg from '@/assets/bg1.jpg'; -import { loginInfo } from '@/scripts/ConstDic'; +import { loginInfo, UrlConfig } from '@/scripts/ConstDic'; import { removeToken } from '@/utils/auth'; import LangStorage from '@/utils/lang'; -import { UrlConfig } from '@/router/index'; import logoImgXty from '@/assets/logo_xty.png'; import logoImgGzb from '@/assets/logo_gzb.png'; import logoImgHyd from '@/assets/logo_hyd.png'; diff --git a/src/views/newMap/displayNew/LeftSlider.vue b/src/views/newMap/displayNew/LeftSlider.vue index 325dd9394..cd97ec8f2 100644 --- a/src/views/newMap/displayNew/LeftSlider.vue +++ b/src/views/newMap/displayNew/LeftSlider.vue @@ -39,7 +39,7 @@ import { getPublishLessonTree } from '@/api/jmap/lesson'; import { trainingNotifyNew } from '@/api/simulation'; import { launchFullscreen } from '@/utils/screen'; -import { UrlConfig } from '@/router/index'; +import { UrlConfig } from '@/scripts/ConstDic'; export default { name: 'LeftSlider', data() { diff --git a/src/views/newMap/displayNew/menuLesson.vue b/src/views/newMap/displayNew/menuLesson.vue index 8025e1ad2..be6d49fb9 100644 --- a/src/views/newMap/displayNew/menuLesson.vue +++ b/src/views/newMap/displayNew/menuLesson.vue @@ -30,7 +30,7 @@ import { startTrainingNew, endTrainingNew } from '@/api/jmap/training'; import { trainingNotifyNew } from '@/api/simulation'; import { TrainingMode } from '@/scripts/ConstDic'; import { timeFormat } from '@/utils/date'; -import { UrlConfig } from '@/router/index'; +import { UrlConfig } from '@/scripts/ConstDic'; export default { name: 'MenuLesson', diff --git a/src/views/newMap/newDesignUser/demonList.vue b/src/views/newMap/newDesignUser/demonList.vue index 868856f8f..92f0fc4df 100644 --- a/src/views/newMap/newDesignUser/demonList.vue +++ b/src/views/newMap/newDesignUser/demonList.vue @@ -34,7 +34,7 @@