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++; } },