From eb6cd7ce2dabda4c789d1b22e47e4101b767dd71 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Thu, 30 Apr 2020 11:28:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=81=93=E5=B2=94=E4=BD=BF?= =?UTF-8?q?=E8=83=BD=E5=8F=91=E9=80=81=E6=B5=81=E7=A8=8B=EF=BC=8C=E5=8F=8A?= =?UTF-8?q?=E7=BB=98=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/Switch/index.js | 14 ++++++++++++-- src/jmapNew/theme/xian_02/menus/menuCancel.vue | 2 ++ src/jmapNew/theme/xian_02/menus/menuRequest.vue | 1 + src/jmapNew/theme/xian_02/menus/menuSwitch.vue | 15 +++++++++++++-- src/jmapNew/theme/xian_02/model.js | 1 - src/store/modules/menuoperation.js | 2 +- src/utils/baseUrl.js | 4 ++-- 7 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/jmapNew/shape/Switch/index.js b/src/jmapNew/shape/Switch/index.js index 66dfcd3ff..94dfff3ee 100644 --- a/src/jmapNew/shape/Switch/index.js +++ b/src/jmapNew/shape/Switch/index.js @@ -177,7 +177,7 @@ export default class Switch extends Group { this.add(this.sheltertriangle); this.add(this.releaseBackground); this.add(this.name); - // this.add(this.enabledName); + this.add(this.enabledName); style.Switch.text.show && model.nameShow ? this.name.show() : this.name.hide(); } @@ -217,6 +217,15 @@ export default class Switch extends Group { } } + setCiConfirm() { + this.enabledName && this.enabledName.show(); + this.enabledName.animateStyle(true) + .when(0, { textFill: this.style.backgroundColor }) + .when(1000, { textFill: 'yellow' }) + .when(2000, { textFill: this.style.backgroundColor }) + .start(); + } + /** 名称动画*/ nameTextAnimation() { this.name.getNameText().animateStyle(true) @@ -258,6 +267,7 @@ export default class Switch extends Group { this.setHasTextBorder(0); this.locShelter.hide(); // 定位覆盖图形 this.relocShelter.hide(); // 反位覆盖图形 + this.enabledName.hide(); // 使能隐藏 } /** 定位*/ @@ -479,7 +489,7 @@ export default class Switch extends Group { /** 区段切除*/ // this.setForkAction(); // 道岔挤岔完成 // 道岔使能显示 - // model.enabledShow ? this.enabledName.show() : this.enabledName.hide(); + model.isCiConfirm && this.setCiConfirm(); model.cutOff && this.setSwitchCutOff(); if (this.style.Switch.sectionAction.flag) { // 哈尔滨线路处理道岔相关区段颜色 const switchModel = Vue.prototype.$jlmap.mapDevice[model.code]; diff --git a/src/jmapNew/theme/xian_02/menus/menuCancel.vue b/src/jmapNew/theme/xian_02/menus/menuCancel.vue index 016ccfa06..7987c6401 100644 --- a/src/jmapNew/theme/xian_02/menus/menuCancel.vue +++ b/src/jmapNew/theme/xian_02/menus/menuCancel.vue @@ -223,6 +223,7 @@ export default { cmdType: eachCmd.cmdType, param: eachCmd.param // 请求栈中参数配置 }; + this.$store.dispatch('training/updateMapState', [{code: eachCmd.device.code, _type: eachCmd.device.type, isCiConfirm: 0}]); } this.$store.dispatch('menuOperation/spliceRequestList', {deviceCode:eachCmd.device.code, operateCode:eachCmd.operation.code}); this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { @@ -234,6 +235,7 @@ export default { } }).catch(() => { this.loading = false; + // this.$refs.noticeInfo.doShow(operate); }); } } diff --git a/src/jmapNew/theme/xian_02/menus/menuRequest.vue b/src/jmapNew/theme/xian_02/menus/menuRequest.vue index 98b022cf4..fb4893f5c 100644 --- a/src/jmapNew/theme/xian_02/menus/menuRequest.vue +++ b/src/jmapNew/theme/xian_02/menus/menuRequest.vue @@ -118,6 +118,7 @@ export default { cmdType: eachCmd.cmdType, param: eachCmd.param // 请求栈中参数配置 }; + this.$store.dispatch('training/updateMapState', [{code: eachCmd.device.code, _type: eachCmd.device.type, isCiConfirm: 0}]); } this.$store.dispatch('menuOperation/spliceRequestList', {deviceCode:eachCmd.device.code, operateCode:eachCmd.operation.code}); this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { diff --git a/src/jmapNew/theme/xian_02/menus/menuSwitch.vue b/src/jmapNew/theme/xian_02/menus/menuSwitch.vue index cc07396fd..92b395795 100644 --- a/src/jmapNew/theme/xian_02/menus/menuSwitch.vue +++ b/src/jmapNew/theme/xian_02/menus/menuSwitch.vue @@ -131,7 +131,7 @@ export default { menuEnabled: [ { label: '使能', - handler: this.undeveloped + handler: this.enabledConfirm }, { label: '模拟', @@ -306,7 +306,8 @@ export default { this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Switch.unlock.menu.operation, name: '道岔解锁'}, - cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK, + // cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK, + ciConfirm: true, param: operate.param }); } @@ -360,6 +361,16 @@ export default { } }); }, + enabledConfirm() { + this.$store.dispatch('menuOperation/pushRequestList', { + device: this.selected, + operation: { code: OperationEvent.Switch.unlock.menu.operation, name: '道岔解锁'}, + cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK, + param: { + switchCode: this.selected.code + } + }); + }, undeveloped() { this.doClose(); this.$alert('实现中......', '提示', { diff --git a/src/jmapNew/theme/xian_02/model.js b/src/jmapNew/theme/xian_02/model.js index c8f69ef5a..66059c253 100644 --- a/src/jmapNew/theme/xian_02/model.js +++ b/src/jmapNew/theme/xian_02/model.js @@ -18,7 +18,6 @@ class Model { kmPostShow: true // 公里标显示 }; this['private'][deviceType.Switch] = { - enabledShow: false, // 使能显示 nameShow: true }; this['private'][deviceType.Section] = { diff --git a/src/store/modules/menuoperation.js b/src/store/modules/menuoperation.js index 7dd366ff3..9c85a5e95 100644 --- a/src/store/modules/menuoperation.js +++ b/src/store/modules/menuoperation.js @@ -145,7 +145,7 @@ const menuOperation = { state.endSignalRouteList = param.endSignalRouteList; }, setLeftClickCount: (state) => { - state.leftClickCount++; + state.leftClickCount++; } }, diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 7cedc6817..e9046878d 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,9 +2,9 @@ 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.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.41:9000'; // 张赛 // BASE_API = 'http://192.168.3.82:9000'; // 杜康 // BASE_API = 'http://192.168.3.41:9000'; // 张赛