From 4f2fc22ee85498bdd565d0a4fcbc9fd1a56bf103 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 6 Dec 2019 09:13:56 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E7=BB=98=E5=9B=BE=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E8=B0=83=E6=95=B4=5F(=E6=92=A4=E9=94=80=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E5=BF=AB=E6=8D=B7=E9=94=AE=E8=B0=83=E6=95=B4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/keyboardController.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/jmapNew/keyboardController.js b/src/jmapNew/keyboardController.js index 78915d191..b1f73cfad 100644 --- a/src/jmapNew/keyboardController.js +++ b/src/jmapNew/keyboardController.js @@ -38,7 +38,7 @@ class KeyboardController extends Eventful { this._keyboards = [ { key: 'Control', keyCode: 17, active: false }, { key: 'Shift', keyCode: 16, active: false }, - { key: 'Alt', keyCode: 18, active: false }, + { key: 'Alt', keyCode: 18, active: false } ]; } @@ -59,6 +59,10 @@ class KeyboardController extends Eventful { }); str += e.key.toUpperCase(); + const keyboardsFlag = this._keyboards.some(item => { return item.active; }); + if (!keyboardsFlag && e.ctrlKey) { + str = 'Control_' + str; + } this.trigger(this.events.Keyboard, str); this._keyboards.forEach(elem => { elem.active = false; }); } From 4f824b83ac8a10d300edd51d93fc0868adddd16a Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 6 Dec 2019 10:05:14 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E7=BB=98=E5=9B=BE=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E8=B0=83=E6=95=B4=5F(=E8=B0=83=E6=95=B4=E5=BF=AB=E6=8D=B7?= =?UTF-8?q?=E9=94=AE=E4=BB=A3=E7=A0=81)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/keyboardEvents.js | 6 ++++ src/jmapNew/keyboardController.js | 46 +++++----------------------- src/views/newMap/jlmapNew/index.vue | 6 ++-- 3 files changed, 16 insertions(+), 42 deletions(-) create mode 100644 src/jmapNew/config/keyboardEvents.js diff --git a/src/jmapNew/config/keyboardEvents.js b/src/jmapNew/config/keyboardEvents.js new file mode 100644 index 000000000..2e6aaf8fa --- /dev/null +++ b/src/jmapNew/config/keyboardEvents.js @@ -0,0 +1,6 @@ +export const keyboardEvents = { + Z: {altKey:false, ctrlKey:true, shiftKey:false, event: 'Ctrl_Z'}, // 绘图撤销 + Y: {altKey:false, ctrlKey:true, shiftKey:false, event: 'Ctrl_Y'}, // 绘图恢复 + DELETE: {altKey:false, ctrlKey:false, shiftKey:false, event: 'Delete'} // 快捷删除绘图元素 +}; + diff --git a/src/jmapNew/keyboardController.js b/src/jmapNew/keyboardController.js index b1f73cfad..9cfd0abc9 100644 --- a/src/jmapNew/keyboardController.js +++ b/src/jmapNew/keyboardController.js @@ -1,4 +1,5 @@ import Eventful from 'zrender/src/mixin/Eventful'; +import {keyboardEvents} from './config/keyboardEvents'; class KeyboardController extends Eventful { constructor(jmap) { @@ -13,19 +14,16 @@ class KeyboardController extends Eventful { initHandler(zr) { if (zr) { var keydownHandle = this.keydown.bind(this); - var keyupHandle = this.keyup.bind(this); this.enable = function (opts) { opts = opts || {}; this._keyOnDownUp = opts.keyOnDownUp || true; window.addEventListener('keydown', keydownHandle, false); - window.addEventListener('keyup', keyupHandle, false); }; this.disable = function () { window.removeEventListener('keydown', keydownHandle, false); - window.removeEventListener('keyup', keyupHandle, false); }; this.dispose = function() { @@ -35,47 +33,17 @@ class KeyboardController extends Eventful { } initData() { - this._keyboards = [ - { key: 'Control', keyCode: 17, active: false }, - { key: 'Shift', keyCode: 16, active: false }, - { key: 'Alt', keyCode: 18, active: false } - ]; + } keydown(e) { if (this._keyOnDownUp && !e.repeat) { - var index = this._keyboards.findIndex( - elem=> { return elem.keyCode == e.keyCode; } - ); - if (index >= 0) { - this._keyboards[index].active = true; - } else { - var str = ''; - this._keyboards.forEach(elem => { - if (elem.active) { - str += elem.key; - str += '_'; - } - }); - - str += e.key.toUpperCase(); - const keyboardsFlag = this._keyboards.some(item => { return item.active; }); - if (!keyboardsFlag && e.ctrlKey) { - str = 'Control_' + str; - } - this.trigger(this.events.Keyboard, str); - this._keyboards.forEach(elem => { elem.active = false; }); + const currentEvent = keyboardEvents[e.key.toUpperCase()]; + let str = ''; + if (currentEvent && currentEvent.altKey === e.altKey && currentEvent.ctrlKey === e.ctrlKey && currentEvent.shiftKey === e.shiftKey) { + str = currentEvent.event; } - } - } - - keyup(e) { - if (this._keyOnDownUp && !e.repeat) { - this._keyboards.forEach(elem=> { - if (elem.keyCode == e.keyCode) { - elem.active = false; - } - }); + this.trigger(this.events.Keyboard, str); } } } diff --git a/src/views/newMap/jlmapNew/index.vue b/src/views/newMap/jlmapNew/index.vue index 1f3781352..6c9073252 100644 --- a/src/views/newMap/jlmapNew/index.vue +++ b/src/views/newMap/jlmapNew/index.vue @@ -218,11 +218,11 @@ export default { // 键盘快捷键事件 onKeyboard(hook) { switch (hook) { - case 'Control_Z': this.$store.dispatch('map/setRevocation'); + case 'Ctrl_Z': this.$store.dispatch('map/setRevocation'); break; - case 'Control_Y': this.$store.dispatch('map/setRecover'); + case 'Ctrl_Y': this.$store.dispatch('map/setRecover'); break; - case 'DELETE': this.$store.dispatch('map/setDeleteCount'); + case 'Delete': this.$store.dispatch('map/setDeleteCount'); break; } }, From ab661e0961efdeb670ef1f7f586e0347f6236bc1 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 6 Dec 2019 10:11:29 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E7=BB=98=E5=9B=BE=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E8=B0=83=E6=95=B4=5F(=E6=9A=82=E4=BB=85=E7=BB=98=E5=9B=BE?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=E9=94=AE=E7=9B=98=E4=BA=8B=E4=BB=B6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/newMap/jlmapNew/index.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/newMap/jlmapNew/index.vue b/src/views/newMap/jlmapNew/index.vue index 6c9073252..3d1b6cdd1 100644 --- a/src/views/newMap/jlmapNew/index.vue +++ b/src/views/newMap/jlmapNew/index.vue @@ -164,8 +164,9 @@ export default { this.$jlmap.on('dataZoom', this.onDataZoom, this); this.$jlmap.on('selected', this.onSelected, this); this.$jlmap.on('contextmenu', this.onContextMenu, this); - this.$jlmap.on('keyboard', this.onKeyboard, this); - + if (this.$route.path.startsWith('/design/usermap/map/draw')) { + this.$jlmap.on('keyboard', this.onKeyboard, this); + } window.document.oncontextmenu = function () { return false; }; From c192deb2caa5d963fb02bc658d3139491bbee841 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Fri, 6 Dec 2019 10:31:19 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/deviceStyle.js | 3 +- src/jmapNew/config/skinCode/batong_01.js | 587 ------------ src/jmapNew/config/skinCode/bejing_01.js | 4 + src/jmapNew/config/skinCode/chengdu_03.js | 4 + src/jmapNew/config/skinCode/chengdu_04.js | 4 + src/jmapNew/config/skinCode/fuzhou_01.js | 4 + src/jmapNew/shape/Station/index.js | 13 +- .../childDialog/childDialog/noticeInfo.vue | 86 -- .../dialog/childDialog/confirmControl.vue | 370 ------- .../childDialog/confirmControlSpeed.vue | 153 --- .../childDialog/confirmSignalUnlock.vue | 118 --- .../menus/dialog/childDialog/confirmTrain.vue | 168 ---- .../menus/dialog/routeCmdControl.vue | 430 --------- .../batong_01/menus/dialog/routeControl.vue | 236 ----- .../batong_01/menus/dialog/routeDetail.vue | 146 --- .../menus/dialog/routeHandControl.vue | 297 ------ .../batong_01/menus/dialog/routeLock.vue | 152 --- .../batong_01/menus/dialog/routeSelection.vue | 231 ----- .../batong_01/menus/dialog/standControl.vue | 279 ------ .../batong_01/menus/dialog/trainControl.vue | 456 --------- .../batong_01/menus/dialog/trainCreate.vue | 160 ---- .../batong_01/menus/dialog/trainDelete.vue | 165 ---- .../menus/dialog/trainEditNumber.vue | 131 --- .../batong_01/menus/dialog/trainMove.vue | 186 ---- .../batong_01/menus/dialog/trainSwitch.vue | 187 ---- src/jmapNew/theme/batong_01/menus/index.vue | 362 ------- src/jmapNew/theme/batong_01/menus/menuBar.vue | 906 ------------------ .../theme/batong_01/menus/menuCancel.vue | 150 --- .../childDialog/twoConfirmation.vue | 126 --- .../menus/menuDialog/childDialog/userAdd.vue | 162 ---- .../menuDialog/childDialog/userDelete.vue | 134 --- .../menus/menuDialog/childDialog/userEdit.vue | 178 ---- .../menus/menuDialog/passwordBox.vue | 221 ----- .../menus/menuDialog/splitModule.vue | 213 ---- .../menuDialog/stationControlConvert.vue | 414 -------- .../menus/menuDialog/stationStantSplit.vue | 187 ---- .../batong_01/menus/menuDialog/trainAdd.vue | 162 ---- .../menus/menuDialog/trainControl.vue | 181 ---- .../menus/menuDialog/trainDelete.vue | 149 --- .../menus/menuDialog/trainTranstalet.vue | 152 --- .../batong_01/menus/menuDialog/viewDevice.vue | 165 ---- .../batong_01/menus/menuDialog/viewName.vue | 248 ----- .../menus/menuDialog/viewTrainId.vue | 188 ---- .../theme/batong_01/menus/menuSection.vue | 392 -------- .../theme/batong_01/menus/menuSignal.vue | 536 ----------- .../theme/batong_01/menus/menuStation.vue | 299 ------ .../batong_01/menus/menuStationControl.vue | 68 -- .../batong_01/menus/menuStationStand.vue | 485 ---------- .../theme/batong_01/menus/menuSwitch.vue | 482 ---------- .../theme/batong_01/menus/menuTool.vue | 205 ---- .../theme/batong_01/menus/menuTrain.vue | 321 ------- .../batong_01/menus/passiveDialog/alarm.vue | 220 ----- .../batong_01/menus/passiveDialog/control.vue | 285 ------ .../batong_01/menus/passiveDialog/timeout.vue | 116 --- .../theme/batong_01/menus/statusBar.vue | 31 - .../batong_01/menus/statusDownTrainDetail.vue | 31 - .../batong_01/menus/statusUpTrainDetail.vue | 31 - .../batong_01/menus/utils/menuItemStatus.js | 527 ---------- src/jmapNew/theme/batong_01/model.js | 63 -- src/jmapNew/utils/JTriangle.js | 118 +-- src/jmapNew/utils/Uid.js | 19 +- src/views/newMap/newMapdraft/configMap.vue | 2 - .../newMapdraft/mapoperate/ImageControl.vue | 4 +- .../newMapdraft/mapoperate/buttonDraft.vue | 285 ------ .../newMap/newMapdraft/mapoperate/counter.vue | 4 +- .../newMap/newMapdraft/mapoperate/index.vue | 4 - .../newMapdraft/mapoperate/lcControl.vue | 4 +- .../newMapdraft/mapoperate/limitControl.vue | 4 +- .../newMap/newMapdraft/mapoperate/line.vue | 4 +- .../newMap/newMapdraft/mapoperate/section.vue | 14 +- .../newMap/newMapdraft/mapoperate/station.vue | 86 +- .../newMapdraft/mapoperate/stationcontrol.vue | 261 ----- .../newMapdraft/mapoperate/stationstand.vue | 4 +- .../newMap/newMapdraft/mapoperate/switch.vue | 20 +- .../newMap/newMapdraft/mapoperate/text.vue | 4 +- .../newMapdraft/mapoperate/trainwindow.vue | 6 +- .../newMapdraft/mapoperate/zcControl.vue | 4 +- 77 files changed, 174 insertions(+), 13633 deletions(-) delete mode 100644 src/jmapNew/config/skinCode/batong_01.js delete mode 100644 src/jmapNew/theme/batong_01/menus/dialog/childDialog/childDialog/noticeInfo.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/dialog/childDialog/confirmControl.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/dialog/childDialog/confirmControlSpeed.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/dialog/childDialog/confirmSignalUnlock.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/dialog/childDialog/confirmTrain.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/dialog/routeCmdControl.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/dialog/routeControl.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/dialog/routeDetail.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/dialog/routeHandControl.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/dialog/routeLock.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/dialog/routeSelection.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/dialog/standControl.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/dialog/trainControl.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/dialog/trainCreate.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/dialog/trainDelete.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/dialog/trainEditNumber.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/dialog/trainMove.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/dialog/trainSwitch.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/index.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/menuBar.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/menuCancel.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/menuDialog/childDialog/twoConfirmation.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/menuDialog/childDialog/userAdd.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/menuDialog/childDialog/userDelete.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/menuDialog/childDialog/userEdit.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/menuDialog/passwordBox.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/menuDialog/splitModule.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/menuDialog/stationControlConvert.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/menuDialog/stationStantSplit.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/menuDialog/trainAdd.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/menuDialog/trainControl.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/menuDialog/trainDelete.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/menuDialog/trainTranstalet.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/menuDialog/viewDevice.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/menuDialog/viewName.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/menuDialog/viewTrainId.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/menuSection.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/menuSignal.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/menuStation.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/menuStationControl.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/menuStationStand.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/menuSwitch.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/menuTool.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/menuTrain.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/passiveDialog/alarm.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/passiveDialog/control.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/passiveDialog/timeout.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/statusBar.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/statusDownTrainDetail.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/statusUpTrainDetail.vue delete mode 100644 src/jmapNew/theme/batong_01/menus/utils/menuItemStatus.js delete mode 100644 src/jmapNew/theme/batong_01/model.js delete mode 100644 src/views/newMap/newMapdraft/mapoperate/buttonDraft.vue delete mode 100644 src/views/newMap/newMapdraft/mapoperate/stationcontrol.vue diff --git a/src/jmapNew/config/deviceStyle.js b/src/jmapNew/config/deviceStyle.js index 697cd8c73..3b7f47be2 100644 --- a/src/jmapNew/config/deviceStyle.js +++ b/src/jmapNew/config/deviceStyle.js @@ -2,8 +2,7 @@ const mapDeviceStyle = { '01': 'chengdu_04', '02': 'fuzhou_01', '03': 'bejing_01', - '04': 'chengdu_03', - '05': 'batong_01' // 暂时没有画北京八通线 + '04': 'chengdu_03' }; export function selectLineCode(code) { diff --git a/src/jmapNew/config/skinCode/batong_01.js b/src/jmapNew/config/skinCode/batong_01.js deleted file mode 100644 index 1753f001b..000000000 --- a/src/jmapNew/config/skinCode/batong_01.js +++ /dev/null @@ -1,587 +0,0 @@ -import defaultStyle from '../defaultStyle'; -import deviceType from '../../constant/deviceType'; - -class SkinCode extends defaultStyle { - constructor() { - super(); - this[deviceType.Section] = { - active: { - routeColor: false // 进路触发颜色 - }, - text: { // 物理区段名称 - show: true, // 物理区段名称显示 - position: -1, // 区段名称位置 1 上面 -1 下面 0 对称 - distance: 11, // 文字离区段距离 - fontSize: 11, // 字体大小 - fontWeight: 'normal', // 字体粗细 - fontColor: '#FFFFFF', // 字体颜色 - textAlign: 'center', // 水平对齐方式 - textPosition: 'inside', // 文字位置 - textVerticalAlign: 'middle' // 文字垂直对齐方式 - }, - logicText: { // 逻辑区段名称 - show: false, // 逻辑区段名称显示 - position: 0, // 区段名称位置 1 上面 -1 下面 0 对称 - distance: 11, // 文字离区段距离 - fontSize: 11, // 字体大小 - fontWeight: 'normal', // 字体粗细 - fontColor: '#FFFFFF', // 字体颜色 - textAlign: 'center', // 水平对齐方式 - textPosition: 'inside', // 文字位置 - textVerticalAlign: 'middle' // 文字垂直对齐方式 - }, - switchText: { - show: false, // 道岔区段名称显示 - position: 0, // 区段名称位置 1 上面 -1 下面 0 对称 - distance: 18, // 文字离区段距离 - fontSize: 11, // 字体大小 - fontWeight: 'normal', // 字体粗细 - fontColor: '#FFFFFF', // 字体颜色 - textAlign: 'center', // 水平对齐方式 - textPosition: 'inside', // 文字位置 - textVerticalAlign: 'middle' // 文字垂直对齐方式 - }, - standText: { // 站台轨名称 - show: true, // 站台轨名称显示 - opposite: true, // 对称相反 - position: 0, // 区段名称位置 1 上面 -1 下面 0 对称 - distance: 11, // 文字离区段距离 - fontSize: 11, // 字体大小 - fontWeight: 'normal', // 字体粗细 - fontColor: '#FFFFFF', // 字体颜色 - textAlign: 'center', // 水平对齐方式 - textPosition: 'inside', // 文字位置 - textVerticalAlign: 'middle' // 文字垂直对齐方式 - }, - reentryText: { // 折返轨名称 - show: true, // 折返轨名称显示 - opposite: true, // 对称相反 - position: 0, // 区段名称位置 1 上面 -1 下面 0 对称 - distance: 11, // 文字离区段距离 - fontSize: 11, // 字体大小 - fontWeight: 'normal', // 字体粗细 - fontColor: '#FFFFFF', // 字体颜色 - textAlign: 'center', // 水平对齐方式 - textPosition: 'inside', // 文字位置 - textVerticalAlign: 'middle' // 文字垂直对齐方式 - }, - transferText: { // 转换轨名称 - show: true, // 转换轨名称显示 - opposite: true, // 对称相反 - position: 0, // 区段名称位置 1 上面 -1 下面 0 对称 - distance: 11, // 文字离区段距离 - fontSize: 11, // 字体大小 - fontWeight: 'normal', // 字体粗细 - fontColor: '#FFFFFF', // 字体颜色 - textAlign: 'center', // 水平对齐方式 - textPosition: 'inside', // 文字位置 - textVerticalAlign: 'middle' // 文字垂直对齐方式 - }, - destinationText: { // 目的码名称 - show: true, // 目的码名称显示 - position: 0, // 区段名称位置 1 上面 -1 下面 0 对称 - distance: 11, // 文字离区段距离 - fontSize: 11, // 字体大小 - fontWeight: 'bold', // 字体粗细 - fontColor: 'yellow', // 字体颜色 - textAlign: 'center', // 水平对齐方式 - textPosition: 'inside', // 文字位置 - textVerticalAlign: 'middle' // 文字垂直对齐方式 - }, - mouseOverStyle: { - borderColor: '#fff', - borderBackgroundColor: '#22DFDF', - textShadowColor: '#22DFDF' - }, - line: { - width: 5, // 区段宽度 - beyondWidth: 0, // 区段宽超出宽度 - invadeColor: '#EF0C08', // 区段侵入颜色 - spareColor: '#606060', // 区段空闲颜色 - communicationOccupiedColor: '#FF0000', // 区段通信车占用颜色 - unCommunicationOccupiedColor: '#800080', // 区段非通讯车占用颜色 - routeLockColor: '#FFFFFF', // 区段路由锁定颜色 - faultLockColor: '#006400', // 区段故障锁定颜色 - undefinedColor: '#0071C1', // 区段未定义颜色 - protectionLockedColor: '#FEFF00', // 保护区段锁闭(未用) - blockColor: '#800080', // 区段封锁颜色 - atcExcisionColor: '#A0522D', // 区段atc切除颜色 - atsExcisionColor: '#A0522D', // 区段ats切除颜色 - timeReleaseColor: '#3F3F3F', // 区段延时释放颜色 - protectiveLockColor: '#FFFF00', // 区段保护锁闭 - protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁 - logicalColor: '#FFFF00', // 逻辑区段颜色 (未用) - logicalTextColor: '#C0C0C0' // 逻辑区段名称颜色 (未用) - }, - axle: { - radius: 3, // 计轴 半径 - distance: 5, // 计轴和区段之间的距离 (未用) - color: '#C0C0C0', // 区段计轴颜色 - resetColor: '#00FFFF', // 区段计轴预复位颜色 - Failure: '#E6A23C' // #FFFF00 计轴失效 - }, - speedLimit: { // 限速元素 - width: 1, // 限速线的宽度 - distance: 5, // 限速线距离区段距离 - lineColor: '#FFFF00', // 限速线颜色 - nameShow: false // 名称显示 - }, - separator: { - z: 1, // 分割符层级 - width: 1.5, // 分隔符宽度 - endWidth: 1.5, // 尽头分隔符宽度 - endColor: '#7F7F7F', // 尽头分隔符颜色 - color: '#7F7F7F' // 区段边界符颜色 - } - }; - - this[deviceType.Signal] = { - distance: 0, // 设备距离区段的距离 - post: { - standardColor: '#5578B6', // 灯灯柱颜色 - standardWidth: 1.5 // 灯柱宽度 - }, - text: { - show: true, // 信号机名称显示 - distance: 3, // 文字和灯杆的距离 - isAlignCenter: false, // 信号字体对其方式 - fontSize: 11, // 信号机名称字体大小 - fontWeight: 'bold', // 信号机名称字体粗细 - defaultColor: '#C0C0C0', // 信号灯字体默认色 - blockColor: '#EF0C08', // 信号灯字体锁定颜色 - checkColor: '#00FF00' // 信号字体 - }, - lamp: { - guidName: 'defult', // 默认引导类型 - stopWidth: 2, // 禁止线宽度 - borderVariable: true, // 信号灯边框可变 - borderWidth: 0.5, // 信号灯边框线宽度 - borderColor: '#3149C3', // 信号灯边框线颜色 - radiusR: 5, // 信号机宽度 - blockColor: '#EF0C08', // 信号灯锁闭 - grayColor: '#7F7F7F', // 信号灯灰色 - redColor: '#FF0000', // 信号灯红色 - greenColor: '#00FF00', // 信号灯绿色 - yellowColor: '#FFFF00', // 信号灯黄色 - whiteColor: '#FFFFFF', // 信号灯白色 - blueColor: '#0070C0' // 信号灯蓝色 - }, - route: { - direction: false, // 自动进路方向 - offset: { x: 1, y: -2 }, // 自动进路偏移量 - routeColor: '#00FF00' // 自动进路 - }, - auto: { - direction: true, // 自动通过方向 - offset: { x: 4, y: 0}, // 自动通过偏移量 - width: 5, // 自动宽度 - autoRoute: '#00FF00', // 自动进路 - autoTrigger: '#FFFF00', // 自动触发 - manualControl: '#FFFF00', // 人工控制 - outConflict: '#C00808' // 出车冲突 - }, - delay: { - direction: false, // 延时解锁方向 - offset: { x: 0, y: -5}, // 延时解锁偏移量 - fontSize: 9, // 延迟解锁字体大小 - fontColor: '#FF0000', // 延迟解锁颜色 - fontWeight: 'bold' // 字体粗细 - }, - button: { - distance: 5, // 信号灯按钮距离区段的距离 - borderDashColor: '#FFFFFF', // 信号灯按钮边线 - buttonColor: 'darkgreen', // 信号灯按钮颜色 - buttonLightenColor: '#E4EF50' // 信号灯按钮闪烁颜色 - }, - mouseOverStyle: { - borderLineColor: '#FFFFFF', - borderLineDash: [3, 3], - nameBackgroundColor: '#22DFDF', - lampBorderLineColor: '#22DFDF' - } - }; - - this[deviceType.StationStand] = { - common: { // 通用属性 - textFontSize: 8 // 站台默认字体大小 - }, - safetyDoor: { // 屏蔽门 - height: 1.6, // 站台屏蔽门高度 - distance: 9, // 站台和屏蔽门之间的距离 - defaultColor: '#00FF00', // 屏蔽门默认颜色 - splitDoorColor: '#F61107' // 屏蔽门切除颜色 - }, - stand: { // 站台 - headFontSize: 8, // 站台首端字体大小 - spareColor: '#606060', // 站台空闲颜色 - stopColor: '#FEFE00', // 站台列车停站颜色 - jumpStopColor: '#9A99FF', // 站台跳停颜色 - designatedJumpStopColor: 'lightSkyBlue' // 站台指定列车跳停颜色 - }, - standEmergent: { // 紧急关闭 - mergentR: 4, // 站台紧急关闭半径 - offset: {x: 0, y: 0}, // 站台紧急关闭偏移量 - closeColor: '#F61107' // 站台紧急关闭颜色 - }, - reentry: { // 站台折返策略 - position: 0, // 折返方向 - offset: {x: -16, y: 18}, // 折返偏移量 - noHumanColor: '#0F16DA', // 站台无人折返 - autoChangeEndsColor: '#0BF400' // 站台自动换端 - }, - detainCar: { // 扣车 - text: 'H', // 扣车显示内容 - position: 1, // 扣车方向 - offset: {x: -8, y: 13}, // 扣车偏移量 - trainColor: '#E4EF50', // 车站扣车颜色 - centerTrainColor: '#FFFFFF', // 中心扣车颜色 - andCenterTrainColor: '#F61107', // 车站+中心扣车颜色 - detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色 - }, - stopTime: { // 停站时间 - position: 1, // 运行时间方向 - offset: {x: -8, y: 3}, // 运行时间偏移量 - textColor: '#FFFFFF' // 停站时间字体颜色 - }, - level: { // 运行等级 - position: 1, // 运行等级方向 - offset: {x: -8, y: 22}, // 运行等级偏移量 - textColor: '#FFFFFF' // 停站等级字体颜色 - }, - mouseOverStyle: { - borderLineColor: '#FFFFFF', - borderLineDash: [3, 3] - } - }; - - 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 // 公里标名称显示 - // }, - kmPostShow: true, // 公里标显示 - kilometerPosition: 'down', // 公里标位置 - fontWeight: 'bold', // 文字错细 - StationControl:{ - text: { - distance: 2, // 灯和文字之间的距离 - fontSize: 10, // 控制模式字体大小 - fontFormat: 'consolas', // 控制模式字体格式 - fontColor: '#ffffff', // 控制模式字体颜色 - fontWeight: 'normal', // 控制模式字体粗细 - textAlign: 'middle', // 控制模式水平对齐 - textVerticalAlign: 'top' // 控制模式垂直对齐 - }, - lamp: { - count: 3, // 控制模式灯个数 - offset: { x: 20, y: 0 }, // 偏移量 - radiusR: 6, // 控制模式灯的半径 - distance: 36, // 控制模式之间灯之间的距离 - grayColor: '#7F7F7F', // 控制模式灰色 - greenColor: '#00FF00', // 控制模式绿色 - redColor: '#FF0000', // 控制模式红色 - yellowColor: '#FFFF00', // 控制模式黄色 - emergencyControlShow: true, // 紧急站控显示 - centerControlShow: true, // 中控显示 - substationControlShow: true, // 站控按钮显示 - interconnectedControlShow: false // 联锁控显示 - }, - arrow: { - show: false // 控制模式箭头显隐 - }, - mouseOverStyle: { // 鼠标悬浮样式 - fontSize: 10, - fontFormat: 'consolas', - fontColor: '#FFF000', - fontWeight: 'normal', - textAlign: 'middle', - textVerticalAlign: 'top' - } - } - }; - - 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' // 道岔单锁颜色 - }, - core: { - length: 6 // 道岔单边长度 - }, - monolock: { // 道岔单锁配置 - locationColor: '#870E10', // 道岔单锁定位颜色 (红色) - inversionColor: '#870E10', // 道岔单锁反位颜色 (红色) - rectShow: false // 道岔单锁 矩形框是否显示 - }, - block: { // 道岔封锁配置 - nameBorderShow: true, // 道岔名称是否有包围框 显示 - contentRectShow: false // 道岔封锁显示 - }, - mouseOverStyle: { - borderBackgroundColor: '#22DFDF', // 边框背景色 - borderColor: '#fff', // 边框颜色 - textShadowColor: '#22DFDF' // 字体阴影颜色 - } - }; - - this[deviceType.LcControl] = { - text: { - fontSize: 10, // 灯字体大小 - fontWeight: 'normal', // 字体粗细 - distance: 5 // 灯跟文字距离 - }, - lamp: { - radiusR: 6, // 灯大小 - controlColor: '#FFFF00' // 灯颜色 - }, - mouseOverStyle: { - fontSize: 10, - fontFormat: 'consolas', - fontColor: '#FFF000', - fontWeight: 'normal', - textAlign: 'middle', - textVerticalAlign: 'top', - arcColor: '#00FFFF', - textColor: '#000000' - } - }; - - this[deviceType.ZcControl] = { - text: { - fontSize: 10, // 字体大小 - fontWeight: 'normal', // 字体粗细 - distance: 5 // 灯跟文字距离 - }, - lamp: { - radiusR: 6, // 灯大小 - controlColor: '#00FF00' // 灯颜色 - }, - mouseOverStyle: { - fontSize: 10, - fontFormat: 'consolas', - fontColor: '#FFF000', - fontWeight: 'normal', - textAlign: 'middle', - textVerticalAlign: 'top', - arcColor: '#00FFFF', - textColor: '#000000' - } - }; - - this[deviceType.LimitControl] = { - text: { - fontSize: 10, // 字体大小 - fontWeight: 'normal', // 字体粗细 - distance: 5 // 灯跟文字距离 - }, - lamp: { - radiusR: 6, // 灯大小 - controlColor: '#ECE9D8' // 灯颜色 - }, - mouseOverStyle: { - fontSize: 10, - fontFormat: 'consolas', - fontColor: '#FFF000', - fontWeight: 'normal', - textAlign: 'middle', - textVerticalAlign: 'top', - textColor: '#000000', - arcColor: '#00FFFF' - } - }; - - this[deviceType.Line] = { - lineColor: '#FFFFFF' // 线条颜色 - }; - - this[deviceType.TrainWindow] = { - lineColor: '#FFF', // 车次窗颜色 - lineDash: [3, 3], // 车次窗虚线间隔 - lineWidth: 1, // 车次窗线宽 - trainWindowSmooth: 0.01 // 车次窗矩形圆滑程度 - }; - - this[deviceType.Train] = { - trainBody: { - trainBodyLineWidth: 0.1, // 车身line宽 - changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度 - specialTrainType: [ - { - type: '03', - serviceNumber: 'M0', - nameFormat: 'serviceNumber:groupNumber' - }, - { - type: '02', - nameFormat: 'targetCode:groupNumber' - } - ], // 特殊列车类型需设置显示格式 - lrPadding: 4, // 两边间隔 - upPadding: 4, // 上边距离 - trainBodyFillColor: '#725A64', // 列车车身填充颜色 - trainNameFormat: 'serviceNumber:tripNumber'// 列车显示格式 - }, - hsda: { - lrPaddingHSDA: 3, // HSDA两边间隔 - upPaddingHSDA: 4, // HSDA上边距离 - trainHSDATextFontSize: 9, // 列车HDSA字号 - textHContent: 'H', // textH文本 - textSContent: 'S', // textS文本 - textDContent: 'D', // textD文本 - textAContent: 'A'// textA文本 - }, - trainNumber: { - trainNumberOffset: { x: 0, y: 1}// 目的地码偏移量 - }, - trainServer: { - serviceNumberPrefix: '00', // 服务号(表号)前缀 - defaultServiceNumber: 'AA', // 默认服务号(表号) - trainServerOffset: { x: 4, y: 4}// 列车服务号偏移 - }, - trainTarget: { - tripNumberPrefix: '000', // 车次号前缀 - defaultTripNumber: 'DDD', // 默认车次号2 - trainTargetOffset: { x: 36, y: 4}, // 列车车次号偏移 - trainTargetTextAlign: 'left'// 车次号文字显示位置 - }, - trainTargetNumber: { - trainTargetNumberOffset: {x: 0, y: 0}// 车组号偏移量 - }, - trainHead: { - trainMoreLength: 0, // 列车车头比车身高出的长度,上下相比车体伸出去的边框 - trainHeadTriangleFirst: { x: 7, y: 1}, // 列车车头三角坐标1偏移量 - trainHeadTriangleSecond: { x: 13, y: 10}, // 列车车头三角坐标2偏移量 - trainHeadTriangleThird: { x: 7, y: 19}, // 列车车头三角坐标3偏移量 - trainHeadRectHeight: 20, // 列车车头矩形高度 - trainConntWidth: 3, // 列车竖杠的宽度 - trainHeadFillColor: '#000000'// 列车车头矩形填充颜色 - }, - common: { - trainHeight: 20, // 列车高度 - trainHeadDistance: 4, // 列车和车头之间的间距 - trainWidth: 40, // 列车长度 - trainTextFontSize: 12, // 列车字号 - fontFamily: 'consolas', // 默认字体 族类 - haveTextHSDA: true, // 是否需创建textHSDA对象 - haveArrowText: true, // 是否需创建arrowText对象 - haveTrainBorder: false, // 是否需创建trainBorder对象 - textOffset: 4, // 字体偏移(用以控制字体据车头的距离) - trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸 - useSelfFormat: true, // 使用配置项的nameFormat - useSelfText: true // 使用配置项的字体大小 - }, - trainStatusStyle: { - destinationStatus: [ - {status: '01', showColor: '#FFFFFF'}, - {status: '02', showColor: '#00FF00'}, - {status: '03', showColor: '#A0522D'}, - {status: '04', showColor: '#FFFF00'} - ], // 目的地状态 01准点 02早点 03晚点 04头码车 - defaultDestinationColor: '#FFFFFF', // 默认目的地状态显示颜色 - destinationStatusSetText: 'trainTarget', // 目的地状态设置的对应哪个text的颜色 - directionType: [ - { - type: '01', - lineLShow: true, - lineRShow: true, - arrowLShow: false, - arrowRShow: false - }, - { - type: '02', - lineLShow: false, - lineRShow: true, - arrowLShow: false, - arrowRShow: true - }, - { - type: '03', - lineLShow: true, - lineRShow: false, - arrowLShow: true, - arrowRShow: false - } - ], // 列车运行方向状态类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行 - directionStopType: [ - {type: '01', lineLShow: false, lineRShow: false}, - {type: '02', lineLShow: false, lineRShow: true}, - {type: '03', lineLShow: true, lineRShow: false} - ], // 列车停止方向类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行 - runModeStatus: [ - { - status: '01', - trainLColor: '#FFFFFF', - trainRColor: '#FFFFFF' - }, - { - status: '02', - trainLColor: '#00FF00', - trainRColor: '#00FF00' - }, - { - status: '03', - trainLColor: '#FFFF00', - trainRColor: '#FFFF00'}, - { - status: '04', - trainLColor: '#A0522D', - trainRColor: '#A0522D' - }, - { - status: '05', - trainLColor: '#A0522D', - trainRColor: '#A0522D' - } - ], // 列车运行模式对应车头颜色 01未知 02 ATO自动驾驶模式AM 03 ATP监控下的人工驾驶模式CM 04 限制人工驾驶模式RM 05 非限制人工驾驶模式RM - runControlStatus: [ - {status: '01', hShow: false, sShow: false}, - {status: '02', hShow: true, sShow: false}, - {status: '03', hShow: false, sShow: true} - ], // 设置运行控制状态类型 01正常 02扣车 03停跳 - doorStatus: [ - {status: '01', dShow: false}, - {status: '02', dShow: true} - ], // 设置车门状态类型 01关门 02开门 - communicationStatus: [ - {status: '01', trainColor: '#725A64'}, - {status: '02', trainColor: '#C0C0C0'} - ], // 设置通信状态 01正常 02故障 - alarmStatus: [ - {status: '01', aShow: false}, - {status: '02', aShow: true} - ], // 设置报警状态 01不报警 02报警 - serverNoType: [ - {type: '01', showColor: '#FFFFFF'}, - {type: '02', showColor: '#FFF000'} - ], // 服务号状态类型 01显示服务号 计划车 02显示车组号: 头码车与人工车 - defaultServerNoColor: '#FFFFFF' // 默认服务号状态显示颜色 - } - }; - } -} - -export default new SkinCode(); diff --git a/src/jmapNew/config/skinCode/bejing_01.js b/src/jmapNew/config/skinCode/bejing_01.js index 87228e1ef..6dd1862de 100644 --- a/src/jmapNew/config/skinCode/bejing_01.js +++ b/src/jmapNew/config/skinCode/bejing_01.js @@ -286,6 +286,10 @@ class SkinCode extends defaultStyle { radiusR: 6, // 控制灯大小 controlColor: '#FFFF00' // 控制灯颜色 }, + turnBack: { // 按图折返 + lamp: 1, // 灯数量 + lampSpace: 60 // 灯间距 + }, StationControl:{ text: { distance: 2, // 灯和文字之间的距离 diff --git a/src/jmapNew/config/skinCode/chengdu_03.js b/src/jmapNew/config/skinCode/chengdu_03.js index bb3a61deb..eee5d9d25 100644 --- a/src/jmapNew/config/skinCode/chengdu_03.js +++ b/src/jmapNew/config/skinCode/chengdu_03.js @@ -289,6 +289,10 @@ class SkinCode extends defaultStyle { radiusR: 6, // 控制灯大小 controlColor: '#FFFF00' // 控制灯颜色 }, + turnBack: { // 按图折返 + lamp: 1, // 灯数量 + lampSpace: 60 // 灯间距 + }, StationControl:{ text: { distance: 2, // 灯和文字之间的距离 diff --git a/src/jmapNew/config/skinCode/chengdu_04.js b/src/jmapNew/config/skinCode/chengdu_04.js index e208375f5..954500031 100644 --- a/src/jmapNew/config/skinCode/chengdu_04.js +++ b/src/jmapNew/config/skinCode/chengdu_04.js @@ -286,6 +286,10 @@ class SkinCode extends defaultStyle { radiusR: 6, // 控制灯大小 controlColor: '#FFFF00' // 控制灯颜色 }, + turnBack: { // 按图折返 + lamp: 1, // 灯数量 + lampSpace: 60 // 灯间距 + }, StationControl:{ text: { distance: 2, // 灯和文字之间的距离 diff --git a/src/jmapNew/config/skinCode/fuzhou_01.js b/src/jmapNew/config/skinCode/fuzhou_01.js index 16a1a05ee..910f74d22 100644 --- a/src/jmapNew/config/skinCode/fuzhou_01.js +++ b/src/jmapNew/config/skinCode/fuzhou_01.js @@ -268,6 +268,10 @@ class SkinCode extends defaultStyle { radiusR: 6, // 控制灯大小 controlColor: '#FFFF00' // 控制灯颜色 }, + turnBack: { // 按图折返 + lamp: 1, // 灯数量 + lampSpace: 60 // 灯间距 + }, StationControl:{ text: { distance: 2, // 灯和文字之间的距离 diff --git a/src/jmapNew/shape/Station/index.js b/src/jmapNew/shape/Station/index.js index 5cba88d79..a4edf4043 100644 --- a/src/jmapNew/shape/Station/index.js +++ b/src/jmapNew/shape/Station/index.js @@ -76,14 +76,14 @@ export default class Station extends Group { const style = this.style; if (model.visible && model.isCreateTurnBack) { this.turnBacks = []; - model.turnBackList.forEach(item => { + for (let index = 0; index < style.Station.turnBack.lamp; index++) { const turnBack = new EControl({ zlevel: this.zlevel, z: this.z, arc: { shape: { - cx: item.x, - cy: item.y, + cx: model.turnBackPoint.x + style.Station.turnBack.lampSpace * index, + cy: model.turnBackPoint.y, r: style.Station.lamp.radiusR }, lineWidth: 0, @@ -91,8 +91,8 @@ export default class Station extends Group { }, text: { position: [0, 0], - x: item.x, - y: item.y + style.Station.lamp.radiusR + style.Station.text.distance, + x: model.turnBackPoint.x + style.Station.turnBack.lampSpace * index, + y: model.turnBackPoint.y + style.Station.lamp.radiusR + style.Station.text.distance, fontWeight: style.Station.text.fontWeight, fontSize: style.Station.text.fontSize, fontFamily: style.fontFamily, @@ -104,7 +104,8 @@ export default class Station extends Group { style: this.style }); this.turnBacks.push(turnBack); - }); + } + this.turnBacks.forEach(lamp => { this.add(lamp); }); } } diff --git a/src/jmapNew/theme/batong_01/menus/dialog/childDialog/childDialog/noticeInfo.vue b/src/jmapNew/theme/batong_01/menus/dialog/childDialog/childDialog/noticeInfo.vue deleted file mode 100644 index 3abfe099a..000000000 --- a/src/jmapNew/theme/batong_01/menus/dialog/childDialog/childDialog/noticeInfo.vue +++ /dev/null @@ -1,86 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/batong_01/menus/dialog/childDialog/confirmControl.vue b/src/jmapNew/theme/batong_01/menus/dialog/childDialog/confirmControl.vue deleted file mode 100644 index b12296702..000000000 --- a/src/jmapNew/theme/batong_01/menus/dialog/childDialog/confirmControl.vue +++ /dev/null @@ -1,370 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/batong_01/menus/dialog/childDialog/confirmControlSpeed.vue b/src/jmapNew/theme/batong_01/menus/dialog/childDialog/confirmControlSpeed.vue deleted file mode 100644 index 3a945a9e6..000000000 --- a/src/jmapNew/theme/batong_01/menus/dialog/childDialog/confirmControlSpeed.vue +++ /dev/null @@ -1,153 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/dialog/childDialog/confirmSignalUnlock.vue b/src/jmapNew/theme/batong_01/menus/dialog/childDialog/confirmSignalUnlock.vue deleted file mode 100644 index 61399a921..000000000 --- a/src/jmapNew/theme/batong_01/menus/dialog/childDialog/confirmSignalUnlock.vue +++ /dev/null @@ -1,118 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/dialog/childDialog/confirmTrain.vue b/src/jmapNew/theme/batong_01/menus/dialog/childDialog/confirmTrain.vue deleted file mode 100644 index dbfc5c3d1..000000000 --- a/src/jmapNew/theme/batong_01/menus/dialog/childDialog/confirmTrain.vue +++ /dev/null @@ -1,168 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/dialog/routeCmdControl.vue b/src/jmapNew/theme/batong_01/menus/dialog/routeCmdControl.vue deleted file mode 100644 index 82e446065..000000000 --- a/src/jmapNew/theme/batong_01/menus/dialog/routeCmdControl.vue +++ /dev/null @@ -1,430 +0,0 @@ - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/dialog/routeControl.vue b/src/jmapNew/theme/batong_01/menus/dialog/routeControl.vue deleted file mode 100644 index 86b6d0b17..000000000 --- a/src/jmapNew/theme/batong_01/menus/dialog/routeControl.vue +++ /dev/null @@ -1,236 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/dialog/routeDetail.vue b/src/jmapNew/theme/batong_01/menus/dialog/routeDetail.vue deleted file mode 100644 index c10498280..000000000 --- a/src/jmapNew/theme/batong_01/menus/dialog/routeDetail.vue +++ /dev/null @@ -1,146 +0,0 @@ - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/dialog/routeHandControl.vue b/src/jmapNew/theme/batong_01/menus/dialog/routeHandControl.vue deleted file mode 100644 index fe7fda0c7..000000000 --- a/src/jmapNew/theme/batong_01/menus/dialog/routeHandControl.vue +++ /dev/null @@ -1,297 +0,0 @@ - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/dialog/routeLock.vue b/src/jmapNew/theme/batong_01/menus/dialog/routeLock.vue deleted file mode 100644 index e13129154..000000000 --- a/src/jmapNew/theme/batong_01/menus/dialog/routeLock.vue +++ /dev/null @@ -1,152 +0,0 @@ - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/dialog/routeSelection.vue b/src/jmapNew/theme/batong_01/menus/dialog/routeSelection.vue deleted file mode 100644 index 10736c3d5..000000000 --- a/src/jmapNew/theme/batong_01/menus/dialog/routeSelection.vue +++ /dev/null @@ -1,231 +0,0 @@ - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/dialog/standControl.vue b/src/jmapNew/theme/batong_01/menus/dialog/standControl.vue deleted file mode 100644 index ce3fa3281..000000000 --- a/src/jmapNew/theme/batong_01/menus/dialog/standControl.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/dialog/trainControl.vue b/src/jmapNew/theme/batong_01/menus/dialog/trainControl.vue deleted file mode 100644 index 4337f3708..000000000 --- a/src/jmapNew/theme/batong_01/menus/dialog/trainControl.vue +++ /dev/null @@ -1,456 +0,0 @@ - - - diff --git a/src/jmapNew/theme/batong_01/menus/dialog/trainCreate.vue b/src/jmapNew/theme/batong_01/menus/dialog/trainCreate.vue deleted file mode 100644 index b21f55dc9..000000000 --- a/src/jmapNew/theme/batong_01/menus/dialog/trainCreate.vue +++ /dev/null @@ -1,160 +0,0 @@ - - - diff --git a/src/jmapNew/theme/batong_01/menus/dialog/trainDelete.vue b/src/jmapNew/theme/batong_01/menus/dialog/trainDelete.vue deleted file mode 100644 index 643df3baa..000000000 --- a/src/jmapNew/theme/batong_01/menus/dialog/trainDelete.vue +++ /dev/null @@ -1,165 +0,0 @@ - - - diff --git a/src/jmapNew/theme/batong_01/menus/dialog/trainEditNumber.vue b/src/jmapNew/theme/batong_01/menus/dialog/trainEditNumber.vue deleted file mode 100644 index c12d370af..000000000 --- a/src/jmapNew/theme/batong_01/menus/dialog/trainEditNumber.vue +++ /dev/null @@ -1,131 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/dialog/trainMove.vue b/src/jmapNew/theme/batong_01/menus/dialog/trainMove.vue deleted file mode 100644 index df2c76842..000000000 --- a/src/jmapNew/theme/batong_01/menus/dialog/trainMove.vue +++ /dev/null @@ -1,186 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/dialog/trainSwitch.vue b/src/jmapNew/theme/batong_01/menus/dialog/trainSwitch.vue deleted file mode 100644 index 843068108..000000000 --- a/src/jmapNew/theme/batong_01/menus/dialog/trainSwitch.vue +++ /dev/null @@ -1,187 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/index.vue b/src/jmapNew/theme/batong_01/menus/index.vue deleted file mode 100644 index 166916cd4..000000000 --- a/src/jmapNew/theme/batong_01/menus/index.vue +++ /dev/null @@ -1,362 +0,0 @@ - - - - - diff --git a/src/jmapNew/theme/batong_01/menus/menuBar.vue b/src/jmapNew/theme/batong_01/menus/menuBar.vue deleted file mode 100644 index 76c1a6145..000000000 --- a/src/jmapNew/theme/batong_01/menus/menuBar.vue +++ /dev/null @@ -1,906 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/batong_01/menus/menuCancel.vue b/src/jmapNew/theme/batong_01/menus/menuCancel.vue deleted file mode 100644 index 427656f30..000000000 --- a/src/jmapNew/theme/batong_01/menus/menuCancel.vue +++ /dev/null @@ -1,150 +0,0 @@ - - - diff --git a/src/jmapNew/theme/batong_01/menus/menuDialog/childDialog/twoConfirmation.vue b/src/jmapNew/theme/batong_01/menus/menuDialog/childDialog/twoConfirmation.vue deleted file mode 100644 index 16201064f..000000000 --- a/src/jmapNew/theme/batong_01/menus/menuDialog/childDialog/twoConfirmation.vue +++ /dev/null @@ -1,126 +0,0 @@ - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/menuDialog/childDialog/userAdd.vue b/src/jmapNew/theme/batong_01/menus/menuDialog/childDialog/userAdd.vue deleted file mode 100644 index 2c42b0224..000000000 --- a/src/jmapNew/theme/batong_01/menus/menuDialog/childDialog/userAdd.vue +++ /dev/null @@ -1,162 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/menuDialog/childDialog/userDelete.vue b/src/jmapNew/theme/batong_01/menus/menuDialog/childDialog/userDelete.vue deleted file mode 100644 index 7ebe5ef7b..000000000 --- a/src/jmapNew/theme/batong_01/menus/menuDialog/childDialog/userDelete.vue +++ /dev/null @@ -1,134 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/menuDialog/childDialog/userEdit.vue b/src/jmapNew/theme/batong_01/menus/menuDialog/childDialog/userEdit.vue deleted file mode 100644 index 000f3f3a6..000000000 --- a/src/jmapNew/theme/batong_01/menus/menuDialog/childDialog/userEdit.vue +++ /dev/null @@ -1,178 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/menuDialog/passwordBox.vue b/src/jmapNew/theme/batong_01/menus/menuDialog/passwordBox.vue deleted file mode 100644 index 605f912fe..000000000 --- a/src/jmapNew/theme/batong_01/menus/menuDialog/passwordBox.vue +++ /dev/null @@ -1,221 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/menuDialog/splitModule.vue b/src/jmapNew/theme/batong_01/menus/menuDialog/splitModule.vue deleted file mode 100644 index 257fd530e..000000000 --- a/src/jmapNew/theme/batong_01/menus/menuDialog/splitModule.vue +++ /dev/null @@ -1,213 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/batong_01/menus/menuDialog/stationControlConvert.vue b/src/jmapNew/theme/batong_01/menus/menuDialog/stationControlConvert.vue deleted file mode 100644 index abb52937c..000000000 --- a/src/jmapNew/theme/batong_01/menus/menuDialog/stationControlConvert.vue +++ /dev/null @@ -1,414 +0,0 @@ - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/menuDialog/stationStantSplit.vue b/src/jmapNew/theme/batong_01/menus/menuDialog/stationStantSplit.vue deleted file mode 100644 index e468fe903..000000000 --- a/src/jmapNew/theme/batong_01/menus/menuDialog/stationStantSplit.vue +++ /dev/null @@ -1,187 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/menuDialog/trainAdd.vue b/src/jmapNew/theme/batong_01/menus/menuDialog/trainAdd.vue deleted file mode 100644 index 8cb070100..000000000 --- a/src/jmapNew/theme/batong_01/menus/menuDialog/trainAdd.vue +++ /dev/null @@ -1,162 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/menuDialog/trainControl.vue b/src/jmapNew/theme/batong_01/menus/menuDialog/trainControl.vue deleted file mode 100644 index c1762373f..000000000 --- a/src/jmapNew/theme/batong_01/menus/menuDialog/trainControl.vue +++ /dev/null @@ -1,181 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/menuDialog/trainDelete.vue b/src/jmapNew/theme/batong_01/menus/menuDialog/trainDelete.vue deleted file mode 100644 index a015b7c12..000000000 --- a/src/jmapNew/theme/batong_01/menus/menuDialog/trainDelete.vue +++ /dev/null @@ -1,149 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/menuDialog/trainTranstalet.vue b/src/jmapNew/theme/batong_01/menus/menuDialog/trainTranstalet.vue deleted file mode 100644 index ff494f1cc..000000000 --- a/src/jmapNew/theme/batong_01/menus/menuDialog/trainTranstalet.vue +++ /dev/null @@ -1,152 +0,0 @@ - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/menuDialog/viewDevice.vue b/src/jmapNew/theme/batong_01/menus/menuDialog/viewDevice.vue deleted file mode 100644 index e11866265..000000000 --- a/src/jmapNew/theme/batong_01/menus/menuDialog/viewDevice.vue +++ /dev/null @@ -1,165 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/batong_01/menus/menuDialog/viewName.vue b/src/jmapNew/theme/batong_01/menus/menuDialog/viewName.vue deleted file mode 100644 index d3b986db0..000000000 --- a/src/jmapNew/theme/batong_01/menus/menuDialog/viewName.vue +++ /dev/null @@ -1,248 +0,0 @@ - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/menuDialog/viewTrainId.vue b/src/jmapNew/theme/batong_01/menus/menuDialog/viewTrainId.vue deleted file mode 100644 index 5ef35ef0f..000000000 --- a/src/jmapNew/theme/batong_01/menus/menuDialog/viewTrainId.vue +++ /dev/null @@ -1,188 +0,0 @@ - - - diff --git a/src/jmapNew/theme/batong_01/menus/menuSection.vue b/src/jmapNew/theme/batong_01/menus/menuSection.vue deleted file mode 100644 index 8c01589ec..000000000 --- a/src/jmapNew/theme/batong_01/menus/menuSection.vue +++ /dev/null @@ -1,392 +0,0 @@ - - - diff --git a/src/jmapNew/theme/batong_01/menus/menuSignal.vue b/src/jmapNew/theme/batong_01/menus/menuSignal.vue deleted file mode 100644 index cf1416ce7..000000000 --- a/src/jmapNew/theme/batong_01/menus/menuSignal.vue +++ /dev/null @@ -1,536 +0,0 @@ - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/menuStation.vue b/src/jmapNew/theme/batong_01/menus/menuStation.vue deleted file mode 100644 index 516ac2541..000000000 --- a/src/jmapNew/theme/batong_01/menus/menuStation.vue +++ /dev/null @@ -1,299 +0,0 @@ - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/menuStationControl.vue b/src/jmapNew/theme/batong_01/menus/menuStationControl.vue deleted file mode 100644 index 3d6215a27..000000000 --- a/src/jmapNew/theme/batong_01/menus/menuStationControl.vue +++ /dev/null @@ -1,68 +0,0 @@ - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/menuStationStand.vue b/src/jmapNew/theme/batong_01/menus/menuStationStand.vue deleted file mode 100644 index 05168ea5b..000000000 --- a/src/jmapNew/theme/batong_01/menus/menuStationStand.vue +++ /dev/null @@ -1,485 +0,0 @@ - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/menuSwitch.vue b/src/jmapNew/theme/batong_01/menus/menuSwitch.vue deleted file mode 100644 index d33c3bde6..000000000 --- a/src/jmapNew/theme/batong_01/menus/menuSwitch.vue +++ /dev/null @@ -1,482 +0,0 @@ - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/menuTool.vue b/src/jmapNew/theme/batong_01/menus/menuTool.vue deleted file mode 100644 index dc32a9673..000000000 --- a/src/jmapNew/theme/batong_01/menus/menuTool.vue +++ /dev/null @@ -1,205 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/menuTrain.vue b/src/jmapNew/theme/batong_01/menus/menuTrain.vue deleted file mode 100644 index 05a582a36..000000000 --- a/src/jmapNew/theme/batong_01/menus/menuTrain.vue +++ /dev/null @@ -1,321 +0,0 @@ - - - diff --git a/src/jmapNew/theme/batong_01/menus/passiveDialog/alarm.vue b/src/jmapNew/theme/batong_01/menus/passiveDialog/alarm.vue deleted file mode 100644 index c5af6d08b..000000000 --- a/src/jmapNew/theme/batong_01/menus/passiveDialog/alarm.vue +++ /dev/null @@ -1,220 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/batong_01/menus/passiveDialog/control.vue b/src/jmapNew/theme/batong_01/menus/passiveDialog/control.vue deleted file mode 100644 index 93fe5df98..000000000 --- a/src/jmapNew/theme/batong_01/menus/passiveDialog/control.vue +++ /dev/null @@ -1,285 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/passiveDialog/timeout.vue b/src/jmapNew/theme/batong_01/menus/passiveDialog/timeout.vue deleted file mode 100644 index 88ce749ae..000000000 --- a/src/jmapNew/theme/batong_01/menus/passiveDialog/timeout.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - diff --git a/src/jmapNew/theme/batong_01/menus/statusBar.vue b/src/jmapNew/theme/batong_01/menus/statusBar.vue deleted file mode 100644 index 46a07d747..000000000 --- a/src/jmapNew/theme/batong_01/menus/statusBar.vue +++ /dev/null @@ -1,31 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/statusDownTrainDetail.vue b/src/jmapNew/theme/batong_01/menus/statusDownTrainDetail.vue deleted file mode 100644 index 14f092b23..000000000 --- a/src/jmapNew/theme/batong_01/menus/statusDownTrainDetail.vue +++ /dev/null @@ -1,31 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/statusUpTrainDetail.vue b/src/jmapNew/theme/batong_01/menus/statusUpTrainDetail.vue deleted file mode 100644 index afafa39cf..000000000 --- a/src/jmapNew/theme/batong_01/menus/statusUpTrainDetail.vue +++ /dev/null @@ -1,31 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/jmapNew/theme/batong_01/menus/utils/menuItemStatus.js b/src/jmapNew/theme/batong_01/menus/utils/menuItemStatus.js deleted file mode 100644 index f5f5a3ad1..000000000 --- a/src/jmapNew/theme/batong_01/menus/utils/menuItemStatus.js +++ /dev/null @@ -1,527 +0,0 @@ -import store from '@/store'; -import deviceState from '@/jmap/constant/deviceState'; -import { OperateMode } from '@/scripts/ConstDic'; - -export function getCurrentStateObject() { - return store.getters['menuOperation/selected']; -} - -/** 系统类型 */ -export const SystemType = { - '01': 'local', // 现地工作站 - '02': 'central' // 中心调度工作站 -}; - -export const StationControlType = { - '01': 'center', // 中控 - '02': 'station', // 站控 - '03': 'station' -}; - -// 控制禁用 -export const MenuDisabledState = { - Section: { - // 故障解锁 - fault() { - }, - // 切除 - split() { - const device = getCurrentStateObject(); - if (device && device.cutOff != deviceState.Section.cutOff.Default) { - return true; - } - }, - // 激活 - active() { - const device = getCurrentStateObject(); - if (device && device.cutOff == deviceState.Section.cutOff.Default) { - return true; - } - }, - // 区段封锁 - lock() { - const device = getCurrentStateObject(); - if (device && device.status == deviceState.Section.status.State06) { - return true; - } - }, - // 区段解禁 - unlock() { - const device = getCurrentStateObject(); - if (device && device.status != deviceState.Section.status.State06) { - return true; - } - }, - // 区段设置限速 - setSpeed() { - const device = getCurrentStateObject(); - if (device && device.speedUpperLimit != deviceState.Section.speedUpperLimit.Default) { - return true; - } - }, - // 区段取消限速 - cancelSpeed() { - const device = getCurrentStateObject(); - if (device && device.speedUpperLimit == deviceState.Section.speedUpperLimit.Default) { - return true; - } - }, - // 新建列车 - newTrain() { - }, - // 计轴预复位 - axlePreReset() { - }, - // 设置故障 - setStoppage() { - const device = getCurrentStateObject(); - if (device && device.fault) { - return true; - } - }, - // 取消故障 - cancelStoppage() { - const device = getCurrentStateObject(); - if (device && !device.fault) { - return true; - } - } - }, - Signal: { - // 进路选排 - arrangementRoute() { - - }, - // 进路取消 - cancelTrainRoute() { - }, - // 信号封闭 - lock() { - const device = getCurrentStateObject(); - if (device && device.status == deviceState.Signal.status.State05) { - return true; - } - }, - // 信号解封 - unlock() { - const device = getCurrentStateObject(); - if (device && device.status != deviceState.Signal.status.State05) { - return true; - } - }, - // 信号重开 - reopenSignal() { - }, - // 进路引导 - guide() { - }, - // 设置联锁自动进路 - setAutoInterlock() { - }, - // 取消联锁自动进路 - cancelAutoInterlock() { - }, - // 设置联锁自动触发 - setAutoTrigger() { - }, - // 取消联锁自动触发 - cancelAutoTrigger() { - }, - // 关灯 - signalClose() { - const device = getCurrentStateObject(); - if (device && device.status == deviceState.Signal.status.State01) { - return true; - } - }, - // 人工控 - humanControl() { - }, - // ats自动控 - atsAutoControl() { - }, - // 查询进路状态 - detail() { - }, - // 设置故障 - setStoppage() { - const device = getCurrentStateObject(); - if (device && device.fault) { - return true; - } - }, - // 取消故障 - cancelStoppage() { - const device = getCurrentStateObject(); - if (device && !device.fault) { - return true; - } - } - }, - Station: { - // 全站设置联锁自动触发 - setAutoTrigger() { - }, - // 全站取消联锁自动触发 - cancelAutoTrigger() { - }, - // 上电解锁 - powerUnLock() { - }, - // 执行关键操作测试 - execKeyOperationTest() { - }, - // 所有进路自排开 - atsAutoControlALL() { - }, - // 所有进路自排关 - humanControlALL() { - }, - // 设置ZC故障 - setStoppage() { - const device = getCurrentStateObject(); - if (device && device.fault) { - return true; - } - }, - // 取消ZC故障 - cancelStoppage() { - const device = getCurrentStateObject(); - if (device && !device.fault) { - return true; - } - } - }, - StationControl: { - // 紧急站控 - emergencyStationControl() { - const device = getCurrentStateObject(); - if (device && device.status == deviceState.StationControl.status.State03) { - return true; - } - }, - // 请求站控 - requestStationControl() { - const device = getCurrentStateObject(); - if (device && device.status == deviceState.StationControl.status.State02) { - return true; - } - }, - // 强行站控 - forcedStationControl() { - const device = getCurrentStateObject(); - if (device && device.status == deviceState.StationControl.status.State02) { - return true; - } - }, - // 请求中控 - requestCentralControl() { - const device = getCurrentStateObject(); - if (device && device.status == deviceState.StationControl.status.State01) { - return true; - } - }, - // 设置故障 - setStoppage() { - const device = getCurrentStateObject(); - if (device && device.fault) { - return true; - } - }, - // 取消故障 - cancelStoppage() { - const device = getCurrentStateObject(); - if (device && !device.fault) { - return true; - } - } - }, - StationStand: { - // 设置扣车 - setDetainTrain() { - const device = getCurrentStateObject(); - if (device && device.holdStatus != deviceState.StationStand.holdStatus.State01) { - return true; - } - }, - // 取消扣车 - cancelDetainTrain() { - const device = getCurrentStateObject(); - if (device && device.holdStatus == deviceState.StationStand.holdStatus.State01) { - return true; - } - }, - // 强制取消扣车 - cancelDetainTrainForce() { - const device = getCurrentStateObject(); - if (device && device.holdStatus == deviceState.StationStand.holdStatus.State01) { - return true; - } - }, - // 设置全站扣车 - cancelDetainTrainAll() { - }, - // 设置运行等级 - setRunLevel() { - }, - // 设置停站时间 - setStopTime() { - }, - // 设置跳停 - setJumpStop() { - const device = getCurrentStateObject(); - if (device && device.jumpStopStatus != deviceState.StationStand.jumpStopStatus.State01) { - return true; - } - }, - // 取消跳停 - cancelJumpStop() { - const device = getCurrentStateObject(); - if (device && device.jumpStopStatus == deviceState.StationStand.jumpStopStatus.State01) { - return true; - } - }, - // 提前发车 - earlyDeparture() { - }, - // 站台详细信息 - detail() { - }, - // 设置折返策略 - setBackStrategy() { - }, - // 设置故障 - setStoppage() { - const device = getCurrentStateObject(); - if (device && device.fault) { - return true; - } - }, - // 取消故障 - cancelStoppage() { - const device = getCurrentStateObject(); - if (device && !device.fault) { - return true; - } - } - }, - Switch: { - // 单锁 - lock() { - const device = getCurrentStateObject(); - if (device && device.status == deviceState.Switch.status.State10) { - return true; - } - }, - // 解锁 - unlock() { - const device = getCurrentStateObject(); - if (device && device.status != deviceState.Switch.status.State10) { - return true; - } - }, - // 封锁 - block() { - const device = getCurrentStateObject(); - if (device && device.status == deviceState.Switch.status.State14) { - return true; - } - }, - // 解封 - unblock() { - const device = getCurrentStateObject(); - if (device && device.status != deviceState.Switch.status.State14) { - return true; - } - }, - // 强扳 - switchTurnoutForce() { - }, - // 转动 - switchTurnout() { - }, - // 道岔故障解锁 - fault() { - }, - // 计轴预复位 - axlePreReset() { - }, - // 道岔切除 - split() { - }, - // 道岔激活 - active() { - }, - // 道岔设置速度 - setSpeed() { - // const device = getCurrentStateObject(); - }, - // 道岔取消速度 - cancelSpeed() { - }, - // 设置故障 - setStoppage() { - const device = getCurrentStateObject(); - if (device && device.fault) { - return true; - } - }, - // 取消故障 - cancelStoppage() { - const device = getCurrentStateObject(); - if (device && !device.fault) { - return true; - } - } - }, - Train: { - // 添加列车识别号 - addTrainId() { - }, - // 删除列车识别号 - delTrainId() { - }, - // 修改列车识别号 - editTrainId() { - }, - // 修改车组号 - editTrainNo() { - }, - // 移动列车识别号 - moveTrainId() { - }, - // 交换列车识别号 - switchTrainId() { - }, - // 设置限速 - limitSpeed() { - }, - // 设置通信故障 - setStoppage() { - var device = getCurrentStateObject(); - if (device && device.fault) { - return true; - } - }, - // 取消通信故障 - cancelStoppage() { - var device = getCurrentStateObject(); - if (device && !device.fault) { - return true; - } - } - } -}; - -/** - * 将menu的disabled属性使用disabledCallback计算并返回 - * @param {Array} menu - */ -export function menuConvert(menu) { - if (menu.constructor === Array) { - menu.forEach(elem => { - if (elem.disabledCallback.constructor === Function) { - elem.disabled = elem.defaultDisabled; - if (!elem.defaultDisabled) { - elem.disabled = elem.disabledCallback(); - } - } - }); - } - return menu; -} - -/** - * 根据产品类型,返回对应的menuBar - * @param {*} menuObj - */ -export function menuBarConvert(menu, mode) { - if (menu) { - if (mode === OperateMode.NORMAL) { - menu.forEach(item => { - item.show = false; - if (!item.click) { - item.click = () => { }; - } - - if (!item.froce) { - item.show = true; - if (item.children && item.children.length > 0) { - menuBarConvert(item.children, mode); - } - } - }); - } else if (mode === OperateMode.ADMIN) { - menu.forEach(item => { - item.show = true; - if (!item.click) { - item.click = () => { }; - } - if (item.children && item.children.length > 0) { - menuBarConvert(item.children, mode); - } - }); - } - } - return menu || []; -} - -/** - * 将menu的show属性过滤返回 - * @param {Array} menu - */ -export function menuFiltration(menuObj) { - var selected = getCurrentStateObject(); - var control; - var menu = []; - - if (selected._type == 'StationStand') { - control = store.getters['map/getStationControlByStationCode'](selected.deviceStationCode); - } else if (selected._type == 'Station') { - control = store.getters['map/getStationControlByStationCode'](selected.code); - } else { - control = store.getters['map/getStationControlByStationCode'](selected.stationCode); - } - - if (control) { - if (store.state.training.prdType != '') { - var type = SystemType[store.state.training.prdType]; - var status = StationControlType[control.status]; - menu = [...menuObj[type]]; - if (menu.constructor === Array) { - menu.forEach(elem => { - if (elem.auth.constructor === Object) { - elem.show = true; - if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示 - elem.show = false; - } - elem.defaultDisabled = !elem.auth[status]; - } - }); - } - } - } - return menu; -} - -/** - * 将train menu的show属性过滤返回 - */ -export function trainMenuFiltration(menuObj) { - var menu = []; - if (store.state.training.prdType != '') { - var type = SystemType[store.state.training.prdType]; - menu = [...menuObj[type]]; - if (menu.constructor === Array) { - menu.forEach(elem => { - if (elem.auth.constructor === Object) { - elem.show = true; - if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示 - elem.show = false; - } - } - }); - } - } - return menu; -} diff --git a/src/jmapNew/theme/batong_01/model.js b/src/jmapNew/theme/batong_01/model.js deleted file mode 100644 index cf408a81f..000000000 --- a/src/jmapNew/theme/batong_01/model.js +++ /dev/null @@ -1,63 +0,0 @@ -import deviceType from '../../constant/deviceType'; - -class Model { - constructor() { - // 公共字段部分默认初始值 - this['public'] = {}; - this['public'][deviceType.Signal] = { - lampPositionType: '02', - lampPostType: '02' - }; - - // 私有字段部分默认初始值 - this['private'] = {}; - this['private'][deviceType.StationControl] = { - indicatorShow: true // 标识灯名称显示 - }; - this['private'][deviceType.Section] = { - borderBorderShow: true, // 区段边界显示 - standTrackNameShow: true, // 站台轨名称显示 - reentryTrackNameShow: true, // 折返轨名称显示 - transferTrackNameShow: true // 转换轨名称显示 - }; - this['private'][deviceType.Signal] = { - linkageAutoRouteShow: true, // 联锁自动进路表示灯显示 - atsAutoTriggerShow: true // ATS自动触发表示灯显示 - }; - this['private'][deviceType.Train] = { - nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式 - nameFontSize: 10 // 字体大小 - }; - this['private'][deviceType.TrainWindow] = { - trainWindowShow: true - }; - } - - initPublicProps(model) { - if (model) { - var modelInitial = this.public[model._type]; - if (modelInitial) { - for (var prop in modelInitial) { - model[prop] = modelInitial[prop]; - } - } - } - - return model; - } - - initPrivateProps(model) { - if (model) { - var modelInitial = this.private[model._type]; - if (modelInitial) { - for (var prop in modelInitial) { - model[prop] = modelInitial[prop]; - } - } - } - - return model; - } -} - -export default new Model(); diff --git a/src/jmapNew/utils/JTriangle.js b/src/jmapNew/utils/JTriangle.js index 5b732c31a..082e0e342 100644 --- a/src/jmapNew/utils/JTriangle.js +++ b/src/jmapNew/utils/JTriangle.js @@ -1,67 +1,67 @@ /** 三角函数计算 */ function JTriangle(beg, end) { - this.init(beg, end); + this.init(beg, end); } JTriangle.prototype = { - constructor: JTriangle, - beg: null, - end: null, - abspowx: 0, - abspowy: 0, - abspowz: 0, - drictx: 0, - dricty: 0, - drict: 0, + constructor: JTriangle, + beg: null, + end: null, + abspowx: 0, + abspowy: 0, + abspowz: 0, + drictx: 0, + dricty: 0, + drict: 0, - init (beg, end) { - this.beg = beg; - this.end = end; - this.abspowx = Math.pow(this.end.x - this.beg.x, 2); - this.abspowy = Math.pow(this.end.y - this.beg.y, 2); - this.abspowz = this.abspowx + this.abspowy; - this.absx = Math.abs(this.end.x - this.beg.x); - this.absy = Math.abs(this.end.y - this.beg.y); - this.absz = Math.sqrt(Math.pow(this.end.x - this.beg.x, 2), Math.pow(this.end.y - this.beg.y, 2)); - this.drictx = this.end.x > this.beg.x ? 1 : -1; - this.dricty = this.end.y > this.beg.y ? 1 : -1; - this.drict = this.drictx * this.dricty; - this.diff_x = end.x - beg.x; - this.diff_y = end.y - beg.y; - }, - getRotation () { - return Math.atan(this.diff_y / this.diff_x); - }, - getAngle () { - return 360 * Math.atan(this.diff_y / this.diff_x) / (2 * Math.PI); - }, - getCos (n) { - return this.drictx * Math.sqrt(Math.pow(n, 2) * this.abspowx / this.abspowz); - }, - getSin (n) { - return this.dricty * Math.sqrt(Math.pow(n, 2) * this.abspowy / this.abspowz); - }, - getCosRate () { - return Math.sqrt(this.abspowx / this.abspowz); - }, - getSinRate () { - return Math.sqrt(this.abspowy / this.abspowz); - }, - getTanRate () { - var diff_x = this.end.x - this.beg.x; - var diff_y = this.end.y - this.beg.y; - return Math.abs(diff_y / diff_x); - }, - getCotRate () { - var diff_x = this.end.x - this.beg.x; - var diff_y = this.end.y - this.beg.y; - return Math.abs(diff_x / diff_y); - }, - middlePoint () { - return { - x: Math.min(this.end.x, this.beg.x) + Math.abs(this.end.x - this.beg.x) / 2, - y: Math.min(this.end.y, this.beg.y) + Math.abs(this.end.y - this.beg.y) / 2 - }; - } + init (beg, end) { + this.beg = beg; + this.end = end; + this.abspowx = Math.pow(this.end.x - this.beg.x, 2); + this.abspowy = Math.pow(this.end.y - this.beg.y, 2); + this.abspowz = this.abspowx + this.abspowy; + this.absx = Math.abs(this.end.x - this.beg.x); + this.absy = Math.abs(this.end.y - this.beg.y); + this.absz = Math.sqrt(Math.pow(this.end.x - this.beg.x, 2), Math.pow(this.end.y - this.beg.y, 2)); + this.drictx = this.end.x > this.beg.x ? 1 : -1; + this.dricty = this.end.y > this.beg.y ? 1 : -1; + this.drict = this.drictx * this.dricty; + this.diff_x = end.x - beg.x; + this.diff_y = end.y - beg.y; + }, + getRotation () { + return Math.atan(this.diff_y / this.diff_x); + }, + getAngle () { + return 360 * Math.atan(this.diff_y / this.diff_x) / (2 * Math.PI); + }, + getCos (n) { + return this.drictx * Math.sqrt(Math.pow(n, 2) * this.abspowx / this.abspowz); + }, + getSin (n) { + return this.dricty * Math.sqrt(Math.pow(n, 2) * this.abspowy / this.abspowz); + }, + getCosRate () { + return Math.sqrt(this.abspowx / this.abspowz); + }, + getSinRate () { + return Math.sqrt(this.abspowy / this.abspowz); + }, + getTanRate () { + var diff_x = this.end.x - this.beg.x; + var diff_y = this.end.y - this.beg.y; + return Math.abs(diff_y / diff_x); + }, + getCotRate () { + var diff_x = this.end.x - this.beg.x; + var diff_y = this.end.y - this.beg.y; + return Math.abs(diff_x / diff_y); + }, + middlePoint () { + return { + x: Math.min(this.end.x, this.beg.x) + Math.abs(this.end.x - this.beg.x) / 2, + y: Math.min(this.end.y, this.beg.y) + Math.abs(this.end.y - this.beg.y) / 2 + }; + } }; export default JTriangle; diff --git a/src/jmapNew/utils/Uid.js b/src/jmapNew/utils/Uid.js index 475c0bce7..012960c10 100644 --- a/src/jmapNew/utils/Uid.js +++ b/src/jmapNew/utils/Uid.js @@ -5,7 +5,22 @@ var base = 0; * @param {string} type * @return {string} */ -export function getUID(type) { +export function getUID(type, list) { + if (list && list.length) { + const code = [(type || ''), base++, Math.random().toFixed(5)].join('_'); + let count = 0; + for (let index = 0; index < list.length; index++) { + count++; + if (list[index].code == code) { + this.getUID(type, list); + return; + } + } + if (count == list.length) { + return code; + } + } else { + return [(type || ''), base++, Math.random().toFixed(5)].join('_'); + } // use Math.random to make id as unique as possible. - return [(type || ''), base++, Math.random().toFixed(5)].join('_'); } diff --git a/src/views/newMap/newMapdraft/configMap.vue b/src/views/newMap/newMapdraft/configMap.vue index 3348d9d03..6e05b9c34 100644 --- a/src/views/newMap/newMapdraft/configMap.vue +++ b/src/views/newMap/newMapdraft/configMap.vue @@ -33,7 +33,6 @@ export default { { code: 'Signal', name: this.$t('map.signal') }, { code: 'Switch', name: this.$t('map.switch') } ], - // defaultPhysicalSelect: [], // 默认选中 physicalLevelsSelect: [] // 选中list }; }, @@ -52,7 +51,6 @@ export default { this.PhysicalViewTypeList = list; this.PhysicalViewTypeList.forEach(elem => { this.physicalLevelsSelect.push(elem.code); - // this.defaultPhysicalSelect.push(elem.code); }); }); }, diff --git a/src/views/newMap/newMapdraft/mapoperate/ImageControl.vue b/src/views/newMap/newMapdraft/mapoperate/ImageControl.vue index 2552c1afc..dba2ffe0f 100644 --- a/src/views/newMap/newMapdraft/mapoperate/ImageControl.vue +++ b/src/views/newMap/newMapdraft/mapoperate/ImageControl.vue @@ -30,7 +30,7 @@ - diff --git a/src/views/newMap/newMapdraft/mapoperate/counter.vue b/src/views/newMap/newMapdraft/mapoperate/counter.vue index fe9f4760c..3be1c4e9d 100644 --- a/src/views/newMap/newMapdraft/mapoperate/counter.vue +++ b/src/views/newMap/newMapdraft/mapoperate/counter.vue @@ -51,7 +51,7 @@ - diff --git a/src/views/newMap/newMapdraft/mapoperate/stationstand.vue b/src/views/newMap/newMapdraft/mapoperate/stationstand.vue index 1c22b54ee..e8983f217 100644 --- a/src/views/newMap/newMapdraft/mapoperate/stationstand.vue +++ b/src/views/newMap/newMapdraft/mapoperate/stationstand.vue @@ -59,7 +59,7 @@