ATP重启 由故障 变为操作
This commit is contained in:
parent
cdb907819f
commit
68d85d3dc6
@ -34,6 +34,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
|||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||||
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
import CommandHandler from '@/scripts/cmdPlugin/CommandHandler.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Menus',
|
name: 'Menus',
|
||||||
@ -153,28 +154,34 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
atpRestart() {
|
atpRestart() {
|
||||||
const step = {
|
CommandHandler.execute('Server_ATP_Restart', {}).then(resp => {
|
||||||
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();
|
this.doClose();
|
||||||
} else {
|
}).catch(error => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$messageBox('设置或取消故障操作失败!');
|
this.$messageBox(error.message || 'ATP重启失败!');
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$messageBox(error.message || '设置或取消故障操作失败!');
|
|
||||||
});
|
});
|
||||||
|
// 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() {
|
doClose() {
|
||||||
if (this.$refs && this.$refs.popMenu) {
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
|
Loading…
Reference in New Issue
Block a user