diff --git a/src/jmapNew/config/skinCode/chengdu_03.js b/src/jmapNew/config/skinCode/chengdu_03.js index 19698dd9b..60e79b999 100644 --- a/src/jmapNew/config/skinCode/chengdu_03.js +++ b/src/jmapNew/config/skinCode/chengdu_03.js @@ -180,10 +180,12 @@ class SkinCode extends defaultStyle { route: { direction: true, // 自动通过方向 offset: { x: 4, y: 0}, // 自动通过偏移量 - routeColor: '#00FF00' // 自动进路 + routeColor: '#00FF00', // 自动进路 + radiusR: 6 }, auto: { signalFrontTriangle: true, // 信号灯前三角展示 + fleetModeTriangle: true, // 自动进路显示三角形非箭头 direction: false, // 自动通过方向 offset: { x: -4, y: 0}, // 自动通过偏移量 width: 5, // 自动宽度 @@ -494,7 +496,7 @@ class SkinCode extends defaultStyle { /** 引导总锁 */ this[deviceType.GuideLock] = { // 是否显示 - displayCondition: '03', // 显示条件 prdType + displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 diff --git a/src/jmapNew/constant/deviceState.js b/src/jmapNew/constant/deviceState.js index 3760f5a27..2a7a98518 100644 --- a/src/jmapNew/constant/deviceState.js +++ b/src/jmapNew/constant/deviceState.js @@ -15,7 +15,16 @@ deviceState[deviceType.Section] = { /** 是否故障*/ fault: 0 /** 非故障*/ }; - +// 进路后端状态 +// boolean cbtcMode;是否CBTC模式 +// boolean atsControl;ats自动控制 +// boolean fleetMode;连续通过进路模式(联锁自动进路)开启 +// boolean ciControl;自动追踪/联锁自动触发模式开启 +// boolean setting;进路是否排列中 +// boolean settingGuide;是否引导进路排列 +// boolean lock;进路是否锁闭 +// boolean canceling;进路是否人解中 +// boolean normalUnlock;是否正常解锁中 deviceState[deviceType.Switch] = { singleLock: 0, // 是否单锁 blockade: 0, // 是否封锁 diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index 47d686e18..b8036bf9b 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -282,6 +282,8 @@ class Jlmap { } else if (oDevice._type === deviceType.Section) { this.$painter.updateShowStation(oDevice, stationCode); this.showStationHandleSection(oDevice, stationCode); + } else if (oDevice._type === deviceType.TrainWindow) { + // 不处理车次窗 勿删 } else if (oDevice._type === deviceType.Psd) { this.showStationHandlePsd(oDevice, stationCode); } else { diff --git a/src/jmapNew/shape/Section/index.js b/src/jmapNew/shape/Section/index.js index db8ed1e42..80819c31d 100644 --- a/src/jmapNew/shape/Section/index.js +++ b/src/jmapNew/shape/Section/index.js @@ -10,7 +10,6 @@ import { EAxle } from './EAxle'; // 创建计轴 (私有) import { EBackArrow, EBackArrowTriangle } from './EBackArrow'; // 折返进路箭头 import ELimitName from './ELimitName'; // 成都三号线 限速名称 import JTriangle from '../../utils/JTriangle'; -import router from '@/router'; import { drawSectionStyle } from '../../config/defaultStyle'; import store from '@/store'; import Vue from 'vue'; @@ -67,14 +66,13 @@ export default class Section extends Group { createSection() { const model = this.model; const style = this.style; - // 创建区段 this.section = new ELines({ zlevel: this.zlevel, z: model.type == '02' ? this.z + 1 : this.z, // 逻辑区段层级降低一层 isSwitchSection: model.switchSection, isCurve: model.curve, - points: model.points, + points: model.type == '04' ? [model.namePosition, model.namePosition] : model.points, style: style }); // 创建哈尔滨特殊区段(用作封锁显示) @@ -320,25 +318,23 @@ export default class Section extends Group { this.add(this.name); } } else if (model.type == '04') { // 道岔计轴区段名称 - if (router.currentRoute.path.startsWith('/design/usermap/map/draw') && router.currentRoute.path.endsWith('/draft')) { - this.name = new ETextName({ - zlevel: this.zlevel, - z: this.z + 2, - style: this.style, - silent: false, - x: tempx + model.namePosition.x, - y: tempy + model.namePosition.y + style.Section.text.distance * drict, - fontWeight: style.Section.text.fontWeight, - fontSize: style.Section.text.fontSize, - fontFamily: style.fontFamily, - text: model.name, - textFill: style.Section.text.fontColor, - textAlign: style.Section.text.textAlign, - textPosition: style.Section.text.textPosition, - textVerticalAlign: style.Section.text.textVerticalAlign - }); - this.add(this.name); - } + this.name = new ETextName({ + zlevel: this.zlevel, + z: this.z + 2, + style: this.style, + silent: false, + x: tempx + model.namePosition.x, + y: tempy + model.namePosition.y + style.Section.text.distance * drict, + fontWeight: style.Section.text.fontWeight, + fontSize: style.Section.text.fontSize, + fontFamily: style.fontFamily, + text: model.name, + textFill: style.Section.text.fontColor, + textAlign: style.Section.text.textAlign, + textPosition: style.Section.text.textPosition, + textVerticalAlign: style.Section.text.textVerticalAlign + }); + this.add(this.name); } /** 站台轨名称*/ @@ -817,8 +813,16 @@ export default class Section extends Group { sectionC && sectionC.instance && sectionC.instance.setState(sectionC, true); } } + let numFlag = 0; + model.logicSectionNum.forEach(item => { + numFlag += item; + }); + if (numFlag) { + return; + } + // 顺序代表优先级 /** 道岔保护区段锁闭 */ - model.overlapLock && this.protectiveLock(); + { model.overlapLock && this.protectiveLock(); } /** 空闲锁闭或者叫进路锁闭 */ model.routeLock && this.routeLock(); /** 轨道封锁 */ diff --git a/src/jmapNew/shape/Signal/index.js b/src/jmapNew/shape/Signal/index.js index 79cc201c3..205ccb0ba 100644 --- a/src/jmapNew/shape/Signal/index.js +++ b/src/jmapNew/shape/Signal/index.js @@ -443,8 +443,13 @@ class Signal extends Group { // 设置自动进路模式状态类型 setAutoRouteOpen() { - this.sigAuto.setColor(this.style.Signal.auto.autoRoute); - this.sigAuto.show(); + if (this.style.Signal.auto.fleetModeTriangle) { + this.sigRoute.show(); + this.sigRoute.setStyle({ fill: this.style.Signal.auto.autoRoute }); + } else { + this.sigAuto.setColor(this.style.Signal.auto.autoRoute); + this.sigAuto.show(); + } } // 信号机进路自动触发模式状态类型 @@ -473,9 +478,9 @@ class Signal extends Group { recover() { this.sigName.setStyle({ textBorderWidth: 0 }); this.setAutoClose(); - this.model.atsControl && this.sigRoute.hide(); this.sigDelay.hide(); this.sigAuto.animationRecover(); + this.sigRoute.hide(); this.sigName.setColor(this.style.Signal.text.defaultColor); if (this.style.Signal.lamp.guidName == 'chengdu_03') { this.lamps[0].setStyle({ lineWidth: this.style.Signal.lamp.borderWidth }); @@ -521,9 +526,7 @@ class Signal extends Group { model.isRouteSignal && this.setLowButtonShow(); /** 信号机封锁 */ model.blockade && this.block(); - // 联锁自动进路通过 // model.linkageAutoRouteShow = 1; - model.fleetMode && this.setAutoRouteOpen(); /** 设置点灯类型*/ if (model.lightType) { this.logicalLight(); // 设置逻辑点灯 @@ -533,6 +536,9 @@ class Signal extends Group { model.guid && this.guid(); // 引导信号显示 /** 进路交人工控或自动控 */ !model.atsControl && this.setArtificialRouteClose(); + // 联锁自动进路通过 + model.fleetMode && this.setAutoRouteOpen(); + debugger; } getBoundingRect() { diff --git a/src/jmapNew/theme/chengdu_03/menus/menuButton.vue b/src/jmapNew/theme/chengdu_03/menus/menuButton.vue index 060355185..e382bf9c0 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuButton.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuButton.vue @@ -1,79 +1,79 @@ @@ -111,15 +112,17 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import OperationHandler from '@/scripts/cmdPlugin/OperationHandler'; import Handler from '@/scripts/cmdPlugin/Handler'; -import { getAutoReentryBySignalCode } from '@/utils/index'; +import { getAutoReentryBySignalCode } from '@/utils/mapList'; import PasswordBox from './dialog/childDialog/passwordInputBox.vue'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; import { mapGetters } from 'vuex'; +import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; export default { name: 'MapButtonMenu', components: { - PasswordBox + PasswordBox, + NoticeInfo }, data() { return { @@ -134,7 +137,7 @@ export default { width: 58, tempData: null, offset: {}, - commandType: '', + commandTypeList: [], cmdTypeList: [], deviceList: [] }; @@ -177,8 +180,10 @@ export default { return CMD.Switch.CMD_SWITCH_SINGLE_LOCK; case this.Switch.unlock.button.operation: // 道岔解锁 return CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK; - case this.Switch.locate.button.operation || this.Switch.reverse.button.operation: // 道岔定位/反位 - return CMD.Switch.CMD_SWITCH_TURN; + case this.Switch.locate.button.operation: // 道岔定位 + return CMD.Switch.CMD_SWITCH_NORMAL_POSITION; + case this.Switch.reverse.button.operation: // 道岔反位 + return CMD.Switch.CMD_SWITCH_REVERSE_POSITION; case this.MixinCommand.block.button.operation: // 封锁 return {}; case this.MixinCommand.unblock.button.operation: // 解封 @@ -190,15 +195,15 @@ export default { case this.Section.fault.button.operation: // 区故解 return CMD.Section.CMD_SECTION_FAULT_UNLOCK; case this.Signal.humanTrainRoute.button.operation: // 总人解 (取消引导进路) - return CMD.Section.CMD_SIGNAL_HUMAN_RELEASE_ROUTE; - case this.Signal.cancelTrainRoute.button.operation: // 总取消 - return CMD.Section.CMD_SIGNAL_CANCEL_ROUTE; + return CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE; case this.Signal.arrangementRoute.button.operation: // 排列进路 return CMD.Signal.CMD_SIGNAL_SET_ROUTE; case this.Signal.guide.button.operation: // 引导进路 return CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE; case this.Signal.reopenSignal.button.operation: return CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL; + case this.Station.guideLock.button.operation: + return CMD.Station.CMD_STATION_SET_MASTER_GUIDE_LOCK; } return ''; } @@ -223,10 +228,13 @@ export default { type: 'mbm', operation: data.operateNext }; + this.trainingOperation(operate); + }, + // 执行操作 + trainingOperation(operate) { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - } }).catch(() => { this.$refs.noticeInfo.doShow(operate); @@ -262,33 +270,21 @@ export default { } } }, - buttonDown(operation, commandType) { + buttonDown(operation, commandTypeList) { + this.deviceList = []; if (operation != this.Command.cancel.clearMbm.operation) { const operate = { type: 'mbm', operation: operation }; + const operationList = [this.Signal.humanTrainRoute.button.operation, this.Section.fault.button.operation, this.Switch.unlock.button.operation, this.MixinCommand.unblock.button.operation]; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.operation = operation; - this.commandType = commandType; - if (this.commandType == 'MixinCommand') { - this.cmdTypeList = ['Switch', 'Signal']; - } else { - this.cmdTypeList = [commandType]; - } + this.commandTypeList = commandTypeList; this.$store.dispatch('menuOperation/setButtonOperation', operation); // 按钮菜单是否被按下 this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - if (operation == this.Signal.humanTrainRoute.button.operation) { // 总人解操作 显示密码窗 - operate['operateNext'] = this.Command.close.password.operation; - this.$refs.password.doShow(operate); - } else if (operation == this.Section.fault.button.operation) { // 区故解操作 显示密码窗 - operate['operateNext'] = this.Command.close.password.operation; - this.$refs.password.doShow(operate); - } else if (operation == this.Switch.unlock.button.operation) { // 道岔解锁操作 显示密码窗 - operate['operateNext'] = this.Command.close.password.operation; - this.$refs.password.doShow(operate); - } else if (operation == this.MixinCommand.unblock.button.operation) { // 解封操作 显示密码窗 + if (operationList.includes(operation)) { operate['operateNext'] = this.Command.close.password.operation; this.$refs.password.doShow(operate); } @@ -303,7 +299,7 @@ export default { }; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { - this.commandType = ''; + this.commandTypeList = []; this.$store.dispatch('menuOperation/setButtonOperation', null); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); Handler.clear(); // 清空操作组 @@ -313,6 +309,12 @@ export default { }, arrangementRouteOperation(deviceList) { const routes = []; + const operate = { + send: true, + operation: this.$store.state.menuOperation.buttonOperation, + cmdType: '', + param: '' + }; let isArrangementRoute = false; if (deviceList.length === 1) { this.routeList.forEach(item => { @@ -325,19 +327,17 @@ export default { }); const signal = this.$store.getters['map/getDeviceByCode'](deviceList[0].code); if (signal.redOpen && !signal.greenOpen && !signal.yellowOpen && isArrangementRoute) { - const operate = { - type: 'mbm', - operation: this.Signal.reopenSignal.button.operation - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - const newOperate = this.handelOperate(deviceList[0].code); - this.$store.dispatch('training/nextNew', newOperate).then(({ valid, response }) => {}); - }); + operate.cmdType = CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL; + operate.param = {signalCode: deviceList[0].code}; + this.deviceList = []; + this.$store.dispatch('training/nextNew', newOperate).then(({ valid, response }) => {}); } } else if (deviceList.length === 2) { this.routeList.forEach(item => { if (item.startSignalCode === deviceList[0].code && item.endSignalCode === deviceList[1].code) { - const operate = this.handelOperate(item); + operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_ROUTE; + operate.param = {routeCode: item.code}; + this.deviceList = []; this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}); } }); @@ -364,7 +364,10 @@ export default { operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_CI_AUTO; operate.param = {signalCode: route.startSignalCode}; } - this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}); + this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch(() => { + this.deviceList = []; + this.$refs.noticeInfo.doShow(operate); + }); }, handelTotalCancel(model, subType) { const operate = { @@ -391,7 +394,10 @@ export default { operate.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO; operate.param = {signalCode: route.startSignalCode}; } - this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}); + this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch(() => { + this.deviceList = []; + this.$refs.noticeInfo.doShow(operate); + }); }, handleGuideRoute(deviceList) { if (deviceList.length === 1) { @@ -422,9 +428,9 @@ export default { }; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { + this.deviceList = []; this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); operate['operateNext'] = this.Command.close.password.operation; - this.operation = '0'; this.$refs.password.doShow(operate); } }); @@ -439,86 +445,129 @@ export default { this.routeList.forEach(item => { if (item.startSignalCode === deviceList[0].code && item.endSignalCode === deviceList[1].code) { operate.param = {routeCode: item.code}; + this.deviceList = []; this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}); } }); } }, - selectedChange() { - // 按钮按下时 - if (this.$store.state.menuOperation.buttonOperation) { - const model = this.$store.state.menuOperation.selected; // 选择设备 - const subType = this.$store.state.menuOperation.subType; // 选择设备的子元素 - this.deviceList.push(model); - if (model._type) { - if (this.Signal.arrangementRoute.button.operation === this.$store.state.menuOperation.buttonOperation) { - if (model._type !== 'Signal') { - return; - } - this.arrangementRouteOperation(this.deviceList); - } else if (this.$store.state.menuOperation.buttonOperation === this.MixinCommand.functionButton.button.operation) { - this.handelFunctionButton(model, subType); - } else if (this.$store.state.menuOperation.buttonOperation === this.MixinCommand.totalCancel.button.operation) { - this.handelTotalCancel(model, subType); - } else if (this.$store.state.menuOperation.buttonOperation === this.Signal.guide.button.operation) { - if (model._type !== 'Signal') { - return; - } - this.handleGuideRoute(this.deviceList); - } else { - const operate = this.handelOperate(model); - if (this.cmdTypeList.indexOf(model._type) >= 0) { - this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}); - } else { - Handler.clear(); // 清空操作组 - this.$store.dispatch('menuOperation/setButtonOperation', null); - } - } - } else { - Handler.clear(); // 清空操作组 - this.$store.dispatch('menuOperation/setButtonOperation', null); + handleTotalHumanSolution(model) { + let route = ''; + this.routeList.forEach(item => { + if (item.startSignalCode === model.code) { + route = item; } + }); + const operate = { + send: true, + operation: this.$store.state.menuOperation.buttonOperation + }; + if (this.routeData[route.code].settingGuide) { + operate.cmdType = CMD; + this.deviceList = []; + this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}); + } else { + operate.cmdType = CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE; + operate.param = {signalCode: model.code}; + this.deviceList = []; + this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); } }, - handelOperate(model) { // 设置operate - this.deviceList = []; + handelControlRoute(model) { + const routeCodeList = []; const operate = { send: true, operation: this.$store.state.menuOperation.buttonOperation, cmdType: this.cmdType, param: {} }; - switch (this.commandType) { - case 'Switch': - operate.param['switchCode'] = model.code; - break; - case 'Signal': - operate.param['signalCode'] = model.code; - break; - case 'Section': - operate.param['sectionCode'] = model.code; - break; - case 'MixinCommand': - if (model._type == 'Switch') { - if (this.operation == this.MixinCommand.block.button.operation) { - operate.cmdType = CMD.Switch.CMD_SWITCH_BLOCK; - } else if (this.operation == this.MixinCommand.unblock.button.operation) { - operate.cmdType = CMD.Switch.CMD_SWITCH_UNBLOCK; - } - operate.param['Switch_Code'] = model.code; - } else if (model._type == 'Signal') { - if (this.operation == this.MixinCommand.block.button.operation) { - operate.cmdType = CMD.Signal.CMD_SIGNAL_BLOCK; - } else if (this.operation == this.MixinCommand.unblock.button.operation) { - operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK; - } - operate.param['Signal_Code'] = model.code; - } else if (model.deviceType == 'ROUTE') { - operate.param['routeCode'] = model.code; + this.routeList.forEach(item => { + if (item.startSignalCode === model.code) { + routeCodeList.push(item.code); } - break; + }); + operate.param = {signalCode: model.code, routeCodeList: routeCodeList}; + this.deviceList = []; + this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + }, + handelSwitchOperate(model) { + const operate = { + send: true, + operation: this.$store.state.menuOperation.buttonOperation, + cmdType: this.cmdType, + param: { switchCode: model.code} + }; + this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + }, + handelBlockOrUnblock(model) { + const buttonOperation = this.$store.state.menuOperation.buttonOperation; + const operate = { + send: true, + operation: buttonOperation, + cmdType: '', + param: {} + }; + if (model.type === 'Switch' && buttonOperation === this.MixinCommand.block.button.operation) { + operate.cmdType = CMD.Switch.CMD_SWITCH_BLOCK; + operate.param = {SwitchCode: model.code}; + } else if (model.type === 'Switch' && buttonOperation === this.MixinCommand.unblock.button.operation) { + operate.cmdType = CMD.Switch.CMD_SWITCH_UNBLOCK; + operate.param = {SwitchCode: model.code}; + } else if (model.type === 'Signal' && buttonOperation === this.MixinCommand.block.button.operation) { + operate.cmdType = CMD.Signal.CMD_SIGNAL_BLOCK; + operate.param = {SignalCode: model.code}; + } else if (model.type === 'Signal' && buttonOperation === this.MixinCommand.unblock.button.operation) { + operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK; + operate.param = {SignalCode: model.code}; + } + this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + }, + selectedChange() { + // 按钮按下时 + const buttonOperation = this.$store.state.menuOperation.buttonOperation; + const model = this.$store.state.menuOperation.selected; // 选择设备 + const subType = this.$store.state.menuOperation.subType; // 选择设备的子元素 + const switchOperation = [this.Switch.lock.button.operation, this.Switch.unlock.button.operation, this.Switch.locate.button.operation, this.Switch.reverse.button.operation]; + if (buttonOperation && this.commandTypeList.includes(model._type)) { + this.deviceList.push(model); + if (buttonOperation === this.Signal.arrangementRoute.button.operation) { + this.arrangementRouteOperation(this.deviceList); + } else if (buttonOperation === this.MixinCommand.functionButton.button.operation) { + this.handelFunctionButton(model, subType); + } else if (buttonOperation === this.MixinCommand.totalCancel.button.operation) { + this.handelTotalCancel(model, subType); + } else if (buttonOperation === this.Signal.humanTrainRoute.button.operation) { + this.handleTotalHumanSolution(model); + } else if (buttonOperation === this.Signal.guide.button.operation) { + this.handleGuideRoute(this.deviceList); + } else if (buttonOperation === this.Signal.atsAutoControl.button.operation || buttonOperation === this.Signal.humanControl.button.operation) { + this.handelControlRoute(model); + } else if (switchOperation.includes(buttonOperation)) { + this.handelSwitchOperate(model); + } else if (buttonOperation === this.MixinCommand.block.button.operation || buttonOperation === this.MixinCommand.unblock.button.operation) { + this.handelBlockOrUnblock(model); + } else { + const operate = this.handelOperate(model); + if (this.cmdTypeList.indexOf(model._type) >= 0) { + this.deviceList = []; + this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}); + } else { + Handler.clear(); // 清空操作组 + this.$store.dispatch('menuOperation/setButtonOperation', null); + } + } + } else { + Handler.clear(); // 清空操作组 + this.$store.dispatch('menuOperation/setButtonOperation', null); } - return operate; } } }; 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) {