diff --git a/src/jmapNew/theme/components/menus/dialog/setFault.vue b/src/jmapNew/theme/components/menus/dialog/setFault.vue index 937d9f0b9..c4f7046c6 100644 --- a/src/jmapNew/theme/components/menus/dialog/setFault.vue +++ b/src/jmapNew/theme/components/menus/dialog/setFault.vue @@ -40,6 +40,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import OperationHandler from '@/scripts/cmdPlugin/OperationHandler'; import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config'; +import { menuOperate } from '@/jmapNew/theme/components/utils/menuOperate'; export default { name: 'SwitchControl', @@ -80,9 +81,9 @@ export default { return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : ''; }, title() { - if (this.operation === OperationEvent.MixinCommand.stoppage.menu.operation) { + if (this.operation == OperationEvent.MixinCommand.stoppage.menu.operation) { return '设置故障'; - } else if (this.operation === OperationEvent.MixinCommand.cancelStoppage.menu.operation) { + } else if (this.operation == OperationEvent.MixinCommand.cancelStoppage.menu.operation) { return '取消故障'; } return ''; @@ -118,20 +119,38 @@ export default { commit() { this.$refs.form.validate((valid) => { if (valid) { - this.sendCommand(); + if (this.operation == OperationEvent.MixinCommand.stoppage.menu.operation) { + this.sendInstructions(); + } else if (this.operation == OperationEvent.MixinCommand.cancelStoppage.menu.operation) { + this.cancelCommand(); + } } }); }, - sendCommand() { // 发送指令 - this.loading = true; + cancelCommand() { const setp = { over: true, - operation: this.operation, - cmdType: this.cmdType, + operation: menuOperate.Common.cancelFault.operation, + cmdType: menuOperate.Common.cancelFault.cmdType, param: { faultType: this.form.faultType } }; + this.sendCommand(setp); + }, + sendInstructions() { // 发送指令 + const setp = { + over: true, + operation: menuOperate.Common.setFault.operation, + cmdType: menuOperate.Common.setFault.cmdType, + param: { + faultType: this.form.faultType + } + }; + this.sendCommand(setp); + }, + sendCommand(setp) { + this.loading = true; this.$store.dispatch('training/nextNew', setp).then(({ valid }) => { this.loading = false; if (valid) { diff --git a/src/jmapNew/theme/foshan_01/menus/dialog/routeSelection.vue b/src/jmapNew/theme/foshan_01/menus/dialog/routeSelection.vue index ae4e9da2d..53e1ccf28 100644 --- a/src/jmapNew/theme/foshan_01/menus/dialog/routeSelection.vue +++ b/src/jmapNew/theme/foshan_01/menus/dialog/routeSelection.vue @@ -185,6 +185,7 @@ export default { // 设置选中指令 const operate = { operation: OperationEvent.Signal.arrangementRoute.choose.operation + // val: }; if (this.row.settable) { diff --git a/src/jmapNew/theme/foshan_01/menus/dialog/standDetail.vue b/src/jmapNew/theme/foshan_01/menus/dialog/standDetail.vue index 5b00d26e7..074bfb894 100644 --- a/src/jmapNew/theme/foshan_01/menus/dialog/standDetail.vue +++ b/src/jmapNew/theme/foshan_01/menus/dialog/standDetail.vue @@ -29,27 +29,6 @@ - 确定 @@ -64,7 +43,7 @@