diff --git a/src/jmapNew/theme/nanjing_02/menus/index.vue b/src/jmapNew/theme/nanjing_02/menus/index.vue index 4b5eb486a..cc29a7a82 100644 --- a/src/jmapNew/theme/nanjing_02/menus/index.vue +++ b/src/jmapNew/theme/nanjing_02/menus/index.vue @@ -34,6 +34,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault'; import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; +import CommandHandler from '@/scripts/cmdPlugin/CommandHandler.js'; export default { name: 'Menus', @@ -153,28 +154,34 @@ export default { }); }, atpRestart() { - const step = { - over: true, - operation: menuOperate.Common.setFault.operation, - cmdType: menuOperate.Common.setFault.cmdType, - param: { - code: 'Server', - faultType: 'Server_ATP_Restart' - } - }; - this.$store.dispatch('training/nextNew', step).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.doClose(); - } else { - this.doClose(); - this.$messageBox('设置或取消故障操作失败!'); - } - }).catch((error) => { - this.loading = false; + CommandHandler.execute('Server_ATP_Restart', {}).then(resp => { this.doClose(); - this.$messageBox(error.message || '设置或取消故障操作失败!'); + }).catch(error => { + this.doClose(); + this.$messageBox(error.message || 'ATP重启失败!'); }); + // const step = { + // over: true, + // operation: menuOperate.Server.atpRestart.operation, + // cmdType: menuOperate.Server.atpRestart.cmdType + // // param: { + // // code: 'Server', + // // faultType: 'Server_ATP_Restart' + // // } + // }; + // this.$store.dispatch('training/nextNew', step).then(({ valid }) => { + // if (valid) { + // this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + // this.doClose(); + // } else { + // this.doClose(); + // this.$messageBox('ATP重启失败!'); + // } + // }).catch((error) => { + // this.loading = false; + // this.doClose(); + // this.$messageBox(error.message || 'ATP重启失败!'); + // }); }, doClose() { if (this.$refs && this.$refs.popMenu) {