From 228b4aadc3c01f8ea53715167e82ca68817fa693 Mon Sep 17 00:00:00 2001 From: fan Date: Fri, 2 Jun 2023 17:32:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=97=E8=BD=A6=E6=93=8D=E4=BD=9C=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/menus/dialog/trainOperation.vue | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/jmapNew/theme/components/menus/dialog/trainOperation.vue b/src/jmapNew/theme/components/menus/dialog/trainOperation.vue index a9519773e..317e3ce5e 100644 --- a/src/jmapNew/theme/components/menus/dialog/trainOperation.vue +++ b/src/jmapNew/theme/components/menus/dialog/trainOperation.vue @@ -25,13 +25,13 @@ - + - + @@ -70,6 +70,9 @@ export default { }; }, computed: { + showRight() { + return (this.right && !this.reversal) || (!this.right && this.reversal); + }, trainPic() { if ((this.right && this.reversal) || (!this.right && !this.reversal)) { return this.leftTrainPic; @@ -107,9 +110,9 @@ export default { sandTableTrainControl(this.$route.query.group, { groupNumber: this.groupNumber, right: this.right, speed: this.speed }).then(resp => { }).catch(err => { this.$message.error(err.message); this.speed = this.train.speed; }).finally(() => { this.changeSpeedFlag = false; }); }, - adjustDirection(value) { - sandTableTrainControl(this.$route.query.group, { groupNumber: this.groupNumber, right: value === 'right', speed: this.speed }).then(resp => { - this.right = value === 'right'; + adjustDirection() { + sandTableTrainControl(this.$route.query.group, { groupNumber: this.groupNumber, right: !this.right, speed: this.speed }).then(resp => { + this.right = !this.right; }).catch(err => { this.$message.error(err.message); }); }, brakeTrain() {