From d4f3f42cdf41c626d3e99158a0746793c25cd3d4 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Tue, 3 Mar 2020 21:00:10 +0800 Subject: [PATCH 01/20] =?UTF-8?q?=E6=88=90=E9=83=BD=E4=B8=80=E5=8F=B7?= =?UTF-8?q?=E7=BA=BF=20=E4=BF=A1=E5=8F=B7=E6=9C=BA=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/theme/chengdu_01/menus/index.vue | 6 +-- .../theme/chengdu_01/menus/menuRequest.vue | 20 +++++----- .../theme/chengdu_01/menus/menuSignal.vue | 40 +++++++++---------- 3 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/jmapNew/theme/chengdu_01/menus/index.vue b/src/jmapNew/theme/chengdu_01/menus/index.vue index 7d01c6adf..117cb64f3 100644 --- a/src/jmapNew/theme/chengdu_01/menus/index.vue +++ b/src/jmapNew/theme/chengdu_01/menus/index.vue @@ -5,7 +5,7 @@ - + @@ -22,7 +22,7 @@ \ No newline at end of file diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/routeSelection.vue b/src/jmapNew/theme/beijing_01/menus/dialog/routeSelection.vue index bd16c727b..797e1f213 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/routeSelection.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/routeSelection.vue @@ -218,7 +218,7 @@ export default { val: row.code }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/standBackStrategy.vue b/src/jmapNew/theme/beijing_01/menus/dialog/standBackStrategy.vue index 21d726024..b9e760881 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/standBackStrategy.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/standBackStrategy.vue @@ -139,7 +139,6 @@ export default { clickEvent(row, column, event) { const operate = { operation: OperationEvent.StationStand.setBackStrategy.choose.operation, - val: `${row.value}`, }; this.strategy = row.value; this.isConfirm = true; diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/standControl.vue b/src/jmapNew/theme/beijing_01/menus/dialog/standControl.vue index bca51d54e..c2fe566c7 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/standControl.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/standControl.vue @@ -309,6 +309,7 @@ export default { this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, + // 提前发车 earlyDeparture() { const operate = { diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/standJumpStopControl.vue b/src/jmapNew/theme/beijing_01/menus/dialog/standJumpStopControl.vue index 85421ee27..262ffda89 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/standJumpStopControl.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/standJumpStopControl.vue @@ -270,6 +270,7 @@ export default { this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, + // 取消跳停 cancelJumpStop() { // let val = this.model.val1; @@ -319,7 +320,6 @@ export default { this.model.val2 = val; this.model.val1 = ''; const operate = { - type: MapDeviceType.StationStand.type, operation: operation }; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { @@ -333,7 +333,6 @@ export default { ? OperationEvent.StationStand.setJumpStop.selfStationStand.operation : OperationEvent.StationStand.cancelJumpStop.selfStationStand.operation; this.model.val1 = val; const operate = { - type: MapDeviceType.StationStand.type, operation: operation }; this.model.val2 = ''; @@ -348,9 +347,7 @@ export default { ? OperationEvent.StationStand.setJumpStop.select.operation : OperationEvent.StationStand.cancelJumpStop.select.operation; this.model.val1 = ''; const operate = { - type: MapDeviceType.StationStand.type, - operation: operation, - val: val + operation: operation }; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/standRunLevel.vue b/src/jmapNew/theme/beijing_01/menus/dialog/standRunLevel.vue index 5c84f4dc2..f313760e7 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/standRunLevel.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/standRunLevel.vue @@ -241,10 +241,10 @@ export default { } }, timeSelectChange(time) { - let operate = { + const operate = { operation: OperationEvent.StationStand.setRunLevel.choose.operation, val: time.toString(), - } + }; this.time = time.toString(); this.isSelect = false; @@ -256,7 +256,7 @@ export default { }) }, levelSelectChange(row) { - let operate = { + const operate = { operation: OperationEvent.StationStand.setRunLevel.chooseLevel.operation, val: row.level.toString(), } @@ -268,19 +268,19 @@ export default { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } - }) + }); }, checkChange(check) { - let operate = { + const operate = { operation: OperationEvent.StationStand.setRunLevel.check.operation, - val: check.toString(), - } + val: check.toString() + }; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } - }) + }); }, doClose() { this.loading = false; @@ -318,7 +318,7 @@ export default { } }, cancel() { - let operate = { + const operate = { operation: OperationEvent.Command.cancel.menu.operation, }; diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/standStopTime.vue b/src/jmapNew/theme/beijing_01/menus/dialog/standStopTime.vue index b88a07167..2c8c95504 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/standStopTime.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/standStopTime.vue @@ -219,7 +219,6 @@ export default { cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME, param: { parkingTime: this.control == '01' ? -1 : 1, - // runLevelTime: this.time, parkingAlwaysValid: this.effective == '1' } // messages: [`停站时间: ${this.stationName} - ${this.standName}, 停站时间为${this.control == '01' ? '自动' : this.time + '秒'}, 有效次数为${this.effective == false ? '一次有效' : '一直有效'}`] diff --git a/src/jmapNew/theme/beijing_01/menus/menuSignal.vue b/src/jmapNew/theme/beijing_01/menus/menuSignal.vue index 2228e91ca..5f858097e 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSignal.vue @@ -208,6 +208,7 @@ export default { setStoppage() { const operate = { start: true, + over: true, code: `${this.selected.code}`, operation: OperationEvent.Signal.stoppage.menu.operation, cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT, @@ -232,6 +233,7 @@ export default { cancelStoppage() { const operate = { start: true, + over: true, code: this.selected.code, cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT, operation: OperationEvent.Signal.cancelStoppage.menu.operation, @@ -255,10 +257,7 @@ export default { arrangementRoute() { const operate = { start: true, - // send: true, code: this.selected.code, - // type: MapDeviceType.Signal.type, - // label: MapDeviceType.Signal.label, operation: OperationEvent.Signal.arrangementRoute.menu.operation // param: { // signalCode: `${this.selected.code}` @@ -325,7 +324,7 @@ export default { // label: MapDeviceType.Signal.label, // operation: OperationEvent.Signal.unlock.menu.operation // }; - // this.$store.dispatch('training/next', operate).then(({ valid }) => { + // this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { // if (valid) { // this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); // this.$refs.routeCmdControl.doShow(operate, this.selected); @@ -370,10 +369,7 @@ export default { humanControl() { const operate = { start: true, - // send: true, code: this.selected.code, - // type: MapDeviceType.Signal.type, - // label: MapDeviceType.Signal.label, operation: OperationEvent.Signal.humanControl.menu.operation, param: { signalCode: `${this.selected.code}` @@ -396,16 +392,13 @@ export default { atsAutoControl() { const operate = { start: true, - // send: true, code: this.selected.code, - // type: MapDeviceType.Signal.type, - // label: MapDeviceType.Signal.label, operation: OperationEvent.Signal.atsAutoControl.menu.operation, param: { signalCode: `${this.selected.code}` } }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); const routes = []; diff --git a/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue b/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue index 907d53642..09340016e 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue @@ -55,72 +55,72 @@ export default { menu: [], menuNormal: { Local: [ - { - label: '设置扣车', - handler: this.setDetainTrain, - cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN, - auth: { station: true, center: false } - }, - { - label: '取消扣车', - handler: this.cancelDetainTrain, - cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN, - auth: { station: true, center: true } - }, - { - label: '设置跳停', - handler: this.setJumpStop, - cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP, - auth: { station: true, center: false } - }, - { - label: '取消跳停', - handler: this.cancelJumpStop, - cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP, - auth: { station: true, center: true } - }, - { - type: 'separator' - }, - { - label: '提前发车', - handler: this.earlyDeparture, - cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART, - auth: { station: true, center: true } - }, - { - label: '设置停站时间', - handler: this.setStopTime, - cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME, - auth: { station: true, center: true } - }, - { - type: 'separator' - }, - { - label: '站台详细信息', - handler: this.detail, - cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS, - auth: { station: true, center: true } - }, - { - label: '运行时间控制', - handler: this.setRunLevel, - cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME, - auth: { station: false, center: false } - }, - { - label: '设置提前发车', - handler: this.earlyDeparture, - cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART, - auth: { station: false, center: false } - }, - { - label: '人工折返策略设置', - handler: this.setBackStrategy, - cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY, - auth: { station: false, center: false } - } + // { + // label: '设置扣车', + // handler: this.setDetainTrain, + // cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN, + // auth: { station: true, center: false } + // }, + // { + // label: '取消扣车', + // handler: this.cancelDetainTrain, + // cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN, + // auth: { station: true, center: true } + // }, + // { + // label: '设置跳停', + // handler: this.setJumpStop, + // cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP, + // auth: { station: true, center: false } + // }, + // { + // label: '取消跳停', + // handler: this.cancelJumpStop, + // cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP, + // auth: { station: true, center: true } + // }, + // { + // type: 'separator' + // }, + // { + // label: '提前发车', + // handler: this.earlyDeparture, + // cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART, + // auth: { station: true, center: true } + // }, + // { + // label: '设置停站时间', + // handler: this.setStopTime, + // cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME, + // auth: { station: true, center: true } + // }, + // { + // type: 'separator' + // }, + // { + // label: '站台详细信息', + // handler: this.detail, + // cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS, + // auth: { station: true, center: true } + // }, + // { + // label: '运行时间控制', + // handler: this.setRunLevel, + // cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME, + // auth: { station: false, center: false } + // }, + // { + // label: '设置提前发车', + // handler: this.earlyDeparture, + // cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART, + // auth: { station: false, center: false } + // }, + // { + // label: '人工折返策略设置', + // handler: this.setBackStrategy, + // cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY, + // auth: { station: false, center: false } + // } // { // label: '查询站台状态', // handler: this.detail, @@ -462,7 +462,6 @@ export default { setBackStrategy() { const operate = { start: true, - // send: true, code: this.selected.code, operation: OperationEvent.StationStand.setBackStrategy.menu.operation, param:{ diff --git a/src/scripts/cmdPlugin/MenuContextHandler.js b/src/scripts/cmdPlugin/MenuContextHandler.js index 1c738b885..fc730f27a 100644 --- a/src/scripts/cmdPlugin/MenuContextHandler.js +++ b/src/scripts/cmdPlugin/MenuContextHandler.js @@ -94,8 +94,8 @@ class MenuContextHandler { if (control) { if (this.getPrdType() != '') { const type = State2SimulationMap[this.getPrdType()]; - // const status = State2ControlMap[control.controlMode]; // 判断当前模式 - const status = 'LocalStationControl'; + const status = State2ControlMap[control.controlMode]; // 判断当前模式 + // const status = 'LocalStationControl'; menu = [...menuList[type]]; // 特殊处理站台的右键操作( 因为小站台不允许有操作 ) if (selected._type == 'StationStand') { From 78939de1163c5b514af4bb1f2b98f1a6c8d25229 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Wed, 4 Mar 2020 11:29:57 +0800 Subject: [PATCH 03/20] =?UTF-8?q?=E6=88=90=E9=83=BD=E4=B8=89=E5=8F=B7?= =?UTF-8?q?=E7=BA=BF=20=E8=A1=8C=E8=B0=83=E4=BF=A1=E5=8F=B7=E6=9C=BA?= =?UTF-8?q?=E7=AB=99=E5=8F=B0=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 --- .../menus/dialog/childDialog/confirmControl.vue | 4 ++-- .../chengdu_03/menus/dialog/routeControl.vue | 4 ++-- .../theme/chengdu_03/menus/dialog/routeDetail.vue | 6 +----- .../chengdu_03/menus/dialog/routeHandControl.vue | 8 ++++---- .../chengdu_03/menus/dialog/standControl.vue | 8 +++++--- .../theme/chengdu_03/menus/dialog/standDetail.vue | 15 ++++++++++----- .../theme/chengdu_03/menus/menuStationStand.vue | 8 ++++---- 7 files changed, 28 insertions(+), 25 deletions(-) diff --git a/src/jmapNew/theme/chengdu_03/menus/dialog/childDialog/confirmControl.vue b/src/jmapNew/theme/chengdu_03/menus/dialog/childDialog/confirmControl.vue index c91404c35..21aac5eb3 100644 --- a/src/jmapNew/theme/chengdu_03/menus/dialog/childDialog/confirmControl.vue +++ b/src/jmapNew/theme/chengdu_03/menus/dialog/childDialog/confirmControl.vue @@ -114,10 +114,10 @@ export default { if (valid) { this.doClose(); } - }).catch(() => { + }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, cancel() { diff --git a/src/jmapNew/theme/chengdu_03/menus/dialog/routeControl.vue b/src/jmapNew/theme/chengdu_03/menus/dialog/routeControl.vue index 318f33f01..b334e1592 100644 --- a/src/jmapNew/theme/chengdu_03/menus/dialog/routeControl.vue +++ b/src/jmapNew/theme/chengdu_03/menus/dialog/routeControl.vue @@ -152,9 +152,9 @@ export default { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.doClose(); } - }).catch(() => { + }).catch((error) => { this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, diff --git a/src/jmapNew/theme/chengdu_03/menus/dialog/routeDetail.vue b/src/jmapNew/theme/chengdu_03/menus/dialog/routeDetail.vue index cd756a990..89a553807 100644 --- a/src/jmapNew/theme/chengdu_03/menus/dialog/routeDetail.vue +++ b/src/jmapNew/theme/chengdu_03/menus/dialog/routeDetail.vue @@ -93,11 +93,7 @@ export default { selected: null, tempData: [], stationName: '', - signalName: '', - // controlTypeMap: { - // '01': '自动', - // '02': '人工' - // } + signalName: '' }; }, computed: { diff --git a/src/jmapNew/theme/chengdu_03/menus/dialog/routeHandControl.vue b/src/jmapNew/theme/chengdu_03/menus/dialog/routeHandControl.vue index d52027526..c6f5ecee9 100644 --- a/src/jmapNew/theme/chengdu_03/menus/dialog/routeHandControl.vue +++ b/src/jmapNew/theme/chengdu_03/menus/dialog/routeHandControl.vue @@ -245,10 +245,10 @@ export default { if (valid) { this.doClose(); } - }).catch(() => { + }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 进路交自动控 @@ -269,10 +269,10 @@ export default { if (valid) { this.doClose(); } - }).catch(() => { + }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, cancel() { diff --git a/src/jmapNew/theme/chengdu_03/menus/dialog/standControl.vue b/src/jmapNew/theme/chengdu_03/menus/dialog/standControl.vue index dcd72d42b..cc3d499ca 100644 --- a/src/jmapNew/theme/chengdu_03/menus/dialog/standControl.vue +++ b/src/jmapNew/theme/chengdu_03/menus/dialog/standControl.vue @@ -377,6 +377,7 @@ export default { this.tripNumber = ''; this.standName = ''; this.stationName = ''; + this.operation = operate.operation; if (selected) { this.standName = selected.direction == '01' ? '下行' : '上行'; } @@ -387,13 +388,14 @@ export default { this.stationName = station.name; } } + debugger; if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation || this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) { this.radio = selected.direction; } else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) { - this.radio = Number(tempDate.parkingTime) === -1 ? '01' : '02'; - this.effective = tempDate.parkingValidStatus ? '01' : '02'; + this.effective = '01'; } - this.operation = operate.operation; + this.radio = '01'; + this.disabledTime = true; this.trainList = this.map.trainList; // 加载列车数据 } this.dialogShow = true; diff --git a/src/jmapNew/theme/chengdu_03/menus/dialog/standDetail.vue b/src/jmapNew/theme/chengdu_03/menus/dialog/standDetail.vue index fea8696ba..f33dcd43f 100644 --- a/src/jmapNew/theme/chengdu_03/menus/dialog/standDetail.vue +++ b/src/jmapNew/theme/chengdu_03/menus/dialog/standDetail.vue @@ -91,6 +91,12 @@ export default { '03': '自动换端', '04': '默认' }, + runLevelList: [ + '自动', + '低速', + '常速', + '高速' + ], modelData: { stopTime: '自动', runLevel: '自动', @@ -141,12 +147,11 @@ export default { station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode); } } - this.modelData = { - stopTime: opts.parkingTime != -1 ? opts.parkingTime : '自动', - runLevel: opts.intervalRunTime > 0 ? '常速' : '自动', - detainCar: opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '无扣车', - jumpStop: opts.jumpStopStatus != '01' ? '已设置' : '无跳停' + stopTime: selected.parkingTime ? selected.parkingTime : '自动', + runLevel: this.runLevelList[selected.runLevelTime], + detainCar: selected.stationHoldTrain || selected.centerHoldTrain ? '已设置' : '无扣车', + jumpStop: selected.allSkip || selected.assignSkip ? '已设置' : '无跳停' }; }, doShow(operate, selected, opts) { diff --git a/src/jmapNew/theme/chengdu_03/menus/menuStationStand.vue b/src/jmapNew/theme/chengdu_03/menus/menuStationStand.vue index beb24e2bd..2fb3d6036 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuStationStand.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuStationStand.vue @@ -166,8 +166,8 @@ export default { } else { this.$refs.noticeInfo.doShow(step); } - }).catch(() => { - this.$refs.noticeInfo.doShow(step); + }).catch((error) => { + this.$refs.noticeInfo.doShow(step, [error.message]); }); }, // 取消故障 @@ -188,8 +188,8 @@ export default { } else { this.$refs.noticeInfo.doShow(step); } - }).catch(() => { - this.$refs.noticeInfo.doShow(step); + }).catch((error) => { + this.$refs.noticeInfo.doShow(step, [error.message]); }); }, // 设置扣车 From 467a9cf98219df39afd4e763ae743a7d39bf3a5e Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Wed, 4 Mar 2020 14:14:59 +0800 Subject: [PATCH 04/20] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AE=81=E6=B3=A2?= =?UTF-8?q?=E7=BA=BF=E8=B7=AF=E7=8E=B0=E5=9C=B0=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/Section/index.js | 2 +- src/jmapNew/shape/Switch/index.js | 2 + .../menus/dialog/childDialog/confirmTrain.vue | 168 ---- .../menus/dialog/routeCmdControl.vue | 438 --------- .../menus/dialog/sectionCmdControl.vue | 337 ------- .../ningbo_01/menus/dialog/sectionControl.vue | 72 +- .../ningbo_01/menus/dialog/sectionUnLock.vue | 318 +++++++ .../menus/dialog/speedCmdControl.vue | 897 ------------------ .../menus/dialog/switchCmdControl.vue | 322 ------- .../ningbo_01/menus/dialog/switchUnLock.vue | 317 +++++++ .../ningbo_01/menus/dialog/trainCreate.vue | 154 --- .../theme/ningbo_01/menus/menuSection.vue | 20 +- .../theme/ningbo_01/menus/menuSignal.vue | 3 - .../theme/ningbo_01/menus/menuSwitch.vue | 16 +- src/scripts/cmdPlugin/OperationHandler.js | 16 + src/utils/baseUrl.js | 4 +- 16 files changed, 697 insertions(+), 2389 deletions(-) delete mode 100644 src/jmapNew/theme/ningbo_01/menus/dialog/childDialog/confirmTrain.vue delete mode 100644 src/jmapNew/theme/ningbo_01/menus/dialog/routeCmdControl.vue delete mode 100644 src/jmapNew/theme/ningbo_01/menus/dialog/sectionCmdControl.vue create mode 100644 src/jmapNew/theme/ningbo_01/menus/dialog/sectionUnLock.vue delete mode 100644 src/jmapNew/theme/ningbo_01/menus/dialog/speedCmdControl.vue delete mode 100644 src/jmapNew/theme/ningbo_01/menus/dialog/switchCmdControl.vue create mode 100644 src/jmapNew/theme/ningbo_01/menus/dialog/switchUnLock.vue delete mode 100644 src/jmapNew/theme/ningbo_01/menus/dialog/trainCreate.vue diff --git a/src/jmapNew/shape/Section/index.js b/src/jmapNew/shape/Section/index.js index 8c6142f3c..98762b546 100644 --- a/src/jmapNew/shape/Section/index.js +++ b/src/jmapNew/shape/Section/index.js @@ -794,7 +794,7 @@ export default class Section extends Group { /** 空闲锁闭或者叫进路锁闭 */ model.routeLock && this.routeLock(); /** 轨道封锁 */ - // model.blockade = 1; + model.blockade = 1; model.blockade && this.block(); /** 非CBTC车占用 */ model.nctOccupied && this.unCommunicationOccupied(); diff --git a/src/jmapNew/shape/Switch/index.js b/src/jmapNew/shape/Switch/index.js index bd2c304f9..ab4f3fed0 100644 --- a/src/jmapNew/shape/Switch/index.js +++ b/src/jmapNew/shape/Switch/index.js @@ -419,8 +419,10 @@ export default class Switch extends Group { this.setLossAction(true); } /** 道岔单锁 */ + model.singleLock = 1; model.singleLock && this.setMonolock(); /** 道岔封锁 */ + // model.blockade = 1; model.blockade && this.block(); /** 区段切除*/ model.cutOff && this.setSwitchCutOff(); diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/childDialog/confirmTrain.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/childDialog/confirmTrain.vue deleted file mode 100644 index 3d0b2eba3..000000000 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/childDialog/confirmTrain.vue +++ /dev/null @@ -1,168 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/routeCmdControl.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/routeCmdControl.vue deleted file mode 100644 index 29bf071e8..000000000 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/routeCmdControl.vue +++ /dev/null @@ -1,438 +0,0 @@ - - diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/sectionCmdControl.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/sectionCmdControl.vue deleted file mode 100644 index 3ddac40c9..000000000 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/sectionCmdControl.vue +++ /dev/null @@ -1,337 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/sectionControl.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/sectionControl.vue index 2e1f9aab1..ff22f21c4 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/sectionControl.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/sectionControl.vue @@ -22,7 +22,7 @@ - + 激活 @@ -61,6 +61,7 @@ export default { loading: false, selected: null, operation: '', + isShow: false, stationName: '', sectionName: '', radio: '' @@ -113,11 +114,13 @@ export default { } } this.operation = operate.operation || ''; - + this.isShow = false; if (this.operation == OperationEvent.Section.split.menu.operation) { this.radio = '2'; + this.isShow = true; } else if (this.operation == OperationEvent.Section.active.menu.operation) { this.radio = '1'; + this.isShow = true; } } this.dialogShow = true; @@ -147,10 +150,33 @@ export default { lock() { const operate = { over: true, - operation: OperationEvent.Section.lock.menu.operation, + operation: this.operation, cmdType: CMD.Section.CMD_SECTION_BLOCK }; + this.sendCommand(operate); + }, + // 轨道区段切除 + split() { + const operate = { + over: true, + operation: this.operation, + cmdType: CMD.Section.CMD_SECTION_CUT_OFF + }; + + this.sendCommand(operate); + }, + // 轨道区段激活 + active() { + const operate = { + over: true, + operation: this.operation, + cmdType: CMD.Section.CMD_SECTION_ACTIVE + }; + + this.sendCommand(operate); + }, + sendCommand(operate) { this.loading = true; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; @@ -163,46 +189,6 @@ export default { this.$refs.noticeInfo.doShow(operate, error.message); }); }, - // 轨道区段切除 - split() { - const operate = { - over: true, - operation: OperationEvent.Section.split.menu.operation, - cmdType: CMD.Section.CMD_SECTION_CUT_OFF - }; - - this.loading = true; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - this.loading = false; - if (valid) { - this.doClose(); - } - }).catch(() => { - this.loading = false; - this.doClose(); - this.$refs.noticeInfo.doShow(operate); - }); - }, - // 轨道区段激活 - active() { - const operate = { - over: true, - operation: OperationEvent.Section.active.menu.operation, - cmdType: CMD.Section.CMD_SECTION_ACTIVE - }; - - this.loading = true; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - this.loading = false; - if (valid) { - this.doClose(); - } - }).catch(() => { - this.loading = false; - this.doClose(); - this.$refs.noticeInfo.doShow(operate); - }); - }, cancel() { const operate = { operation: OperationEvent.Command.cancel.menu.operation diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/sectionUnLock.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/sectionUnLock.vue new file mode 100644 index 000000000..dbf186aae --- /dev/null +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/sectionUnLock.vue @@ -0,0 +1,318 @@ + + + + diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/speedCmdControl.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/speedCmdControl.vue deleted file mode 100644 index 0f6ff2147..000000000 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/speedCmdControl.vue +++ /dev/null @@ -1,897 +0,0 @@ - - diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/switchCmdControl.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/switchCmdControl.vue deleted file mode 100644 index e9339584b..000000000 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/switchCmdControl.vue +++ /dev/null @@ -1,322 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/switchUnLock.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/switchUnLock.vue new file mode 100644 index 000000000..6c7378eb1 --- /dev/null +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/switchUnLock.vue @@ -0,0 +1,317 @@ + + + + diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/trainCreate.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/trainCreate.vue deleted file mode 100644 index b5ca7b901..000000000 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/trainCreate.vue +++ /dev/null @@ -1,154 +0,0 @@ - - - diff --git a/src/jmapNew/theme/ningbo_01/menus/menuSection.vue b/src/jmapNew/theme/ningbo_01/menus/menuSection.vue index e22454204..8a2e150b6 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuSection.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuSection.vue @@ -2,10 +2,8 @@
- + - -
@@ -14,10 +12,8 @@ + diff --git a/src/views/newMap/newMapdraft/mapoperate/index.vue b/src/views/newMap/newMapdraft/mapoperate/index.vue index 46f811c85..22d14242e 100644 --- a/src/views/newMap/newMapdraft/mapoperate/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/index.vue @@ -92,6 +92,14 @@ @setCenter="setCenter" /> + + + Date: Thu, 5 Mar 2020 09:53:42 +0800 Subject: [PATCH 10/20] =?UTF-8?q?=E5=8C=97=E4=BA=AC=E4=B8=80=E5=8F=B7?= =?UTF-8?q?=E7=8E=B0=E5=9C=B0=E9=81=93=E5=B2=94=20=E5=8D=95=E9=94=81?= =?UTF-8?q?=E8=A7=A3=E5=B0=81=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 --- .../menus/dialog/switchCmdControl.vue | 10 ++--- .../beijing_01/menus/dialog/switchControl.vue | 34 +-------------- .../theme/beijing_01/menus/menuSwitch.vue | 41 ++++++++----------- 3 files changed, 25 insertions(+), 60 deletions(-) diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/switchCmdControl.vue b/src/jmapNew/theme/beijing_01/menus/dialog/switchCmdControl.vue index 1ba0d403e..f5164c4c0 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/switchCmdControl.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/switchCmdControl.vue @@ -298,7 +298,7 @@ this.setMessage('请点击“确认1”按钮,确认命令!'); this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' }); - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.setButtonEnable({ step: 1 }); @@ -331,7 +331,7 @@ this.setMessage('请点击“确认2”按钮,确认命令!'); this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' }); - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.timeCountCommand = -1; @@ -367,7 +367,7 @@ this.setMessage(''); this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' }); - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.timeCountCommand = -1; this.timeCountConfirm = -1; this.setButtonEnable({ step: -1 }); @@ -404,7 +404,7 @@ } this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' }); - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.setButtonEnable({ step: 0 }); @@ -422,7 +422,7 @@ operation: OperationEvent.Command.close.menu.operation, } - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.doClose(); } diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/switchControl.vue b/src/jmapNew/theme/beijing_01/menus/dialog/switchControl.vue index 64abdf8e0..8304e61b0 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/switchControl.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/switchControl.vue @@ -66,12 +66,8 @@ export default { return this.dialogShow ? getDomIdByOperation(this.operation) : ''; }, title() { - if (this.operation == OperationEvent.Switch.lock.menu.operation) { - return '道岔单锁'; - } else if (this.operation == OperationEvent.Switch.block.menu.operation) { + if (this.operation == OperationEvent.Switch.block.menu.operation) { return '道岔封锁'; - } else if (this.operation == OperationEvent.Switch.turnout.menu.operation) { - return '道岔转动'; } else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) { return '道岔强扳'; } else if (this.operation == OperationEvent.Switch.split.menu.operation) { @@ -115,15 +111,9 @@ export default { mouseCancelState(this.selected); }, commit() { - if (this.operation == OperationEvent.Switch.lock.menu.operation) { - /** 道岔单锁*/ - this.lock(); - } else if (this.operation == OperationEvent.Switch.block.menu.operation) { + if (this.operation == OperationEvent.Switch.block.menu.operation) { /** 道岔封锁*/ this.block(); - } else if (this.operation == OperationEvent.Switch.turnout.menu.operation) { - /** 道岔转动*/ - this.turnout(this.operation); } else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) { /** 道岔强扳*/ this.turnoutForce(); @@ -135,16 +125,6 @@ export default { this.active(); } }, - // 道岔单锁 - lock() { - const operate = { - over: true, - operation: OperationEvent.Switch.lock.menu.operation, - cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK - }; - - this.sendCommand(operate); - }, // 道岔封锁 block() { const operate = { @@ -155,16 +135,6 @@ export default { this.sendCommand(operate); }, - // 道岔转动 - turnout(operation) { - const operate = { - over: true, - operation: OperationEvent.Switch.turnout.menu.operation, - cmdType: CMD.Switch.CMD_SWITCH_TURN - }; - - this.sendCommand(operate); - }, // 道岔强扮 turnoutForce() { const operate = { diff --git a/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue b/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue index 5e05239e0..16de7f6a4 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue @@ -52,18 +52,6 @@ export default { menu: [], menuNormal: { Local: [ - // { - // label: '轨道切除', - // handler: this.split, - // cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF, - // auth: { station: true, center: true } - // }, - // { - // label: '轨道激活', - // handler: this.active, - // cmdType: CMD.Switch.CMD_SWITCH_ACTIVE, - // auth: { station: true, center: true } - // } ], Center: [ { @@ -189,11 +177,18 @@ export default { break; } case OperationEvent.Switch.lock.button.operation: { + debugger; // 道岔单锁 + if (!selectType.singleLock) { + this.lock(selectType); + } break; } case OperationEvent.Switch.unlock.button.operation: { // 道岔解锁 + if (selectType.singleLock) { + this.unlock(selectType); + } break; } } @@ -245,36 +240,38 @@ export default { }); }, // 道岔单锁 - lock() { + lock(selectType) { const operate = { start: true, - code: this.selected.code, + over: true, operation: OperationEvent.Switch.lock.menu.operation, param: { - switchCode: `${this.selected.code}` - } + switchCode: selectType.code + }, + cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK }; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.switchControl.doShow(operate, this.selected); } }); }, // 道岔解封 - unlock() { + unlock(selectType) { const operate = { start: true, + over: true, code: this.selected.code, operation: OperationEvent.Switch.unlock.menu.operation, param: { - switchCode: `${this.selected.code}` - } + switchCode: selectType.code + }, + cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK }; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.switchCmdControl.doShow(operate, this.selected); + // this.$refs.switchCmdControl.doShow(operate, this.selected); } }); }, @@ -343,7 +340,6 @@ export default { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - // this.$refs.switchControl.doShow(operate, this.selected); } }); }, @@ -362,7 +358,6 @@ export default { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - // this.$refs.switchControl.doShow(operate, this.selected); } }); }, From 8e7fc5104aa78ba70221143aa2b89cbb26136c26 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Thu, 5 Mar 2020 12:21:28 +0800 Subject: [PATCH 11/20] =?UTF-8?q?=E8=B0=83=E6=95=B4lc=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=EF=BC=8C=E8=87=AA=E5=8A=A8=E6=8A=98=E8=BF=94?= =?UTF-8?q?=E7=BB=98=E5=9B=BE=E7=8A=B6=E6=80=81=E9=85=8D=E7=BD=AE=EF=BC=8C?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/ningbo_01.js | 8 ++++ src/jmapNew/constant/stateTransition.js | 3 ++ src/jmapNew/shape/Automactic/index.js | 46 +++++++++++++++++-- src/jmapNew/utils/parser.js | 2 +- .../mapoperate/automaticControl.vue | 18 +++++--- .../newMap/newMapdraft/mapoperate/index.vue | 4 +- 6 files changed, 66 insertions(+), 15 deletions(-) diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index a386009a2..d149841c1 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -211,7 +211,15 @@ class SkinCode extends defaultStyle { fontWeight: 'normal', // 字体粗细 distance: 5 // 灯跟文字距离 }, + subtitleText: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 17 // 等于副标题距离 + }, lamp: { + lineDash: null, // 灯的包围框 + stroke: '#FFFFFF', // 框的颜色 + fill: 'rgba(0,0,0,0)', // 填充色 radiusR: 6, // 控制灯大小 controlColor: '#b5b3b3' // 控制灯颜色 (灰色) } diff --git a/src/jmapNew/constant/stateTransition.js b/src/jmapNew/constant/stateTransition.js index b3f456574..1bff1aac5 100644 --- a/src/jmapNew/constant/stateTransition.js +++ b/src/jmapNew/constant/stateTransition.js @@ -97,6 +97,9 @@ class Status { handleZcControl(device) { this.statusObj = { }; } + handleLcControl(device) { + this.statusObj = { }; + } handleTrainWindow(device) { this.statusObj = { }; } diff --git a/src/jmapNew/shape/Automactic/index.js b/src/jmapNew/shape/Automactic/index.js index 869431a5a..3e747688d 100644 --- a/src/jmapNew/shape/Automactic/index.js +++ b/src/jmapNew/shape/Automactic/index.js @@ -2,7 +2,10 @@ * 自动折返 控制器 */ import Group from 'zrender/src/container/Group'; -import EControl from '../element/EControl'; +import Arc from 'zrender/src/graphic/shape/Arc'; +import Text from 'zrender/src/graphic/Text'; +import { createBoundingRect } from '../../utils/parser'; +import Rect from 'zrender/src/graphic/shape/Rect'; import EMouse from './EMouse'; export default class LcControl extends Group { @@ -53,6 +56,27 @@ export default class LcControl extends Group { textVerticalAlign: 'top' } }); + + if (this.model.subtitleName) { + this.subtitleText = new Text({ + _subType: 'Text', + zlevel: this.zlevel, + z: this.z, + position: [0, 0], + style: { + x: model.position.x, + y: model.position.y + this.style.Automactic.lamp.radiusR + this.style.Automactic.subtitleText.distance, + fontWeight: this.style.Automactic.subtitleText.fontWeight, + fontSize: this.style.Automactic.subtitleText.fontSize, + fontFamily: this.style.fontFamily, + text: model.subtitleName, + textFill: '#fff', + textAlign: 'middle', + textVerticalAlign: 'top' + } + }); + this.add(this.subtitleText); + } const arcRect = this.getArcBoundingRect(); this.arcBorder = new Rect({ zlevel: this.zlevel, @@ -60,14 +84,14 @@ export default class LcControl extends Group { silent: true, shape: arcRect, style: { - lineDash: this.style.arcBorderStyle.lineDash, - stroke: this.style.arcBorderStyle.stroke, - fill: this.style.arcBorderStyle.fill + lineDash: this.style.Automactic.lamp.lineDash, + stroke: this.style.Automactic.lamp.stroke, + fill: this.style.Automactic.lamp.fill } }); this.add(this.control); this.add(this.text); - this.add(this.textBorder); + this.add(this.arcBorder); } // 设置状态 @@ -83,6 +107,18 @@ export default class LcControl extends Group { } } + getArcBoundingRect() { + const rect = this.control.getBoundingRect().clone(); + const scale = this.control.scale[0]; + const offsetX = this.control.position[0]; + const offsetY = this.control.position[1]; + rect.x = rect.x * scale + offsetX - 2; + rect.y = rect.y * scale + offsetY - 2; + rect.width = rect.width * scale + 4; + rect.height = rect.height * scale + 4; + return rect; + } + getShapeTipPoint() { if (this.control) { var distance = 2; diff --git a/src/jmapNew/utils/parser.js b/src/jmapNew/utils/parser.js index ca3cace52..b54e7cdce 100644 --- a/src/jmapNew/utils/parser.js +++ b/src/jmapNew/utils/parser.js @@ -200,7 +200,7 @@ export function updateMapData(state, model) { case deviceType.StationCounter: updateForList(model, state, 'stationCounterList'); break; case deviceType.ZcControl: updateForList(model, state, 'zcList'); break; case deviceType.StationDelayUnlock:updateForList(model, state, 'stationDelayUnlockList'); break; - case deviceType.LcControl: updateForList(model, state, 'lcControlList'); break; + case deviceType.LcControl: updateForList(model, state, 'lcList'); break; case deviceType.LimitControl: updateForList(model, state, 'tempSpeedLimitList'); break; case deviceType.Resource: updateForList(model, state, 'resourceList'); break; case deviceType.Train: updateForList(model, state, 'trainList'); break; diff --git a/src/views/newMap/newMapdraft/mapoperate/automaticControl.vue b/src/views/newMap/newMapdraft/mapoperate/automaticControl.vue index 1a1de81c4..ec07c28e6 100644 --- a/src/views/newMap/newMapdraft/mapoperate/automaticControl.vue +++ b/src/views/newMap/newMapdraft/mapoperate/automaticControl.vue @@ -57,6 +57,7 @@ export default { editModel: { code: '', name: '', + subtitleName: '', //副标题 automaticCode: '', // 关联自动折返code position: { x: 0, @@ -66,6 +67,7 @@ export default { addModel: { code: '', name: '', + subtitleName: '', // 副标题 automaticCode: '', // 关联自动折返code position: { x: 0, @@ -106,9 +108,10 @@ export default { draw: { name: this.$t('map.drawData'), item: [ - { prop: 'code', label: `${this.$t('map.zcZoneControl')}${this.$t('map.code')}`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.automaticList, change: true, deviceChange: this.deviceChange }, - { prop: 'name', label: this.$t('map.statusSignalName'), type: 'input' }, - { prop: 'position', label: this.$t('map.stateSignalsPlotCoordinates'), type: 'coordinate', width: '140px', children: [ + { prop: 'code', label: `${this.$t('map.code')}`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.automaticList, change: true, deviceChange: this.deviceChange }, + { prop: 'name', label: '标题名称:', type: 'input' }, + { prop: 'subtitleName', label: '副标题名称:', type: 'input' }, + { prop: 'position', label: '坐标:', type: 'coordinate', width: '140px', children: [ { prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' }, { prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' } ] }, @@ -125,9 +128,10 @@ export default { items: [ { prop:'automaticCode', label: '自动折返进路:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.autoList }, { prop: 'name', label: '自动折返名称:', type: 'input' }, - { prop: 'position', label: this.$t('map.stateSignalsPlotCoordinates'), type: 'coordinate', width: '140px', children: [ - { prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' }, - { prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' } + { prop: 'subtitleName', label: '副标题名称:', type: 'input' }, + { prop: 'position', label: '坐标:', type: 'coordinate', width: '140px', children: [ + { prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, + { prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } ] }, ] @@ -182,7 +186,6 @@ export default { }; const resp = await getAutoReentryList(this.$route.params.mapId, params); this.autoList = resp.data.list; - console.log(this.autoList) }, // 创建对象 create() { @@ -194,6 +197,7 @@ export default { _type: 'Automactic', code: uid, name: this.addModel.name, + subtitleName: this.addModel.subtitleName, position: { x: this.addModel.position.x, y: this.addModel.position.y diff --git a/src/views/newMap/newMapdraft/mapoperate/index.vue b/src/views/newMap/newMapdraft/mapoperate/index.vue index 22d14242e..c2b3ef8de 100644 --- a/src/views/newMap/newMapdraft/mapoperate/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/index.vue @@ -92,9 +92,9 @@ @setCenter="setCenter" /> - + Date: Thu, 5 Mar 2020 13:40:50 +0800 Subject: [PATCH 12/20] =?UTF-8?q?=E6=88=90=E9=83=BD=E4=B8=80=E5=8F=B7?= =?UTF-8?q?=E7=BA=BF=20=E4=BF=A1=E5=8F=B7=E6=9C=BA=20=E4=BF=A1=E5=8F=B7?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E9=80=9A=E8=BF=87=20=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=B0=83=E6=95=B4=20=E8=87=AA=E5=8A=A8=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=EF=BC=8C=E8=87=AA=E5=8A=A8=E8=A7=A6=E5=8F=91?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=20=E7=8A=B6=E6=80=81=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/chengdu_01/menus/menuSignal.vue | 76 ++++++------------- src/scripts/translate.js | 4 +- .../dataRelation/routeoperate/route.vue | 12 +-- .../dataRelation/routeoperate/route.vue | 12 +-- 4 files changed, 36 insertions(+), 68 deletions(-) diff --git a/src/jmapNew/theme/chengdu_01/menus/menuSignal.vue b/src/jmapNew/theme/chengdu_01/menus/menuSignal.vue index 86783b790..d59afe815 100644 --- a/src/jmapNew/theme/chengdu_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/chengdu_01/menus/menuSignal.vue @@ -113,13 +113,13 @@ export default { }, { label: '开放自动进路', - handler: this.atsAutoControl, - cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING + handler: this.singalPassModel, + cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO }, { label: '关闭自动进路', - handler: this.humanControl, - cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING + handler: this.singalCancelPassModel, + cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO }, { label: '终端信号封锁', @@ -404,69 +404,37 @@ export default { } }); }, - // 进路交人工控 - humanControl() { - const routes = []; - this.routeList.forEach(elem => { - if (elem.startSignalCode === this.selected.code) { - // routes.push(elem); - if (elem.atsControl == '1') { - routes.push(elem.code); - } - } - }); - if (routes.length <= 0) { - this.$refs.noticeInfo.doShow({}, ['所选的进路没有一个是人工的']); - return false; - } - const step = { + // 设置通过模式 + singalPassModel() { + const operate = { start: true, - over:true, - code: `${this.selected.code}`, - operation: OperationEvent.Signal.humanControl.menu.operation, + code: this.selected.code, + operation: OperationEvent.Signal.setAutoInterlock.menu.operation, param: { - signalCode: `${this.selected.code}`, - routeCodeList:routes - }, - // cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING + signalCode: `${this.selected.code}` + } }; - this.$store.dispatch('training/nextNew', step).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: '关闭自动进路',cmdType:CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING}); + this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.setAutoInterlock.menu.operation, name: '开放自动进路', cmdType:CMD.Signal.CMD_SIGNAL_SET_CI_AUTO}}); } }); }, - // 进路交自动控 - atsAutoControl() { - const routes = []; - this.routeList.forEach(elem => { - if (elem.startSignalCode === this.selected.code) { - // routes.push(elem); - if (elem.atsControl == '0') { - routes.push(elem.code); - } - } - }); - if (routes.length <= 0) { - this.$refs.noticeInfo.doShow({}, ['所选的进路没有一个是自动的']); - return false; - } - const step = { + // 取消通过模式 + singalCancelPassModel() { + const operate = { start: true, - // over:true, - code: `${this.selected.code}`, - operation: OperationEvent.Signal.atsAutoControl.menu.operation, + code: this.selected.code, + operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation, param: { - signalCode: `${this.selected.code}`, - routeCodeList:routes - }, - // cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING + signalCode: `${this.selected.code}` + } }; - this.$store.dispatch('training/nextNew', step).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.atsAutoControl.menu.operation, name: '开放自动进路',cmdType:CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING}}); + this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.cancelAutoInterlock.menu.operation, name: '关闭自动进路', cmdType:CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO}}); } }); }, diff --git a/src/scripts/translate.js b/src/scripts/translate.js index c9ff3976f..8019f2ce7 100644 --- a/src/scripts/translate.js +++ b/src/scripts/translate.js @@ -101,8 +101,8 @@ export const translate = { { key: 'overlapSwitchCode', tHeader: '延续保护道岔ID', formatter: (val) => { return val || ''; } }, { key: 'overlapSwitchLocateType', tHeader: '延续保护道岔位置类型', formatter: (val) => { return val || ''; } }, { key: 'turnBackSectionCode', tHeader: '折返轨ID', formatter: (val) => { return val || ''; } }, - { key: 'arc', tHeader: '是否自动追踪/联锁自动触发', formatter: (val) => { return val || false; } }, - { key: 'flt', tHeader: '是否车队/联锁自动进路', formatter: (val) => { return val || false; } }, + { key: 'ciControl', tHeader: '是否自动追踪/联锁自动触发', formatter: (val) => { return val || false; } }, + { key: 'setFleetMode', tHeader: '是否车队/联锁自动进路', formatter: (val) => { return val || false; } }, { key: 'delayReleaseTime', tHeader: '延时解锁时间', formatter: (val) => { return val || 0; } } ] }, diff --git a/src/views/mapdraft/dataRelation/routeoperate/route.vue b/src/views/mapdraft/dataRelation/routeoperate/route.vue index 5e581e6e8..1ef7cc5bc 100644 --- a/src/views/mapdraft/dataRelation/routeoperate/route.vue +++ b/src/views/mapdraft/dataRelation/routeoperate/route.vue @@ -10,14 +10,14 @@ - - + + {{ $t('map.are') }} {{ $t('map.deny') }} - - + + {{ $t('map.are') }} {{ $t('map.deny') }} @@ -313,8 +313,8 @@ export default { code: '', name: '', // 名字 stationCode: '', // 所属站台 - arc: false, // 是否自动追踪/联锁自动触发 - flt: false, // 是否车队/联锁自动进路 + ciControl: false, // 是否自动追踪/联锁自动触发 + setFleetMode: false, // 是否车队/联锁自动进路 delayReleaseTime: '', // 延时解锁时间 turnBack: false, // 是否折返进路 startSignalCode: '', // 始端信号机 diff --git a/src/views/newMap/newMapdraft/dataRelation/routeoperate/route.vue b/src/views/newMap/newMapdraft/dataRelation/routeoperate/route.vue index d4b028bf4..a497dd334 100644 --- a/src/views/newMap/newMapdraft/dataRelation/routeoperate/route.vue +++ b/src/views/newMap/newMapdraft/dataRelation/routeoperate/route.vue @@ -10,14 +10,14 @@ - - + + {{ $t('map.are') }} {{ $t('map.deny') }} - - + + {{ $t('map.are') }} {{ $t('map.deny') }} @@ -250,8 +250,8 @@ export default { code: '', name: '', // 名字 stationCode: '', // 所属站台 - arc: false, // 是否自动追踪/联锁自动触发 - flt: false, // 是否车队/联锁自动进路 + ciControl: false, // 是否自动追踪/联锁自动触发 + setFleetMode: false, // 是否车队/联锁自动进路 lockFirst:false, // 是否先锁闭——办理过程直接先锁闭区段 delayReleaseTime: '', // 延时解锁时间 turnBack: false, // 是否折返进路 From 3510548b7ba9d23f96f214c513abe5f88fa0e3b2 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Thu, 5 Mar 2020 14:33:08 +0800 Subject: [PATCH 13/20] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=9B=86=E4=B8=AD?= =?UTF-8?q?=E7=AB=99=E6=8C=87=E7=A4=BA=E7=81=AF=E7=8A=B6=E6=80=81=EF=BC=8C?= =?UTF-8?q?=E7=BB=98=E5=9B=BE=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/ningbo_01.js | 8 +- src/jmapNew/shape/Automactic/index.js | 1 - src/jmapNew/shape/Station/ESingleControl.js | 14 +++- src/jmapNew/shape/Station/index.js | 15 +++- src/jmapNew/shape/StationControl/index.js | 78 +++++++++++-------- .../ningbo_01/menus/dialog/stationControl.vue | 5 +- .../ningbo_01/menus/menuStationControl.vue | 2 - 7 files changed, 79 insertions(+), 44 deletions(-) diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index d149841c1..2cdf784ab 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -321,7 +321,7 @@ class SkinCode extends defaultStyle { }, StationControl: { text: { - distance: 2, // 灯和文字之间的距离 + distance: 12, // 灯和文字之间的距离 fontSize: 12, // 字体大小 fontFormat: 'consolas', // 字体格式 fontColor: '#ffffff', // 字体颜色 @@ -339,7 +339,7 @@ class SkinCode extends defaultStyle { lamp: { count: 4, // 控制模式的个数 offset: { x: 20, y: 0 }, // 偏移量 - radiusR: 4, // 控制模式灯的半径 + radiusR: 5, // 控制模式灯的半径 distance: 46, // 控制模式之间灯之间的距离 grayColor: '#C0C0C0', // 控制模式灰色 greenColor: 'green', // 控制模式绿色 @@ -349,7 +349,9 @@ class SkinCode extends defaultStyle { centerControlShow: true, // 中控显示 substationControlShow: true, // 站控按钮显示 interconnectedControlShow: false, // 联锁控显示 - centerControlButtonShow: true // 中控显示 + centerControlButtonShow: true, // 中控显示 + stroke: '#FFFFFF', // 框的颜色 + fill: 'rgba(0,0,0,0)', // 填充色 }, arrow: { show: false // 控制模式箭头显隐 diff --git a/src/jmapNew/shape/Automactic/index.js b/src/jmapNew/shape/Automactic/index.js index 3e747688d..03a10015e 100644 --- a/src/jmapNew/shape/Automactic/index.js +++ b/src/jmapNew/shape/Automactic/index.js @@ -4,7 +4,6 @@ import Group from 'zrender/src/container/Group'; import Arc from 'zrender/src/graphic/shape/Arc'; import Text from 'zrender/src/graphic/Text'; -import { createBoundingRect } from '../../utils/parser'; import Rect from 'zrender/src/graphic/shape/Rect'; import EMouse from './EMouse'; diff --git a/src/jmapNew/shape/Station/ESingleControl.js b/src/jmapNew/shape/Station/ESingleControl.js index 2f1f8e2c0..1206cb4a3 100644 --- a/src/jmapNew/shape/Station/ESingleControl.js +++ b/src/jmapNew/shape/Station/ESingleControl.js @@ -36,7 +36,7 @@ export default class ESingleControl extends Group { r: model.style.Station.StationControl.lamp.radiusR }, style: { - lineWidth: 0.5, + lineWidth: 0, fill: model.style.Station.StationControl.lamp.grayColor, stroke: model.style.Station.StationControl.lamp.grayColor } @@ -70,4 +70,16 @@ export default class ESingleControl extends Group { this.control.setStyle('fill', color); } } + + getArcBoundingRect() { + const rect = this.control.getBoundingRect().clone(); + const scale = this.control.scale[0]; + const offsetX = this.control.position[0]; + const offsetY = this.control.position[1]; + rect.x = rect.x * scale + offsetX - 2; + rect.y = rect.y * scale + offsetY - 2; + rect.width = rect.width * scale + 4; + rect.height = rect.height * scale + 4; + return rect; + } } diff --git a/src/jmapNew/shape/Station/index.js b/src/jmapNew/shape/Station/index.js index da5e0862f..ddb210d21 100644 --- a/src/jmapNew/shape/Station/index.js +++ b/src/jmapNew/shape/Station/index.js @@ -8,6 +8,7 @@ import EMouse from './EMouse'; import ESingleControl from './ESingleControl'; import EArrow from './EArrow'; import { arrow } from '../utils/ShapePoints'; +import Rect from 'zrender/src/graphic/shape/Rect'; import BoundingRect from 'zrender/src/core/BoundingRect'; export default class Station extends Group { @@ -208,7 +209,6 @@ export default class Station extends Group { x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.lamp.offset.x, y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y }, - // context: model.lskContent || '联锁控', context: this.style.Station.StationControl.text.interconnectedControlText || '联锁控', pop: false }); @@ -247,6 +247,19 @@ export default class Station extends Group { pop: false }); this.add(this.centerControlButton); + const arcRect = this.centerControlButton.getArcBoundingRect(); + this.arcBorder = new Rect({ + zlevel: this.zlevel, + z: this.z, + silent: true, + shape: arcRect, + style: { + lineDash: null, + stroke: this.style.Station.StationControl.lamp.stroke, + fill: this.style.Station.StationControl.lamp.fill + } + }); + this.add(this.arcBorder); } } diff --git a/src/jmapNew/shape/StationControl/index.js b/src/jmapNew/shape/StationControl/index.js index b3c32b3fd..087037322 100644 --- a/src/jmapNew/shape/StationControl/index.js +++ b/src/jmapNew/shape/StationControl/index.js @@ -26,75 +26,75 @@ export default class StationControl extends Group { create() { const model = this.model; // 紧急站控 - if (this.style.StationControl.lamp.emergencyControlShow) { + if (this.style.Station.StationControl.lamp.emergencyControlShow) { this.emergencyControl = new ESingleControl({ _subType: 'emergency', style: this.style, zlevel: this.zlevel, z: this.z, point: { - x: model.position.x - this.style.StationControl.lamp.distance * 3 / 2 + this.style.StationControl.lamp.offset.x, - y: model.position.y + this.style.StationControl.lamp.offset.y + x: model.position.x - this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.lamp.offset.x, + y: model.position.y + this.style.Station.StationControl.lamp.offset.y }, - context: this.style.StationControl.text.emergencyControlText, + context: this.style.Station.StationControl.text.emergencyControlText, // model.jjzkContent, pop: false }); this.add(this.emergencyControl); } // 中控按钮 - if (this.style.StationControl.lamp.centerControlShow) { + if (this.style.Station.StationControl.lamp.centerControlShow) { this.centerControl = new ESingleControl({ _subType: 'center', style: this.style, zlevel: this.zlevel, z: this.z, point: { - x: model.position.x - this.style.StationControl.lamp.distance / 2 + this.style.StationControl.lamp.offset.x, - y: model.position.y + this.style.StationControl.lamp.offset.y + x: model.position.x - this.style.Station.StationControl.lamp.distance / 2 + this.style.Station.StationControl.lamp.offset.x, + y: model.position.y + this.style.Station.StationControl.lamp.offset.y }, - context: this.style.StationControl.text.centerControlText, + context: this.style.Station.StationControl.text.centerControlText, // model.zokContent, pop: false }); this.add(this.centerControl); } // 站控按钮 - if (this.style.StationControl.lamp.substationControlShow) { + if (this.style.Station.StationControl.lamp.substationControlShow) { this.substationControl = new ESingleControl({ _subType: 'substation', style: this.style, zlevel: this.zlevel, z: this.z, point: { - x: model.position.x + this.style.StationControl.lamp.distance / 2 + this.style.StationControl.lamp.offset.x, - y: model.position.y + this.style.StationControl.lamp.offset.y + x: model.position.x + this.style.Station.StationControl.lamp.distance / 2 + this.style.Station.StationControl.lamp.offset.x, + y: model.position.y + this.style.Station.StationControl.lamp.offset.y }, - context: this.style.StationControl.text.substationControlText, + context: this.style.Station.StationControl.text.substationControlText, // model.zakContent pop: false }); this.add(this.substationControl); } // 联锁控 - if (this.style.StationControl.lamp.interconnectedControlShow) { + if (this.style.Station.StationControl.lamp.interconnectedControlShow) { this.interconnectedControl = new ESingleControl({ _subType: 'interconnected', style: this.style, zlevel: this.zlevel, z: this.z, point: { - x: model.position.x + this.style.StationControl.lamp.distance * 3 / 2 + this.style.StationControl.lamp.offset.x, - y: model.position.y + this.style.StationControl.lamp.offset.y + x: model.position.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.lamp.offset.x, + y: model.position.y + this.style.Station.StationControl.lamp.offset.y }, - context: this.style.StationControl.text.interconnectedControlText || '联锁控', + context: this.style.Station.StationControl.text.interconnectedControlText || '联锁控', pop: false }); this.add(this.interconnectedControl); } // 箭头 - if (this.style.StationControl.arrow.show) { - const point = arrow(this.model.position.x, this.model.position.y + this.style.StationControl.lamp.radiusR / 2, this.style.StationControl.lamp.distance / 6, this.style.StationControl.lamp.radiusR * 0.8); + if (this.style.Station.StationControl.arrow.show) { + const point = arrow(this.model.position.x, this.model.position.y + this.style.Station.StationControl.lamp.radiusR / 2, this.style.Station.StationControl.lamp.distance / 6, this.style.Station.StationControl.lamp.radiusR * 0.8); this.arrowsControl = new EArrow({ zlevel: this.zlevel, z: this.z, @@ -102,9 +102,9 @@ export default class StationControl extends Group { count: this.count, drict: 1, point: point, - x: model.position.x + this.style.StationControl.lamp.offset.x, - y: model.position.y + this.style.StationControl.lamp.radiusR / 2 + this.style.StationControl.lamp.offset.y, - fill: this.style.StationControl.lamp.grayColor, + x: model.position.x + this.style.Station.StationControl.lamp.offset.x, + y: model.position.y + this.style.Station.StationControl.lamp.radiusR / 2 + this.style.Station.StationControl.lamp.offset.y, + fill: this.style.Station.StationControl.lamp.grayColor, lineWidth: 1, stroke: this.style.sidelineColor }); @@ -116,28 +116,40 @@ export default class StationControl extends Group { setState(model) { // switch (model.status) { // case '00': // 无状态 - // this.emergencyControl && this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor); - // this.substationControl && this.substationControl.setColor(this.style.StationControl.lamp.grayColor); - // this.centerControl && this.centerControl.setColor(this.style.StationControl.lamp.grayColor); + // this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor); + // this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor); + // this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); // break; // case '01': // 中控 - // this.emergencyControl && this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor); - // this.substationControl && this.substationControl.setColor(this.style.StationControl.lamp.grayColor); - // this.centerControl && this.centerControl.setColor(this.style.StationControl.lamp.greenColor); + // this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor); + // this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor); + // this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.greenColor); // break; // case '02': // 站控 - // this.emergencyControl && this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor); - // this.substationControl && this.substationControl.setColor(this.style.StationControl.lamp.yellowColor); - // this.centerControl && this.centerControl.setColor(this.style.StationControl.lamp.grayColor); + // this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor); + // this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.yellowColor); + // this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); // break; // case '03': // 紧急站控 - // this.emergencyControl && this.emergencyControl.setColor(this.style.StationControl.lamp.redColor); - // this.substationControl && this.substationControl.setColor(this.style.StationControl.lamp.grayColor); - // this.centerControl && this.centerControl.setColor(this.style.StationControl.lamp.grayColor); + // this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.redColor); + // this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor); + // this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); // break; // } } + getArcBoundingRect(view) { + const rect = view.getBoundingRect().clone(); + const scale = view.scale[0]; + const offsetX = view.position[0]; + const offsetY = view.position[1]; + rect.x = rect.x * scale + offsetX - 2; + rect.y = rect.y * scale + offsetY - 2; + rect.width = rect.width * scale + 4; + rect.height = rect.height * scale + 4; + return rect; + } + /** 按钮是否按下*/ isPop(e) { for (var i = 0; i < this.childCount(); i++) { diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/stationControl.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/stationControl.vue index 3b466a561..b4ce94a54 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/stationControl.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/stationControl.vue @@ -221,7 +221,6 @@ export default { operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL; operate.operation = OperationEvent.StationControl.requestStationControl.menu.operation; } - console.log(operate); this.loading = true; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { @@ -229,10 +228,10 @@ export default { if (valid) { this.doClose(); } - }).catch(() => { + }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, error.message); }); } }, diff --git a/src/jmapNew/theme/ningbo_01/menus/menuStationControl.vue b/src/jmapNew/theme/ningbo_01/menus/menuStationControl.vue index 14d9f99c2..e139e138f 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuStationControl.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuStationControl.vue @@ -116,7 +116,6 @@ export default { start: true, code: this.selected.code, operation: OperationEvent.StationControl.requestCentralControl.menu.operation, - // cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL, param: { stationControlCode: this.selected.code } @@ -133,7 +132,6 @@ export default { start: true, code: this.selected.code, operation: OperationEvent.StationControl.requestStationControl.menu.operation, - // cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL, param: { stationControlCode: this.selected.code } From 30c672026f0241bdf85fde42831cfb8a115b634e Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Thu, 5 Mar 2020 15:48:51 +0800 Subject: [PATCH 14/20] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=9F=A9=E5=BD=A2?= =?UTF-8?q?=E5=8C=85=E5=9B=B4=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/ningbo_01.js | 5 +- src/jmapNew/constant/deviceRender.js | 9 +- src/jmapNew/constant/deviceType.js | 3 +- src/jmapNew/constant/stateTransition.js | 5 +- src/jmapNew/shape/Automactic/index.js | 24 +- src/jmapNew/shape/OutFrame/index.js | 41 +++ src/jmapNew/shape/factory.js | 6 +- src/jmapNew/utils/parser.js | 11 +- src/store/modules/map.js | 11 +- .../mapoperate/automaticControl.vue | 30 +- .../newMap/newMapdraft/mapoperate/index.vue | 14 +- .../mapoperate/outFrameControl.vue | 319 ++++++++++++++++++ 12 files changed, 437 insertions(+), 41 deletions(-) create mode 100644 src/jmapNew/shape/OutFrame/index.js create mode 100644 src/views/newMap/newMapdraft/mapoperate/outFrameControl.vue diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index 2cdf784ab..d06ce0e0f 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -203,7 +203,7 @@ class SkinCode extends defaultStyle { } }; - this[deviceType.Automactic] = { + this[deviceType.MapCycleButtonVO] = { // 是否显示 visible: true, text: { @@ -222,6 +222,9 @@ class SkinCode extends defaultStyle { fill: 'rgba(0,0,0,0)', // 填充色 radiusR: 6, // 控制灯大小 controlColor: '#b5b3b3' // 控制灯颜色 (灰色) + }, + OutFrame: { + } }; diff --git a/src/jmapNew/constant/deviceRender.js b/src/jmapNew/constant/deviceRender.js index 15fd2dccf..90a90f970 100644 --- a/src/jmapNew/constant/deviceRender.js +++ b/src/jmapNew/constant/deviceRender.js @@ -117,10 +117,15 @@ deviceRender[deviceType.CheckBox] = { }; /** Automactic渲染配置 自动折返*/ -deviceRender[deviceType.Automactic] = { - _type: deviceType.Automactic, +deviceRender[deviceType.MapCycleButtonVO] = { + _type: deviceType.MapCycleButtonVO, zlevel: 1 }; +/** OutFrame渲染配置 自动折返包围矩形*/ +deviceRender[deviceType.OutFrame] = { + _type: deviceType.OutFrame, + zlevel: 1 +}; export default deviceRender; diff --git a/src/jmapNew/constant/deviceType.js b/src/jmapNew/constant/deviceType.js index 6407bfeb4..f1af16ab7 100644 --- a/src/jmapNew/constant/deviceType.js +++ b/src/jmapNew/constant/deviceType.js @@ -10,7 +10,8 @@ const deviceType = { StationStand: 'StationStand', Esp: 'Esp', Psd: 'Psd', - Automactic: 'Automactic', + MapCycleButtonVO: 'MapCycleButtonVO', + OutFrame: 'OutFrame', StationControl: 'StationControl', StationCounter: 'StationCounter', StationDelayUnlock: 'StationDelayUnlock', diff --git a/src/jmapNew/constant/stateTransition.js b/src/jmapNew/constant/stateTransition.js index 1bff1aac5..f993764e1 100644 --- a/src/jmapNew/constant/stateTransition.js +++ b/src/jmapNew/constant/stateTransition.js @@ -109,7 +109,10 @@ class Status { handleLimitControl(device) { this.statusObj = { }; } - handleAutomactic(device) { + handleMapCycleButtonVO(device) { + this.statusObj = { }; + } + handleOutFrame(device) { this.statusObj = { }; } getStatus() { diff --git a/src/jmapNew/shape/Automactic/index.js b/src/jmapNew/shape/Automactic/index.js index 03a10015e..f1bfbde4e 100644 --- a/src/jmapNew/shape/Automactic/index.js +++ b/src/jmapNew/shape/Automactic/index.js @@ -7,7 +7,7 @@ import Text from 'zrender/src/graphic/Text'; import Rect from 'zrender/src/graphic/shape/Rect'; import EMouse from './EMouse'; -export default class LcControl extends Group { +export default class Automactic extends Group { constructor(model, style) { super(); this.z = 20; @@ -30,11 +30,11 @@ export default class LcControl extends Group { shape: { cx: model.position.x, cy: model.position.y, - r: this.style.Automactic.lamp.radiusR + r: this.style.MapCycleButtonVO.lamp.radiusR }, style: { lineWidth: 0, - fill: this.style.Automactic.lamp.controlColor + fill: this.style.MapCycleButtonVO.lamp.controlColor } }); @@ -45,9 +45,9 @@ export default class LcControl extends Group { position: [0, 0], style: { x: model.position.x, - y: model.position.y + this.style.Automactic.lamp.radiusR + this.style.Automactic.text.distance, - fontWeight: this.style.Automactic.text.fontWeight, - fontSize: this.style.Automactic.text.fontSize, + y: model.position.y + this.style.MapCycleButtonVO.lamp.radiusR + this.style.MapCycleButtonVO.text.distance, + fontWeight: this.style.MapCycleButtonVO.text.fontWeight, + fontSize: this.style.MapCycleButtonVO.text.fontSize, fontFamily: this.style.fontFamily, text: model.name, textFill: '#fff', @@ -64,9 +64,9 @@ export default class LcControl extends Group { position: [0, 0], style: { x: model.position.x, - y: model.position.y + this.style.Automactic.lamp.radiusR + this.style.Automactic.subtitleText.distance, - fontWeight: this.style.Automactic.subtitleText.fontWeight, - fontSize: this.style.Automactic.subtitleText.fontSize, + y: model.position.y + this.style.MapCycleButtonVO.lamp.radiusR + this.style.MapCycleButtonVO.subtitleText.distance, + fontWeight: this.style.MapCycleButtonVO.subtitleText.fontWeight, + fontSize: this.style.MapCycleButtonVO.subtitleText.fontSize, fontFamily: this.style.fontFamily, text: model.subtitleName, textFill: '#fff', @@ -83,9 +83,9 @@ export default class LcControl extends Group { silent: true, shape: arcRect, style: { - lineDash: this.style.Automactic.lamp.lineDash, - stroke: this.style.Automactic.lamp.stroke, - fill: this.style.Automactic.lamp.fill + lineDash: this.style.MapCycleButtonVO.lamp.lineDash, + stroke: this.style.MapCycleButtonVO.lamp.stroke, + fill: this.style.MapCycleButtonVO.lamp.fill } }); this.add(this.control); diff --git a/src/jmapNew/shape/OutFrame/index.js b/src/jmapNew/shape/OutFrame/index.js new file mode 100644 index 000000000..af6376aa6 --- /dev/null +++ b/src/jmapNew/shape/OutFrame/index.js @@ -0,0 +1,41 @@ +import Group from 'zrender/src/container/Group'; +import Rect from 'zrender/src/graphic/shape/Rect'; + +export default class OutFrame extends Group { + constructor(model, style) { + super(); + this.model = model; + this._type = model._type; + this._code = model.code; + this.style = style; + this.zlevel = model.zlevel; + this.z = 0; + this.create(); + this.setState(model); + } + + create() { + const model = this.model; + this.box = new Rect({ + zlevel: this.zlevel, + z: this.z, + shape: { + x: model.position.x - model.width / 2, + y: model.position.y - model.height / 2, + width: model.width, + height: model.height + }, + style: { + lineDash: null, + stroke: '#fff', + lineWidth: 1, + fill: 'rgb(135,206,250,0)' + } + }); + this.add(this.box); + } + + // 设置状态 + setState(model) { + } +} diff --git a/src/jmapNew/shape/factory.js b/src/jmapNew/shape/factory.js index b003bf2e4..36a7ce029 100644 --- a/src/jmapNew/shape/factory.js +++ b/src/jmapNew/shape/factory.js @@ -15,7 +15,8 @@ import TrainWindow from './TrainWindow/index.js'; import Train from './Train/index.js'; import Line from './Line/index.js'; import Text2 from './Text/index.js'; -import Automactic from './Automactic/index.js'; +import MapCycleButtonVO from './Automactic/index.js'; +import OutFrame from './OutFrame/index.js'; import CheckBox from './checkBox/checkBox.js'; /** 图库*/ @@ -36,7 +37,8 @@ mapShape[deviceType.TrainWindow] = TrainWindow; mapShape[deviceType.Train] = Train; mapShape[deviceType.Line] = Line; mapShape[deviceType.Text] = Text2; -mapShape[deviceType.Automactic] = Automactic; +mapShape[deviceType.MapCycleButtonVO] = MapCycleButtonVO; +mapShape[deviceType.OutFrame] = OutFrame; mapShape[deviceType.CheckBox] = CheckBox; function shapefactory(device, jmap) { diff --git a/src/jmapNew/utils/parser.js b/src/jmapNew/utils/parser.js index b54e7cdce..0b0567b91 100644 --- a/src/jmapNew/utils/parser.js +++ b/src/jmapNew/utils/parser.js @@ -115,8 +115,12 @@ export function parser(data, skinCode) { mapDevice[elem.code] = createDevice(deviceType.Text, elem, propConvert); }, this); - zrUtil.each(data.Automactic || [], elem => { - mapDevice[elem.code] = createDevice(deviceType.Automactic, elem, propConvert); + zrUtil.each(data.cycleButtonList || [], elem => { + mapDevice[elem.code] = createDevice(deviceType.MapCycleButtonVO, elem, propConvert); + }, this); + + zrUtil.each(data.outFrameList || [], elem => { + mapDevice[elem.code] = createDevice(deviceType.OutFrame, elem, propConvert); }, this); zrUtil.each(data.trainWindowList || [], elem => { @@ -209,7 +213,8 @@ export function updateMapData(state, model) { case deviceType.Text: updateForList(model, state, 'textList'); break; case deviceType.Psd: updateForList(model, state, 'psdList'); break; case deviceType.Esp: updateForList(model, state, 'espList'); break; - case deviceType.Automactic: updateForList(model, state, 'automaticList'); break; + case deviceType.MapCycleButtonVO: updateForList(model, state, 'cycleButtonList'); break; + case deviceType.OutFrame: updateForList(model, state, 'outFrameList'); break; } } } diff --git a/src/store/modules/map.js b/src/store/modules/map.js index 7d6ce651e..2b8cd2ae2 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -316,9 +316,16 @@ const map = { return []; } }, - automaticList: (state) => { + cycleButtonList: (state) => { if (state.map) { - return state.map.automaticList || []; + return state.map.cycleButtonList || []; + } else { + return []; + } + }, + outFrameList: (state) => { + if (state.map) { + return state.map.outFrameList || []; } else { return []; } diff --git a/src/views/newMap/newMapdraft/mapoperate/automaticControl.vue b/src/views/newMap/newMapdraft/mapoperate/automaticControl.vue index ec07c28e6..33968a55c 100644 --- a/src/views/newMap/newMapdraft/mapoperate/automaticControl.vue +++ b/src/views/newMap/newMapdraft/mapoperate/automaticControl.vue @@ -37,7 +37,7 @@ import { deepAssign } from '@/utils/index'; import { getAutoReentryList} from '@/api/jmap/mapdraft'; export default { - name: 'ZcControlDraft', + name: 'MapCycleButtonVO', components: { ConfigList, ConfigData @@ -58,7 +58,7 @@ export default { code: '', name: '', subtitleName: '', //副标题 - automaticCode: '', // 关联自动折返code + cycleCode: '', // 关联自动折返code position: { x: 0, y: 0 @@ -68,7 +68,7 @@ export default { code: '', name: '', subtitleName: '', // 副标题 - automaticCode: '', // 关联自动折返code + cycleCode: '', // 关联自动折返code position: { x: 0, y: 0 @@ -81,7 +81,7 @@ export default { name: [ { required: true, message: this.$t('rules.pleaseEnterStatusSignal'), trigger: 'blur' } ], - automaticCode:[ + cycleCode:[ { required: true, message: this.$t('rules.selectConcentrateStation'), trigger: 'change' } ], 'position.x': [ @@ -95,7 +95,7 @@ export default { }, computed: { ...mapGetters('map', [ - 'automaticList' + 'cycleButtonList' ]), form() { const form = { @@ -108,14 +108,14 @@ export default { draw: { name: this.$t('map.drawData'), item: [ - { prop: 'code', label: `${this.$t('map.code')}`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.automaticList, change: true, deviceChange: this.deviceChange }, + { prop: 'code', label: `${this.$t('map.code')}`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.cycleButtonList, change: true, deviceChange: this.deviceChange }, { prop: 'name', label: '标题名称:', type: 'input' }, { prop: 'subtitleName', label: '副标题名称:', type: 'input' }, { prop: 'position', label: '坐标:', type: 'coordinate', width: '140px', children: [ { prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' }, { prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' } ] }, - { prop:'automaticCode', label: '自动折返进路code:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.autoList }, + { prop:'cycleCode', label: '自动折返进路code:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.autoList }, ] } } @@ -126,7 +126,7 @@ export default { const form = { labelWidth: '150px', items: [ - { prop:'automaticCode', label: '自动折返进路:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.autoList }, + { prop:'cycleCode', label: '自动折返进路:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.autoList }, { prop: 'name', label: '自动折返名称:', type: 'input' }, { prop: 'subtitleName', label: '副标题名称:', type: 'input' }, { prop: 'position', label: '坐标:', type: 'coordinate', width: '140px', children: [ @@ -140,7 +140,7 @@ export default { }, createRules: function () { return { - automaticCode: [ + cycleCode: [ { required: true, message: '请选择自动折返进路', trigger: 'change' } ], name: [ @@ -174,7 +174,7 @@ export default { deviceSelect(selected) { this.$refs.dataform.resetFields(); this.$refs.make.resetFields(); - if (selected && selected._type.toUpperCase() === 'Automactic'.toUpperCase()) { + if (selected && selected._type.toUpperCase() === 'MapCycleButtonVO'.toUpperCase()) { this.activeName = 'first'; this.editModel = deepAssign(this.editModel, selected); } @@ -191,10 +191,10 @@ export default { create() { this.$refs.make.validate((valid) => { if (valid) { - const uid = getUID('Automactic', this.automaticList); + const uid = getUID('MapCycleButtonVO', this.cycleButtonList); let models = []; const model = { - _type: 'Automactic', + _type: 'MapCycleButtonVO', code: uid, name: this.addModel.name, subtitleName: this.addModel.subtitleName, @@ -202,7 +202,7 @@ export default { x: this.addModel.position.x, y: this.addModel.position.y }, - automaticCode:this.addModel.automaticCode + cycleCode:this.addModel.cycleCode }; models.push(model); this.$emit('updateMapModel', models); @@ -214,7 +214,7 @@ export default { edit() { this.$refs['dataform'].validate((valid) => { if (valid) { - const data = Object.assign({_type: 'Automactic'}, this.editModel); + const data = Object.assign({_type: 'MapCycleButtonVO'}, this.editModel); let models = [data]; this.$emit('updateMapModel', models); } @@ -223,7 +223,7 @@ export default { // 删除对象 deleteObj() { const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code); - if (selected && selected._type.toUpperCase() === 'Automactic'.toUpperCase()) { + if (selected && selected._type.toUpperCase() === 'MapCycleButtonVO'.toUpperCase()) { const _that = this; this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), { confirmButtonText: this.$t('tip.confirm'), diff --git a/src/views/newMap/newMapdraft/mapoperate/index.vue b/src/views/newMap/newMapdraft/mapoperate/index.vue index c2b3ef8de..0cf5c53cc 100644 --- a/src/views/newMap/newMapdraft/mapoperate/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/index.vue @@ -92,9 +92,9 @@ @setCenter="setCenter" /> - + + + + + + +
+ + + +
+ + {{ $t('map.updateObj') }} + {{ $t('map.deleteObj') }} + +
+ +
+ + + + +
+ + {{ $t('map.create') }} + +
+
+ + + + From 420c97f88e378ce84ba0b843b41420997009eaf5 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Thu, 5 Mar 2020 16:28:08 +0800 Subject: [PATCH 15/20] =?UTF-8?q?=E5=AE=81=E6=B3=A2=E4=B8=80=E5=8F=B7?= =?UTF-8?q?=E7=BA=BF=E4=BF=A1=E5=8F=B7=E6=9C=BA=E7=AB=99=E5=8F=B0=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4=EF=BC=88=E8=A1=8C?= =?UTF-8?q?=E8=B0=83=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/beijing_01/menus/dialog/standDetail.vue | 12 ++++++------ src/jmapNew/theme/beijing_01/menus/menuSwitch.vue | 14 ++++++++++++++ .../menus/dialog/childDialog/confirmControl.vue | 4 ++-- .../theme/ningbo_01/menus/dialog/routeDetail.vue | 1 - .../theme/ningbo_01/menus/dialog/routeLock.vue | 3 +-- .../menus/dialog/standBulkBuckleTrain.vue | 2 +- .../theme/ningbo_01/menus/dialog/standDetail.vue | 12 ++++++------ 7 files changed, 30 insertions(+), 18 deletions(-) diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/standDetail.vue b/src/jmapNew/theme/beijing_01/menus/dialog/standDetail.vue index 488772703..1c2a8046d 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/standDetail.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/standDetail.vue @@ -195,21 +195,21 @@ export default { // this.tempData.push({ item: '车站扣车', status: opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '未设置' }); // this.tempData.push({ item: '中心扣车', status: opts.holdStatus == '03' || opts.holdStatus == '04' ? '已设置' : '未设置' }); // 中心扣车 - this.treeData[1].children[0].value = opts.holdStatus == '03' || opts.holdStatus == '04' ? '已设置' : '未设置'; + this.treeData[1].children[0].value = selected.centerHoldTrain ? '已设置' : '未设置'; // 车站扣车 - this.treeData[1].children[1].value = opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '未设置'; + this.treeData[1].children[1].value = selected.stationHoldTrain ? '已设置' : '未设置'; // this.tempData.push({ item: '停站时间', status: opts.parkingTime != -1 ? opts.parkingTime : '自动' }); // 停站时间 - this.treeData[0].children[2].value = opts.parkingTime != -1 ? opts.parkingTime : '自动'; + this.treeData[0].children[2].value = selected.parkingTime != -1 ? selected.parkingTime : '自动'; // 跳停 - this.treeData[0].children[3].value = opts.jumpStopStatus != '01' ? '已设置' : '未设置'; + this.treeData[0].children[3].value = selected.allSkip || selected.assignSkip ? '已设置' : '未设置'; if (!stationStand || !station) { this.tempData.push({ item: '运行等级', status: `自动` }); } else { - this.tempData.push({ item: '运行等级', status: opts.intervalRunTime > 0 ? `至${station.name}${stationStand.name}:人工` : `至${station.name}${stationStand.name}:自动` }); + this.tempData.push({ item: '运行等级', status: selected.runLevelTime > 0 ? `至${station.name}${stationStand.name}:人工` : `至${station.name}${stationStand.name}:自动` }); } // this.tempData.push({ item: '跳停', status: opts.jumpStopStatus != '01' ? '已设置' : '未设置' }); - this.tempData.push({ item: '下行折返策略', status: this.strategyMap[opts.reentryStrategy] ? this.strategyMap[opts.reentryStrategy] : '默认' }); + this.tempData.push({ item: '下行折返策略', status: this.strategyMap[selected.reentryStrategy] ? this.strategyMap[selected.reentryStrategy] : '默认' }); }, doShow(operate, selected, opts) { this.selected = selected; diff --git a/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue b/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue index 16de7f6a4..bce77aaa9 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue @@ -52,6 +52,20 @@ export default { menu: [], menuNormal: { Local: [ + { + label: '轨道切除', + handler: this.split, + cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF + }, + { + label: '轨道激活', + handler: this.active, + cmdType: CMD.Switch.CMD_SWITCH_ACTIVE + } + // { + // label: '查看站场设备状态', + // handler: this.undeveloped + // } ], Center: [ { diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/childDialog/confirmControl.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/childDialog/confirmControl.vue index 9840066c3..0569c806c 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/childDialog/confirmControl.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/childDialog/confirmControl.vue @@ -263,10 +263,10 @@ export default { if (valid) { this.doClose(); } - }).catch(() => { + }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, error.message); }); } } diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/routeDetail.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/routeDetail.vue index 8d608e1d7..fa74d117a 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/routeDetail.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/routeDetail.vue @@ -135,7 +135,6 @@ export default { const operate = { over: true, operation: OperationEvent.Signal.detail.menu.operation, - cmdType: CMD.Signal.CMD_SIGNAL_DETAIL }; this.loading = true; diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/routeLock.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/routeLock.vue index 333638b92..3521fb45a 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/routeLock.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/routeLock.vue @@ -155,11 +155,10 @@ export default { }, cancel() { const operate = { - type: MapDeviceType.Signal.type, operation: OperationEvent.Command.cancel.menu.operation }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.doClose(); } diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/standBulkBuckleTrain.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/standBulkBuckleTrain.vue index 9742f5d04..48be045ef 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/standBulkBuckleTrain.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/standBulkBuckleTrain.vue @@ -160,7 +160,7 @@ export default { operate.operation = OperationEvent.StationStand.earlyDeparture.downSelect.operation; } - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/standDetail.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/standDetail.vue index ef43665f2..5d4aa26d8 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/standDetail.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/standDetail.vue @@ -193,21 +193,21 @@ export default { // this.tempData.push({ item: '车站扣车', status: opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '未设置' }); // this.tempData.push({ item: '中心扣车', status: opts.holdStatus == '03' || opts.holdStatus == '04' ? '已设置' : '未设置' }); // 中心扣车 - this.treeData[1].children[0].value = opts.holdStatus == '03' || opts.holdStatus == '04' ? '已设置' : '未设置'; + this.treeData[1].children[0].value = selected.centerHoldTrain ? '已设置' : '未设置'; // 车站扣车 - this.treeData[1].children[1].value = opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '未设置'; + this.treeData[1].children[1].value = selected.stationHoldTrain ? '已设置' : '未设置'; // this.tempData.push({ item: '停站时间', status: opts.parkingTime != -1 ? opts.parkingTime : '自动' }); // 停站时间 - this.treeData[0].children[2].value = opts.parkingTime != -1 ? opts.parkingTime : '自动'; + this.treeData[0].children[2].value = selected.parkingTime != -1 ? selected.parkingTime : '自动'; // 跳停 - this.treeData[0].children[3].value = opts.jumpStopStatus != '01' ? '已设置' : '未设置'; + this.treeData[0].children[3].value = selected.allSkip || selected.assignSkip ? '已设置' : '未设置'; if (!stationStand || !station) { this.tempData.push({ item: '运行等级', status: `自动` }); } else { - this.tempData.push({ item: '运行等级', status: opts.intervalRunTime > 0 ? `至${station.name}${stationStand.name}:人工` : `至${station.name}${stationStand.name}:自动` }); + this.tempData.push({ item: '运行等级', status: selected.runLevelTime > 0 ? `至${station.name}${stationStand.name}:人工` : `至${station.name}${stationStand.name}:自动` }); } // this.tempData.push({ item: '跳停', status: opts.jumpStopStatus != '01' ? '已设置' : '未设置' }); - this.tempData.push({ item: '下行折返策略', status: this.strategyMap[opts.reentryStrategy] ? this.strategyMap[opts.reentryStrategy] : '默认' }); + this.tempData.push({ item: '下行折返策略', status: this.strategyMap[selected.reentryStrategy] ? this.strategyMap[selected.reentryStrategy] : '默认' }); }, doShow(operate, selected, opts) { this.selected = selected; From 8d58125e1f3d1030995e2d7bffc56797f80876a6 Mon Sep 17 00:00:00 2001 From: joylink_fanyuhong <18706759286@163.com> Date: Thu, 5 Mar 2020 16:39:49 +0800 Subject: [PATCH 16/20] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=BF=9B=E8=B7=AF?= =?UTF-8?q?=E5=92=8C=E5=BC=95=E5=AF=BC=E6=80=BB=E9=94=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/chengdu_03.js | 41 ++- src/jmapNew/constant/deviceRender.js | 6 + src/jmapNew/constant/deviceType.js | 3 +- src/jmapNew/shape/AutomacticRoute/EMouse.js | 53 ++++ src/jmapNew/shape/AutomacticRoute/index.js | 105 +++++++ src/jmapNew/shape/Station/index.js | 34 +++ src/jmapNew/shape/factory.js | 2 + src/jmapNew/utils/parser.js | 1 + src/store/modules/map.js | 7 + src/utils/baseUrl.js | 4 +- .../newMapdraft/mapoperate/automaticRoute.vue | 274 ++++++++++++++++++ .../newMap/newMapdraft/mapoperate/index.vue | 12 +- .../newMap/newMapdraft/mapoperate/station.vue | 10 + 13 files changed, 546 insertions(+), 6 deletions(-) create mode 100644 src/jmapNew/shape/AutomacticRoute/EMouse.js create mode 100644 src/jmapNew/shape/AutomacticRoute/index.js create mode 100644 src/views/newMap/newMapdraft/mapoperate/automaticRoute.vue diff --git a/src/jmapNew/config/skinCode/chengdu_03.js b/src/jmapNew/config/skinCode/chengdu_03.js index 82e2cccb3..c75389a0b 100644 --- a/src/jmapNew/config/skinCode/chengdu_03.js +++ b/src/jmapNew/config/skinCode/chengdu_03.js @@ -295,7 +295,8 @@ class SkinCode extends defaultStyle { }, lamp: { radiusR: 6, // 控制灯大小 - controlColor: '#FFFF00' // 控制灯颜色 + controlColor: '#FFFF00', // 控制灯颜色 + guideColor: '#5A5D5A' // 引导总锁灯颜色 }, turnBack: { // 按图折返 lamp: 1, // 灯数量 @@ -413,7 +414,43 @@ class SkinCode extends defaultStyle { this[deviceType.Line] = { lineColor: '#FFFFFF' // 线条颜色 }; - + this[deviceType.Automactic] = { + // 是否显示 + visible: true, + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + subtitleText: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 17 // 等于副标题距离 + }, + lamp: { + lineDash: null, // 灯的包围框 + stroke: '#FFFFFF', // 框的颜色 + fill: 'rgba(0,0,0,0)', // 填充色 + radiusR: 6, // 控制灯大小 + controlColor: '#b5b3b3' // 控制灯颜色 (灰色) + } + }; + this[deviceType.AutomaticRoute] = { + // 是否显示 + visible: true, + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + lamp: { + lineDash: null, // 灯的包围框 + stroke: '#FFFFFF', // 框的颜色 + fill: 'rgba(0,0,0,0)', // 填充色 + radiusR: 6, // 控制灯大小 + controlColor: '#b5b3b3' // 控制灯颜色 (灰色) + } + }; this[deviceType.TrainWindow] = { lineColor: '#4DD43F', // 车次窗颜色 lineDash: null, // 车次窗虚线间隔 diff --git a/src/jmapNew/constant/deviceRender.js b/src/jmapNew/constant/deviceRender.js index 15fd2dccf..3b07cbf3c 100644 --- a/src/jmapNew/constant/deviceRender.js +++ b/src/jmapNew/constant/deviceRender.js @@ -122,5 +122,11 @@ deviceRender[deviceType.Automactic] = { zlevel: 1 }; +/** AutomacticRoute渲染配置 自动折返*/ +deviceRender[deviceType.AutomaticRoute] = { + _type: deviceType.AutomaticRoute, + zlevel: 1 +}; + export default deviceRender; diff --git a/src/jmapNew/constant/deviceType.js b/src/jmapNew/constant/deviceType.js index 6407bfeb4..ef1a9b840 100644 --- a/src/jmapNew/constant/deviceType.js +++ b/src/jmapNew/constant/deviceType.js @@ -18,7 +18,8 @@ const deviceType = { TrainWindow: 'TrainWindow', Line: 'Line', Text: 'Text', - CheckBox: 'CheckBox' + CheckBox: 'CheckBox', + AutomaticRoute:'AutomaticRoute' }; export default deviceType; diff --git a/src/jmapNew/shape/AutomacticRoute/EMouse.js b/src/jmapNew/shape/AutomacticRoute/EMouse.js new file mode 100644 index 000000000..fdb639e95 --- /dev/null +++ b/src/jmapNew/shape/AutomacticRoute/EMouse.js @@ -0,0 +1,53 @@ +import Group from 'zrender/src/container/Group'; +import Text from 'zrender/src/graphic/Text'; + +export default class EMouse extends Group { + constructor(device) { + super(); + this.device = device; + this.create(); + } + create() { + this.text = new Text({ + zlevel: this.device.zlevel, + z: this.device.z+1, + position: [0, 0], + style: { + x: this.device.model.position.x, + y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance-30, + fontWeight: 'normal', + fontSize: this.device.style.LcControl.mouseOverStyle.fontSize, + fontFamily: this.device.style.LcControl.mouseOverStyle.fontFamily, + text: this.device.model.name, + textFill: this.device.style.LcControl.mouseOverStyle.fontColor, + textAlign: this.device.style.LcControl.mouseOverStyle.textAlign, + textVerticalAlign: this.device.style.LcControl.mouseOverStyle.textVerticalAlign + } + }); + this.add(this.text); + this.text.hide(); + } + mouseover(e) { + if (e.target && e.target._subType == 'Text') { + this.text.show(); + } else { + this.device.control.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor); + this.device.control.setTextColor(this.device.style.LcControl.mouseOverStyle.textColor); + this.device.control.setTextBorder(true); + this.device.control.setArcBorder(true); + } + } + + mouseout(e) { + if (!this.device.model.down) { + if (e.target && e.target._subType == 'Text') { + this.text.hide(); + } else { + this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor); + this.device.control.setTextColor('#FFFFFF'); + this.device.control.setTextBorder(false); + this.device.control.setArcBorder(false); + } + } + } +} diff --git a/src/jmapNew/shape/AutomacticRoute/index.js b/src/jmapNew/shape/AutomacticRoute/index.js new file mode 100644 index 000000000..2d1dc1426 --- /dev/null +++ b/src/jmapNew/shape/AutomacticRoute/index.js @@ -0,0 +1,105 @@ +/* +* 自动折返 控制器 +*/ +import Group from 'zrender/src/container/Group'; +import Arc from 'zrender/src/graphic/shape/Arc'; +import Text from 'zrender/src/graphic/Text'; +import EMouse from './EMouse'; + +export default class LcControl extends Group { + constructor(model, style) { + super(); + this.z = 20; + this._code = model.code; + this._type = model._type; + this.zlevel = model.zlevel; + this.model = model; + this.style = style; + this.create(); + this.createMouseEvent(); + this.setState(model); + } + + create() { + const model = this.model; + this.control = new Arc({ + _subType: 'Control', + zlevel: this.zlevel, + z: this.z, + shape: { + cx: model.position.x, + cy: model.position.y, + r: this.style.AutomaticRoute.lamp.radiusR + }, + style: { + lineWidth: 0, + fill: this.style.AutomaticRoute.lamp.controlColor + } + }); + + this.text = new Text({ + _subType: 'Text', + zlevel: this.zlevel, + z: this.z, + position: [0, 0], + style: { + x: model.position.x, + y: model.position.y + this.style.AutomaticRoute.lamp.radiusR + this.style.AutomaticRoute.text.distance, + fontWeight: this.style.AutomaticRoute.text.fontWeight, + fontSize: this.style.AutomaticRoute.text.fontSize, + fontFamily: this.style.fontFamily, + text: model.name, + textFill: '#fff', + textAlign: 'middle', + textVerticalAlign: 'top' + } + }); + + if (this.model.subtitleName) { + this.subtitleText = new Text({ + _subType: 'Text', + zlevel: this.zlevel, + z: this.z, + position: [0, 0], + style: { + x: model.position.x, + y: model.position.y + this.style.AutomaticRoute.lamp.radiusR + this.style.AutomaticRoute.subtitleText.distance, + fontWeight: this.style.AutomaticRoute.subtitleText.fontWeight, + fontSize: this.style.AutomaticRoute.subtitleText.fontSize, + fontFamily: this.style.fontFamily, + text: model.subtitleName, + textFill: '#fff', + textAlign: 'middle', + textVerticalAlign: 'top' + } + }); + this.add(this.subtitleText); + } + this.add(this.control); + this.add(this.text); + } + + // 设置状态 + setState(model) { + } + + createMouseEvent() { + if (this.style.LcControl.mouseOverStyle) { + this.mouseEvent = new EMouse(this); + this.add(this.mouseEvent); + this.on('mouseout', (e) => { this.mouseEvent.mouseout(e); }); + this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); }); + } + } + getShapeTipPoint() { + if (this.control) { + var distance = 2; + var rect = this.control.getBoundingRect(); + return { + x: rect.x + rect.width / 2, + y: rect.y - distance + }; + } + return null; + } +} diff --git a/src/jmapNew/shape/Station/index.js b/src/jmapNew/shape/Station/index.js index ddb210d21..b3f348eab 100644 --- a/src/jmapNew/shape/Station/index.js +++ b/src/jmapNew/shape/Station/index.js @@ -22,6 +22,7 @@ export default class Station extends Group { this.style = style; this.create(); this.createTurnBack(); // 创建按图折返 + this.createGuideTotalLock(); // 创建引导总锁 this.createControlMode(); this.setState(model); this.checkIsDrawMap(); @@ -104,6 +105,39 @@ export default class Station extends Group { } } } + createGuideTotalLock() { // 创建引导总锁 + const model = this.model; + const style = this.style; + if(model.guideTotalLock) { + this.guideLamp = new EControl({ + zlevel: this.zlevel, + z: this.z, + arc: { + shape: { + cx: model.guideTotalLockPoint.x, + cy: model.guideTotalLockPoint.y, + r: style.Station.lamp.radiusR + }, + lineWidth: 0, + fill: style.Station.lamp.guideColor + }, + text: { + position: [0, 0], + x: model.guideTotalLockPoint.x, + y: model.guideTotalLockPoint.y + style.Station.lamp.radiusR + style.Station.StationControl.text.distance, + fontWeight: style.Station.text.fontWeight, + fontSize: style.Station.text.fontSize, + fontFamily: style.fontFamily, + text: '引导总锁', + textFill: '#fff', + textAlign: 'middle', + textVerticalAlign: 'top' + }, + style: this.style + }); + this.add(this.guideLamp); + } + } createTurnBack() { // 创建按图折返 const model = this.model; const style = this.style; diff --git a/src/jmapNew/shape/factory.js b/src/jmapNew/shape/factory.js index b003bf2e4..42534ae7d 100644 --- a/src/jmapNew/shape/factory.js +++ b/src/jmapNew/shape/factory.js @@ -17,6 +17,7 @@ import Line from './Line/index.js'; import Text2 from './Text/index.js'; import Automactic from './Automactic/index.js'; import CheckBox from './checkBox/checkBox.js'; +import AutomaticRoute from './AutomacticRoute/index.js'; /** 图库*/ const mapShape = {}; @@ -38,6 +39,7 @@ mapShape[deviceType.Line] = Line; mapShape[deviceType.Text] = Text2; mapShape[deviceType.Automactic] = Automactic; mapShape[deviceType.CheckBox] = CheckBox; +mapShape[deviceType.AutomaticRoute] = AutomaticRoute; function shapefactory(device, jmap) { const type = device._type; diff --git a/src/jmapNew/utils/parser.js b/src/jmapNew/utils/parser.js index b54e7cdce..02f2940a0 100644 --- a/src/jmapNew/utils/parser.js +++ b/src/jmapNew/utils/parser.js @@ -210,6 +210,7 @@ export function updateMapData(state, model) { case deviceType.Psd: updateForList(model, state, 'psdList'); break; case deviceType.Esp: updateForList(model, state, 'espList'); break; case deviceType.Automactic: updateForList(model, state, 'automaticList'); break; + case deviceType.AutomaticRoute: updateForList(model, state, 'automaticRouteButtonList'); break; } } } diff --git a/src/store/modules/map.js b/src/store/modules/map.js index 7d6ce651e..29c513518 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -323,6 +323,13 @@ const map = { return []; } }, + automaticRouteButtonList: (state) => { + if (state.map) { + return state.map.automaticRouteButtonList || []; + } else { + return []; + } + }, resourceList: (state) => { if (state.map) { return state.map.resourceList; diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 506eafc22..8f0c4853a 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -3,14 +3,14 @@ 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://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 - // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 + BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 } else { BASE_API = process.env.VUE_APP_BASE_API; } diff --git a/src/views/newMap/newMapdraft/mapoperate/automaticRoute.vue b/src/views/newMap/newMapdraft/mapoperate/automaticRoute.vue new file mode 100644 index 000000000..b06e218f9 --- /dev/null +++ b/src/views/newMap/newMapdraft/mapoperate/automaticRoute.vue @@ -0,0 +1,274 @@ + + + + diff --git a/src/views/newMap/newMapdraft/mapoperate/index.vue b/src/views/newMap/newMapdraft/mapoperate/index.vue index c2b3ef8de..2d4068963 100644 --- a/src/views/newMap/newMapdraft/mapoperate/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/index.vue @@ -100,6 +100,14 @@ @setCenter="setCenter" />
+ + + Date: Thu, 5 Mar 2020 18:17:47 +0800 Subject: [PATCH 17/20] =?UTF-8?q?=E7=AB=99=E5=8F=B0=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=8C=89=E9=92=AE=EF=BC=8C=E6=9C=AA=E5=AE=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/Station/index.js | 2 +- src/jmapNew/shape/StationStand/index.js | 36 +++++++- .../newMap/newMapdraft/mapoperate/station.vue | 2 + .../newMapdraft/mapoperate/stationstand.vue | 86 +++++++++++++++++-- 4 files changed, 119 insertions(+), 7 deletions(-) diff --git a/src/jmapNew/shape/Station/index.js b/src/jmapNew/shape/Station/index.js index b3f348eab..cec7a6a8e 100644 --- a/src/jmapNew/shape/Station/index.js +++ b/src/jmapNew/shape/Station/index.js @@ -108,7 +108,7 @@ export default class Station extends Group { createGuideTotalLock() { // 创建引导总锁 const model = this.model; const style = this.style; - if(model.guideTotalLock) { + if (model.guideTotalLock) { this.guideLamp = new EControl({ zlevel: this.zlevel, z: this.z, diff --git a/src/jmapNew/shape/StationStand/index.js b/src/jmapNew/shape/StationStand/index.js index 66d880da6..1f3293dea 100644 --- a/src/jmapNew/shape/StationStand/index.js +++ b/src/jmapNew/shape/StationStand/index.js @@ -11,6 +11,7 @@ import EJump from './EJump'; import EHighlight from '../element/EHighlight'; import ETrainStop from './ETrainStop'; import ETrainDepart from './ETrainDepart'; +import EControl from '../element/EControl'; class StationStand extends Group { constructor(model, style) { @@ -24,6 +25,7 @@ class StationStand extends Group { this.doors = new Group(); this.create(); this.createMouseEvent(); + this.createFunctionButton(); this.setVisible(model.visible); this.setState(model); this.checkIsDrawMap(); @@ -205,7 +207,39 @@ class StationStand extends Group { this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); }); } } - + createFunctionButton() { // + // const model = this.model; + // const style = this.style; + // if (model.stopJumpLamp) { + // this.stopJumpLampButton = new EControl({ + // zlevel: this.zlevel, + // z: this.z, + // arc: { + // shape: { + // cx: model.guideTotalLockPoint.x, + // cy: model.guideTotalLockPoint.y, + // r: style.Station.lamp.radiusR + // }, + // lineWidth: 0, + // fill: style.Station.lamp.guideColor + // }, + // text: { + // position: [0, 0], + // x: model.guideTotalLockPoint.x, + // y: model.guideTotalLockPoint.y + style.Station.lamp.radiusR + style.Station.StationControl.text.distance, + // fontWeight: style.Station.text.fontWeight, + // fontSize: style.Station.text.fontSize, + // fontFamily: style.fontFamily, + // text: '引导总锁', + // textFill: '#fff', + // textAlign: 'middle', + // textVerticalAlign: 'top' + // }, + // style: this.style + // }); + // this.add(this.stopJumpLampButton); + // } + } setVisible(visible) { if (visible) { this.eachChild(elem => { elem.show(); }); diff --git a/src/views/newMap/newMapdraft/mapoperate/station.vue b/src/views/newMap/newMapdraft/mapoperate/station.vue index e7ce15cfc..323065578 100644 --- a/src/views/newMap/newMapdraft/mapoperate/station.vue +++ b/src/views/newMap/newMapdraft/mapoperate/station.vue @@ -404,6 +404,8 @@ export default { // controlled: false, chargeStationCodeList:[], createControlMode: item.control, + guideTotalLock: false, + guideTotalLockPoint: {x: 0, y: 0}, createTurnBack: false, turnBackPoint: {x: 0, y: 0} // 按图折返坐标 }; diff --git a/src/views/newMap/newMapdraft/mapoperate/stationstand.vue b/src/views/newMap/newMapdraft/mapoperate/stationstand.vue index 6c83299c0..c775d589a 100644 --- a/src/views/newMap/newMapdraft/mapoperate/stationstand.vue +++ b/src/views/newMap/newMapdraft/mapoperate/stationstand.vue @@ -74,7 +74,15 @@ export default { inside: false, // 内外站台显示 right: true, standTrackCode: '', - small: false + small: false, + stopJumpLamp: false, // 跳停功能按钮 + stopJumpLampPoint: {x: 0, y: 0}, // 跳停功能按钮坐标 + cancelStopJumpLamp: false, // 取消跳停功能按钮 + cancelStopJumpLampPoint: {x: 0, y: 0}, // 取消跳停功能按钮坐标 + upDetainLamp: false, // 上行扣车功能按钮 + upDetainLampPoint: {x: 0, y: 0}, // 上行扣车功能按钮坐标 + downDetainLamp: false, // 下行扣车功能按钮 + downDetainLampPoint: {x: 0, y: 0} // 下行扣车功能按钮坐标 // direction: '' // 上下行方向 }, field: '', @@ -90,7 +98,15 @@ export default { stationstandDirection: '02', // 屏蔽门方向 right: true, inside: false, // 内外站台 - small: false + small: false, + stopJumpLamp: false, // 跳停功能按钮 + stopJumpLampPoint: {x: 0, y: 0}, // 跳停功能按钮坐标 + cancelStopJumpLamp: false, // 取消跳停功能按钮 + cancelStopJumpLampPoint: {x: 0, y: 0}, // 取消跳停功能按钮坐标 + upDetainLamp: false, // 上行扣车功能按钮 + upDetainLampPoint: {x: 0, y: 0}, // 上行扣车功能按钮坐标 + downDetainLamp: false, // 下行扣车功能按钮 + downDetainLampPoint: {x: 0, y: 0} // 下行扣车功能按钮坐标 } }; }, @@ -125,7 +141,27 @@ export default { { prop: 'standTrackCode', label: '站台轨:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList, hover: this.hover, buttonType: 'editSectionSelectCode', buttonShowType: this.isButtonTypeES }, { prop: 'right', label: '行驶方向:', type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.isRightList }, { prop: 'small', label: '是否小型站台:', type: 'checkbox', disabled: true }, - { prop: 'inside', label: '是否内站台:', type: 'checkbox' } + { prop: 'inside', label: '是否内站台:', type: 'checkbox' }, + { prop: 'stopJumpLamp', label: '跳停按钮:', type: 'checkbox'}, + { prop: 'stopJumpLampPoint', label: '跳停按钮坐标:', type: 'coordinate', width: '120px', isHidden: !this.isStopJumpPointsShow, children: [ + { prop: 'stopJumpLampPoint.x', firstLevel: 'stopJumpLampPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, + { prop: 'stopJumpLampPoint.y', firstLevel: 'stopJumpLampPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } + ] }, + { prop: 'cancelStopJumpLamp', label: '取消跳停按钮:', type: 'checkbox'}, + { prop: 'cancelStopJumpLampPoint', label: '取消跳停按钮坐标:', type: 'coordinate', width: '120px', isHidden: !this.isCancelStopJumpPointsShow, children: [ + { prop: 'cancelStopJumpLampPoint.x', firstLevel: 'cancelStopJumpLampPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, + { prop: 'cancelStopJumpLampPoint.y', firstLevel: 'cancelStopJumpLampPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } + ] }, + { prop: 'upDetainLamp', label: '上行扣车按钮:', type: 'checkbox'}, + { prop: 'upDetainLampPoint', label: '上行扣车按钮坐标:', type: 'coordinate', width: '120px', isHidden: !this.isUpDetainPointsShow, children: [ + { prop: 'upDetainLampPoint.x', firstLevel: 'upDetainLampPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, + { prop: 'upDetainLampPoint.y', firstLevel: 'upDetainLampPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } + ] }, + { prop: 'downDetainLamp', label: '下行扣车按钮:', type: 'checkbox'}, + { prop: 'downDetainLampPoint', label: '下行扣车坐标:', type: 'coordinate', width: '120px', isHidden: !this.isDownDetainPointsShow, children: [ + { prop: 'downDetainLampPoint.x', firstLevel: 'downDetainLampPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, + { prop: 'downDetainLampPoint.y', firstLevel: 'downDetainLampPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } + ] } ] }, map: { @@ -188,7 +224,27 @@ export default { { prop: 'standTrackCode', label: '站台轨:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList, hover: this.hover, buttonType: 'sectionSelectCode', buttonShowType: this.isButtonTypeS }, { prop: 'right', label: '行驶方向:', type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.isRightList }, { prop: 'small', label: '是否小型站台:', type: 'checkbox' }, - { prop: 'inside', label: '是否内站台:', type: 'checkbox' } + { prop: 'inside', label: '是否内站台:', type: 'checkbox' }, + { prop: 'stopJumpLamp', label: '跳停按钮:', type: 'checkbox'}, + { prop: 'stopJumpLampPoint', label: '跳停按钮坐标:', type: 'coordinate', width: '120px', isHidden: !this.isStopJumpPointsShow, children: [ + { prop: 'stopJumpLampPoint.x', firstLevel: 'stopJumpLampPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, + { prop: 'stopJumpLampPoint.y', firstLevel: 'stopJumpLampPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } + ] }, + { prop: 'cancelStopJumpLamp', label: '取消跳停按钮:', type: 'checkbox'}, + { prop: 'cancelStopJumpLampPoint', label: '取消跳停按钮坐标:', type: 'coordinate', width: '120px', isHidden: !this.isCancelStopJumpPointsShow, children: [ + { prop: 'cancelStopJumpLampPoint.x', firstLevel: 'cancelStopJumpLampPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, + { prop: 'cancelStopJumpLampPoint.y', firstLevel: 'cancelStopJumpLampPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } + ] }, + { prop: 'upDetainLamp', label: '上行扣车按钮:', type: 'checkbox'}, + { prop: 'upDetainLampPoint', label: '上行扣车按钮坐标:', type: 'coordinate', width: '120px', isHidden: !this.isUpDetainPointsShow, children: [ + { prop: 'upDetainLampPoint.x', firstLevel: 'upDetainLampPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, + { prop: 'upDetainLampPoint.y', firstLevel: 'upDetainLampPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } + ] }, + { prop: 'downDetainLamp', label: '下行扣车按钮:', type: 'checkbox'}, + { prop: 'downDetainLampPoint', label: '下行扣车坐标:', type: 'coordinate', width: '120px', isHidden: !this.isDownDetainPointsShow, children: [ + { prop: 'downDetainLampPoint.x', firstLevel: 'downDetainLampPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, + { prop: 'downDetainLampPoint.y', firstLevel: 'downDetainLampPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } + ] } ] }, door: { @@ -228,6 +284,18 @@ export default { isButtonTypeES() { return this.field === 'editSectionSelectCode'; }, + isStopJumpPointsShow() { + return this.activeName === 'first' ? this.editModel.stopJumpLamp : this.addModel.stopJumpLamp; + }, + isCancelStopJumpPointsShow() { + return this.activeName === 'first' ? this.editModel.cancelStopJumpLamp : this.addModel.cancelStopJumpLamp; + }, + isUpDetainPointsShow() { + return this.activeName === 'first' ? this.editModel.upDetainLamp : this.addModel.upDetainLamp; + }, + isDownDetainPointsShow() { + return this.activeName === 'first' ? this.editModel.downDetainLamp : this.addModel.downDetainLamp; + }, PhysicalSectionList() { let list = []; if (this.sectionList && this.sectionList.length) { @@ -309,7 +377,15 @@ export default { standTrackCode: this.addModel.standTrackCode, right: this.addModel.right, small: this.addModel.small, - inside: this.addModel.inside + inside: this.addModel.inside, + stopJumpLamp: this.addModel.stopJumpLamp, // 跳停功能按钮 + stopJumpLampPoint: this.addModel.stopJumpLampPoint, // 跳停功能按钮坐标 + cancelStopJumpLamp: this.addModel.cancelStopJumpLamp, // 取消跳停功能按钮 + cancelStopJumpLampPoint: this.addModel.cancelStopJumpLampPoint, // 取消跳停功能按钮坐标 + upDetainLamp: this.addModel.upDetainLamp, // 上行扣车功能按钮 + upDetainLampPoint: this.addModel.upDetainLampPoint, // 上行扣车功能按钮坐标 + downDetainLamp: this.addModel.downDetainLamp, // 下行扣车功能按钮 + downDetainLampPoint: this.addModel.downDetainLampPoint // 下行扣车功能按钮坐标 }; this.stationList.forEach(elem => { if (elem.code == this.addModel.stationCode) { From 67aef69fe5d04855d861b804ed406addd93e2a32 Mon Sep 17 00:00:00 2001 From: joylink_fanyuhong <18706759286@163.com> Date: Thu, 5 Mar 2020 18:24:06 +0800 Subject: [PATCH 18/20] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=97=B6=E6=9B=BF=E6=8D=A2=E5=88=97=E8=BD=A6code=E4=BD=8Dgroup?= =?UTF-8?q?Number?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/loaddata.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/loaddata.js b/src/utils/loaddata.js index f599bab78..d7af33551 100644 --- a/src/utils/loaddata.js +++ b/src/utils/loaddata.js @@ -38,6 +38,9 @@ export function loadMapDataById(mapId) { export function loadNewMapDataByGroup(group) { return new Promise((resolve, reject) => { getNewMapDataByGroup(group).then(resp => { + resp.data.graphDataNew && resp.data.graphDataNew.trainList && resp.data.graphDataNew.trainList.forEach(item => { + item.code = item.groupNumber; + }); const mapData = resp.data.graphDataNew; store.dispatch('map/setMapData', mapData).then(() => { store.dispatch('map/clearJlmapTrainView').then(() => { From 02a23367314e201ef77461eeaeb51de5571b5b25 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Thu, 5 Mar 2020 20:36:27 +0800 Subject: [PATCH 19/20] =?UTF-8?q?=E5=AE=81=E6=B3=A2=E4=B8=80=E5=8F=B7?= =?UTF-8?q?=E7=BA=BF=E8=A1=8C=E8=B0=83=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 --- .../ningbo_01/menus/dialog/routeHandControl.vue | 12 ++++++++++-- .../theme/ningbo_01/menus/dialog/standDetail.vue | 16 ++++++++++------ 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/routeHandControl.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/routeHandControl.vue index 0718bbeb1..aae0336b8 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/routeHandControl.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/routeHandControl.vue @@ -230,6 +230,8 @@ export default { if (!item.disabled) { this.changeList.push(false); this.selection.splice(this.selection.indexOf(item.code), 1); + } else { + this.changeList = []; } }); this.allSelect = false; @@ -287,7 +289,10 @@ export default { const operate = { over: true, operation: OperationEvent.Signal.humanControl.menu.operation, - cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING + cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, + param:{ + routeCodeList: this.selection + } }; this.sendCommand(operate); @@ -297,7 +302,10 @@ export default { const operate = { over: true, operation: OperationEvent.Signal.atsAutoControl.menu.operation, - cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING + cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING, + param:{ + routeCodeList: this.selection + } }; this.sendCommand(operate); diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/standDetail.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/standDetail.vue index 5d4aa26d8..b1d6c726b 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/standDetail.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/standDetail.vue @@ -201,13 +201,17 @@ export default { this.treeData[0].children[2].value = selected.parkingTime != -1 ? selected.parkingTime : '自动'; // 跳停 this.treeData[0].children[3].value = selected.allSkip || selected.assignSkip ? '已设置' : '未设置'; - if (!stationStand || !station) { - this.tempData.push({ item: '运行等级', status: `自动` }); - } else { - this.tempData.push({ item: '运行等级', status: selected.runLevelTime > 0 ? `至${station.name}${stationStand.name}:人工` : `至${station.name}${stationStand.name}:自动` }); - } + // if (selected.direction == '01') { + // 待添加 + // } + // if (!stationStand || !station) { + // this.tempData.push({ item: '运行等级', status: `自动` }); + // } else { + // this.tempData.push({ item: '运行等级', status: selected.runLevelTime > 0 ? `至${station.name}${stationStand.name}:人工` : `至${station.name}${stationStand.name}:自动` }); + // } // this.tempData.push({ item: '跳停', status: opts.jumpStopStatus != '01' ? '已设置' : '未设置' }); - this.tempData.push({ item: '下行折返策略', status: this.strategyMap[selected.reentryStrategy] ? this.strategyMap[selected.reentryStrategy] : '默认' }); + // 待添加 + // this.tempData.push({ item: '下行折返策略', status: this.strategyMap[selected.reentryStrategy] ? this.strategyMap[selected.reentryStrategy] : '默认' }); }, doShow(operate, selected, opts) { this.selected = selected; From 217864dbd44ea7388e27e98aa61b41cd194139ed Mon Sep 17 00:00:00 2001 From: joylink_fanyuhong <18706759286@163.com> Date: Fri, 6 Mar 2020 10:05:21 +0800 Subject: [PATCH 20/20] =?UTF-8?q?=E7=AB=99=E5=8F=B0=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/bejing_01.js | 9 ++ src/jmapNew/config/skinCode/chengdu_01.js | 9 ++ src/jmapNew/config/skinCode/chengdu_03.js | 9 ++ src/jmapNew/config/skinCode/fuzhou_01.js | 9 ++ src/jmapNew/config/skinCode/haerbin_01.js | 9 ++ src/jmapNew/config/skinCode/ningbo_01.js | 11 +- src/jmapNew/shape/StationStand/index.js | 149 +++++++++++++++++----- src/store/modules/socket.js | 2 +- src/utils/baseUrl.js | 4 +- src/utils/loaddata.js | 6 +- 10 files changed, 179 insertions(+), 38 deletions(-) diff --git a/src/jmapNew/config/skinCode/bejing_01.js b/src/jmapNew/config/skinCode/bejing_01.js index b11a0d198..4c7cba4c1 100644 --- a/src/jmapNew/config/skinCode/bejing_01.js +++ b/src/jmapNew/config/skinCode/bejing_01.js @@ -257,6 +257,15 @@ class SkinCode extends defaultStyle { mouseOverStyle: { borderLineColor: '#FFFFFF', borderLineDash: [3, 3] + }, + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + lamp: { + radiusR: 6, // 控制灯大小 + lampColor: '#5A5D5A' // 功能按钮颜色 } }; diff --git a/src/jmapNew/config/skinCode/chengdu_01.js b/src/jmapNew/config/skinCode/chengdu_01.js index f0c861d39..ec6bd9961 100644 --- a/src/jmapNew/config/skinCode/chengdu_01.js +++ b/src/jmapNew/config/skinCode/chengdu_01.js @@ -258,6 +258,15 @@ class SkinCode extends defaultStyle { position: 1, // 运行等级方向 offset: {x: -8, y: 30}, // 运行等级偏移量 textColor: '#FFF000' // 停站等级字体颜色 + }, + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + lamp: { + radiusR: 6, // 控制灯大小 + lampColor: '#5A5D5A' // 功能按钮颜色 } }; diff --git a/src/jmapNew/config/skinCode/chengdu_03.js b/src/jmapNew/config/skinCode/chengdu_03.js index c75389a0b..9f2335b4a 100644 --- a/src/jmapNew/config/skinCode/chengdu_03.js +++ b/src/jmapNew/config/skinCode/chengdu_03.js @@ -263,6 +263,15 @@ class SkinCode extends defaultStyle { position: 1, // 运行等级方向 offset: {x: -8, y: 15}, // 运行等级偏移量 textColor: '#FFF000' // 停站等级字体颜色 + }, + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + lamp: { + radiusR: 6, // 控制灯大小 + lampColor: '#5A5D5A' // 功能按钮颜色 } }; diff --git a/src/jmapNew/config/skinCode/fuzhou_01.js b/src/jmapNew/config/skinCode/fuzhou_01.js index 511f84f1a..78b1ad1a1 100644 --- a/src/jmapNew/config/skinCode/fuzhou_01.js +++ b/src/jmapNew/config/skinCode/fuzhou_01.js @@ -241,6 +241,15 @@ class SkinCode extends defaultStyle { position: 1, // 运行等级方向 offset: {x: -8, y: 6}, // 运行等级偏移量 textColor: '#FFFFFF' // 停站等级字体颜色 + }, + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + lamp: { + radiusR: 6, // 控制灯大小 + lampColor: '#5A5D5A' // 功能按钮颜色 } }; diff --git a/src/jmapNew/config/skinCode/haerbin_01.js b/src/jmapNew/config/skinCode/haerbin_01.js index fd6f077c6..944e7eb95 100644 --- a/src/jmapNew/config/skinCode/haerbin_01.js +++ b/src/jmapNew/config/skinCode/haerbin_01.js @@ -246,6 +246,15 @@ class SkinCode extends defaultStyle { position: 1, // 运行等级方向 offset: { x: -8, y: 6 }, // 运行等级偏移量 textColor: '#FFFFFF' // 停站等级字体颜色 + }, + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + lamp: { + radiusR: 6, // 控制灯大小 + lampColor: '#5A5D5A' // 功能按钮颜色 } }; diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index d06ce0e0f..c016c5a4b 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -224,7 +224,7 @@ class SkinCode extends defaultStyle { controlColor: '#b5b3b3' // 控制灯颜色 (灰色) }, OutFrame: { - + } }; @@ -284,6 +284,15 @@ class SkinCode extends defaultStyle { position: -1, // 运行等级方向 offset: { x: -8, y: 4 }, // 运行等级偏移量 textColor: '#FFF000' // 停站等级字体颜色 + }, + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + lamp: { + radiusR: 6, // 控制灯大小 + lampColor: '#5A5D5A' // 功能按钮颜色 } }; diff --git a/src/jmapNew/shape/StationStand/index.js b/src/jmapNew/shape/StationStand/index.js index 1f3293dea..e96cba070 100644 --- a/src/jmapNew/shape/StationStand/index.js +++ b/src/jmapNew/shape/StationStand/index.js @@ -208,37 +208,124 @@ class StationStand extends Group { } } createFunctionButton() { // - // const model = this.model; - // const style = this.style; - // if (model.stopJumpLamp) { - // this.stopJumpLampButton = new EControl({ - // zlevel: this.zlevel, - // z: this.z, - // arc: { - // shape: { - // cx: model.guideTotalLockPoint.x, - // cy: model.guideTotalLockPoint.y, - // r: style.Station.lamp.radiusR - // }, - // lineWidth: 0, - // fill: style.Station.lamp.guideColor - // }, - // text: { - // position: [0, 0], - // x: model.guideTotalLockPoint.x, - // y: model.guideTotalLockPoint.y + style.Station.lamp.radiusR + style.Station.StationControl.text.distance, - // fontWeight: style.Station.text.fontWeight, - // fontSize: style.Station.text.fontSize, - // fontFamily: style.fontFamily, - // text: '引导总锁', - // textFill: '#fff', - // textAlign: 'middle', - // textVerticalAlign: 'top' - // }, - // style: this.style - // }); - // this.add(this.stopJumpLampButton); - // } + const model = this.model; + const style = this.style; + if (model.stopJumpLamp) { + this.stopJumpLampButton = new EControl({ + zlevel: this.zlevel, + z: this.z, + arc: { + shape: { + cx: model.stopJumpLampPoint.x, + cy: model.stopJumpLampPoint.y, + r: style.Station.lamp.radiusR + }, + lineWidth: 0, + fill: style.StationStand.lamp.lampColor + }, + text: { + position: [0, 0], + x: model.stopJumpLampPoint.x, + y: model.stopJumpLampPoint.y + style.StationStand.lamp.radiusR + style.StationStand.text.distance, + fontWeight: style.StationStand.text.fontWeight, + fontSize: style.StationStand.text.fontSize, + fontFamily: style.fontFamily, + text: '跳停', + textFill: '#fff', + textAlign: 'middle', + textVerticalAlign: 'top' + }, + style: this.style + }); + this.add(this.stopJumpLampButton); + } + if (model.cancelStopJumpLamp) { + this.cancelStopJumpLampButton = new EControl({ + zlevel: this.zlevel, + z: this.z, + arc: { + shape: { + cx: model.cancelStopJumpLampPoint.x, + cy: model.cancelStopJumpLampPoint.y, + r: style.Station.lamp.radiusR + }, + lineWidth: 0, + fill: style.StationStand.lamp.lampColor + }, + text: { + position: [0, 0], + x: model.cancelStopJumpLampPoint.x, + y: model.cancelStopJumpLampPoint.y + style.StationStand.lamp.radiusR + style.StationStand.text.distance, + fontWeight: style.StationStand.text.fontWeight, + fontSize: style.StationStand.text.fontSize, + fontFamily: style.fontFamily, + text: '取消跳停', + textFill: '#fff', + textAlign: 'middle', + textVerticalAlign: 'top' + }, + style: this.style + }); + this.add(this.cancelStopJumpLampButton); + } + if (model.upDetainLamp) { + this.upDetainLampButton = new EControl({ + zlevel: this.zlevel, + z: this.z, + arc: { + shape: { + cx: model.upDetainLampPoint.x, + cy: model.upDetainLampPoint.y, + r: style.Station.lamp.radiusR + }, + lineWidth: 0, + fill: style.StationStand.lamp.lampColor + }, + text: { + position: [0, 0], + x: model.upDetainLampPoint.x, + y: model.upDetainLampPoint.y + style.StationStand.lamp.radiusR + style.StationStand.text.distance, + fontWeight: style.StationStand.text.fontWeight, + fontSize: style.StationStand.text.fontSize, + fontFamily: style.fontFamily, + text: '上行扣车', + textFill: '#fff', + textAlign: 'middle', + textVerticalAlign: 'top' + }, + style: this.style + }); + this.add(this.upDetainLampButton); + } + if (model.downDetainLamp) { + this.downDetainLampButton = new EControl({ + zlevel: this.zlevel, + z: this.z, + arc: { + shape: { + cx: model.downDetainLampPoint.x, + cy: model.downDetainLampPoint.y, + r: style.Station.lamp.radiusR + }, + lineWidth: 0, + fill: style.StationStand.lamp.lampColor + }, + text: { + position: [0, 0], + x: model.downDetainLampPoint.x, + y: model.downDetainLampPoint.y + style.StationStand.lamp.radiusR + style.StationStand.text.distance, + fontWeight: style.StationStand.text.fontWeight, + fontSize: style.StationStand.text.fontSize, + fontFamily: style.fontFamily, + text: '上行扣车', + textFill: '#fff', + textAlign: 'middle', + textVerticalAlign: 'top' + }, + style: this.style + }); + this.add(this.downDetainLampButton); + } } setVisible(visible) { if (visible) { diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js index 7fbc857b4..8649dab82 100644 --- a/src/store/modules/socket.js +++ b/src/store/modules/socket.js @@ -2,7 +2,7 @@ import store from '@/store'; import { Notification } from 'element-ui'; function handle(state, data) { - // console.log(data, 'socket订阅'); + console.log(data, 'socket订阅'); const msg = data.body; const path = window.location.href; switch (data.type) { diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 8f0c4853a..506eafc22 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -3,14 +3,14 @@ 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://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 - BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 + // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 } else { BASE_API = process.env.VUE_APP_BASE_API; } diff --git a/src/utils/loaddata.js b/src/utils/loaddata.js index d7af33551..e5aecf199 100644 --- a/src/utils/loaddata.js +++ b/src/utils/loaddata.js @@ -38,9 +38,9 @@ export function loadMapDataById(mapId) { export function loadNewMapDataByGroup(group) { return new Promise((resolve, reject) => { getNewMapDataByGroup(group).then(resp => { - resp.data.graphDataNew && resp.data.graphDataNew.trainList && resp.data.graphDataNew.trainList.forEach(item => { - item.code = item.groupNumber; - }); + // resp.data.graphDataNew && resp.data.graphDataNew.trainList && resp.data.graphDataNew.trainList.forEach(item => { + // item.code = item.groupNumber; + // }); const mapData = resp.data.graphDataNew; store.dispatch('map/setMapData', mapData).then(() => { store.dispatch('map/clearJlmapTrainView').then(() => {